Small Size of Recorded Neuronal Structures Confines the Accuracy in Direct Axonal Voltage Measurements

Abstract Patch-clamp instruments including amplifier circuits and pipettes affect the recorded voltage signals. We hypothesized that realistic and complete in silico representation of recording instruments together with detailed morphology and biophysics of small recorded structures will reveal signal distortions and provide a tool that predicts native, instrument-free electrical signals from distorted voltage recordings. Therefore, we built a model that was verified by small axonal recordings. The model accurately recreated actual action potential (AP) measurements with typical recording artefacts and predicted the native electrical behavior. The simulations verified that recording instruments substantially filter voltage recordings. Moreover, we revealed that instrumentation directly interferes with local signal generation depending on the size of the recorded structures, which complicates the interpretation of recordings from smaller structures, such as axons. However, our model offers a straightforward approach that predicts the native waveforms of fast voltage signals and the underlying conductances even from the smallest neuronal structures.


Introduction
Patch-clamp technique is affected by limitations that originate primarily from the physical properties of the recording pipettes (Hamill et al., 1981;Benndorf, 1995;Marty and Neher, 1995). Patch pipettes have significant resistance (R pip ) and their glass wall represent a substantial capacitive surface (C pip ) as well. Limitations can be reduced by optimizing the recording conditions (that is, with the reduction of the R pip and C pip ) and corrected by using compensatory mechanisms of the amplifiers. Under standard recording conditions in measurements from relatively large structures, such as neuronal somata, these optimizations and corrections can sufficiently reduce distortions to an acceptable level. Therefore, the difference between the recorded and native voltage signals are negligible during good current clamp (CC) conditions in most neuronal structures. However, the reduction of instrumental distortions could become inherently insufficient in cases where the recorded structures are small, such as most of the central synapses. Recording pipettes for small neuronal structures must have small tip, which inevitably results in larger R pip values that substantial filters the recorded signals (Benndorf, 1995;Ying et al., 2002;Novak et al., 2013). Consequently, the fast voltage signals such as the action potentials (APs) are particularly vulnerable to signal distortion associated with direct recordings in small axonal structures. The shape of axonal APs is a key determinant of neuronal signaling that affects neurotransmitter release and short-term dynamics in synaptic connections (Katz and Miledi, 1967;Borst and Sakmann, 1999;Geiger and Jonas, 2000;Bean, 2007;Kawaguchi and Sakaba, 2015;Chao and Yang, 2019;Zbili and Debanne, 2019). This synaptic activity generates dynamic changes in the postsynaptic membrane potential that would be translated into AP firing of the postsynaptic neuron (Koch and Segev, 2000;London and Häusser, 2005;Silver, 2010). Therefore, accurate measurement of the membrane voltage is essential to understand fundamental mechanisms of the neuronal information flow. Recent developments of the recording apparatus allows collecting voltage signals from the finest axonal structures (Novak et al., 2013;Kawaguchi and Sakaba, 2015;Rowan et al., 2016;Vivekananda et al., 2017;Ritzau-Jost et al., 2021). However, the interpretation of these signals are still limited because signal distortions caused by the recording pipette and amplifier circuits remains elusive (Ritzau-Jost et al., 2021). We reasoned that as computational modeling allows the precise reconstruction of the native electrical behavior of the most complex neuronal structures (Alle et al., 2009;Branco and Häusser, 2011;Jayant et al., 2017;Kwon et al., 2017;Beaulieu-Laroche and Harnett, 2018), it should be similarly possible to simulate the behavior of the recording instruments.
With this in mind, we built and tested a realistic model that considers not only the biological structures but also amplifier and pipette features. Using this complex model, we simulated actual recording conditions with the aim of subsequent recovery of undistorted (native) signals by removing instrumental contributions from the model. Thus, this complex model allowed the correction of the distortions caused by patch-clamp recording instruments and the prediction of isolated biological signals. We tested the model by predicting the native AP waveform of a directly recorded small axonal varicosity. Our simulations showed that recording instrumentation not only filters the signal, but it directly interferes with native signal generation in small neuronal structures.

Materials and Methods
Experimental procedures were made in accordance with the Institute of Experimental Medicine Animal Care Committee's regulations (MÁB-7/2016, PE/EA/ 48-2/2020).

