Detection and Removal of Hyper-synchronous Artifacts in Massively Parallel Spike Recordings
- Jonas Oberste-Frielinghaus1,2,
- Aitor Morales-Gregorio1,3,
- Simon Essink1,2,
- Alexander Kleinjohann1,2,
- Cristiano A. Köhler1,2,
- Frederic Barthélemy1,
- Alexa Riehle4,
- Thomas Brochier4,
- Simon Musall5,6,7,
- Junji Ito1 and
- Sonja Grün1,8,9
- 1Institute for Advanced Simulation (IAS-6), Jülich Research Centre, Jülich 52425, Germany
- 2RWTH Aachen University, Aachen 52062, Germany
- 3Faculty of Mathematics and Physics, Charles University, Prague 12116, Czechia
- 4Institut de Neurosciences de la Timone (INT), Aix-Marseille Université, CNRS, Marseille 13005, France
- 5Institute of Biological Information Processing (IBI-3), Jülich Research Centre, Jülich 52425, Germany
- 6Institute of Biology 2, RWTH Aachen University, Aachen 52074, Germany
- 7Faculty of Medicine, Institute of Experimental Epileptology and Cognition Research, University of Bonn, Bonn 53127, Germany
- 8JARA Brain Institute I (INM-10), Jülich Research Centre, Jülich 52425, Germany
- 9Theoretical Systems Neurobiology, RWTH Aachen University, Aachen 52056, Germany
- Correspondence should be addressed to Jonas Oberste-Frielinghaus at j.oberste-frielinghaus{at}fz-juelich.de.
-
Author Contributions: J.O.-F., J.I., and S.G. designed research; J.O.-F., A.M.-G., A.K., C.A.K., F.B., A.R., T.B., S.M., J.I., and S.G. performed research; J.O.-F., A.M.-G., S.E., A.K., F.B., and J.I. analyzed data; J.O.-F., A.M.-G., S.E., A.K., C.A.K., F.B., A.R., T.B., S.M., J.I., and S.G. wrote the first draft of the paper; J.O.-F., A.M.-G., S.E., A.K., C.A.K., F.B., A.R., T.B., S.M., J.I., and S.G. edited the paper; J.O.-F., A.M.-G., S.E., A.K., C.A.K., F.B., A.R., T.B., S.M., J.I., and S.G. wrote the paper.
Abstract
Contemporary electrophysiology experiments often involve massively parallel recordings of neuronal activity using multi-electrode arrays. While researchers have been aware of artifacts arising from electric cross-talk between channels in setups for such recordings, systematic and quantitative assessment of the effects of those artifacts on the data quality has never been reported. Here we present, based on examination of electrophysiology recordings from multiple laboratories, that multi-electrode recordings of spiking activity commonly contain extremely precise (at the data sampling resolution) spike coincidences far above the chance level. The recordings analyzed here were obtained from two rhesus macaques (Macaca mulatta; one male, one female) and one male mouse (C57BL/6J). We derive, through modeling of the electric cross-talk, a systematic relation between the amount of such hyper-synchronous events (HSEs) in channel pairs and the correlation between the raw signals of those channels in the multi-unit activity frequency range (500–7,500 Hz). We show that whitening the band-pass filtered raw signals removes the above chance HSEs; strongly suggesting they originate from linear mixing of signals. Whitening should therefore be performed prior to spike sorting and any further analysis of precise spike correlation, otherwise analysis results may be considerably affected.
Significance Statement
Artifacts are widespread in electrophysiological recordings. To mitigate their impact, these artifacts need to be detected and they should be removed from the data without impacting the quality of the data. This work presents measures to identify and quantify the amount of artifacts within a multi-channel recording by evaluating the occurrence of hyper-synchronous events i.e., spikes that are synchronous on a sub-millisecond time scale, and further introduces zero-phase component analysis (ZCA) as a method to remove these artifacts from the data. Thus, we recommend to use ZCA as a general preprocessing for electrophysiological recordings.
Introduction
Modern electrophysiological experiments often use multi-electrodes to record simultaneously many neurons from multiple sites. These recordings are known to be very sensitive to various sources of noise (Rey et al., 2015; Harris et al., 2016), which need to be mitigated to enable reliable and robust data analysis (Oberste-Frielinghaus et al., 2025). Artifacts in neural recordings may occur from both, internal (heartbeats, eye movements, chewing, muscles, etc., Merletti and Conte, 1997), and external (electric grid interference, loud noises, etc.) sources (Fabietti et al., 2020). These sources are of non-neural origin, and can often be distinguished from neural activity by their particular frequencies and distinct waveforms in the raw signals. This kind of noise can be removed by applying high pass filtering to the signals and/or by discarding the data during the time periods, e.g., of body movements. In more general cases, more sophisticated methods are required, such as independent component analysis (Bell and Sejnowski, 1995; Rong and Contreras-Vidal, 2006; Delorme et al., 2007), canonical correlation analysis (Hotelling, 1936; Wim De et al., 2006), wavelet methods, or certain combinations thereof. These are mostly applied to electroencephalogram (EEG; Wim De et al., 2006; Delorme et al., 2007; Shackman et al., 2009; Barban et al., 2021; Mumtaz et al., 2021) and magnetoencephalogram (Rong and Contreras-Vidal, 2006) data, and to a lesser extent to extracellular electrophysiology (Ludwig et al., 2009; Islam et al., 2014; Fabietti et al., 2020). Besides these common noise sources (capacitive, resistive, or inductive) coupling between shanks or cables can cause cross-talk between different channels (Nelson et al., 2017), leading to a mixing of neural signals that can persist even after spike sorting (Torre et al., 2016). Cross-talk is a well-known problem in EEG (Nagaoka et al., 1992) and electromyogram (Koh and Grabiner, 1993; Kilner et al., 2002; Farina et al., 2004) data recording systems, however only a few studies have focused on cross-talk in electrophysiology systems (Musial et al., 2002; Nelson et al., 2017; Pérez-Prieto and Delgado-Restituto, 2021). One approach to avoid cross-talk in these systems is through hardware implementations, like improving the isolation and design of the circuits (Blot and Barbour, 2014; Nelson et al., 2017; Pérez-Prieto and Delgado-Restituto, 2021; Perez-Prieto et al., 2021). However, even with the best efforts, eliminating all possible causes of artifacts is practically unfeasible. Thus, the recorded data need to be examined offline to check for existence of artifacts, and if they exist, they need to be removed from the data, otherwise they lead to false results, especially in the context of analysis of fine temporal correlations in spike trains (Oberste-Frielinghaus et al., 2025).
We here illustrate, on three different data sets from three different laboratories, animals and recording setups, hyper-synchronous
artifacts that are present with a time resolution of the recording system (30 kHz). Two of the data sets were recorded by
Utah arrays (Blackrock Microsystems, Hatsopoulos et al., 1998; De Haan et al., 2018; Chen et al., 2022) and the third by a Neuropixel probe (IMEC sold by Cambridge NeuroTec; Jun et al., 2017). Both systems have very different approaches to measure single neuron contributions. The electrodes on Utah arrays are at
least 400
μm apart such that the same single neuron cannot be identified on different electrodes, while in Neuropixel probes the recordings
of a single neuron on neighboring electrodes (inter-contact distance of 20
μm) is intended. The extraction of single units is in both cases performed by spike sorting after some preprocessing (high
pass filtering, etc.) of the raw recorded signals. Still, in data of both recording types we identified hyper-synchronous
artifacts even after application of spike sorting. Thus the artifacts appear as extremely precise spike synchrony (at the
data sampling resolution, e.g.,
ms; Yu et al., 2009; Torre et al., 2016; Dehnen et al., 2021; Chen et al., 2022), which we identified as non-neuronal.
After demonstrating on these three data sets how hyper-synchronous artifacts or their derivations are identified, we introduce a software solution to get rid of them. We illustrate that the artifacts can be removed by using the zero-phase component analysis (ZCA) whitening (Bell and Sejnowski, 1997; Kessy et al., 2018). While preprocessing frameworks such as SpikeInterface (Buccino et al., 2020) provide ZCA whitening by default, and this configuration is employed in some spike sorting workflows (e.g., MountainSort), other usage scenarios or user-defined configurations may still perform whitening only on subsets of channels, particularly when spike sorters are used independently of standardized preprocessing frameworks (e.g., direct use of Kilosort). We show that it should be applied to all recordings channels together to secure removal of artifacts.
Materials and Methods
Experimental design
Macaques
We analyzed resting state data from two (N = 2) rhesus macaques (Macaca mulatta), recorded in two different experimental laboratories. The data from macaque L was collected at the Netherlands Institute for Neuroscience, and previously published (Chen et al., 2022). The data from macaque Y was collected at the Institut de Neurosciences de la Timone, with the recording apparatus described by De Haan et al. (2018). At the time of the array implantation macaque L (male) was 7 years old and weighed ∼11 kg; and macaque Y (female) was 6 years old and weighed ∼7 kg. All experimental and surgical procedures for macaque L complied with the NIH Guide for Care and Use of Laboratory Animals, and were approved by the institutional animal care and use committee of the Royal Netherlands Academy of Arts and Sciences (approval number AVD-8010020171046). All experimental and surgical procedures for macaque Y were approved by the local ethical committee (C2EA 71; authorization Apafis#13894-2018030217116218v4) and conformed to the European and French government regulations.
Mouse
Mouse data were recorded at the Institute of Biology 2 at RWTH Aachen using the recording apparatus described by Balla et al. (2023). The mouse was an 18-week-old male C57BL/6J animal and weighed 26 g at the time of the acute recording. All procedures for the mouse experiment were performed in compliance with the EU directives 86/609/EWG and 2007/526/EG guidelines for animal experiments and were approved by the local governments (Thueringer Landesamt and Landesamt für Natur, Umwelt und Verbraucherschutz Nordrhein-Westfalen) under permit number 81-08.04.2021.A021.
Data collection
Both macaques were recorded using setups based on the Blackrock Microsystems (Blackrock Neurotech) ecosystem.
Macaque L
See Chen et al. (2022) for an in-depth description of this data set. Briefly, electrophysiological signals originating from the V1 and V4 regions were recorded using a configuration of 1,024 channels distributed across 16 Utah Arrays, each comprising 8 × 8 electrodes. The references wires were located on alternating arrays (array numbers 1, 3, 5, 7, 9, 11, 13, and 15) and ran alongside the wire bundle before emerging several millimeters before the point of connection between the wire bundle and the array. Sampling was performed at a rate of 30 kHz. The signal pathway commenced with the passive conduction of neuronal signals from the 1,024-channel pedestal to an Electronic Interface Board (EIB). This EIB was equipped with thirty-two 36-channel Omnetics connectors, facilitating the interface with eight 128-channel CerePlex M headstages. Each CerePlex M headstage received signals from two electrode arrays and applied a 0.3–7,500 Hz analog filter at unity gain, refraining from signal amplification. Analog-to-digital conversion (ADC) was conducted by the CerePlex M, employing a 16-bit resolution with a sensitivity of 250 nV/bit. The digitized signal was subsequently routed to a 128-channel Digital Hub, with each Digital Hub processing data originating from one CerePlex M. The Digital Hub undertook the conversion of the digital signal into an optic-digital format. This transformed signal was then transmitted via an optic-fiber cable to a 128-channel neural signal processor (NSP) for subsequent processing and storage. Each Digital Hub supplied the signal to a single NSP. In total, eight NSPs were employed. In the present study, we focused on a single data stream (NSP1) from one session, which included one array in V1 and one array in V4. These arrays showed many artifacts in a previous less exhaustive analysis (Chen et al., 2022), including events across both arrays, even though they were separated by the lunate sulcus. Thus, this data stream was particularly useful to demonstrate the non-neural origin of the artifacts. We manually found a period of two seconds of consecutive artifact events (see Supplemental Material: Fig. S4) which we cut out before the analysis of the data.
Macaque Y
Electrophysiological signals originating from V1, V2, DP, and 7A were recorded with four separate 6 × 6-electrode Utah Arrays. Additionally, M1/PMd was recorded with a 10 × 10-electrode Utah Array. Sampling was performed at a rate of 30 kHz. In contrast to macaque L, the signal pathway commenced with two 128-channel pedestals (CerePort): one for the four 36-channel arrays and one for the 100-channel array. There are two reference electrodes per pedestal consisting in silver wires placed on the dura at two different sites under the skull. Each of the pedestals interfaced with a 128-channel CerePlex E headstage. One of the two reference electrodes can be selected with a microswitch on the CerePlex. When the animal recovered from surgery and during the first recording session, both references were tested and the one that gave the best signal-to-noise ratio was selected. Once it was chosen, the reference was kept for the sake of consistency across the recording session. Notably, the CerePlex E headstages applied a 0.3–7,500 Hz analog filter at unity gain, refraining from signal amplification. ADC was conducted by the CerePlex E, employing a 16-bit resolution with a sensitivity of 250 nV/bit. The digitized signal was subsequently routed to a 128-channel Digital Hub, with each Digital Hub processing data originating from one CerePlex E, which in turn was linked to one 100-channel array or four 36-channel arrays. The Digital Hub undertook the conversion of the digital signal into an optic-digital format. This transformed signal was then transmitted via an optic-fiber cable to a 128-channel NSP for subsequent processing and storage. Each Digital Hub supplied the signal to a single NSP. In total, two NSPs were employed. In the present study, we focused on the M1/PMd array from one session, to demonstrate that the artifacts are not limited to visual processing areas.
Mouse
High-density electrophysiological recordings were done with Neuropixels 1.0 probes in awake head-fixed mice, freely running on a wheel. To allow a later recovery of the probe position in the brain, the probe was painted with DiD cell labeling solution (Invitrogen V22887). High pass filtered data above 300 Hz at 30 kHz and low pass filtered signals between 0.5 and 100 Hz at 2.5 kHz from the bottom 384 channels of the Neuropixels probe (∼3.8 mm active recording area) were recorded. To simultaneously record from V1 and superior colliculus (SC), the probes were angled to 35° elevation and inserted to a depth of 3.6 mm. The reference electrode was a gold-pin and it was placed on the dura above the cerebellum. Visual stimuli were presented during the recording, consisting of 0.1-s long full-field low-pass filtered Gaussian noise patterns with a cutoff at 0.12 cycles per degree and a temporal frequency of 1 Hz. Each stimulus was presented twice with an inter-trial interval of 3–5 s. Signals were acquired with an external Neuropixels PXIe card (IMEC) used in a PXIe-Chassis (PXIe-1071, National Instruments). Triggers and control signals for different stimuli and wheel movements were separately recorded as analog and digital signals using the SpikeGLX software (Janelia Farm Research Campus, USA; Bill Karsh, https://github.com/billkarsh/SpikeGLX).
Signal processing
Macaque recordings
All offline signal processing steps (except for spike sorting) and data analysis described below were performed by original
custom codes written in the Python programming language provided along with this publication and executed in a pipeline defined
as a Snakemake workflow (Mölder et al., 2021). The recorded raw signals were band-pass filtered in the frequency range of 500 Hz–7,500 Hz (second order Butterworth filter,
as implemented in the signal_processing.butter() function in the Elephant toolbox; Denker et al., 2018). According to Quiroga (2007), putative spikes were extracted from the band-pass filtered raw signal of each channel by thresholding it at:
where si denotes the band-pass filtered raw signal of channel i. The time of threshold crossing of each putative spike was registered as the time of that spike. The resulting spike times
per channel were taken as the spike train of the multi-unit activity of that channel. For the artifact removal, we apply ZCA
whitening after the band-pass filter and then proceed as above.
Mouse recording
The data was processed with the SpikeInterface toolbox (Buccino et al., 2020). First, the data were band-pass filtered between 500 and 7,500 Hz. Second, the channels that were broken or outside the brain were removed from further analysis, using a manually curated bad channels rejection implementation. Third, the data were time-shifted to correct for multiplexing during acquisition. Fourth, we performed a median-subtraction across all channels, to remove the common signal originating from the reference electrode. Finally, the data were automatically spike-sorted using Kilosort 4.0.6 (Pachitariu et al., 2024). Three different parameter settings were used for the ZCA whitening step before spike sorting: (1) without whitening; (2) whitening only the nearest 32 channels to each electrode (default setting of Kilosort); and (3) whitening across all channels. All other parameters were left unchanged from their default values.
ZCA whitening
As a data cleaning method for removing correlations introduced by the electric cross-talks between channels, we propose whitening
of the signals by use of ZCA (Bell and Sejnowski, 1997; Kessy et al., 2018). ZCA is the whitening transformation of given multivariate data that is closest to the original data in terms of Euclidean
distance. For an Nchannels × Nsamples data matrix X, the ZCA transform matrix W is defined using the covariance matrix Σ of X as W = Σ−1/2. Then the whitened data
are obtained by applying this transform matrix W to the original data matrix X as
. For numerical stability, in practical applications to the experimental datasets the transform matrix W was computed as
, with U and Λ obtained from the eigendecomposition of the covariance matrix: Σ = UΛUT and
ϵ set to 10−5.
Cross-talk model
We observed spike waveforms that are very similar among multiple channels without time delay or phase shift (Fig. 2a). This led us to assume the cross-talk between channels to be a resistive interaction, which is instantaneous and has no frequency dependence, rather than a capacitive or inductive interaction, which causes frequency dependent amplitude reduction and phase shift. For modeling the generation of artifact spikes in a pair of channels, we formulated this assumption as a linear mixture of signals between channels, as described below. First, we consider the “ground truth” signals (i.e., not contaminated by cross-talk) x1(ti) and x2(ti) for channel 1 and 2, respectively, where ti (i = 1, 2, 3, …) are discrete sampling times. For simplicity, we assume that x1 and x2 are time series of independent Gaussian white noise with the same mean E[x1] = E[x2] = 0 and the same variance Var(x1) = Var(x2) = σ2.
Next, we model the cross-talk as a linear mixing of these two signals. Concretely, we define the measured signals s1(ti) and s2(ti) for channel 1 and 2, respectively, as:
where α is a parameter representing the strength of the cross-talk: s1 and s2 are identical when α = 1, and they are independent when α = 0. By this construction, both s1 and s2 obey a Gaussian distribution with a mean E[s1] = E[s2] = 0 and variance Var(s1) = Var(s2) = (1 + α2)σ2. The Pearson correlation coefficient c12 for the signals s1 and s2 is derived as:
We further introduce spikes to the signals. Here we model spikes in channel 1 by adding a value A1, representing the spike amplitude, to x1 at various, random time points. We parameterize A1 as
, where
is the signal-to-noise ratio of the spike waveform, such that SUAs with different spike amplitudes are represented by modifying
the value of
. The spikes introduced in the ground truth signal x1 are transferred to the measured signals s1 and s2 via the cross-talk. To count those transferred spikes, we extract spikes from s1 by thresholding it at
, where
is the standard deviation of s1 and m is a multiplier determining the threshold in relation to the standard deviation. Assuming that N1 spikes were introduced to x1, we can derive the expected number n11 of the spikes transferred from x1 and detected in s1 (
at spike times) as:
where erfc( · ) is the complementary error function. For simplicity, this formalism does not consider “noise” spikes which
arise from the random fluctuations of the background signal that happen to cross the threshold by chance.
Note that the factor
in front of N1 in the above expression represents the probability that a spike transferred from the ground truth signal x1 is detected in the measured signal s1. In a similar manner, the probability p21 that a spike originally in x1 is detected in s2 is derived as
. Furthermore, assuming N2 spikes in the other ground truth signal x2, the probabilities p12 and p22 that those spikes are detected in the measured signals s1 and s2, respectively, are derived as
and
.
With these probability values, the expected numbers n1 and n2 of spikes detected in the measured signals s1 and s2, respectively, are represented as:
given the numbers N1 and N2 of spikes in the ground truth signals x1 and x2, respectively. Note that the terms p12N2 and p21N1 represent the number of spikes transferred from the other channel, and hence these spikes are detected in the both of the
measured signals. Thus, the sum of these terms: n1,2 = p12N2 + p21N1 represents the number of artifacts in this pair of measured signals. Using this, the hyper-synchronous events (HSE) index
I1,2 between the measured signals s1 and s2 is expressed as:
which takes a value between 0 and 1 depending on the parameters.
The model can be extended to represent data with more than a pair of channels. Following the same steps as for the channel-pair
model, we first define the ground truth signal xi for channel i (1 < i < Nch, where Nch is the total number of channels) as Gaussian white noise time series with the mean E[xi] = 0 and the variance
. Then, for each channel i, spikes are introduced to the ground truth signal by subtracting a value
, where
is the signal-to-noise ratio of the spike waveform in channel i, at random timings. The measured signal si for channel i is then obtained as:
where αij is a cross-talk strength matrix, representing the strength of the cross-talk between channels i and j, taking a value between 0 and 1.
For the simulation of the extended multi-channel model shown in Figure 4, we used the following parameters: Nch = 100, σi = 1 (for all i), and
(for all i). The cross-talk strength matrix αij is defined as follows: (i) the diagonal elements αii are all set to 1; (ii) for the elements in the upper triangle, i.e., αij (i < j), their values are drawn from a uniform distribution between 0.1 and 0.2 for
; (iii) values for
and
are set in the same manner; (iv) values for all the remaining upper triangle elements are drawn from a uniform distribution
between 0 and 0.1; and finally, (v) values of the elements in the lower triangle are set such that αji = αij. This results in three groups of 20 channels strongly cross-talking with each other within each group, with weak cross-talks
between channels not belonging to the same group. This structure is meant to mimic the correlations between channels observed
in the macaque Y data set, as shown in Supplemental Material: Figure S2. The firing rate the spike trains in the ground truth data is set to 20 Hz for all channels. With this setup, the ground
truth signals are generated for a duration of 100 s with the temporal resolution of 0.1 ms. When introducing spikes to the
ground truth data, to give a finite temporal width to spikes, the spike amplitude value Ai is subtracted from the background Gaussian white noise time series at three successive data points (corresponding to a spike
width of 0.3 ms) starting at each spike time.
Statistical analysis
Complexity and estimation of chance levels
To study fine temporal correlation and detect potential synchronous artifacts in parallel spike train data, we first bin the time axis of the spike trains with a predefined bin width (in the present study we use 1, 0.1, and 1/30 ms bin widths) and compute the complexity of spiking activity at each bin, i.e., the number of units contributing spikes to that bin. Then we make a histogram of the complexity values for all the bins throughout the recording, called complexity distribution (Grün et al., 2008). For easier comparison of the results from different data sets, the histogram is normalized by dividing the counts of all complexities (including the complexity of zero, i.e., bins with no spikes) by the total number of bins, such that the sum of the histogram values over all complexities equals to unity.
We compare the empirical distribution to chance levels from independent data, to elucidate if the real data contains excess spike synchrony. To estimate the complexity distribution of independent data, we use surrogate data, i.e., modified versions of the original data where spike times are intentionally altered. Stella et al. (2022) compared a number of surrogate methods, and according to that, we employ here the “time-shift” method (with a ±30 ms shift width, Pipa et al., 2008), by which the spike trains are randomly shifted in time against each other implemented in the Elephant software package (doi:10.5281/zenodo.1186602; RRID:SCR_003833; Denker et al., 2018). Time shifting destroys potential correlations between spike trains, while conserving many other features of the data such as the inter-spike interval distribution, the firing rate modulations and autocorrelation (Stella et al., 2022). We generate 200 surrogate spike train data sets, and for each of them we compute the complexity distribution. The mean and standard deviation of the count are calculated for each complexity, and plotted together with the empirical complexity distribution for comparison (Fig. 1c,d).
Cross-correlation of band-passed signals
The correlation cij between the band-passed signals of channel i and j is evaluated by the Pearson correlation coefficient as:
where si and sj represent the band-passed signals of channel i and j, respectively, obtained as described in “Signal processing,” and Var(si) and Cov(si, sj) represent the variance of si and the covariance between si and sj, respectively.
Measure of spike synchrony
Assume that we have ni spikes in channel i at times
(1 ≤ p ≤ ni). We discretize the time axis in bins of width b, which should be small enough to contain at most one spike in a bin, and obtain a set of bin indices
, which indicates the positions of the time bins where the spikes are observed [in other words, the time of the pth spike is in the time range
]. The number ni,j of spike synchrony events between channels i and j is obtained as
. We define the pairwise HSE index Ii,j as:
which is a measure of the abundance of spike synchrony events between a pair of channels i and j. We choose to divide by the smaller spike count so that the HSE index is independent of the channel order (i.e., Ii,j = Ij,i) and also sensitive to HSEs occurring on channels with small number of spikes.
In a similar manner, we define the global HSE index Ii as:
where
is defined as
, which represents the number of spike synchrony events between channel i and any other channel. Thus, the global HSE is a measure of the abundance of spike synchrony events between channel i and any other channel.
Results
Synchronous spike events are widespread in multi-electrode systems
To demonstrate how artifacts appear in massively parallel spike train data, we start inspecting two macaque data sets from
different laboratories and animals (Fig. 1a). In the raster display of the simultaneously recorded spike trains (Fig. 1b, top), we notice events where many neurons exhibit spikes simultaneously (highlighted in gray). To examine the temporal precision
of these spike coincidences, we compute the population spike time histograms with different bin sizes (Fig. 1b, bottom). At the resolutions of 1 and
ms, we find some bins with outstandingly high spike counts, not visible at the resolution of 10 ms. We term these extremely
precise spike coincidences within
ms as HSEs.
Observation of hyper-synchronous event (HSEs). a, Electrode arrays and implantation sites for the two macaques, macaque Y: 6 × 6 electrode arrays in V1, V2, DP, 7A and 10 × 10
in M1/PMd (we focus here only on the 10 × 10 array); macaque L: 14 8 × 8 arrays in V1 and two in V4 (focus here on an array
pair with one in V1 and one in V4). The arrays focused on are colored. b, Raster display (top) and population histograms with different bin sizes (bottom) for a 60 ms long data slice. HSEs are highlighted
with gray. c, Illustration of the surrogate generation method. Original spike trains are shifted against each other by a random amount
of time. d, Complexity distribution of the original data (colored bars), and the mean and standard deviation (dot and error bar, respectively)
for the complexity distribution of the respective surrogates. Top: 1 ms bin size; bottom:
ms bin size.
We further quantify the HSEs by their complexity (i.e., number of involved neurons; Grün et al., 2008) and compare the obtained complexities to those expected by chance using a surrogate method (Stella et al., 2022; Fig. 1c; see “Materials and Methods” for details). Figure 1d shows the distributions of complexity values from the original and the surrogate data, for two different bin sizes (1 and
ms). For both bin sizes, the original data contains more high complexity HSEs than expected by random chance. Considering
that the coordination of spike times on the timescale of
ms is very unlikely, we conclude that many of the HSEs in the experimental data are artifacts, which we name synchrofacts.
We find artifacts in two separate data sets originating from two different laboratories, recorded in two different cortical areas of different macaques. Other arrays in these recordings, but not presented here, also show similar excess HSEs (see Supplementary Material: Fig. S7). Therefore we suspect that artifacts are common across recordings of the same type. While both data sets were recorded with Blackrock recording systems, artifacts also occur in other recording systems, e.g., in Neuropixels recordings (see section “High-density probe recordings also contain artifacts”). Taken together, our observations highlight the ubiquity of artifacts.
One might think that the data can be cleaned by simply removing all HSEs. However, that is not an appropriate solution to
get rid of artifacts, since this also removes many genuine neuronal spikes and, thus, genuine neuronal synchrony. One can
demonstrate this by removing all spikes in the bins with complexity of two or larger at
resolution, and then calculating the complexity distribution, to be compared to the complexity distribution of its surrogates.
The surrogate distribution obtained in this way contains complexities of two or higher that occur by chance. However, the
original distribution after the removal totally lacks complexities higher than 2, and hence it differs vastly from the surrogate
distribution (see Supplemental Material: Fig. S1). Thus, removing all HSEs significantly alters the statistical properties of the spike trains by selectively eliminating
higher-order chance synchrony, which can lead to false results regarding fine temporal correlations in the spike trains.
To summarize, HSEs in massively parallel spike trains commonly contain synchrofacts, which are artificial spike synchrony events on a timescale of the data sampling frequency. Synchrofacts can only be spotted when analyzing the data on very fine timescale and show themselves as excess HSEs. Since HSEs contain not only artifacts but also genuine neuronal synchrony (as well as chance coincidences), removing all HSEs for cleaning the data is not a proper approach. Hence, we aim at discriminating artifacts from chance coincidences of real spikes, for selectively removing artifacts from the data.
Synchronous spike events with nearly identical waveforms are not of neural origin
Following the observations in the previous section, we now take a deeper look into the HSEs for features discriminating artifacts from chance spike coincidences. Whereas an HSE with a very high complexity is likely to be an artifact, we cannot rule out the possibility that it is a real spike synchrony. In fact, there is no way of discriminating between them on the description level of spikes. Thus, seeking for additional information to spot artifacts, we inspect the raw signals from which the spike events are extracted.
Here for the macaque data sets, the spike extraction was performed by thresholding the band-pass filtered raw signals in the frequency range of 500–7,500 Hz (see “Materials and Methods, Signal processing” for details). For simplicity, we henceforth refer to the band-pass filtered raw signal merely as band-passed signal. Figure 2a shows the band-passed signals of multiple channels around the timing of one HSE. We observe highly similar spike-like waveforms in multiple channels simultaneously, but with different amplitudes. Furthermore, the ongoing signal fluctuations before and after the HSE appear to be correlated across these channels. The electrodes of these channels are not necessarily in close spatial proximity, as shown in Figure 2b. To quantify this observation, we measure the distances between the electrodes of channels participating in each and every HSEs with high complexities. The distribution of the obtained distances (Fig. 2c) shows that the high complexity HSEs often involve electrodes that are far apart, up to several millimeters. In particular, in the case of macaque L, HSEs appear even across the two arrays located on opposite banks of the lunate sulcus.
HSEs in relation to the band-passed signals, for macaque Y (red) and L (blue). a, Dot display (top) centered around a single HSE and the corresponding band-pass filtered (500–7,500 Hz) raw signals of the channels participating in the HSE. Spike-like excursions are aligned on the HSE. b, Positions of the electrodes on the respective array for the band-passed signal channels participating in the HSE in (a). The trace of the spike-like excursion in each channel is shown at the corresponding position. c, Distances between the electrodes involved in all HSEs with high complexity, selected based on the surrogate analysis from Figure 1. For reference, the distance distribution between all possible electrode pairs is shown in gray.
To summarize, we have observed (i) sub-millisecond synchronization of spikes across channels, (ii) nearly identical waveforms of those spikes, (iii) visible correlation between band-passed signals, and (iv) partly large distances between the participating electrodes. Taken together, these observations strongly suggest that many of these events are artifacts due to electric cross-talk between channels, rather than multiple electrodes recording the same neuron or some novel form of fast neuronal synchronization.
Cross-correlation and HSE can detect artifacts
An electric cross-talk between a channel pair is expected to increase the Pearson correlation coefficient between the band-passed signals of these channels. Figure 3a shows the correlation coefficient ci,j between the band-passed signals of channels i and j (see “Materials and Methods, Cross-correlation of band-passed signals” for details), for all channel pairs in the two data sets in a matrix form (only for i ≠ j). The distribution of the ci,j values in the matrix is shown in Figure 3b. The coefficients are mostly larger than zero, i.e., the band-passed signals are generally positively correlated. The coefficient values vary strongly across channel pairs, with some pairs showing quite strong correlation, in both recording setups from different laboratories.
Relation of pairwise band-passed signal correlations to respective pairwise occurrences of HSEs. a, Pairwise correlation coefficients ci,j of the band-passed signals. Data are shown in matrix form; the channels are sorted by largest maximum correlation. b, Distribution of the ci,j values that appear in the matrix shown in (a). c, HSE index Ii,j for all channel pairs shown in a channel-by-channel matrix form. The channels are sorted in the same order as in (a). d, Distribution of the Ii,j values that appear in the matrix shown in (c). e, Scatter plot of the band-passed signal correlation coefficient ci,j against HSE index Ii,j of the corresponding channel pair. Each dot represents one channel pair.
Cross-talk model of artifacts. a, Illustration of the setup for derivation of the HSE index. Ground truth signals for channels 1 and 2 are mixed, representing
the cross-talk, to yield the signals measured in a pair of channels. Spikes (vertical lines) are introduced to the ground
truth signals, and they “bleed” into the measured signal of the other channel via the cross-talk. b, The correlation c1,2 between the channels plotted against the cross-talk strength α. c, The HSE index I1,2 of the channels plotted against the cross-talk strength α (left) and the correlation c1,2 between the channels (right). Here the signal-to-noise ratios of spikes in x1 and x2 are set to be identical
, and varied between 5 and 15 in steps of 1, while keeping the threshold multiplier at m = 5. The curves for different values of rSN are plotted in different shades of gray. d, The cross-talk strength matrix used for the simulation of the extended multi-channel model shown in panel e. e, Simulated ground truth (left) and mixed (right) signals of the multi-channel model. The lower panels show the spike trains
extracted from the signals in the upper panels. In the plot of the mixed signals, traces for the channels that belong to a
strongly cross-talking group are drawn in black, while traces for the channels not participating in the groups are drawn in
gray. Accordingly, the background of the spike trains in the lower panel is shaded in gray for the channels that belong to
a strongly cross-talking group. f, The complexity distributions of the extracted spikes of the ground truth (blue) and the mixed (gray) signals computed from
the simulations (panel e). The bin width for the complexity calculation is the same as the simulation time step, i.e., 0.1 ms.
There may be multiple possible origins for such strong correlations, ranging from damages on the electrodes to electric shortcuts between channels due to various reasons, e.g., crossing of the implanted cables below the skull, dirt in the headstage connector, interference between the cables connected to the amplifier, etc. (Yu et al., 2009). As shown in Figure 2b,c, the artifacts are not limited to spatially proximal channels but extend over the whole array or even across arrays, indicating that a deficit in a local group of channels cannot be the primary reason for these correlations. Another possibility is a local deficit on the headstage connector, which might be the case for Macaque Y but not for Macaque L (see Supplemental Material: Fig. S2). Thus, no single reason can explain the observed correlations, but rather there would be multiple causes residing on different stages of the setup. Eliminating all possible causes from the setup is practically not feasible, and hence we cannot avoid having such correlations in the data.
For channel pairs with a large ci,j value, their band-passed signals must be similar to each other. Hence, if one channel of such a pair had spike-like waveforms, the other channel should also have those at the same time. This leads to the expectation that a channel pair with a larger ci,j should show more artifacts. To confirm this, we first count, for each channel pair, the number of HSEs containing spikes from that pair. We then define the HSE index Ii,j of channel i and j as the ratio of the obtained HSE count to the spike counts of these two channels (see “Materials and Methods, Measure of spike synchrony” for the formula). Figure 3c shows the Ii,j values obtained from the two data sets in a matrix form (only for i ≠ j). The distribution of those values in the matrix is shown in Figure 3d. We find Ii,j values ranging from 0 to 0.5, while the value expected from an independent pair of spike trains is on the order of 10−3 (see Supplementary Fig. S3).
We then plot Ii,j against the correlation coefficient cij to look for a systematic relation between them (Fig. 3e). We find that a majority of channel pairs have HSE index values close to zero, meaning that hardly any spikes are shared by these pairs. Especially the channel pairs with low correlation coefficients ci,j, such as <0.4, have very low HSE index values. As the correlation ci,j gets larger than 0.4, the HSE index value rapidly increases, indicating a critical correlation beyond which spikes becomes very likely to be detected in both channels. Note that an HSE index larger than zero does not immediately indicate artifacts. As shown in Figure 1d, a certain amount of HSEs can be explained by chance. However, as we mentioned before, the HSE index expected from independent spike trains is very small, on the order of 10−3. Hence, an HSE index excessively greater than this strongly indicates presence of artifacts.
Cross-talk model explains the emergence of artifacts
To understand the origin of the relation between the band-passed signal correlation ci,j and the HSE index Ii,j, here we present a simple model of cross-talk between channels (see “Materials and Methods, Cross-talk model” for details). This model enables us to derive an analytic expression of the relation, which is in agreement with our experimental observations (Fig. 3e).
Our model assumes two Gaussian white noise (mean 0, variance σ2) time series x1 and x2 as the cross-talk-free “ground truth” signals. We model the cross-talk as a linear mixing of these two signals (Fig. 4a), such that the mixed signals s1 and s2 measured on channel 1 and 2, respectively, are:
where 0 ≤ α ≤ 1 is the strength of the cross-talk: s1 and s2 are identical with α = 1, and independent with α = 0. The Pearson correlation coefficient c1,2 between s1 and s2 can be written in terms of α as (see “Materials and Methods, Cross-talk model” for derivation):
Thus the correlation c1,2 increases nonlinearly with the cross-talk strength α, as shown in Figure 4b.
For the derivation of the HSE index, we need to introduce spikes to the signals. We model spikes by subtracting a value Ai, representing the spike amplitude, from the ground truth signal xi (
) at random time points. We parameterize Ai as
, where
is the signal-to-noise ratio of the spike waveform in xi. Spikes are then extracted from the mixed signals s1 and s2 by thresholding, as commonly done for experimental data. We set the threshold for si at
, where
is the standard deviation of si and m is a multiplier (Quiroga et al., 2004). The expected numbers n1 and n2 of spikes detected in s1 and s2, respectively, are:
where N1 and N2 are the number of spikes introduced in x1 and x2, respectively, and pi,j is the probabilities that a spike from xi is detected in sj as a function of the parameters α,
,
, and m (see “Materials and Methods, Cross-talk model” for more details).
The spikes transferred across channels by the cross-talk are detected in both channels, so the sum of the numbers of such spikes, i.e., n1,2 = p1,2N2 + p2,1N1 represents the number of artifacts in this pair of channels. We can now calculate the HSE index as I1,2 = n1,2/min(n1, n2) (see “Materials and Methods, Cross-talk model” for detailed derivations). While this model could be extended to include more realistic details such as different types of noise, spike waveforms, and so on, the simple model as described here suffices for the current purpose of deriving the HSE index analytically.
Through the dependence of pi,j on the cross-talk strength α, the HSE index I1,2 is dependent on α and thereby the correlation coefficient c1,2 (Fig. 4c). Interestingly, hardly any artifacts are observed in the model for α < 0.2 or c1,2 < 0.4, suggesting that some degree of cross-talk might be tolerable in recording systems. However, for higher α or c1,2, the HSE index rapidly increases in the form of a sigmoid, depending on the signal-to-noise ratio rSN. This is in good agreement with what we observed in our macaque datasets (Fig. 3e).
In the real data, the signal of one channel is typically correlated not only with another channel but with multiple other channels at once, as seen in Figure 3. The model can be extended to represent such data by introducing multiple channels (let Nch be the number of channels) and expanding the cross-talk strength parameter α to a cross-talk strength matrix αij (1 ≤ i ≤ Nch, 1 ≤ j ≤ Nch), which represents the cross-talk strength between channel i and j (see “Materials and Methods, Cross-talk model” for more details).
Here we demonstrate that the extended multi-channel model can simulate artifacts and correlated signal fluctuations as seen in our experimental data (Fig. 2a), given a proper cross-talk strength matrix. We consider a model of 100 channels and a cross-talk strength matrix as shown in Figure 4d. The diagonal elements of the matrix are all set to 1 (to be consistent with the channel-pair model shown above), and the remaining elements are defined such that the data contains three groups of 20 channels (i.e., channels 0–19, channels 40–59, and channels 80–99) with strong cross-talk within each group. The ground truth signal of each of the 100 channels is generated independently as a Gaussian white noise time series with a Poisson spike train (20 Hz firing rate, 0.3 ms spike width) injected (see “Materials and Methods, Cross-talk model” for more details of the simulation), as shown in Figure 4e, left. Since the injected spike trains are independent between channels, the complexity distribution of the spikes in the ground truth signals is just as expected from chance spike coincidences between channels (Fig. 4f, blue). From these ground truth signals, mixed signals are generated according to the cross-talk strength matrix (Fig. 4e, right). Strong correlations in the signals among the channels within each cross-talking channel group (black traces) are evident, compared to the correlations among the channels not participating in those groups (gray traces). As a consequence, when there is a chance spike coincidence in the ground truth signals of a cross-talking channel group (e.g., at the middle of Fig. 4e, left, for the bottom channels), the strong cross-talk within the group replicates those spikes into the other channels of the group at the same timing, resulting in a formation of an artifact (Fig. 4e, right, for the bottom channels). Accordingly, the complexity distribution of the mixed signals exhibits a heavy tail of high order complexities (Fig. 4f, gray), which resembles the complexity distribution of the real data (Fig. 1d).
ZCA whitening effectively removes artifacts
From this model we now see that the correlations between the signals lead to emergence of artifacts. Conversely, the model poses a possibility that if one could properly decorrelate the measured signals, the ground truth signals could be recovered and the artifacts would be dissolved. Since our model assumes a linear mixture of the ground truth signals via symmetric cross-talks, the measured signals can be decorrelated by whitening them based on their covariance matrix, a method called ZCA whitening (Bell and Sejnowski, 1997; Kessy et al., 2018).
In Fig. 5a we illustrate an example application of ZCA whitening to simulated data of the model. Similarly to the example shown in the previous figure (Fig. 4e), a chance spike coincidence in the ground truth signal (Fig. 5a, left) develops to an artifact in the mixed signal (Fig. 5a, center) due to cross-talk. After an application of ZCA whitening to the mixed data, the ground truth signals are perfectly recovered for all channels (Fig. 5a, right), and the spikes that compose the artifact are removed except for the two that are the original chance coincidence spikes that caused the artifact. All the other spikes outside the artifact are also kept intact.
Performance of ZCA whitening on the cross-talk model simulation data. a, Example application of ZCA whitening to simulated data of a 10-channel cross-talk model with uniform cross-talks between all channels. ZCA whitening applied to the mixed signals from the model (center) yields whitened signals (right), which are identical to the ground truth signals (left) used to generate the mixed signals. Red dots indicate the timings of spikes randomly injected in the ground truth signals and detected by thresholding the respective signals. b, Pearson correlation coefficient between the whitened signals and their respective ground truth signals, computed from simulations of the 10-channel cross-talk model with varied combinations of data duration, firing rate of spikes in each channel, and the uniform cross-talk strength α. Lines and flanking shades represent the median and inter-quartile interval, respectively, of the correlation coefficients of 100 channels (i.e., 10 channels times 10 simulations) per parameter combination. c, Example application of ZCA whitening to simulated data of the cross-talk model, where spike coincidences are intentionally introduced to the bottom 5 channels at the 3 timings indicated by the orange triangles at the bottom. ZCA whitening removes only the spike coincidences due to the cross-talk, keeping the original coincidences in the ground truth signals intact. The same convention as for panel a applies here. d, Effect of ZCA whitening on genuine cross-channel spike coincidences, in the same 10-channel uniform cross-talk model (α = 0.2). Five of the ten channels share injected coincident spikes; the coincidence injection rate is swept from 1 to 100 Hz with the overall firing rate of each channel kept at 100 Hz. Left: signal fidelity, the Pearson correlation between each ground truth channel and its whitened counterpart. Right: real-coincidence preservation, the fraction of the five channels on which an injected coincident spike is detected in the whitened signal, averaged over all coincidences. In both panels, lines and flanking shades represent the median and inter-quartile interval, respectively, of the respective measures for 100 channels (i.e., 10 channels times 10 simulations).
To quantify the performance of ZCA whitening on linearly mixed signals, we statistically compared the ground truth and the ZCA whitened signals obtained from simulations of our cross-talk model with a simple setting: 10 channels with all-to-all, uniform cross-talk and a common, homogeneous firing rate. We systematically varied the uniform cross-talk strength α, the duration T of the signals, and the common firing rate λ, and examined how the Pearson correlation coefficient between the whitened signals and their respective ground truth signal varies depending on these parameters. As summarized in Figure 5b, the correlation coefficient is almost 1 for the signal durations longer than 10 s, while it drops toward shorter durations, but never falls below 0.9995 (median over 10 channels times 10 simulations per case). The firing rate and the cross-talk strength do not seem to affect the correlation. Thus, for experimentally meaningful data durations (>10 s), the ZCA whitened signals are practically identical to the ground truth signals. This means that spikes can be detected in the whitened signals with the same waveforms and timings as in the ground truth signals. Furthermore, even for shorter durations, we confirmed that all spikes in the ground truth signals are detected in the whitened signal with exactly the same spike times.
In fact, ZCA whitening is exactly the inverse operation of the linear mixture performed by the proposed cross-talk model, as long as the covariance matrix of the mixed signals is correctly estimated. The declined performance of the ZCA whitening seen for shorter data durations is due to inaccurate estimation of the covariance matrix because of a smaller sample size for the estimation. Thus, given enough data, ZCA whitening should perform almost perfectly to recover the ground truth signals for any mixed signals where the correlations are generated according to the cross-talk model.
Here we note that, if temporal correlations across the spike trains, e.g., excess spike coincidences reflecting some physiological processes taking place in the recorded neuronal population (Grün et al., 2002a, 2002b), exist in the ground truth signals, they are not removed by the ZCA whitening and hence they correctly remain in the whitened signals. To illustrate this, we show in Figure 5c an application of the ZCA whitening to a simulation of our cross-talk model where spike coincidences mimicking physiological correlations in spike timing are manually introduced. The “physiological” coincidences in the ground truth signals are exaggerated by the cross-talk, generating a lot of copied artificial spikes in the mixed signals. The ZCA whitening removes all these copied spikes, while all the original spikes, including the manually introduced coincident spikes, remain the same in the whitened signals as in the ground truth signals. Only if the rate of the manually introduced spike coincidences is un-physiologically high (for an estimate of physiological coincidence rate, e.g., Maldonado et al., 2008), some of the coincident spikes are missed in the whitened signals (Fig. 5d). Thus, the ZCA whitening does not destroy physiological correlations in spike timing that may exist in the ground truth signals.
Now we apply ZCA whitening to our experimental data and see if this method can remove the artifacts. Figure 6b shows the complexity distributions for the macaque Y (top right) and macaque L (bottom right) data with application of ZCA whitening [and for comparison, the corresponding distributions without ZCA whitening (Fig. 6b, left), which are the same data as in Fig. 1d]. With ZCA whitening, the complexity distribution matches quite tightly to the distribution from surrogate data, i.e., independent data, with a considerable reduction of high order complexities seen in the complexity distribution without ZCA whitening.
Removal of artifacts by use of ZCA whitening. a, Complexity distribution of the Macaque Y (red bars) and Macaque L (blue bars) data, without (right) or with (left) ZCA whitening. For comparison, the mean (black dot) and standard deviation (error bar) of the complexity distribution of respective surrogate data are also shown. b, Global HSE index Ii for channels of the Macaque Y (red) and Macaque L (blue) data, plotted against the highest correlation Ci of the channels, without (left) or with (right) ZCA whitening. The inset in the right panel shows a magnified view of the same data. c, Comparison of spike train statistics of the Macaque Y (left) and Macaque L (right) data between without (x-axis) and without (y-axis) ZCA whitening. The color of dots represents the highest correlation of the respective channels without ZCA whitening, as indicated in the color bars to the right. Top: global HSE index for each channel. Middle: firing rate of spikes in each channel. Bottom: signal-to-noise ratio (SNR) of spike waveforms in each channel.
To quantify the effects of ZCA whitening on single channels, we introduce a measure evaluating the participation of each channel
in HSEs. We term this as the global HSE index Ii for channel i, defined as the ratio of the number of HSEs including channel i to the number of all spikes on channel i (see “Materials and Methods, Measure of spike synchrony” for the formula). The HSE index Ii,j that we have introduced before for a pair of channels i and j is henceforth referred to as pairwise HSE index. Furthermore, we also introduce a channel-wise measure of signal correlations,
i.e., the highest correlation coefficient for each channel i to all other channels, denoted as Ci for channel i and defined as
, where ci,j denotes the correlation coefficient between the band-passed signals of channel i and j. Figure 6c shows, for data with (right) or without (left) ZCA whitening, the global HSE indices Ii plotted against their respective highest correlation coefficients Ci for all channels in macaque Y and L data sets. In the case without ZCA whitening (Fig. 6c, left), as expected from the model, the channels with high Ci values are indeed also the channels with high Ii values, while the channels with Ci below 0.4 show rather small Ii. On the other hand, in the case with ZCA whitening (Fig. 6c, right), all channels show almost zero correlations, which is a direct consequence of the whitening, and also show considerably
lower Ii values, indicating an overall suppression of HSEs by ZCA whitening.
Figure 6d shows the statistics of the two data sets with (y-axes) and without (x-axes) ZCA whitening. Figure 6d (top) compares the global HSE index Ii with and without ZCA whitening. All channels show a reduction in Ii with ZCA whitening. This reduction is achieved without reduction in the firing rates of the spike trains in a majority of channels, as evidenced by the comparison of channel-wise firing rate with and without ZCA whitening (Fig. 6d, middle). Most channels show similar firing rates with and without ZCA whitening, indicating that ZCA whitening removes only a tiny fraction of spikes, which are most likely the ones copied by the cross-talk between channels. Similarly the spike waveform SNR does not change from after the whitening: the signal is largely unchanged (see Supplemental Material: Fig. S5).
High-density probe recordings also contain artifacts
So far we have focused on the occurrence and removal of artifacts in recordings with Utah electrode arrays, where the inter-electrode
distance is at least
. Nowadays more and more laboratories start to use high-density electrodes, such as Neuropixels probes (Jun et al., 2017), with inter-electrode distances as small as
at minimum. With such a high electrode density, a spike of one neuron can and is intended to be recorded at multiple neighboring
electrodes, which causes an apparent synchronous spike event among the respective channels. Such synchronous spikes (of different
shapes) are used to sort out the contributions of single units by use of a waveform template considering signals from multiple
neighboring channels, as is done in, e.g., the Kilosort sorting algorithm (Pachitariu et al., 2024). However, this does not necessarily mean that spike trains sorted in such a way are free from artifacts. They can still
contain artifacts due to cross-talks between distant channels pairs, or any other causes that introduce strong correlations
between signals at distant channels. In this section we focus on spike train data from a Neuropixels recording sorted by Kilosort
to show that these data also contain artifacts and our ZCA whitening-based approach presented above can be used to remove
them.
The data we consider here were recorded with a Neuropixels 1.0 probe (see “Materials and Methods”) in an awake mouse during visual stimulation. The probe was inserted through the primary visual cortex (V1; Fig. 7a), with the tip of the probe reaching the SC. The band-pass filtered raw signals appear largely similar across all channels (Fig. 7b, left). This is primarily because all recorded channels are relative to the external reference electrode (in this recording placed on the dura above the cerebellum) and are therefore equally affected by signal fluctuations at the reference. Consequently, the signals can show very strong correlations between channels, even at distant channel pairs (Fig. 7c, top).
Artifacts in Neuropixels recording. a, Illustration of the subject animal and the probe. b, Traces of the recorded signals after progressive signal processing steps. Channels are ordered according to their spatial position on the probe (the bottom corresponds to the tip of the probe). Time and voltage scales are indicated by the respective scale bars. Left: signals after band-pass filtering (BP) in 500–7,500 Hz. Center: signals after BP and median removal (MR). Right: signals after BP, MR, and ZCA whitening across all channels (ZW). c, Pearson correlation coefficient (CC) between the signals of a channel pair as a function of the channel distance. Note the different value ranges on the y-axis for different panels. Top: CC for signals after BP. Middle: CC for signals after BP and MR. Bottom: CC for signals after BP, MR, and ZW. d, Complexity distributions for signals with different signal processing steps. For “kilosort default,” BP and MR are applied to the signals, and then ZCA whitening is applied on each neighboring 32 channel groups, as done by Kilosort sorter with its default settings. e, Global HSE index of sorted single units plotted against their position on the probe. The size of the disk is proportional to the number of spikes of the corresponding single unit, as indicated by the legend in the rightmost panel. The total number of detected single units and spikes are shown in the title of each panel. The dataset labels and the color convention are common to those in panel d.
A standard signal pre-processing step is therefore to first remove signals from electrodes outside of the brain and then to
calculate the median of signals across all remaining channels at each time point. By subtracting this median signal from each
channel—commonly known as median removal or common average referencing—common noise patterns that are shared across all channels
are effectively removed (for more details see “Materials and Methods”). The signals after this median removal show more variability
across channels (Fig. 7b, center) and generally contain much less correlation between channels (Fig. 7c, middle). However, there are still strong correlations in channel pairs with very short distances, as expected from the conductivity
of the brain tissue. Besides that, there are clear negative correlations between channels separated by more than
, which can be recognized also in the signal traces in Figure 7c (middle panel) for top and bottom channels showing inverted waveforms. These negative correlations seem not to be of physiological
origin, because the bottom electrodes are in another brain region than the top electrodes (namely, SC and V1, respectively).
One may additionally notice oscillatory modulations of the correlation coefficient as a function of the inter-electrode distance.
In the scope of the present study, we do not discuss these oscillations further, but we suspect that they most likely stem
from the hardware or get introduced by the correction for the time shifts introduced by the multiplexing during the recording
(see “Materials and Methods”). The time-shift correction is a necessary pre-processing procedure to obtain properly time-aligned
signals from the raw recordings.
ZCA whitening on the median-removed signals almost totally gets rid of the positive and negative correlations (Fig. 7c, bottom). Kilosort sorting applied to the median-removed and ZCA whitened signals results in a considerable difference in terms of the complexity distribution of the obtained spike trains (Fig. 7d): the distribution for the median-removed signal (Fig. 7d, “BP + MR”) shows a heavy tail of high order complexities up to 20, while the distribution for the ZCA whitened signal (Fig. 7d, “BP + MR + ZW”) shows a faster decay with a maximum complexity of 7.
We need to note that ZCA whitening is already included in the typical and recommended workflow of the Kilosort sorting algorithm as a signal pre-processing step, which we intentionally disabled when we compute the complexity distribution for the median-removed signal in Figure 7d. The ZCA whitening in Kilosort is by default applied to the 32 channels closest to the target channel. In this manner, the signals in the channels separated by more than 32 channels are not decorrelated to each other, i.e., the negative correlations between distant channel pairs we found in the median-removed signals are not removed. This could lead to artifacts between sorted single units in the top and the bottom channels, and in fact, the complexity distribution for the median-removed signals sorted with the Kilosort default settings (Fig. 7d, “kilosort default”) shows more high order complexities than our ZCA whitened signals, where ZCA was applied to all channels simultaneously (Fig. 7d, “BP + MR + ZW”). To further examine the degree and location of artifacts in these data, we compute the global HSE index Ii for each sorted single unit and plot it against the position of that unit on the probe (Fig. 7e). In the case without ZCA whitening (Fig. 7e, left), the units around the top and the bottom of the probe stand out with particularly high Ii, as we expected from the negative correlations between top and bottom channels. These correlations cause Kilosort to extract spikes in these channels at the same time point just with opposite signs. In the case with ZCA whitening with Kilosort default settings (Fig. 7e, center), much less number of spikes are detected and hence units naturally show lower Ii values, but the units around the top and the bottom of the probe still exhibit relatively high Ii values compared to the other units. This is a reflection of the negative correlations that still remain in the signals by the spatially restricted application of ZCA (32 channels in parallel) by Kilosort. In the case with ZCA whitening applied to all channels altogether (Fig. 7e, right), a similar number of spikes and units are detected as in the previous case, whereas the units around the top and the bottom of the probe do not show particularly high Ii values, indicating that artifacts including these units are removed. Although whitening across all channels slightly reduced the overall waveform amplitude, the SNR of the detected units remained essentially unchanged (Supplemental Material: Fig. S6).
With these results, we conclude that, although the internal cause of artifacts is probably different from the case using Utah array(s), Neuropixel recordings can contain artifacts (although of different appearance) and ZCA whitening applied to all channels together effectively removes those artifacts from the data. We need to note that the use of ZCA whitening here cannot be considered as resolving the linear mixture of the signals according to our cross-talk model, since the background fluctuations in neighboring electrodes cannot be considered as independent as the model assumes, due to the close proximity of the electrodes in the Neuropixels probe. What we want to stress here is that HSEs do exist in high-density probe recordings even after spike sorting, and that the application of ZCA whitening to 32 neighboring channels only, which is the default setting of the Kilosort spike sorter and widely used in many studies, is not capable of eliminating these HSEs. We have shown that the ZCA whitening to all channels at once removes HSEs in the Neuropixels recording, with approximately the same number of spikes and sorted units as obtained with the default setting. Hence, we recommend to apply ZCA whitening always to all channels at once to obtain spike data free from the synchronous artifacts, even though the application to high-density probe recordings is not validated by the cross-talk model as in the case for Utah array recordings.
Discussion
We have shown, based on examination of electrophysiological recordings from multiple laboratories, that HSE in massively parallel spike trains commonly contain artifacts, i.e., artificial extremely precise (at the data sampling resolution) spike synchrony events. These artifacts express themselves in the raw signal as nearly identical activity traces, observed also between distant electrodes with sub-millisecond precision, strongly suggesting that they originate from external noise or cross-talk in the recording hardware. We introduced a measure, the HSE index (Ii,j), to quantify the occurrences of HSEs in each channel pair, and showed its systematic relation to the correlation coefficient (ci,j) of the band-pass filtered raw signals. We also presented a minimal model of cross-talk between signals that explains the observed relation between Ii,j and ci,j, suggesting that cross-talk is the main source for the artifacts in the examined datasets recorded by the Utah arrays. Based on the observations and the model, we suggested cleaning of the data by decorrelating the signals using ZCA whitening, which removes all above chance HSEs. We in addition showed that recordings with high-density probes such as Neuropixels probes may include artifacts and that the ZCA whitening based cleaning method removes these artifacts in those recordings, even though the artifacts there seem not to stem from electric cross-talks between channels. We thus highlight the importance of removing these artifacts from neural data, since they could bias analyses and produce misleading, as will be discussed below.
A crucial thing to note is that we cannot distinguish which spikes are artifact spikes and which are “real” spikes. We conclude that these are artifacts in the data from the abundance of HSEs and the resulting high correlation of the spiking activity in the data but do not identify artifacts on a single spike level (with a few exceptions see Supplemental Material: Fig. S4). While spiking activity is known to be coordinated on the timescales of a few milliseconds (König et al., 1995; Riehle et al., 1997; Butts et al., 2007; Grün, 2009), no observation of sub-millisecond coordination has been reported, nor are there any known mechanisms that enable sub-millisecond synchronization. A high amount of HSEs almost certainly signifies artifacts.
As a first step to mitigate artifacts, after their observation, we tried to identify their physical sources in the experimental recording setup. The first suspect was noise on the reference electrode; the electrode arrays in the macaque Y recording use a common reference wire, which is positioned on the dura (see “Materials and Methods”). We found many short lived artifacts associated with external events such as switching on a light or closing a door, probably affecting the reference wire. In such interference on the reference wire, the signals on all channels are affected (example for such an event in Supplemental Material: Fig. S4). However, most of the observed HSEs occur only in a small subset of the electrodes. Therefore these events do not originate from the reference electrode. Cross-talk was another potential source of artifacts. It had been known that they tend to happen between electrode shanks at relatively short distances (Nelson et al., 2017). Nevertheless, we observed artifacts also at large distances (Fig. 2), suggesting that cross-talk is happening elsewhere. Furthermore, the placement of the individual channels in the connector to the head stage does not seem to explain the spatial patterns of the cross-talk for all data sets (Supplemental Material: Fig. S2). Therefore, the circuitry inside the headstage is our primary suspect for cross-talk. There the analog signals from many channels are multiplexed, amplified, filtered and converted to digital signals, steps known to be very sensitive to cross-talk (Pérez-Prieto and Delgado-Restituto, 2021; Perez-Prieto et al., 2021). Indeed, in the case of macaque Y, previous recordings had used the analog signal processing headstage “Samtec” and “Patient Cable” (Blackrock Microsystems; Riehle et al., 2013; Brochier et al., 2018), and after updating it to “CerePlex E” (Blackrock Microsystems) we observed by far fewer artifacts. This is mainly due to the fact that with CerePlex E, digitalization is done at the headstage level, whereas it was done at the amplifier level with the Samtec and patient cables. In the case of macaque L, “CerePlex M” (Blackrock Microsystems) was used. Since it was not possible to further pin down and remove the sources of cross-talk, we decided to develop the post hoc artifact removal method presented in this paper.
Based on the assumption that artifacts result from linear mixing of signals, we suggested cleaning of data by use of ZCA whitening for artifact removal. This cleaning method works perfectly on simulated data to decorrelate the mixed signals, eliminating the artifacts and recovering the identical signals as in the ground truth data as demonstrated with the cross-talk model. This is because, under the assumption of independent background fluctuations in the ground truth signals, ZCA whitening is exactly the inverse operation of the linear mixture of the ground truth signals with a symmetric mixture matrix, as is done in the model with the cross-talk strength matrix. Application to the Utah array recordings also showed remarkable performance in removing artificial HSEs with high complexity orders, providing a convincing support for the hypothesis that the artifacts in these recordings were generated by electric cross-talk between channels.
Previous studies have taken different approaches for artifact removal. Torre et al. (2016) performed a complete removal of the HSEs with complexities >1 on the 1/30 ms timescale. This is for sure a brute force approach, but despite that the authors found excess spike synchrony (on the ms scale) for pairs and higher-order synchrony patterns, which revealed a particular spatial organization in the cortex suggested to relate to functional properties. In Brochier et al. (2018) two methods were used to remove artifacts. The first was to define “invalidated waveforms” which were defined by the Plexon Offline Sorter (Plexon Inc) as synchronous potential waveforms involving more than 70% of all channels. This was intended to remove artifacts (e.g., chewing artifacts). These invalidated waveforms were ignored in further analysis including spike sorting. The second step was applied after spike sorting. Here the sorted spike data were controlled on their original time resolution (1/30 ms) for potential occurrences of HSEs using the complexity distribution. HSEs with complexity larger or equal to 2 were removed, as well as spikes occurring within a short time interval around this event (±1/30 ms), which led to a more aggressive removal of HSEs than in Torre et al. (2016). These HSE-removing approaches to artifact removal may damage the data, since the lack of chance synchrony (see Supplemental Material: Fig. S1) can be noticed even on longer timescales on the order of several ms. As a result, potentially existing neuronal spike synchrony may be undetected (Oberste-Frielinghaus et al., 2025). Our proposed approach selectively removes the HSEs that stem from problematic correlations between channels, and hence affects the synchrony structure of the original data only minimally. Another previous study (Chen et al., 2022) defined a “synchrofact participation” (SP) ratio as the number of synchronous spike events above chance, derived by a bootstrap method on the complexity distribution. The channels with highest SP were removed iteratively, such that chance levels were re-evaluated after removal of each channel. Thus, instead of individual HSEs, here the whole signal of a channel is removed from the data. Our proposed method provides an alternative approach for artifact removal where no channels need to be removed from the data. For Neuropixels recordings (Jun et al., 2017) artifacts are intended to be removed on the level of the spike sorting. The Kilosort spike sorter (Pachitariu et al., 2024) contains an automatic setting that applies the ZCA whitening procedure on 32 neighboring channels at a time, successively. However, as we have shown here this should be extended to the application to all channels simultaneously to completely remove the artifacts. We note that ZCA whitening applied simultaneously to all recording channels is already implemented in modern spike sorting frameworks, such as those provided by SpikeInterface (Buccino et al., 2020; Laboratory et al., 2024), underscoring the relevance and practicality of our proposed approach. Nevertheless in some packages (e.g., Kilosort; Pachitariu et al., 2024) whitening is not applied to all recording channels simultaneously by default, therefore we emphasize the importance to check the settings to include all channels to the whitening.
In summary, we showed that artifacts are widespread in multi-electrode recordings. There are multiple possible reasons for their emergence: in the Utah array recordings, they are likely caused by electric cross-talks between the channels, and in the Neuropixels recording likely by the influence of the reference channel in the middle of the electrode. For the detection of the artifacts, we suggest to compare the complexity distribution of the data with their surrogate data at the data sampling resolution. The approach we propose here is to remove artifacts by ZCA whitening before spike sorting. Note that this requires access to the original broadband signal at data sampling resolution. The data cleaning based on ZCA whitening effectively removes artificial HSEs with high complexity orders without removing individual channels, irrespective of the cause of the artifacts. If higher-than-chance complexity events remain after the data cleaning, artifacts originating from common external noise may be present and should also be removed by excluding the affected time periods from further analysis. Artifacts are common in multi-electrode neural recordings and their presence can affect results of data analyses. Therefore detection and removal of artifacts is crucial for avoiding false results and ensuring a sound interpretation of the obtained results.
Footnotes
-
We thank Julia Sprenger, Vahid Rostami and Emiliano Torre for previous work on artifacts. This project has received funding partly from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreement No. 945539 (Human Brain Project SGA3), the NRW-network “iBehave” (grant number: NW21-049), and by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)—368482240/GRK2416, the DFG Priority Program (SPP 2041 “Computational Connectomics”) [S.J. van Albada: AL 2041/1-1] and International Research Project (IRP) “Vision-For-Action” between CNRS, Aix-Marseille University and Forschungszentrum Jülich. This work received funding from the Programme Johannes Amos Comenius (OP JAK) under the project “MSCA Fellowships CZ - UK3” (registration number CZ.02.01.01/00/22 010/0008220).
-
The authors declare no competing financial interests.
-
This paper contains supplemental material available at: https://doi.org/10.1523/JNEUROSCI.0295-26.2026
- Received February 18, 2026.
- Revision received June 19, 2026.
- Accepted July 13, 2026.
- Copyright © 2026 Oberste-Frielinghaus et al.
This is an open-access article distributed under the terms of the Creative Commons Attribution 4.0 International license, which permits unrestricted use, distribution and reproduction in any medium provided that the original work is properly attributed.












