When the Ostrich-Algorithm Fails: Blanking Method Affects Spike Train Statistics

Modern electroceuticals are bound to employ the usage of electrical high frequency (130–180 Hz) stimulation carried out under closed loop control, most prominent in the case of movement disorders. However, particular challenges are faced when electrical recordings of neuronal tissue are carried out during high frequency electrical stimulation, both in-vivo and in-vitro. This stimulation produces undesired artifacts and can render the recorded signal only partially useful. The extent of these artifacts is often reduced by temporarily grounding the recording input during stimulation pulses. In the following study, we quantify the effects of this method, “blanking,” on the spike count and spike train statistics. Starting from a theoretical standpoint, we calculate a loss in the absolute number of action potentials, depending on: width of the blanking window, frequency of stimulation, and intrinsic neuronal activity. These calculations were then corroborated by actual high signal to noise ratio (SNR) single cell recordings. We state that, for clinically relevant frequencies of 130 Hz (used for movement disorders) and realistic blanking windows of 2 ms, up to 27% of actual existing spikes are lost. We strongly advice cautioned use of the blanking method when spike rate quantification is attempted. Impact statement Blanking (artifact removal by temporarily grounding input), depending on recording parameters, can lead to significant spike loss. Very careful use of blanking circuits is advised.


INTRODUCTION
Electrical stimulation of neuronal tissue is used to provide insights into neuronal responses (Penfield, 1958;Brindley and Lewin, 1968;McCreery et al., 1990;Tehovnik, 1996), to influence brain networks (Pezaris and Reid, 2007;Xie et al., 2014;Choi et al., 2016), and to alleviate clinically relevant symptoms of neurological disorders (Kandel et al., 2000;Tronnier et al., 2002). To evoke a response, an electrical charge is delivered via electrodes to the region of interest, as described in seminal work by Rattay (1989) and Tehovnik et al. (2006). Deep Brain Stimulation (DBS) with high frequencies (HFS), which has similar effects to lesioning (Benabid et al., 1991), but is not irreversible, has gained popularity since the 90's. It is now considered to be an effective, symptomatic treatment for diseases such as Parkinson's or Obsessive Compulsive Disorder (OCD) (Nuttin et al., 1999;Aouizerate et al., 2004;Abelson et al., 2005). HFS is understood to work by inhibiting neuronal activity in the stimulated brain region (McIntyre et al., 2004) or due to extracellular release of GABA (Hiller et al., 2007;Xie et al., 2014). HFS has also been shown to affect other neurotransmitter release (Lee et al., 2004;Deniau et al., 2010;Joseph et al., 2015).
Unfortunately, while synchronously attempting the "readout" of neuron's electrophysiological responses during HFS, the obligatory high level of amplification leads to signal contamination or even frequent saturation of recording systems, i.e., the stimulation artifact (Hashimoto et al., 2002). The overlapping artifact may render the acquired neuronal signal difficult to analyze, which can be debilitating when neuronal spike statistics or responses are the focus of the investigation (Wagenaar and Potter, 2002).
Alternatively, several manufacturers of recording systems (Plexon Inc.-USA, Multi-Channel Systems-Germany) have implemented a hardware solution to prevent amplifier saturation by temporarily grounding inputs using a "blanking circuit." The input stage of the amplifier is thus protected from saturation and even damage, with a trigger signal that marks the stimulation pulse. The amplifiers are reconnected to the circuit after a user defined a "blanking window, " based on manufacturer recommendations. It is evident that during the "blanking window, " the signal values are set to zero, thus masking valuable neuronal signals.
This protective blanking window needs to have a temporal onset at least at the start of the actual stimulus pulse and needs to cover the complete discharge period of the surrogate circuit of both the probe and electronics, which helps avoid cross talk between the stimulation and recording electrodes. This "artifact free" signal is then further analyzed for changes in LFP or spike content (Heffer and Fallon, 2008;ter Braack et al., 2013;Yi et al., 2013;Multichannel Systems, 2015;Qiu et al., 2015).
However, we caution users to exercise extreme care when using this seemingly bullet-proof method, as the chosen settings may very well have an influence on spike quantifications and indiscriminate use may introduce significant errors in real world spike count recordings for basic neuroscience (Georgopoulos et al., 1986) and neuroengineering (Serruya et al., 2002;Schwartz, 2004;Hochberg et al., 2006).
There exists a probability that the events of interest overlap with the blanking window, which could result in event loss and detrimental consequences for subsequent neurobiological conclusions, requiring additional means to validate experiments (Xie et al., 2014). The following study investigates the influence of this widely used technique from both a theoretical and experimental standpoint.