Constraining the amplifier model The model cell
Electrical components of the customized model cell (test #3 circuit, modified type 1U, Molecular Devices) were connected through conductive metal slots taken from a circuit breadboard allowing the change of circuit components without the need for soldering that would introduce variable stray capacitance (Extended Data Fig. 1-1). We used non-inductive, low-noise resistors: resistors either originally present in the 1U model cell, 10 and 500 MX, or Ohmite SLIM-MOX10203 series, 20-100 MX. Stray capacitance of each element of the test circuits (including the resistors and their slots) was characterized in VC mode by measuring the capacitive load associated with the introduction of the given circuit element. All capacitors were considered ideal, that is, without any resistive component.

Boosting unit
We implemented a simplified boosting unit (Sigworth, 1995) in which capacitors were fixed (100 and 120 pF) while resistors were directly fitted to reproduce the capacitive current response in the test #1 configuration. Late phase of the response profile (starting 24 ms after the stimulus onset) has particular importance because artefacts in that temporal domain can contaminate measured biological signals, therefore, this part of the signal was heavily weighted (850Â) during the adjustment of the boosting unit.

VC capacitance compensation
Both CPf and CPs circuits were designed as described previously (Sigworth, 1995).

Stray capacitance of the CC circuit
To optimize the circuitry of CC model, we performed measurements with test #3 circuit, where pipette parameters (10 MV, 2.8 pF) and the size of the cell-equivalent resistor (500 MV) were fixed, only cellular capacitance varied from 0.75 to 46.7 pF. We applied short current stimuli (À50 to À200 pA, 3 ms) to elicit voltage responses with the maximal attainable capacitance neutralization (CPN) or without CPN. Traces recorded in the absence of CPN allowed us to characterize the total capacitive load of the CC circuitry. The model most accurately reproduced the real voltage responses when a 0.76 pF stray capacitance was added at the amplifier input node (Fig. 1, C CC ).

CPN
We implemented CPN in two steps. First, we added an idealized positive feedback loop, where the compensation through the C inj can be modulated with the gain of an operational amplifier. This simple circuit representation was sufficient to reproduce the neutralizing capability of the real amplifier, that is, equal CPN settings resulted in the same level of compensation in the model as in the real experiments. Next, we reproduced the characteristic CPN-related stimulus artefacts that are present in typical CC measurements. We placed a resistor (R CPN ) and an inductor (L CPN ) to the CPN path ( Fig. 1) and tuned their parameters by direct fitting of the model voltage responses to the experimental data (examples are shown in Fig. 2D).

Bridge balance (BB) compensation
To recreate the BB circuit, we created a reference signal from the command equivalent to the voltage drop caused by 1-MV load resistance (Fig. 1). Scaled version of that reference signal was then subtracted from the pipette voltage for the correction.

Bessel filters
We added filters to the amplifier model to match our actual biological recordings. We added an active linear filter consisting of two cascaded Sallen-Key filter stages (Fig.  1). Filter parameters were set according to an available filter design tool (https://tools.analog.com/en/filterwizard/) to produce output with four pole low-pass Bessel filter characteristics. All recordings were made with bypassed filtering mode, and we applied a 100-kHz lowpass filter throughout the simulations.

Pipette parameter measurements
We used typical borosilicate glass capillaries (BF150-75-10, Sutter Instruments) to fabricate pipettes that are suitable for recordings from small axons. To implement these high-impedance pipettes into the model we measured their actual parameters. First, we assessed the actual pipette capacitance as a function of the tip distance by dipping known part of the recording pipettes into the recording solution. Pipette position was measured by the x-axis values of the motorized micromanipulator (SM5 controller with Mini unit, Luigs und Neumann). First, we recorded the total capacitance of the instrumentation in open circuit VC mode when the pipette was out of the solution. Then, we gently moved the pipette to a position where the tip intermittently reached the surface of the fluid characterized by the appearance of short conductive periods in the recorded VC signal. Then, the pipette was pushed forward to the solution to reach a position where the conductive state became stable (typically ,5 mm forward movement). Starting from this tip position point, we systematically increased the length of the dipped part and quantified the capacitance in VC by integrating the first 50 ms of the transient response to a À20-mV voltage step. Integrated area was divided by the voltage step amplitude to convert the electric charge to capacitance.
To measure distribution of resistance along the pipettes, we broke off a known length of the pipette and measured the resistance of the remaining part in VC mode. First, we moved the pipette tip to a defined position under the objective and recorded its resistance. After withdrawal of the pipette, we broke the tip by gently touching it with a piece of lens cleaning tissue. The newly formed pipette tip was then positioned back to the reference position on the image. We determined the length of the broken pipette parts by reading the difference of the positioning motor. Resistance was measured in VC mode using À2to À20-mV steps. We repeated the breaking process for each pipettes several times (1-8Â, using 22 pipettes in total). . Implementation of individual amplifier components with realistic parameters. A, The stray capacitance (C stray ) associated with the current passing resistor (R f ) was predicted by simulating the voltage responses recorded in test #2 configuration. C stray acts as a capacitance neutralizing element in CC mode. Because the capacitance neutralizing effect of C stray depends on the load resistance (R load ) attached to the amplifier input (V CC ), we tested three scenarios using 20-, 50-, and 100-MX resistors. The left traces show measured voltage responses evoked by brief current injection in the presence of different R load . Idealized (i.e., C stray free) model responses are shown in the middle for comparison. Right, Model responses with 0.38 pF C stray replicated the observed amplifier behavior. B, C stray of R f slows down the current responses in the VC model (red trace, left panel). This effect is compensated in the actual amplifiers by using high-frequency boost circuit (HFB). The implementation of a HFB circuit in the model restored the response speed (red trace, right panel). C, Capacitance compensation in the VC model (red) faithfully replicates the magnitude and the time course of amplifier-generated compensatory currents (black, test circuit #1) for both the fast (CPf) and slow (CPs) compensations. D, Comparison of simulated (red) and recorded (black) voltage signals obtained with different capacitance neutralization (CPN) in CC mode from a small structure (middle panel) and from a large structure (left panel). Notice that the instrumental CC model faithfully replicates the neutralizing capability of the amplifier and the neutralization associated signal artefacts regardless of the applied CPN settings.

Research Article: New Research
We visualized the outer/inner diameter ratio (R OI ) of the recording pipettes using a grinding system that gradually cut them in half. This measurement allowed to avoid the optical distortions caused by the lens effect of the cylindrical glass. The recording pipettes (the first 8-12 mm from the tip) were embedded into epoxy resin on a microscope slide. Pipettes were longitudinally grinded with a coarse-grained aluminum-oxide abrasive disk (grit size = 600) until we reached the surface of the pipettes. Then, the grinding was occasionally interrupted to check the surface and cross-section of the pipette under a transmitted light microscope (Leica DM2500 microscope, 5-100Â magnifications). As the plane of the pipette tip was approached, we switched to fine-grained abrasive discs (grit size = 6000). The images obtained from different cross-section levels were then used to measure the pipette diameters (Adobe Photoshop 5.0). The diameter data were included only from those focal planes for distinct segments of the pipette tips, where the outer diameter was the largest and the relative wall thickness was the smallest. We assumed infinite pipette wall resistivity in the model.
To record from the individual small MF terminal, we searched for visually identifiable axonal structures under the guidance of the DIC optics in the stratum lucidum of the CA3 area, whose size was smaller than those of the typical large mossy fiber boutons. After the seal formation, we manually carefully compensated the C pip in VC mode. Compensated capacitive responses to À20-mV step command were then recorded and the average of 164 sweeps served as target for tuning the C pip in the model. After establishing the whole-cell configuration by applying sudden negative pressure, we switched to CC mode to record the passive and active membrane responses from the axon with different CPN compensation. All recordings were collected with a MultiClamp 700B amplifier (Molecular Devices) without filtering (filter bypassed) and digitized with Digidata1440 A/D board (Molecular Devices) at 250-kHz sampling rate using the pClamp10 software package (Molecular Devices). At the end of the experiment, we collected preliminary morphologic data by imaging the Alexa Fluor 594 signal with the confocal system. The obtained z stack image was then used to confirm the MF identity (evidenced by the presence of a large MF terminal along the recorded axon) and for the documentation of the recording position.

3D morphologic reconstruction
After the recording, slice was fixed overnight at 4°C in 0.1 mM phosphate buffer containing 2% PFA and 0.1% picric acid. The slice was then re-sectioned (to 60 mm) and the sections were incubated overnight with Alexa Fluor 594-conjugated streptavidin in 0.5% Triton X-100 and 2% normal horse serum to reveal the biocytin signal. To investigate the detailed morphology, the recorded axon was imaged with a confocal system (60Â objective, Plan Apo VC, NA = 1.45, Nikon C2, x-y pixel size: 0.08-0.1 mm, zstep: 0.1-0.15 mm). High-resolution reconstructions were done automatically by the Vaa3D software (Peng et al., 2010(Peng et al., , 2014a.

Implementation of the seal in the model
The seal was represented as a single resistor (R seal ) connected in parallel to the cell. To estimate the R seal in the axonal recording, first we calculated the ratio (R ratio ) between the cellular input resistance (R cell ) and the R seal based on the voltage shift produced by the shunt conductance of seal (Perkins, 2006): where V measured is the recorded voltage, V rest is the native resting membrane potential. R seal and R cell were then calculated from the measured input resistance (R in,measured ) and from the R ratio using the equations: where: The measured resting membrane potential of the recorded MF axon was À75.2 mV, close to the resting membrane potential previously reported for the somata and axons of granule cells (;À80 mV; Staley et al., 1992;Schmidt-Hieber et al., 2004;Ruiz et al., 2010;Brunner and Szabadics, 2016;Martinello et al., 2019). This moderate shift, caused by the leak through the seal, suggests orders of magnitude larger R seal compared with the axonal input resistance. Indeed, we calculated 65.64 GV R seal and 3.94-GV R cell for the recording assuming À80 mV resting membrane potential. Accordingly, we applied 65.64-GV R seal in the AP reconstitution model , while R seal was set to 50 GV in all other simulations. To compensate for the seal-induced depolarizing voltage shift, baseline membrane potential in the model was adjusted by constant current injection to match those of the experimental data.

General simulation parameters
Simulations were run on a custom workstation computer (i7-8700K CPU at 3.7 GHz) under Windows 10 Pro operating system, except for the AP fits. The parallelized codes for AP reconstitution were run on the Comet supercomputer through the Neuroscience Gateway portal (Sivagnanam et al., 2013). Cellular membrane parameters were assumed to be spatially uniform, unless stated otherwise. Potassium and sodium equilibrium potentials were set to À77 and 170 mV, respectively, and we assumed À80-mV reversal potential for the leak conductance in active models. Simulations ran with 4-and 0.5-ms temporal resolution, in CC mode and in VC mode, respectively. The instrumental and cellular parameter values used in different model configurations are summarized in Table 1.

Fitting procedures
We fitted the model responses to the experimental data to minimize the sum of squared error between them using the Brent's PRAXIS optimization algorithm embedded in NEURON. For C pip estimation, a 5-ms-long trace was considered with 2.5-ms baseline before the stimulus. For passive parameter estimations, we weighted the voltage response evoked by short current stimulus (25.8 ms from the stimulus onset, 3Â) to equalize the contribution of short and long pulse responses to the total error. For AP reconstruction, fitting interval started with 2.6-ms-long baseline period before the stimulus onset. The actual APs were weighted 8-fold, starting 0.5 ms before the peak. The optimization ended 1.5 ms following the AP peak to avoid the contamination of the parameter estimation with afterdepolarization related mechanisms not implicated in the model (Ohura and Kamiya, 2018;Martinello et al., 2019).
We used sodium and potassium conductance mechanisms with canonical Hodgkin-Huxley gating scheme, in which not only the density can be freely adjusted but also the kinetics and the voltage dependence of the two types of conductance. For this, we modified the built-in Hodgkin-Huxley mechanisms of NEURON by introducing rate-scaling factors (scNa and scK) to adjust the speed of model channel operation. The originally implemented temperature scaling was removed from the mechanisms. In addition, we used global voltage shifts (vsNa and vsK) to modulate the voltage dependence of the channels. Altogether, free parameters (g Na max, g K max, scNa, scK, vsNa, vsK) were constrained to obtain an ideal model of the AP waveform measured in our various experimental settings. Because the R access can change during the recordings, this parameter was set individually for each target trace. Optimization of the individual AP fits was initiated from four parameter sets that allows exploration of substantial part of the parameter space (Extended Data Fig. 4-2). To assess the quality of individual fits, their mean squared error was normalized to the baseline variance of the actual target trace. Of the results of the four parallel optimizations, the solution where the normalized error was the smallest was accepted as the best fit. Fit was rejected when the normalized error was larger than 10. Fitting of two of the original 90 target APs did not resulted in solutions, which met this criterion. These APs were excluded from the analysis (both were obtained with 7.386 pF CPN).

Assessments of the reliability of optimizations
In silico reconstruction of the complete experiment consisted of subsequent optimization steps (Extended Data Fig. 4-1A). First, we used VC data to set actual pipette parameters (1). After adding the model instrumentation and the detailed morphology of the recorded structure to the model, we tuned the passive cellular parameters together with the R access (2). Next, we equipped the model structure with active sodium and potassium conductances and adjusted their properties to match model responses the experimentally recorded AP waveform (3). Finally, having established the appropriate conductance sets, we obtained the native behavior of the axon (4). The reliability of the fitting procedures was tested with artificial traces with Gaussian noise.
To assess the accuracy of C tot estimation, we generated target traces by simulating on-cell VC experiments. The model always recovered correct C tot value (proportion of fitting estimations within 10% error to the correct value: 100%, n = 990 optimizations; Extended Data Fig. 4-1A,B) regardless to the C tot (5.8-13.7 pF) and noise level (SD = 0-35.3 pA) of the targets, which confirms the high sensitivity of VC based C pip estimation.
To test the reliability of cellular passive parameter and R access prediction, we created a hypothetical axon with biologically plausible diameter distribution (log-normal distribution with mean of 0.6 mm and variance of 0.4 mm 2 ). We attached the model axon to the pipette and generated hypothetical CC measurements with long and short current stimuli (C m range: 0.5-1.5 mF/cm 2 , R m range: 10-100 kV/cm 2 , R i range: 50-250 V*cm, R access : 50-400 MV, noise SD = 1.73 mV). We fitted these synthetic targets from a single initiation parameter set (C m : 1 mF/cm 2 , R m : 50 kV/cm 2 , R i : 150 V*cm, R access : 150 MV). 75% of optimizations resulted in acceptable results, that is, the fit error was ,10-times the baseline variance of its target. In those successfully fitted cases the predicted parameters were close to their predefined values (proportion of fitting estimations within 10% error to the correct value: C m : 90.83%, R m : 97.66%, R i : 81.88%, R access : 82.3% n = 469 optimizations; Extended Data Fig. 4-1C).
We also verified the reliability of the prediction of native AP shapes in independent simulations (Extended Data Fig. 4-1D,E). For this we generated AP waveforms using independent, sophisticated sodium and potassium conductance mechanisms using 8-state kinetic schemes obtained from (Schmidt-Hieber and Bischofberger, 2010;Hallermann et al., 2012) in a single compartment neuron (C m : 1 mF/cm 2 , R m : 10 kV/cm 2 , R i : 150 V*cm, diameter of the compartment: 15 mm). Channel densities and kinetics were systematically varied (g Na8st max range: 150-450 mS/cm 2 , g K8st max range: 250-850 mS/cm 2 , channel kinetics were scaled by a factor of 2-4) to generate diverse AP shapes (AP peak range: 19.28-65.82 mV, AP halfwidth range: 0.21-0.62 ms). We next simulated CC measurements with these conductance sets to generate noisy targets (R access = 100 MV, C pip = 6.74 pF, BB compensation = 100 MV, CPN compensation = 6.8 pF, R seal = 50 GV, added noise SD: 0.45 mV) for subsequent optimization. Our standard fitting routine reliably retrieved the native AP shapes.

Systematic errors in model predictions
We also examined the potential impact of systematic error sources on model predictions. Such potential error can originate from inaccuracies of the morphologic reconstruction. Post hoc anatomic processing can result in considerable tissue shrinkage. Additionally, diameter of thin axonal processes is close to the resolution limit of light microscopy. To evaluate the potential effects of inaccurate anatomic representation of the recorded axon caused by tissue shrinkage or imperfect optical resolution, we artificially altered the reconstructed morphologies and tested how the recovered native APs were affected. For testing the impact of inaccurate diameter estimation, axonal diameters were either homogeneously increased by 160 nm or reduced by 180 nm (axons were not allowed to shrink below 100 nm). In another control simulation we proportionally increased the axonal diameters by 30% to compensate for potential tissue shrinkage. As expected, recovered passive parameters and active conductance densities scaled with the diameter to compensate for the altered morphologic dimensions (Table 2). However, as the model re-adjusted the local electrical environment by scaling the membrane properties, the predicted intra-axonal and native AP waveforms remained remarkably similar despite the large changes in the morphology and passive membrane parameter.
R seal provides an additional error source because its calculation depends on the native resting membrane potential, which cannot be assessed directly (i.e., measurements start in cell attached mode). Therefore, we defined the theoretical lower limit for the R seal in the direct axonal recording; when native resting membrane potential equals with the potassium equilibrium potential (À93 mV with the solutions used in the experiment) R seal would be only 20.58 GV. Re-optimization of the model using this small R seal caused only minor alterations in the predicted conductances and AP parameters (reduced R seal model; Table 2). Altogether, these control simulations suggest that potential systematic errors have marginal impact on the primary results of the manuscript.
Simulations to explore the correlations between signal distortions and recording conditions (Fig. 7) We used a single-compartment neuron in these simulations (C m : 1 mF/cm 2 , R m : 20 kV/cm 2 , g Na max: 150 mS/ cm 2 , g K max: 40 mS/cm 2 ). Surface area of the compartment was set to 100 mm 2 or 1000 mm 2 , to model a small Testing reliability of C tot estimation (Extended Data Fig. 4-1B) 5.8-13.7 n/a. *3 50 n/a. *3 n/a. *3 n/a. *3 n/a. *3 n/a. *3 n/a. *3 n/a. *3 n/a. *3 Testing reliability of cellular passive parameter and Raccess prediction (Extended Data Fig. 4 median of the predicted maximal conductance densities for the reconstruction of APs generated with independent conductance mechanisms. Research Article: New Research neuronal structure with 1-pF total capacitance or a larger cell with 10-pF total capacitance, respectively. To keep the seal-induced signal distortion constant in the two conditions, R seal was reduced to 5 GV, for the large cell, which results in similar R seal /R cell ratio as for the small structure. The total instrumental capacitance was fixed to 6.74 pF, while R access was systematically varied in the range of 1-200 MV. To mimic optimal recording configuration, the applied CPN settings (6.8 pF) closely matched with C tot . APs were elicited with 3-ms-long current stimuli (30 and 160 pA for small and larger cell, respectively).
Simulations to explore the correlations between signal distortions and axonal morphology (Fig. 8) The detailed morphology of a somatically labeled granule cell was imported to the NEURON. Dendritic spines were implemented by scaling 2-fold the C m and the leak conductance in dendrites. Passive parameters (R i : 150 V*cm, C m : 1 mF/cm 2 , R m : 50 kV/cm 2 ) were constant otherwise. Active conductances (g Na density = 300 mS/cm 2 , g K density = 15 mS/cm 2 ) were homogenously distributed along the cell, except the initial part of the axon where we applied higher channel densities (g Na density = 1200 mS/ cm 2 , g K density = 75 mS/cm 2 ) with left-shifted activation and inactivation (10 mV in the hyperpolarized direction). To explore the distortions in axonal AP recordings, position of recording electrode (C tot = 6.74 pF, R access = 60 MV, R seal = 50 GV, applied CPN = 6.8 pF) was systematically changed along the main axon (n = 942 recording positions). APs were evoked by 3-ms-long current stimuli at each recording position. Amplitude of the injected current was automatically adjusted to evoke APs ;1.5 ms (1.33 6 0.01 ms delay, n = 942 APs) after stimulus onset. Local capacitance was determined for each recording position using idealized VC simulations in the absence of experimental instrumentation (built-in SEClamp mechanism with 10-MV series resistance). For quantification, we integrated the first 100 ms of the transient capacitive response to À20-mV voltage step. The resulted charge was divided by the voltage step amplitude.

Data analysis and statistics
AP threshold was determined as membrane voltage where depolarization rate exceeded 20 mV/ms. AP amplitude was calculated as the voltage difference between the absolute peak potential and the threshold. AP halfwidth was defined as the spike duration at half of its amplitude. AP conduction velocity was determined by measuring the temporal difference between AP peaks at the initiation and at the recording site.

Code accessibility
The relevant NEURON codes described in the paper are freely available online at https://github.com/ brunnerjanos/amplifier-model or can be downloaded from the ModelDB (http://modeldb.yale.edu; accession number: 267063). This NEURON codes are also available as Extended Data 1.

In silico implementation of amplifier features
We developed and validated a realistic amplifier model working both in voltage clamp (VC) and in current clamp (CC) mode using the NEURON simulation environment (Hines and Carnevale, 1997). The model needed to be suitable for both VC and CC modes, because instrumental compensations are typically determined in VC mode during seal formations and these settings are implemented for CC during voltage signals recordings. For precise implementation of the components of the amplifier circuit, we examined their capacitive and resistive properties using three test configurations (Extended Data Fig. 1-1). The first test configuration was the isolated headstage in open circuit (test #1), which allowed the characterization of the high-frequency boost unit (see below) and the capacitance compensation of the VC circuitry. Since open circuit measurements are not possible in CC mode, the circuit was closed via known resistors in the second test configuration (test #2). This configuration allowed the estimation of stray capacitance associated with the feedback resistor. The third test circuit was a modified model cell (test #3, type 1U, Molecular Devices), which represents whole-cell recording conditions as it includes an idealized cell and recording pipette with their resistive and capacitive components. In order to explore an extended range of signal processing capacity of the amplifier, model cell components were varied using custom capacitors and resistors. This test configuration allowed us to investigate the features of the CPN of the CC circuitry.
We used idealized circuits for model amplifier construction to start with, namely, a resistive feedback circuit (current-to-voltage converter) for the VC and a voltage follower circuit (a unity gain voltage buffer) with idealized current source for the CC (Wilson and Park, 1989;Sigworth, 1995;Sherman-Gold, 2012; Fig. 1). Operation of combined VC and CC amplifiers requires a capacitor (C inj ) for current injection in both VC and CC modes and a resistor (R f ) used as current generator in CC and as feedback resistor in VC (Strickholm, 1995; Fig. 1). To create realistic amplifier model, we first measured amplifier responses using the three test circuits, which were subsequently simulated allowing individual tuning of elementary circuit parameters. First, we measured C inj , assuming that the total capacitive load present in the isolated VC circuit (test #1) corresponds to the injector capacitor. By recording voltage-step-evoked capacitive current responses in open circuit configuration, we determined that the total capacitive load is 1.615 pF in our amplifier (MultiClamp700B). As virtually all real resistors, R f has a certain amount of parasitic capacitance (C stray ) which affects the performance characteristics of the amplifier. We next determined the size of this parasitic capacitance. In CC mode, the C stray connected in parallel with the R f (Fig. 1, ISOURCE circuit) acts as a capacitance-neutralizing element. However, this neutralizing effect appears only when the input load is considerably smaller than the R f which was set to 500 MV in the real amplifier ( Fig. 2A, left traces). To characterize the size of C stray associated with the R f , we adjusted the C stray in the model to reproduce the evoked voltage responses recorded with the amplifier in test #2 configuration with 20-, 50-, and 100-MV input loads ( Fig. 2A, right traces). These simulations revealed 0.38 pF C stray , thus we used this value in the model.
Next, we added the remaining amplifier components to the model one-by-one. First, we focused on the VC operations whose speed depends on a dedicated high-frequency boost circuit (Sigworth, 1995). Amplifiers are built with this compensation mechanism because C stray substantially reduces the output bandwidth of the feedback circuit in VC mode (time constant of the capacitive relaxation with the previously determined 0.38 pF C stray : 191.92 ms; Fig. 2B, left). We added a simplified boosting unit tuned to accelerate model responses to the experimentally observed amplifier speed (3.85 vs 3.19 ms, real vs boosted model; Figs. 1, 2B, right). Next, we implemented two pipette capacitance compensation circuits in the VC model. Fast capacitance compensation (CPf, 0-16 pF, 0.5-1.8 ms) cancels the majority of C pip -induced current transients, while the slow capacitance compensation (CPs, 0-3 pF, 10-4000 ms) reduces the slower instrumental capacitive components (Sigworth, 1995; not equivalent to whole-cell compensation that was not implemented in this model; Figs. 1, 2C).
We also implemented two compensatory mechanisms for the CC mode, namely the CPN and the BB compensation (Fig. 1). The CPN circuit is a positive feedback loop that feeds the pipette voltage back to the input through the C inj to discharge the pipette capacitance (Wilson and Park, 1989;Sherman-Gold, 2012). Because of this positive feedback, the recordings are prone to oscillate as CPN level approaches a fully compensated state. Such evolving oscillation carry information about the intrinsic behavior of the CPN circuit. Therefore, the oscillating signal (dampening and frequency profile) can be employed for determining a minimal set of passive circuit elements necessary the re-create the CPN behavior. Specifically, we measured the maximal possible CPN where the recording is still stable using test #3 circuit. Pipette parameters (10 MV, 2.8 pF) and the cell-equivalent resistor (500 MV) was fixed and only the capacitance of the cell was varied from 0.75 to 46.7 pF. The model reproduced the recorded signal artefacts when a resistor (1.49 MV) and an inductor (18.3 H) was incorporated to the CPN circuit in series with the C inj (Figs. 1, 2D). Amplifiers are typically supplied with BB compensatory mechanism to eliminate the voltage drop across the access resistance (Araki and Otani, 1955;Sherman-Gold, 2012). In the model, we subtracted a scaled version of the command signal from the recorded voltage (Fig. 1). We also extended our model with a four-pole low-pass Bessel filter unit with adjustable cutoff frequencies from 0.5 to 100 kHz (Fig. 1).
Altogether, by using a measurement-based approach we created an amplifier model, in which both the VC and CC operation and their specific compensatory capabilities show realistic behavior.

Pipette implementation considers the observed nonuniform C pip and R pip distributions
Next, we focused on the accurate implementation of patch pipettes. To properly characterize the distribution of resistance along patch pipettes that are suitable for recordings from small axons, we repeatedly broke small pieces from the end of the pipettes and determined the resistance as a function of tip distance (n = 55 resistance measurements; Fig. 3A). In agreement with the theoretical considerations (Benndorf, 1995;Ying et al., 2002), we found that pipette resistance drops sharply after the tip, falling below 1 MV within the first millimeter (R pip declines from the tip with length constant of 208 6 40 mm and fall below 1 MX at 703-mm tip distance, exponential fit of the data shown in Fig. 3A; R 2 = 0.86, n = 55 resistance measurements; R pip = 0.33 6 0.18 MX for measurements with tip distance over 1 mm, n = 20 measurements). To determine the capacitance distribution of our pipettes we systematically varied the immersed length of the pipettes in the recording solution and measured the capacitance, which corresponds to the cumulative capacitance of the dipped part (Cornwall and Thomas, 1981; n = 656 capacitance measurements; Fig. 3A). The cumulative capacitance increased within the first 3 mm from the tip, whereas the remaining part of the pipette had only moderate contribution to the total capacitance suggesting inhomogeneous capacitance distribution along pipettes (0.03 6 0.01, 0.48 6 0.02, 2.52 6 0.05, and 3.1 6 0.04 pF at 0.1-, 0.7-, 3-, and 7-mm tip distances, respectively, n = 39, 39, 40, and 38 measurements; Fig. 3A). A key parameter that defines the pipette capacitance is the ratio of the outer and inner pipette diameters (R OI ; Cornwall and Thomas, 1981;Benndorf, 1995). One potential explanation for the inhomogeneous capacitance distribution is Figure 3. Implementation of pipettes with non-uniform C pip and R pip distributions. A, Pooled data of R pip (left graph) and C pip (right graph) as a function of tip distance. B, A representative imaging plane that was used for the measurement of the relative wall-thickness (R OI ) that is, the ratio of outer and inner diameter (o.d. and i.d., respectively) of the pipettes. Scale bar: 0.5 mm. Graph on the right shows that the wall of the pipettes is much thinner toward the tips (i.e., the i.d. is larger than predicted from the R oi of the original glass; the four measured pipettes are shown in different shades of purple). C, Pipettes were implemented as 10 independent RC units, a resistor (R tip , on the left) and a capacitor (C base , on the right). The two latter components allow the adjustment of the model to fit the differences of R pip and C pip of individual pipettes. Graph on the right indicates the actual capacitance (purple) and resistance (green) values of the 10 fixed RC motifs. that the R OI is not constant along the pipette but it decreases toward the tip. To test this possibility and verify the predictions of the capacitance distribution measurement, we directly measured the R OI of the recording pipettes. In order to precisely measure the edge of the pipette walls and avoid optical distortions by the curved glass walls, we carefully split the pipettes using a custombuilt grinding system and measured their inner and outer diameters along the longitudinal axis ( Fig. 3B; for details, see Materials and Methods). Consistent with the dipping measurements, R OI decreased toward the tip (R OI ,2 mm = 1.6 6 0.02 vs R OI .5 mm = 2.04 6 0.02, n = 4 pipettes) explaining the larger contribution of the tip region to the total pipette capacitance.
Based on these measurements, we created the skeleton of a "prototypical" patch pipette model from 10 RC units to consider the inhomogeneous distribution of capacitance and resistance (Fig. 3C). Model pipette parameters (R pip and C pip ) can be adjusted using an additional resistor and capacitor to account for variability across individual pipettes. Since the bulk of pipette capacitance is spatially separated from the pipette resistance and because these pipettes have similar a shape, we placed the tunable resistor to the tip and the capacitor to the back of the pipette model (R tip and C base ; Fig. 3C).

Reconstitution of the native electrical behavior of a small axon
To test the efficacy of the complex instrumental model in predicting undisturbed fast neuronal membrane responses from distorted recordings, we used patch-clamp data from a small (,1 mm) en passant axonal varicosity of an identified hippocampal mossy fiber axon (MF; Fig. 4A). Recordings from submicronsized neuronal structures are supposedly substantially distorted as they can be patched only with high access resistance and their capacitance is in the range of the remaining uncompensated instrumental capacitance.
The experimental conditions needed to be realistically modeled, including the precise morphology and electrical properties of the biological structure and the instrumental conditions (Extended Data Fig. 4-1; for details, see Materials and Methods). First, we characterized the total instrumental capacitance (C tot , the sum of all amplifier-related, holder-related, and pipette-related capacitances) present in the actual recording (C tot : 7.097 pF from which 3.23 pF is the C pip and 2 pF is the capacitance of the pipette holder; Fig. 4A). Target trace for this estimation was recorded using both fast and slow pipette capacitance compensation of the amplifier with the highest frequency resolution (output filter was bypassed) and we set the model accordingly.
Next, we precisely reconstructed the morphology of the biocytin-labeled and fluorescently recovered MF axon because signal propagation strongly depends on the length, diameter and their inhomogeneties of the biological structures (Goldstein and Rall, 1974;Manor et al., 1991;Fig. 4B). As it is characteristic for hippocampal mossy fibers the 519-mm-long reconstruction of the recorded MF included large (.3 mm) terminals, filopodial extensions and small (,1.5 mm) en passant varicosities within the stratum lucidum of the CA3 area (Acsády et al., 1998;Rollenhagen et al., 2007).
We next determined the cable properties: specific membrane resistance (R m ), membrane capacitance (C m ), and intracellular resistivity (R i ) of the particular axon. For this, we optimized the model to the experimentally recorded voltage responses evoked by short and long current stimuli (Fig. 4C; Roth and Häusser, 2001;Schmidt-Hieber et al., 2007;Nörenberg et al., 2010;Szoboszlay et al., 2016). The advantages of the complex (instrumental 1 biological) model became obvious in these fittings. Pipette artefacts can markedly contaminate the onset of the evoked responses on current injection (Major et al., 1994). The incorporation of the complete experimental instrument to the model precisely reproduced these stimulus artefacts, therefore, allowing us to isolate biological contributions and obtain the passive cellular parameters. The predicted cellular parameters (R m = 60.01 kV/cm 2 , a C m = 0.65 mF/cm À2 , and R i = 147.3 V*cm) match with the data reported for MFs using recordings from large terminals (Hallermann et al., 2003). It is important to note that the similarities of the simulated and recorded fast voltage transients further verify our complex model.
Next, we simulated the active ionic mechanisms underlying the recorded AP waveforms. APs were evoked with brief current stimuli (3 ms, 86 pA; Fig. 4D,E). To simulate APs we tuned Hodgkin-Huxley-type sodium and potassium conductances (Hodgkin and Huxley, 1952; modified version of the built-in mechanism in the NEURON simulation environment). Optimization of the density, kinetics and voltage dependence resulted in AP waveforms closely matching to the recorded ones (absolute AP peak: 9.01 6 0.12 vs 9.28 6 0.12 mV, AP half-width: 0.52 6 0.002 vs 0.52 6 0.002 ms, AP threshold: À45.28 6 0.07 vs À44.27 6 0.16 mV, maximum rate of rise: 363.26 6 0.93 vs 355.23 6 9.39 V/s, simulated vs recorded APs, respectively, n = 30 APs; Fig. 4D). This suggest that the complex instrumental model in combination with traditional conductance functions is sufficient to reconstruct the recorded AP waveforms from potentially distorted recordings. Importantly, although each of the target APs was fitted independently, the optimal model conductance parameters were confined to a narrow range within the parameter space (coefficient of variation = 3% for both the Na 1 and K 1 conductance predictions, maximal g Na density: 151.7 6 0.95 mS/cm 2 , maximal g K density: 5.41 6 0.03 mS/cm 2 , n = 30; Fig. 4E) indicating that the optimization provided a unique solution for the experimental data. Analysis of the error between the fit and its target data in different Na 1 and K 1 conductance combinations also revealed a single minimum that coincided with the best fit parameter combinations (Extended Data Fig. 4-2). Furthermore, the optimal conductance parameters (i.e., their maximal conductance levels, their voltage dependence, and their activation and inactivation time constants), as well as the resulted ionic currents, are similar to previously described mechanisms underlying cortical axonal APs at near-physiological temperature (Geiger and Jonas, 2000;Alle et al., 2009Alle et al., , 2011Schmidt-Hieber and Bischofberger, 2010;Hallermann et al., 2012;Hu and Jonas, 2014;Engel and Jonas, 2005;Fig. 4E,F), confirming the validity of our AP-reconstitution approach.
The relatively high series resistance (R access ) in the recording (modeled R access : 53.2 6 1.02 MV in the AP reconstitution simulations) can result in significant pipette filtering. The complex model, however, allowed us to investigate not only the APs recorded through the pipette but also the local spike that occurred within the axon while it was patched (Fig. 4G). These local APs are not affected by the filtering effect caused by the pipette, so we could directly quantify filtering effects by comparing the local and recorded axonal AP waveforms (Fig. 4H). A, Current responses to À20-mV voltage steps recorded from the axonal membrane in on-cell mode (black) and in the model with 7.097 pF (red) and 7.347 pF (gray) C tot . Notice the sensitivity of simulated responses to small differences in the instrumental capacitance applied in the model. B, Confocal z-stack images show the recorded axon at the end of the experiment (left) and after the anatomic recovery (right). Bottom, Part of the reconstructed morphology. Asterisk marks the recording position. Scale bars: 10 mm. C, Voltage responses in the recorded axon (black) and in the passive cable model with the added instrument (red) to short (3 ms, À50 pA) and long (250 ms, À2.5 pA) current stimuli. The short pulse is shown at an expanded timescale on the right. D, Recorded (black) and simulated APs (red) evoked by brief (3 ms, 86 pA) current stimuli. APs were simulated in the complex model that included the instrument, the passive cable and Hodgkin-Huxley type sodium and potassium conductances. To evaluate the reliability of the optimization, see Extended Data Figures 4-1, 4-2. E, left, Distribution of optimal maximal Na 1 (g Na max) and K 1 (g K max) conductance densities obtained from 30 recorded and independently fitted APs. Right, Averaged gating properties and voltage dependence of the conductances that were resulted in by the fits that recreated the recorded APs. F, Simulated AP waveform (top) with the underlying conductances (middle, g Na and g K ) and the modeled ionic currents (bottom, I Na and I K ). G, The simulations with the confirmed conductance sets allowed to see the waveforms of the same APs not only within the pipette (red, corresponding to measured APs) but also the simultaneous AP waveforms within the axon (orange, corresponding to local APs) and, after the removal of the recording instrument from the model, the native, undisturbed AP waveforms (green). H, Differences in waveform parameters of measured, local and native APs. Individual points show the peak, threshold, maximum rate of the rise (dV/dt max ) and half-width of 30 independently simulated APs in the three points of view. Horizontal black lines indicate mean values.
Because of the filtering, local spikes had larger peak amplitudes and faster time course than the recorded APs (absolute peak: 21.96 6 0.12 vs 9.01 6 0.12 mV, local vs measured AP, respectively, n = 30 APs, half-width: 0.48 6 0.002 vs 0.52 6 0.002 ms, local vs measured AP, respectively, n = 30 APs; Fig. 4H). As expected, the maximal rate of rise (dV/dt max ) during the upstroke of spikes was the most different between local and measured APs as it is the most sensitive to low-pass filtering introduced by the pipette (453.11 6 2.54 vs 363.26 6 0.93 V/s, local vs measured AP, respectively, n = 30 APs; Fig. 4H). Altogether, these observations are in agreement with the expected filtering, which affects fast signals, such as the axonal APs more prominently.
We next investigated the native AP parameters predicted by the model. In this arrangement, we run the modeled biological structure with the reconstructed model conductances but the recording instruments was removed (Fig. 4G,H). Thus, we predict how the native APs would look if the recording instrument was not present. We found that the native APs reached more depolarized peak potential (46.85 6 0.09 mV, p ( 0.0001, paired sample t test; n = 30 APs) and were significantly faster (half-width: 0.33 6 0.002 ms, p ( 0.0001, paired sample t test; dV/dt max : 1064.81 6 5.1 V/s, p ( 0.0001, paired sample t test, n = 30 APs) compared with the local spikes modeled with the experimental rig.
Altogether, these results show that it is possible to obtain the native and local AP properties and the plausible underlying mechanisms using a complex instrumental model.

Modeling the recording instruments accurately predicts signal distortions and native AP shapes
We used additional experiments to verify the reliability and plausibility of the model predictions. Specifically, we recorded APs with three different CPN settings from the same axon and tested whether it alters the output of the model (CPN = 6.5, 7, and 7.386 pF; Fig. 5A). Suboptimal CPN conditions affects the recorded signal in several ways (Extended Data Fig. 5-1). The simulations reproduced the recorded APs with different level of distortions when the CPN in the model was adjusted accordingly (Fig. 5A). In addition, the predicted underlying sodium and potassium conductances were also very similar (g Na density: 159.02 6 1.73, 151.7 6 0.95, and 160.03 6 1.47 mS/ cm 2 , g K density: 5.83 6 0.05, 5.41 6 0.03, and 6.32 6 0.09 mS/cm 2 ; n = 30, n = 30, and n = 28 for CPN = 6.5 pF APs, CPN = 7 pF APs, and CPN = 7.386 pF APs, respectively; Fig. 5B; Extended Data Fig. 5-2). Importantly, not only the predicted AP shapes matched but the native APs were also similar despite of the different levels of distortions in the three independent original recording conditions (absolute AP peak: 42.98 6 0.17, 46.85 6 0.09, and 47.24 6 0.14 mV, AP half- Figure 5. APs recorded and simulated from the same axon under different instrumental distortions predicted similar native spike shapes. A, Representative target APs (black) and their best-fit representations in the complex instrument1axon model with standard CPN settings (red, 7 pF), with slightly reduced CPN (purple, 6.5 pF) or with the highest attainable CPN level (blue, 7.386 pF). The parameters of the APs recorded with different CPN settings are shown in the Extended Data Figure 5-1. B, The best-fit g Na max and g K max were similar from APs with different CPN levels (n = 30, 30, and 28 target APs). The voltage dependence and the kinetic profile of the optimal conductance sets are presented in the Extended Data Figure 5-2. C, The native AP waveforms retrieved from APs with different CPN levels were also similar. D, Peak, maximal dV/dt and half-width of the native APs predicted based on recordings with three different CPN settings. Columns show the averages of the native APs, while X denotes the averages of the experimentally measured parameters (n = 30, 30, and 28 APs) which were distorted by the instruments.
width: 0.31 6 0.003, 0.33 6 0.002, and 0.34 6 0.003 ms; n = 30, n = 30, n = 28 for CPN = 6.5 pF APs, CPN = 7 pF APs, and CPN = 7.386 pF APs, respectively; Fig. 5C,D). For an additional verification, we tested whether the model provides consistent predictions of AP propagation across conductance sets derived from different recording configurations. Specifically, we simulated the natural AP conduction of distally evoked APs to the original recording site (423 mm away; Fig. 6A) and measured the speed of propagation and the shape of the incoming APs. The incoming propagating APs were similar (absolute AP peak: 61.73 6 0.13, 64.22 6 0.07, and 65.48 6 0.08 mV, AP width at À10 mV: 0.34 6 0.003, 0.36 6 0.002, and 0.33 6 0.002 ms; n = 30, n = 30, n = 28 for CPN = 6.5 pF APs, CPN = 7 pF APs, and CPN = 7.386 pF APs, respectively; Fig. 6). The prediction of AP propagation velocity is particularly sensitive to model parametrization as the speed of axonal spike propagation strongly depends both on the morphologic properties of the axon and the specific passive and active mechanisms of the axonal membrane. Consistent with previous measurements in hippocampal MFs (Kress et al., 2008;Alle et al., 2009), all model configuration predicted similar propagation speed (0.46 6 0.002, 0.45 6 0.001, and 0.47 6 0.002 m s À1 ; Fig. 6B).
Taken together, these results confirm that complete representation of the recording instruments in a model is sufficient for generating plausible native signals and underlying membrane mechanisms from signals that are distorted by the recording apparatus.
Instrumental and structural parameters jointly define signal distortion in recordings from small neuronal structures In addition to providing a useful tool for predicting and correcting instrumental distortions our simulations confirmed that complete elimination of the instrumental disturbance was not possible during recordings (Ritzau-Jost et al., 2021), since substantial difference persists between the measured and native APs, even when the capacitance compensation reached the maximally attainable level (see Fig. 5C). The model raised the possibility that inadequate local signal generation also significantly contribute to the alterations in AP shapes in addition to filtering that affects recordings through patch pipettes. We refer to this effect as observer effect based on the analogy with the concept introduced in the field of physics for situations where the measurement inevitably changes the measured parameter. The observer effect can be quantified as the difference between local APs (signals in the structure when pipette is present) and native APs (signals without the presence of any instrument; Fig. 4G,H). We quantified the relative contribution of filtering and observer effects to the total instrumental distortion in different experimental situations. Figure 6. Characteristics of propagating native APs. A, The reconstructed and simulated axonal structure with the position at which native AP parameters were captured (indicated with asterisk) after distal AP initiation (stimulation site) in individual models that were optimized for different recording conditions. Left, 88 original AP recordings that were used for the AP optimization in the models and recorded individually with three different CPN settings (n = 30, 30, and 28 with 6.5, 7, and 7.386 pF CPN, respectively). The retrieved conductance sets were applied to the complete axon individually in all 88 cases. The right panel shows the 88 native, propagating simulated APs at the indicated distal point along the axon. The color is as for the measured APs on the left. A simulated AP at the stimulation site is shown in gray. B, Peak, width at À10 mV and propagation velocity of the distally initiated propagating APs retrieved from 88 individual simulations. Note that conventional AP half-width measurements cannot be applied for propagating APs because of the altered apparent threshold.
Specifically, we varied pipette parameters, compensation settings and the size of the recorded cell (the size of the model neuron was adjusted to match 1-and 10-pF total capacitance, representing an axon or small caliber dendrite and a small cell body, respectively) in a reduced model which included only a single neuronal compartment with the instrumentation and compared the half-widths of APs (Fig. 7).
First, we isolated the filter effect by comparing simultaneous AP signals in the pipette and in the cell (measured vs local AP). In accordance with the general notion, high R access significantly filters fast voltage transients and Figure 7. Instrumental and structural parameters cooperatively determine signal distortions in recordings from small neuronal structures. A, On the left, the differences between the waveforms of the same APs within the pipette (measured) and in the two hypothetical cells (local) highlight the filtering effect of 60-MX R access . Only the size of the membrane surface was different in the two spherical structures, resulting in 1-and 10-pF biological capacitance, which correspond to small axonal and small somatic recordings. Graph in the middle summarizes the filtering effect quantified as the difference in AP half-width over a wide range of R access in the small and large spherical cells. The right graph summarizes the filtering effect in simulations where suboptimal CPN was applied (6.3 pF instead of 6.8 pF). The effect of filtering on the AP amplitude is shown in Extended Data Figure 7-1A. B, Using the same simulation environment as in panel A, the observer effect was quantified as the difference between the local AP and the native AP waveform. Thus, these data represent the isolated influence of the instrument on local signal generation. See also Extended Data Figure 7-1B. C, To quantify the measurement error, we demonstrate the difference between the measured AP and the native AP waveform in the same conditions as above. Thus, this is the sum of the filtering and observer effects. See also Extended Data allows faithful measurement only in a confined R access range (R access that causes 10% AP signal widening: 44 MV for small cell and 40 MV in case of larger cell; Fig. 7A, left). Furthermore, when uncompensated capacitance was added to the circuit by reducing the applied CPN (À0.5 pF), the recording became more vulnerable and reliable recordings needed better R access (R access with 10% distortion: 20 MV for small cell and 17 MV in case of larger cell; Fig. 7A, right).
Next, we isolated the observer effect by comparing the local and native AP shapes with or without the presence of the recording instrument (Fig. 7B). The observer effect was always negligible in the case of the larger simulated biological structure as the capacitance added by the pipette was insignificant compared with the cellular parameters. In contrast, when the structure was smaller the structure had to discharge the remaining instrumental capacitance, which was in this case in the range of C cell , resulting in significant observer effect on the recorded AP shape (Fig. 7B). Consistent with this hypothesis, observer effect was larger in simulations with additional uncompensated C pip (mean change in AP half-width in the R access range of 1-50 MX: 29.72 6 0.23% vs 38.66 6 1.12%, optimal CPN vs CPN with 0.5 pF uncompensated C pip , respectively; Fig. 7B). Intriguingly, the observer effect showed a reversed dependence on the R access . It was the most pronounced when R access was low. The larger R access presumably isolates the residual instrumental capacitance from the cell and consequently weakens the instrumental impact.
Finally, by comparing the measured and native signals we assessed the overall measurement error. In case of the larger simulated structure, the overall measurement error is dominated by the filtering effect (Fig. 7C). In contrast, when C cell is small, the observer effect contributes significantly to the total error. Interestingly, the complementary changes in the two effects make these recordings less sensitive to changes of R access and the error is similar when the R access is low or high (Fig. 7C, left). The results confirm that residual uncompensated pipette capacitance further deteriorate the difference between native and measured AP signals (Fig. 7C, left). Similar conclusions can be drawn regarding other AP parameters as well (Extended Data Fig. 7-1). Altogether, these model simulations demonstrated that measurement errors in patch-clamp recordings depend not purely on the pipette parameters but the size of the recorded structure itself has influence on the signal distortion.
Finally, to confirm the above findings on the error sources in a native biophysical structure we repeated the above tests in a reconstructed MF that was labeled during somatic recording that ensured more intact axonal arborization (Fig. 8A). In this case the simulations ran with fixed instrumental parameters (6.74 pF C tot and 60 MV R access , with 6.8 pF CPN and 60 MV BB correction; Fig. 8A-C). We evoked APs along the axon and compared the pipette-measured, local and native AP waveforms to determine the contribution of the observer and filtering effects to the instrumental signal distortion and their dependence on the local biophysical environment (Fig. 8A-C). In agreement with the single compartment simulations (Fig. 7), observer effect had a major contribution to the overall measurement error (change in AP half-width: 7.02 6 1.02%, 34.03 6 4.59%, and 43.26 6 4.51% for pipette filtering, for observer effect, and for total measurement error, respectively, n = 941 locations; Fig.  8A-C). As it is expected from the fixed instrumental parameters, pipette filtering was similar in small and large diameter sections of the axon. In contrast, the size of the observer effect was much larger in smaller axonal structures. Consequently, the measurement error was also the largest in the smallest diameter sections (Fig. 8B). Importantly, minima in observer effect coincide with larger local capacitance, which originate from the large mossy fiber boutons in the CA3 area and branching points in the hilus. Indeed, the overall measurement error showed similar inverse correlation to local capacitance (R 2 = 0.68, power) as the observer effect (R 2 = 0.75, power) while the pipette filtering was structure-independent ( Fig. 8D-F). These findings confirm that measurement error critically depends on the local biophysical environment.

Discussion
Here, we developed a measurement-based, highly realistic model representation of the recording instrument that faithfully replicates actual patch-clamp recordings when combined with the detailed morphologic reconstruction of the recorded structure. Simulation of the complete experimental condition allows for eliminating the instrumental distortions that are inevitably contaminates signals from small neuronal processes, such as axons. This realistic model also enabled us to determine the extent and sources of perturbations that contaminate electrophysiological signals. The results showed that physical parameters of the measuring instrument and the local biophysical properties of the recorded structure and their quantifiable interactions define the errors in voltage measurements. Consequently, signal deterioration potentially arises from the altered local signal generation instead of pipette filtering in small axonal recordings.
The core hypothesis behind our study is that realistic in silico representation of recording instruments together with the detailed morphology and biophysics of the recorded structure provide a better understanding of signal distortions present in direct voltage recordings and offers an applicable offline approach to predict native signals from distorted recordings. The combined simulation of the experimental conditions and the morphology was proved previously to be an ideal tool to describe technical limitations associated with VC measurements and to correct the recorded signals from those distortions (Silver et al., 1992;Spruston et al., 1993;Major et al., 1994;Schaefer et al., 2003;Beaulieu-Laroche and Harnett, 2018). However, these simulations have not included the complete recording instruments, which are known to impose significant distortions on the recorded signals, especially when the biological source is physically small, such as small axons. Other efforts corrected distortions of measured voltage signals by estimating the transfer Figure 8. Measurement error along the axon is inhomogeneous and depends on the local biophysical environment. A, Morphology of a somatically labeled complete granule cell that was used for simulating hypothetical recordings along its axon. B, top, Observer and filtering effects (dark blue and light blue, respectively) together with the overall measurement error (brown) in simulated axonal measurements plotted against the somatic distance of the recording position. Each value represent average of five individual measurements in each 10-mm segments. Bottom, Axonal diameter (gray) and local capacitance (black) as a function of somatic distance. Vertical bars indicate the branch points of hilar axon collaterals. Notice that signals that derive from axonal segments that are closer to the soma are less affected by the observer effect because of the capacitive "load" of the somatic membrane. C, Representative simulated recordings from the soma and different axonal sites and confocal images of the simulated recording site (same cell as in panel A). Corresponding somatic distances and local capacitances are indicated on the top. Asterisks mark the recording positions in the simulations. Scale bar: 10 mm. D, The filtering effect showed only weak correlation with the local axonal capacitance (n = 941 functions of the specific recording instrument (Magistretti et al., 1998;Brette et al., 2008;Jayant et al., 2017). Although such formulations are computationally efficient, they could not be applied to the variable individual contribution of circuit components (e.g., pipettes, C pip and R access compensatory elements), which imposes different signal distortions, such as filtering or instrumental capacitive load. Here, we implemented the pipette and all amplifier elements as individual circuits as they were actually built in the complete system and showed that the idealized instrument is sufficient to replicate the behavior of the complete measuring instrument and its compensatory capabilities (Figs. 1-3). Thus, we assume that implementing these components will allow adapting the model to other amplifier types.
We characterized the spatial relationship between R pip and C pip along the pipette to create detailed, multicompartmental pipette representation in the model (Fig. 3). Significant pipette resistance can effectively separate downstream pipette capacitance from the amplifier thereby reducing the neutralization capability of the amplifier. For the axonal recording pipettes, we show that the majority of the total C pip originate from the first two and a half mm from the tip. Nevertheless, we found that only a minor fraction of C pip fell into the range where significant R pip was present (Fig. 3A). The spatial segregation of R pip and C pip is probably more complete in pipettes with low resistance or with optimized tip geometry. Under such conditions a single RC circuit may be sufficient to describe the electrical behavior of the recording pipettes. We observed decreased relative wall thickness toward the tip that explains the tip-dominated capacitance distribution (Fig.  3B). The relative wall thickness was found to be constant previously for borosilicate glass capillaries (Benndorf, 1995). Interestingly, for quartz pipettes, Levis and Rae found similarly decreased R OI at the tip region (Levis and Rae, 1993). On the other hand, optimized pipette fabrication can actually increase the relative wall thickness of quartz capillaries indicating that capacitance distribution critically depends on the pipette material and on the applied pulling process (Dudel et al., 2000).
To outline a feasible application, we used the complete instrumental model to correct the shape of APs directly recorded from a small axon terminal of a hippocampal mossy fiber. The size of this bouton (largest diameter: 0.7 mm) was in the range of typical cortical axon terminals and was much smaller than the famous large mossy fiber terminals. The complete instrumental model in combination with the realistic axonal morphology and biophysics faithfully replicated the measured voltage signals , including the signal artefacts and distorted fast APs. The simulation resulted in ionic currents and conductances that matched with previous results obtained with direct MF recordings from large boutons (Fig. 4E,F; Geiger and Jonas, 2000; Alle et al., 2009Alle et al., , 2011. Consequently, the retrieved native axonal APs were brief events with large amplitude (Figs. 4-6) whose shape closely resembled the spike waveforms reported for the large axon terminals of the same axon (Geiger and Jonas, 2000;Alle et al., 2009). The simple Hodgkin-Huxley type conductance models with six free parameters were sufficient to restore the experimentally recorded MF AP waveforms. Although APs in the distal MFs can be described with a similar standard Hodgkin-Huxley type gating (Engel and Jonas, 2005;Ohura and Kamiya, 2018), AP simulation in other neuron types or in other subcellular elements required more detailed kinetic schemes (Schmidt-Hieber and Bischofberger, 2010;Hallermann et al., 2012;Ritzau-Jost et al., 2014, 2021. Therefore, implementation of more elaborated conductance models and inclusion of additional conductances can further improve our simulations and adapt to multiple activity regimes, such as the plasticity of AP shapes during sustained activity (Geiger and Jonas, 2000).
The complex model allowed us to dissect the sources of errors that contaminate recordings from small biological structures. As previously described for small, electrotonically compact neurons (D'Angelo et al., 1995;Goodman et al., 1998;Rohrbough and Broadie, 2002), we found that even with careful CPN, the capacitive load added by the recording instrument substantially altered the intrinsic electrical behavior of the axon (Figs. 4, 5). Using a simplified neuronal representation, we confirmed with that instrumental capacitance effectively attenuates the APs in small neuronal structures (Fig. 7) emphasizing again that C pip reduction can substantially improve the accuracy of the measured voltage signal (Sakmann and Neher, 1983;Levis and Rae, 1993;Ogden and Stanfield, 1994;Dudel et al., 2000;Ritzau-Jost et al., 2021). Interestingly, we have shown that increase in the R access reduced the instrumental impact on the cellular electrogenesis (probably because of effective electrical isolation of the neuronal structure from the recording pipette) suggesting that high-impedance recording can have also advantages when experimental subject is small. The highimpedance recordings may reduce the complexity of post hoc AP reconstitution as in this case the predicted AP shape depends only on the pipette filtering (Jayant et al., 2017). One of the major findings of our study is that instrumental and cellular factors define the accuracy of CC experiments not in isolation from each other, but their interaction is equally important. This was the most apparent when we examined the cellular contribution of the overall measurement error along a reconstructed MF which forms varicosities with different diameter. Thus, the differently sized axon segments provide different local biophysical conditions (Fig. 8). In this arrangement, which is characteristic to all axons at a various degree (i.e., the size of the terminals and axonal shaft varies), the observed inverse relationship between local capacitance continued simulated recordings, R 2 = 0.13, linear fit). Circles represent the filtering effect at independent measurement sites along the same axon. Note the logarithmic scale of the x-axis. E, The observer effect showed significant correlation with local axonal capacitance (n = 941 simulated recordings, R 2 = 0.75, fitted with power function). F, Correlation between the total measurement error and the local axonal capacitance (n = 941 simulated recordings, R 2 = 0.68, fitted with power function). and the measurement error highlights the influence of structural details on direct axonal recordings.
A more general consideration is that the target-size-dependent effects are not specific to the axonal recordings. Experiments that target small cellular structures, whose electrical parameters are comparable to the capacitance introduced by the measuring instrument, are potentially subject to the distortions quantified in our study. The target-dependent measurement errors are not specific to the AP firing either. In fact, the typically high conductance densities in axons (Hu and Jonas, 2014;Ritzau-Jost et al., 2014) can partly compensate for the observer effect. Depending on the local biophysical environment, the recording instruments can induce substantial observer error in dendritic membrane potential as well.