| Literature DB >> 30542106 |
Carmen Rocío Caro-Martín1, José M Delgado-García1, Agnès Gruart1, R Sánchez-Campusano2.
Abstract
Spike sorting is one of the most important data analysis problems in neurophysiology. The precision in all steps of the spike-sorting procedure critically affects the accuracy of all subsequent analyses. After data preprocessing and spike detection have been carried out properly, both feature extraction and spike clustering are the most critical subsequent steps of the spike-sorting procedure. The proposed spike sorting approach comprised a new feature extraction method based on shape, phase, and distribution features of each spike (hereinafter SS-SPDF method), which reveal significant information of the neural events under study. In addition, we applied an efficient clustering algorithm based on K-means and template optimization in phase space (hereinafter K-TOPS) that included two integrative clustering measures (validity and error indices) to verify the cohesion-dispersion among spike events during classification and the misclassification of clustering, respectively. The proposed method/algorithm was tested on both simulated data and real neural recordings. The results obtained for these datasets suggest that our spike sorting approach provides an efficient way for sorting both single-unit spikes and overlapping waveforms. By analyzing raw extracellular recordings collected from the rostral-medial prefrontal cortex (rmPFC) of behaving rabbits during classical eyeblink conditioning, we have demonstrated that the present method/algorithm performs better at classifying spikes and neurons and at assessing their modulating properties than other methods currently used in neurophysiology.Entities:
Year: 2018 PMID: 30542106 PMCID: PMC6290782 DOI: 10.1038/s41598-018-35491-4
Source DB: PubMed Journal: Sci Rep ISSN: 2045-2322 Impact factor: 4.379
Overview of other spike-sorting methods/algorithms based on feature extraction.
| Author/Year | Number of Features/Description | Classification Method/Algorithm | |
|---|---|---|---|
| Gibson | 2 | Areas under the positive (integral IP) and negative (integral IN) phases of the action potential—that is, the Integral Transform (IT). | Fuzzy C-means clustering. |
| Jahanmiri-Nezhad | 2 | Peak-to-valley amplitude of the action potential, and the area under the curve (sum of absolute values). | |
| Kamboh & Mason[ | 2 | Zero-Crossing Features (ZCF) of the spike. ZC1 (the sum of all the values before zero-crossing) and ZC2 (the sum of values after zero-crossing). | |
| Zviagintsev | 2 | Integral Transform (IT). Discrete and normalized spike integrals IP and IN. | Segmented Principal Component algorithm + Principal Component Analysis (PCA). |
| Lewicki[ | 3 | Positive peak amplitude of the spike, peak-to-valley amplitude, and the waveform duration. | |
| Yang | 3 | Positive peak amplitude of the spike, and the positive [F14] and negative peaks of the spike first derivative (FD). | Spike derivative-based feature extraction algorithm. Spike height + Peaks of spike derivatives. |
| Paraskevopoulou | 3 | Positive peak [F14] of the spike FD, and the positive [F18] and negative [F19] peaks of the spike second derivative (SD). | 10-iteration |
| Yang | 3 | Integral of repolarization (IR) of the spike, and the positive [F14] and negative peaks of the spike FD. | 20-iteration |
| Balasubramanian & Obeid[ | 5 | Spike power, spike amplitude range, negative and positive deflections, and the spike gradient slope. | Fuzzy logic-based feature extraction system. |
| Sonoo & Stalberg[ | 5 | Peak-to-valley amplitude of the spike, waveform duration, negative Integral Transform (nIT), ratio (nIT/maximum peak), and the logarithm of the maximum rise of the spike. | Nearest-neighbor Methods + Discriminant Analysis (DA). |
| Su | 6 | Spike peak amplitude, peak roundness (i.e., the spike peak [F19] of the SD), the root-mean-square of pre-spike amplitude, the highest repolarization rate, the afterhyperpolarization (i.e., afterspike minimum), and the correlation coefficient between the spike and the reference waveform. | |
| Bestel[ | 7 | Positive and negative peaks of the action potential, left and right spike angles, negative and positive signal energy of a continuous-time signal, and the core spike duration. | Expectation maximization (EM) method + Gaussian basis functions. |
| Stewart | 7 | Peak-to-valley amplitude of the spike, waveform duration, trailing waveform duration, leading waveform aspect ratio, trailing waveform aspect ratio, waveform transition slope, and event duration. | Nearest-neighbor Methods + Discriminant Analysis (DA). |
Note that in general, the authors cited here have used only three (F14, F18 and F19 common features) of the 24 features (F1–F24) proposed in this work (see Table 3).
Neurophysiological features of each spike characterizing the process of creating objects (24D feature-vectors).
| Number | Name | Algebraic definition | |
|---|---|---|---|
| Shape | F | Waveform duration of the FD of the action potential | tP5 − tP1 |
| F | Peak-to-valley amplitude of the FD of the action potential |
| |
| F | Valley-to-valley amplitude of the FD of the action potential |
| |
| F | Correlation coefficient between the FD of the action potential (ap) and the reference spike-waveform (ref), considering their corresponding standard deviation |
| |
| F | Logarithm of the positive deflection of the FD of the action potential |
| |
| F | Negative deflection of the FD of the action potential |
| |
| F | Logarithm of the slope among valleys of the FD of the action potential |
| |
| F | Root-mean-square of pre-event amplitudes of the FD of the action potential |
| |
| F | Negative slope ratio of the FD of the action potential |
| |
| F | Positive slope ratio of the FD of the action potential |
| |
| F | Peak-to-valley ratio of the FD of the action potential |
| |
| Phase |
| Amplitude of the FD of the action potential relating to P1 |
|
| F | Amplitude of the FD of the action potential relating to P3 |
| |
| F14 | Amplitude of the FD of the action potential relating to P4 |
| |
|
| Amplitude of the FD of the action potential relating to P5 |
| |
| F | Amplitude of the FD of the action potential relating to P6 |
| |
| F | Amplitude of the SD of the action potential relating to P1 |
| |
|
| Amplitude of the SD of the action potential relating to P3 |
| |
| F19 | Amplitude of the SD of the action potential relative to P5 |
| |
| Distribution | F | Inter-quartile range (Q3 − Q1) of the FD of the action potential, considering the percentiles |
|
| F | Inter-quartile range (Q3 − Q1) of the SD of the action potential, considering the percentiles |
| |
| F | Kurtosis coefficient of the FD of the action potential, considering the fourth sampling moment of |
| |
| F | Fisher asymmetry of the FD of the action potential, considering the third sampling moment of |
| |
| F | Fisher asymmetry of the SD of the action potential, considering the third sampling moment of |
|
List of shape (F1–F11), phase (F12–F19), and distribution (F20–F24) features and their algebraic definition (see graphic representation in Fig. 3), considering the first derivative (FD) and the second derivative (SD) of each action potential. The three common features (F14, F18 and F19) proposed also by other authors[19,20] (see Table 1) are marked with an asterisk.
Figure 1Overall structure of the proposed SS-SPDF method/algorithm. Step-by-step illustration of the spike-sorting process based on shape, phase and distribution features (SS-SPDF method) and K-TOPS clustering (K-means and template optimization in phase space) with validity and error indices. White sub-blocks represent the common steps of a spike-sorting algorithm. Gray sub-blocks indicate the main methodological contributions of the proposed spike sorting approach, —that were the SS-SPDF method of feature extraction and the K-TOPS clustering algorithm for systematically sorting both single-unit spikes and overlapping waveforms. Notice that, shape features refer to measures extracted from spike waveform in time domain of the first derivative, phase features refer to measures extracted from spike trajectory in phase-space (spike first derivative vs. spike second derivative), and distribution features concern to features extracted from spike amplitude distribution function for both the first and second derivatives. At the last step (resulting clusters), a summary subblock (also in gray) for reporting the relevant information of the whole process was implemented. This approach facilitates the physiological interpretation of the extracted spike features, the assessment of the modulating properties of the involved neurons, and the functional characterization of the neural process under study.
Figure 2An example illustrating the preprocessing steps during the spike sorting of extracellular rmPFC recordings. (a) rmPFC raw record, with 37500 timepoints that corresponds to 1.5 s at a sampling rate of 25 kHz. (b) First derivative of the rmPFC band-pass (FIR filter, 450–2050 Hz) filtered record. The horizontal dotted line indicates an alternative amplitude threshold for direct spike-event detection. (c) Distribution in time of the spikes detected in b. (d) Left, resulting spike events (gray traces) in the time domain (time vs. first derivative) and their corresponding mean event profile (black trace). Right, phase space portraits (second derivative vs. first derivative; gray traces) of the spikes and their corresponding mean phase trajectory (black trace).
Figure 3Schematic representation of the feature-extraction method. (a) Six fundamental points (P1–P6, see Table 2) and 11 shape-based features (F1–F11) from each spike event in the time domain of the spike first derivative (FD). (b) Eight phase-based features (F12–F19) from each spike trajectory in the phase space (second derivative (SD) vs. FD). (c) Five distribution-based features (F20–F24) for the statistical amplitude distribution of the FD (i.e., F20, F22, and F23) and SD (i.e., F21 and F24) of the spike. Note that for each spike amplitude distribution (probability density function, PDF), the mean, median, mode, interquartile range (Q3–Q1), kurtosis (e.g., k – 3 > 0), and asymmetry (e.g., s > 0) are indicated. In summary, a vector of 24 features (F1–F24, see Table 3) was determined for each spike event.
List of the selected waveform components.
| Spike-points number | Definition |
|---|---|
| P1 | First zero-crossing of the FD before the action potential has been detected |
| P2 | Valley of the FD of the action potential |
| P3 | Second zero-crossing of the FD of the action potential that has been detected |
| P4 | Peak of the FD of the action potential |
| P5 | Third zero-crossing of the FD after the action potential has been detected |
| P6 | Valley of the FD after the action potential |
Six fundamental points (P1–P6) determined each detected spike. These points were graphically identified in both time domain (Fig. 3a) and phase space (see Fig. 3b), considering the first derivative (FD) and the second derivative (SD) of the action potential.
Figure 4Validation on simulated data. The wide-ranging simulated data were sampled at 44 kHz during 180 s. The time-window of the represented simulated data (panels a and c) was of 150 ms. (a) Simulated data without noise. (b) At the left, it is represented the three activity patterns (cluster 1, black template; cluster 2, red template; and cluster 3, blue template) detected from the wide-ranging simulated data with action potentials clustering by SS-SPDF method/algorithm. At the right, it is represented their corresponding phase-space portraits (action potential vs. its first derivative). (c) Simulated data with low added noise and a signal-to-noise ratio of 3.55 dB. (d) First derivative of the band-pass (FIR filter, 450–2600 Hz) filtered signal. (e) At the left, it is represented the three activity patterns (cluster 1, 2728 spikes, black traces; cluster 2, 2690 spikes, red traces; and cluster 3, 2733 spikes, blue traces) of the wide-ranging (180 s) simulated data with action potentials sorting by SS-SPDF method/algorithm (comprising K-TOPS clustering), while the phase-space portraits of them are represented at the right part of this panel. Here, each white trace (resulting template) represents the mean spike-event of each cluster.
Observed classification matrices resulting from our SS-SPDF method/algorithm [K-TOPS approach —that is, applying the sequence of first, K-means (for sorting the single-unit spikes), and then, template optimization in the phase space (for sorting the overlapping waveforms)] on five simulated datasets (from D_1 to D_5).
| Dataset | Classification Matrix | *Unclassified | *Misclassified | *Well-classified | Error Index |
|---|---|---|---|---|---|
| D_1 |
| 23 (13) | 13 (4) | 8145 (64) | 26.665 |
| D_2 |
| 12 (9) | 11 (1) | 8158 (71) | 17.436 |
| D_3 |
| 13 (9) | 13 (2) | 8155 (70) | 20.518 |
| D_4 |
| 25 (18) | 11 (1) | 8145 (62) | 25.357 |
| D_5 |
| 12 (11) | 17 (2) | 8152 (68) | 23.195 |
| Mean |
| 17 (12) | 13 (2) | 8151 (67) | 22.634 |
The first number in unclassified, misclassified or well-classified columns is the number of spike events. The number in parentheses represents the number of overlapping waveforms for each category. In the last row, the corresponding percentage values (%) are indicated. In the last column, the resulting Error Index [see Eq. (9)] for each simulated dataset and the average value of them are reported. *Here are indicated, well-classified (), misclassified () and unclassified [)] spike events. Also, N is the total number of spike events (8181, among which 8100 are single-unit spikes and 81 are overlapping waveforms), while d and r are the diagonal and nondiagonal elements of the observed classification matrix, respectively. Abbreviations: SEM, standard error of the mean.
Error Index for different approaches: Principal Component Analysis (PCA), Reduce Feature Set (RFS), Wavelet-based Spike Classifier (WSC), K-means (first step alone), K-means and Template Optimization in Phase Space (K-TOPS, two-steps workflow) and Template-Matching in Phase Space (TMPS), all of them applied to simulated datasets with the same template generation protocol (T1, T2 and T3 in Fig. 4).
| Method/Algorithm | Category | Error Index | |
|---|---|---|---|
| *Simulated data description (overlapping waveforms were generated as superpositions of the single-unit templates | Unclassified | Misclassified | Mean ± SEM |
|
| |||
| *The resulting spike train mimicked three neurons (with 100 instances per unit) firing independently at an average rate of 30 spikes/s and contained 19 overlapping waveforms. | 22.4 ± 4.082 (ranged 8–26) | 94.0 ± 1.304 (ranged 92–99) | 137.650 ± 0.951 (ranged 135.6–140.8) |
|
| |||
| *The resulting spike train mimicked three neurons (with 100 instances per unit) firing independently at an average rate of 30 spikes/s and | 21.4 ± 5.335 (ranged 9–38) | 59.8 ± 1.241 (ranged 56–63) | 88.620 ± 1.225 (ranged 85.7–92.8) |
|
| |||
| *The resulting spike train mimicked three neurons (with 100 instances per unit) firing independently at an average rate of 30 spikes/s and | 33.4 ± 8.606 (ranged 20–64) | 20.6 ± 1.833 (ranged 14–25) | 35.920 ± 3.170 (ranged 30.5–47.1) |
|
| |||
| *The resulting spike train mimicked three neurons (with 2700 instances per unit) firing independently at an average rate of 15 spikes/s and | 86.0 ± 1.581 (ranged 82–91) | 11.0 ± 1.049 (ranged 9–15) | 58.529 ± 0.431 (ranged 57.4–59.7) |
| *The resulting spike train mimicked three neurons (with 2700 instances per unit) firing independently at an average rate of 15 spikes/s and | 17.0 ± 2.881 (ranged 12–25) | 13.0 ± 1.095 (ranged 11–17) | 22.634 ± 1.665 (ranged 17.4–26.7) |
| *The resulting spike train mimicked three neurons (with 2700 instances per unit) firing independently at an average rate of 15 spikes/s and | 17.6 ± 3.558 (ranged 7–26) | 3.4 ± 1.030 (ranged 1–7) | 13.848 ± 1.468 (ranged 10.3–17.3) |
|
| |||
| *The resulting spike train mimicked three neurons (with 104 instances per unit) firing independently at an average rate of 10 spikes/s, | Unreported | Unreported | 13.010 ± 1.789 |
The number of both unclassified and misclassified spike events and the Error Index values are reported by the Mean ± SEM (standard error of the mean).
Figure 5Automatic K-means clustering and the cohesion-dispersion index (CD-index). (a) Some examples (one for each metric) considering different combinations (distance vs metric) for their comparative analysis using the proposed 24D feature vectors (Table 3). Each gray dotted square indicates the relationship between the value (in %) of the internal validation index (Silhouette, blue triangle; Davies-Bouldin, orange circle; or Dunn, green square) and the number of clusters obtained by the unsupervised method. Combinations (distance vs. metric) for which the Silhouette and Dunn indices reached their maximum values while the Davies-Bouldin index reached its minimum value are marked with an asterisk (*). In each of these cases, the suboptimal number of clusters is indicated (K = 3, 4 or 5). The distance-metric combinations for which the criterion above was not met are identified as failures. (b) CD-index value (in %) vs. number of clusters for the selected seven metrics. Note that the three internal validation indices interact to produce the maximal cohesion-dispersion of the clustering. Thus, the highest of all the CD-index values (i.e., CD = 100%, Cityblock vs. Correlation) afforded the optimal number of clusters (K = 3, marked with an asterisk over the red dashed rectangle). (c) Classification applying the SS-SPDF method/algorithm. Note that for the selected recording epoch (1.5 s; at rmPFC), two clusters were significant (cluster 1, 23 spikes; cluster 2, 19 spikes) in their configurations, while the third one was not (cluster 3, 1 outlier). (d) At the bottom right are illustrated the principal components analysis (PC1 vs. PC2 plot) and the waveform templates (magenta, brown, and gray profiles) for the resulting clusters. Note that, the action potentials clustering by the SS-SPDF method/algorithm (in c) are in perfect correspondence to those spikes (magenta circumferences, brown crosses, and gray square) clustering by principal component analysis (in d).
Figure 6Comparison of the clustering performance between the current SS-SPDF method/algorithm and other methods/algorithms also based on feature extraction. FV2, FV3, FV5, FV6, and FV24 (with 2, 3, 5, 6, and 24 features, respectively) are feature vectors with different features and dimensions (see Table 6). Notice that, the vectors FV2, FV5, FV6 were not subsets of FV24. Only FV3 with three common features is a subset of FV24. (a), (c) Neuronal activities at the rmPFC corresponding to three representative trials of recordings (epoch of 1.5 s). For each trial, the number of identified spikes (trial 1 in a, 32 spikes; trial 2 in c, 57 spikes) and the different clusters (spike events with the same color symbol) are indicated. (b), (d) The process for the determination of the optimal clustering among different feature vectors applying the CE-index. For all the principal components (PC) analyses (PC1 vs. PC2 plots), the resulting number of clusters is indicated. In addition, the value of the CE-index is reported in each panel corresponding to each feature vector (Table 6). For each selected trial, the lowest value of the CE-index (trial 1, CE = 2.085; trial 2, CE = 3.161; applying FV24, with K = 4) afforded the optimal clustering among all the classifications (i.e., the one with the lowest value of the CE-index, marked with an asterisk over the red dashed rectangle). (e) Distribution of the CE-index values for the different feature vectors across 60 trials. Once again, the lowest CE-index was obtained for FV24, which showed statistically significant differences with respect to the mean values of the CE-index obtained by applying the other feature vectors. (f) Multiple comparison analyses. For the pairwise comparisons with significant differences between the mean values of the CE-index, the significance level is indicated (*P < 0.05; **P < 0.01; ***P < 0.001; see Supplementary Table S4). Data are represented by the Mean ± SEM.
Figure 7A full enforcement of the SS-SPDF method/algorithm for a single trial of rmPFC recording. (a) A representative single trial of rmPFC recording involving single-unit spikes and special spike events (burst activity and spike overlapping). The resulting spike events (s = 50) are indicated with different color symbols, one for each cluster of spike events. (b) The internal validation indices (S, Silhouette; DB, Davies-Bouldin; and D, Dunn) and the CD-index (in %) for the optimal distance-metric combination (Cityblock vs. Jaccard). The optimal number of clusters was K = 5 (without outliers) corresponding to the maximum value (100%, red dashed line) of the CD-index is indicated. (c) Modulating patterns of the identified neurons (five clusters of neurons), including the pulses (spikes with different color symbol in each panel) and the firing rates (in spikes/s). (d) Representation of the spike events in both time domain and phase space. (e) Principal components (PC1, PC2, and PC3) analysis, indicating the value of the CE-index (FV24; CE = 2.532) obtained by SS-SPDF method/algorithm. Each normalized histogram in the diagonal represents the number of mixed spike events per band (n = 10) for each principal component. (f) Canonical components (CC1 and CC2) analysis. Waveform templates for the resulting clusters (five clusters of spikes, and two clusters of outliers) are showed and their corresponding numbers of spike events are indicated. Also, three different neuronal units (U1, 9 spikes; U2, 9 spikes; and U3, 28 spikes; see panels d and f) are indicated as resulting of the spike sorting analysis for this representative trial of rmPFC recording.
Values of the clustering error index (CE-index) for feature vectors (FV) with different features and dimensions to check the clustering performance from two representative trials (trials 1 and 2) and from a session of recordings [n = 60 trials, from the rostral-medial prefrontal cortex (rmPFC)].
| FV | Feature description/Author | |||
|---|---|---|---|---|
| Trial 1 | Trial 2 | Session of 60 trials | ||
| FV2 | Zero-Crossing Features (ZCF) of the spike. ZC1 (the sum of all the values before zero-crossing) and ZC2 (the sum of values after zero-crossing). Taken from Kamboh & Mason[ | |||
| FV3 | Positive peak [F14] of the spike FD, and the positive [F18] and negative [F19] peaks of the spike second derivative (SD). Taken from Paraskevopoulou | |||
| FV5 | Peak-to-valley amplitude of the spike, waveform duration, negative Integral Transform (nIT), ratio (nIT/maximum peak), and the logarithm of the maximum rise of the spike. Taken from Sonoo & Stalberg[ | |||
| FV6 | Spike peak amplitude, peak roundness (i.e., the spike peak [F19] of the SD), the root-mean-square of pre-spike amplitude, the highest repolarization rate, the afterhyperpolarization (i.e., afterspike minimum), and the correlation coefficient between the spike and the reference waveform. Taken from Su | |||
| FV24 | Description according to the waveform features (shape, phase, and distribution measures) proposed in Table | |||
CE-index values are reported by the Mean ± SEM (standard error of the mean). The total number of spikes (s), the dimensionality (d) of the method and the number of clusters (K) for each trial are also indicated (see Fig. 6). Notice that, the vectors FV2, FV5, FV6 were not subsets of FV24. Only FV3 with three common features (F14, F18 and F19) is a subset of FV24.
Figure 8Block diagram of the overlapping waveform separation algorithm using template optimization in phase space (TOPS clustering algorithm, second step). (a) Real overlapping waveform. The arrows indicate the fundamental minima and the different points (from 1 to 7) are the zeros. (b) Raw segment profiles (dashed traces) extracted from the real overlapping waveform according to the criterion for the fundamental minima. Each segment in time domain corresponds to a quasi-closed trajectory in the phase space. (c) Single-unit templates (gray traces) obtained from K-means clustering (first step). Here are also indicated the extracted segments in time domain (black traces) corresponding to quasi-closed trajectories in the phase space. (d) Artificial overlapping waveform obtained by linear superposition of the single-unit templates with time shift sequences smaller than 2 ms between peaks. (e) Phase space portrait and the new variables θ (phase) and n(θ) (normal deviation) that were introduced to describe the trajectory of the analyzed signal (i.e., the reconstructed raw segment profile S in the phase space, see dashed trace). The length of the vector |n(θ)| corresponds to the minimal distance between the signal S and the limit trajectory T (i.e., one reconstructed single-unit template T in the phase space, see black trace). P0, M and N are reference points of the trajectories in the phase space. Finally, to find the artificial overlapping waveform which resembles the real overlapping waveform as good as possible, the cross-correlation is applied between them, for all the combinations.