Theoretical Evaluation-Probability of Data Loss
To assess the potential impact of blanking on electrophysiological results based on spike statistics and counts, we utilize the spike probability of cells under investigation based on their interspike-interval-distribution. As previously described, spiking activity of neurons can be by a Poisson distribution and the interspike-interval-distribution (ISI) can be modeled by a Gamma distribution (Bair et al., 1994) (Figure 1). Cellular properties then define the ISI and thus variability is to be expected between consecutive spikes.
The stimulation pulse triggered blanking circuit is designed to not just mask the actual pulse artifact with a width of PW and a repetition frequency F ST , but needs to include an additional safety margin to outlast the capacitive discharge, which could originate from either the system design or the electrode-tissue coupling. Setting the stimulation pulse width PW, a safety margin T M and the stimulation's repetition frequency F ST , we seek to estimate the likelihood of a spike to fall within the blanking window T B = (PW+T M ), where it will be lost.
The likelihood of a spike falling within TB is determined by the actual spiking probability of the neuron type under investigation, which is modeled by the Gamma distribution (Equation 1), defined with scale and shape parameters, a and b, respectively. The Gamma function Γ (a) and the mean value of the distribution µ are defined using Equations (2, 3). (1) The cumulative probability of the Gamma distribution between x1 and x2 can be calculated using Equations (4, 5). The maximal number of blanked bins N b is determined using Equation 6, which integrates the ISI distribution of up to 99.95% of the counted events. If the number of blanked regions multiplied by the blanking window is larger than this x99.95 count, no spikes will be detected, as in Equation (7). The maximum probability of detection of non-blanked events is given by Equations (8,9). Figure 2D illustrates blanking windows within the fitted Gamma distribution. Then P Detectable APs = 0 (8)

Experimental Validation-Actual Data Loss
To validate our theoretical findings, we performed cell-attached patch clamp recordings of cholinergic interneurons from the nucleus accumbens of rats in a slice preparation. This provides high SNR recordings with action potentials easily identified, despite non-saturating stimulus artifacts ( Figure 2B) providing ground truth measurements for spike detection and counts. Under these conditions, the stimulation artifact is clearly visible without obscuring the events, establishing a well-controlled test bed for the quantification of the blanking artifact. Inspite of the usage of rectangular pulses for the HFS, the non-rectangular stimulation artifact observed is as a result of effect of aliasing. Aliasing occurs when the sampling frequency is not high enough for the perfect digitization and reconstruction of the artifact. Since a rectangular pulse has infinite frequencies, it is close to impossible to increase the sampling frequency high enough to reconstruct the stimulation pulses.

Animals and Tissue Preparation
All protocols were approved by the responsible Animal Care Committee of the Regierungspräsidium Freiburg (Permit X16/02A), and all efforts were made to minimize the number of animals used, with respect to statistical constraints. Male Wistar rats (3-4 weeks old) (Janvier, France), housed in groups of 4, under standard lighting (12 h light-dark cycle), 22 • C and 40% humidity were used in this study, and were allowed access to food and water ad libitum.

Electrophysiological Recordings
Recordings were carried out using a Multiclamp 700B Amplifier (Molecular Devices, USA) and the data was digitized using a CED 1401 Mark II (Cambridge Electronic devices, UK), acquired using a custom routine in IGOR Pro (Wavemetrics Inc., USA). Cholinergic interneurons from the Nucleus accumbens were chosen for their tonic firing behavior (Xie et al., 2014) (Figures 2B,C). The distribution of inter-spike-intevals of the cholinergic cells used in this study is shown in Figure 2D which can be modeled by a Gamma distribution (red line) in accordance with (Dayan and Abbott, 2001).
Slices were submerged in the recording chamber and continuously perfused (4 ml/min) with oxygenated aCSF (34 • C). Recording electrodes were pulled from thick walled borosilicate glass capillaries (2.0 mm O.D. and 1.2 mm I.D), filled with 150 mM NaCl (3-5 M ) (Perkins, 2006). To prevent clogging of the electrode tip while approaching targeted cells, a positive pressure was applied (40 mbar). Once a dimple was observed on the cell membrane surface, the pressure was released and a GΩ seal was seen to form almost instantly. If not, light suction pulses were applied until the seal was obtained. To prevent artificial depolarization of the cell membrane, the voltage was clamped such that a 0 µA holding current was maintained, as described previously (Perkins, 2006). Action potentials could be observed almost instantaneously, a feature to be expected from tonically firing cholinergic interneurons (Figure 2A).

Electrical Stimulation
Bipolar platinum-iridium (Pt/Ir) electrodes (GBCBG30, FHC Inc., Maine) with a central cathode (Diameter: 75 µm, Area: 0.0062 mm 2 ) and a concentric anode were used for stimulation at a distance of 500 µm from the cell soma. The stimulation was carried out either using a commercially available PlexStim (Plexon Inc., USA) or a stimulator developed in-house  used to generate biphasic electrical stimuli with amplitude of 12 µA. Stimulation parameters were chosen based on therapeutic High Frequency Stimulation (HFS) as described previously . Both stimulators were used in chargebalanced mode and the pulse width was controlled on-line with an oscilloscope (TPS2012, Tektronix, Switzerland) in parallel to the electrode. Stimulation runs of 100 s each were performed with a constant stimulation current of 12 µA, at a distance of 500 µm. Stimulation produces a visible artifact in the cellattached extracellular recordings, despite the charge balanced stimulation (Figure 3A).

Experimental Paradigm
Experimental runs were divided into phases of 100 s each. Spike detection and counting was carried out offline in Matlab (Mathworks, USA) by an algorithm taking spike shapes into account. The algorithm is based on the detection of three main features of recorded events i.e., amplitude, rise-fall slopes, and the peak shape, defined during baseline recording. Based on arbitrarily chosen, overlapping signal windows, the algorithm detects potential events of interest despite artifact contamination by using the previously defined parameters. It then counts and archives the detected events for further statistical analysis. After each detection step, the event count was quantified and confirmed by a blinded user to be compared against the detected events. Figure 3B illustrates a detected event during the high frequency stimulation phase and an overlay of 67 distinct event contaminations to visualize possible artifact positions relative  to the spikes. After baseline recordings (100 s), the cells were stimulated for 100 s and then allowed to rest for 300 s before further experiments were carried out. Each cell was measured in triplicate.

RESULTS
The cell attached recording technique was chosen to obtain the best signal-to-noise ratio for action potentials despite ongoing electrical stimulation, yet did not protect against contamination. Even charge-balanced stimulation pulses frequently overlap action potentials with substantial amplitude (Figures 3A,B).
Signal deterioration, however, is worsened by setting all signal values to zero for the duration of the blanking window T B , as can be seen with an exemplary spike in Figure 3C. It illustrates the successful removal of the stimulation artifacts at the cost of a clear change in event parameters due to the inconsiderate use of the blanking mechanism. Such distorted events are generally not detected by baseline-oriented methods like the one utilized here.
As the above theoretical considerations illustrate, the usage of a blanking window will result in event loss, as given by Equation (9) (Figure 5). The event loss for different blanking window widths is dependent on the stimulation/blanking frequency (Figures 4A,B). The most commonly used blanking window of 2 ms leads to a spike loss rate of up to 30 %, at therapeutically relevant frequencies. Wider blanking windows, motivated by sensitive amplifiers with longer saturation periods, clearly aggravates the situation and event loss may reach up to 80%.
Any potential loss in event counts is influenced by electrophysiological properties of the cells under investigation, given by their firing rates. Although intuitive, the percentage of lost events is directly proportional to the spike rate. However, for cell types with a spike rate >3 Hz, the loss is independent of the spike rate and is influenced by the stimulation frequency alone. The length of the blanking window and the intrinsic mean of cells' spiking rate are two parameters that play an important role in detectable spikes while recording during electrical stimulation with blanking system on. Figure 4A depicts a comparison of the blanking window over a range of 200 µs−6 ms, while Figure 4B illustrates a scenario with spiking rates from 1 to 15 Hz. A real life situation is overlaid on both figures with an average spiking rate of r = 1.12 Hz found from the cholinergic cells in this study, and blanking windows of 2 ms as a commonly used parameter (dashed-line).

DISCUSSION AND CONCLUSION
When it comes to utilizing electrical stimulation in the nervous system, electrophysiological recordings from an increasing number of neurons and an increasing number of experimental settings are in danger of being corrupted by the infamous stimulation artifact. The currently used gold standard of blanking the recording system during stimulation pulses to make the amplifiers invulnerable against saturation and potential damage may very well-introduce unexpected errors in precision analysis and reconstruction. Starting from theoretical considerations, we urge to a very cautious and well-reflected use of blanking as it inadvertently introduces loss of information by shrouding perfectly well-defined spikes relevant for statistics.
Even though it seems evident that the usage of any type of blanking circuit in real spike recordings is to be with great caution and its effects need to be studied prior to use, this report is, to our knowledge, the first one to quantify the detrimental effect blanking may have with respect to the actual event counts at clinically relevant stimulation frequencies. We approached this quantification by the known theoretical description of firing activity based on neuronal interspike-interval histograms. Blanking nullifies the very histogram bins, which coincide with the blanking window period and width within this distribution. As the histogram can be modeled by a Gamma function, it is possible to estimate the number of spikes affected, depending on the window width T B , its frequency F ST and the average firing rate R, of the cell type under consideration. As the Gamma function is not limited in time, we restrict calculations to the 99.95 percentile and have to report on loosing up to 27% of spikes with a quite common blanking window of 2 ms and therapeutically relevant 130 Hz stimulation.
In order to validate our theoretical evaluation, we used high SNR data from cell attached recordings of cholinergic interneurons from the nucleus accumbens of rats. They were collected in context of a critical re-assessment of the effects of HFS in slices (Xie et al., 2014) and corroborate the theoretical results of substantial spike loss by blanking within the error margins of our automated spike detector.
In laboratory settings, where the mechanism of action is being explored, alternative stimulation modalities such as optogenetic stimulation can be used, even at high frequencies, to examine the effects on firing rates (Deisseroth, 2015;Huidobro et al., 2017Huidobro et al., , 2018. However, even this modality comes with its own difficulties and traps (Ayling et al., 2009;Cardin et al., 2009;Han et al., 2009).
In conclusion, we urge establishing confidence in spike statistics obtained during electrical stimulation by taking independent safeguards like pharmacological controls and careful experimental design. This is a critical and delicate issue which entails that all aspects of the experiment, analysis and conclusion in a study are accounted for based on the techniques and hardware used. Blanking, for example in this study, is a procedure, designed by the device manufacturer as a safety tool, which has been demonstrated to influence the outcome of a whole experiment potentially leading to false conclusions if not taken into consideration.

AUTHOR CONTRIBUTIONS
SM and KJ conducted experimental and theoretical work; TF and UH supervised the experimental and theoretical work; OC provided technical support; SM, KJ, OC, TF, and UH wrote and reviewed the manuscript.