1. Introduction
The realm of neural signal analysis has witnessed remarkable advancements with the emergence of clustering methods that play a crucial role in uncovering intricate patterns within multi-dimensional data [
1,
2,
3]. Among these techniques, spike sorting is crucial, facilitating the isolation and classification of individual action potentials from complex recordings [
4,
5,
6].
Accurate spike sorting is fundamental for unveiling neural dynamics, understanding network interactions, and deciphering the underlying mechanisms governing neural behavior [
7]. However, the extraction of action potentials from biosignals has presented formidable challenges due to the pervasive presence of noise, interference, and the diversity of action potential shapes in biological recordings [
8,
9,
10]. In recent years, these main drawbacks have been studied from a computational viewpoint, where two seminal works have been published [
11,
12]. In these articles, the most commonly used techniques for biosignal analysis and spike sorting are mentioned, highlighting algorithms such as Wavelets and PCA as feature extraction techniques. Some newer algorithms, such as Support Vector Machines and neural networks, are also mentioned [
13,
14]. In the particular case of PCA, three papers mention that this technique has been used to reduce the dimensionality of the data. For clustering, some methods such as Bayesian and hierarchical clustering and Gaussian mixtures are also mentioned as a possibility to analyze this kind of data [
15]. The methodologies reviewed in these two papers leverage the synergistic potential of machine learning, in particular, clustering methods and signal processing, to unravel the complexities of action potential detection and classification.
Recent articles have introduced novel methods for spike sorting: In [
16], they introduced an approach for spike sorting by using a one-dimensional convolutional neural network; their method achieved high accuracy in synthetic data. However, it has not been tested with real acquisitions that have varying noise levels and overlapping spikes. They outperformed methods like WMsorting and deep learning multi-layer perceptron (MLP) models. The study by [
17] proposed a deep learning-based technique for spike sorting, termed deep spike detection (DSD), to improve spike detection accuracy. DSD incorporates two convolutional neural networks (CNNs) into the conventional spike sorting pipeline. These CNNs are employed for selecting active neural channels and removing artifacts from the chosen channels, enhancing the overall classification performance. In [
18], they present another approach to spike sorting using a deep learning-based autoencoder method. This method aims to improve clustering performance compared to traditional techniques like PCA and ICA. The improvement has been demonstrated using both synthetic and real datasets. Autoencoders are capable of learning underlying features from unlabeled data. Spike sorting involves extracting informative features from spike waveforms, and autoencoders can discover these features in an unsupervised manner, eliminating the need for labeled data, which can be difficult to obtain in spike sorting. Additionally, autoencoders have been shown to be robust to noise, which is a common challenge in spike sorting due to the low signal-to-noise ratio of recordings. In [
19], the authors proposed a deep learning network based on a convolutional neural network and sliding window Long Short-Term Memory for spike sorting. LSTM [
20] is a recurrent neural network architecture that has recently attracted attention in the study of biosignals due to its ability to process spatiotemporal information. This paper presents important results for low noise and simulated data, which is not the case for real neural recordings. In the same way as reinforcement learning, Liu et al. [
21] proposed a method for sorting under multi-class imbalance in two public datasets with real neural recordings. They proposed a Markov sequence decision and constructed a dynamic reward function (DRF) to improve the sensitivity of the agent to minor classes based on the inter-class imbalance ratios. Another paper using deep learning was presented in [
22], where the authors developed a deep learning method, which learns contextualized, temporal, and spatial patterns and classifies them as channels containing neural spike data or only noise. From this, they created a batch of waveforms to detect spikes in data recorded from a single tetraplegic patient. From the same author, in [
14], a method based on K-means for classifying the detected spikes was presented. The methodology employed by these authors aligns closely with our approach, as we share a parallel trajectory. Much like their sequence, we initially published a paper focusing on spike detection and shifted our focus toward classifying the detected spikes. However, in our instance, our exploration delves into distinct clustering algorithms. The K-means algorithm was also recently investigated with template optimization in phase space as demonstrated in [
8]. This method obtained interesting results on both simulated data and real neural recordings. Wavelet [
23] is another approach widely used in the analysis of biosignals. In this paper, the authors use a continuous wavelet transform (CWT) with optimized parameters to sort artificial and real data. The authors suggest that their results outperform those based on PCA.
Several notable and contemporary contributions within the realm of spike sorting have been highlighted [
24]. Nevertheless, providing an exhaustive review of all existing literature in this domain is an intricate task, further compounded by the challenges of conducting a direct comparison across this large number of works. The intricacy arises due to the divergent employment of various databases and algorithms for detecting and classifying potentials.
In this context, we have spotlighted articles resembling our proposition, particularly those grounded in PCA and K-means methodologies. However, to the best of our knowledge, our pursuit did not yield evidence of articles employing hierarchical clustering or Self-Organizing Maps as classification methods in neural recordings. Even those employing PCA and K-means do so in a manner distinct from the approach proposed in this study. Specifically, our approach involves an initial step of utilizing spike detections derived from a prior research endeavor conducted by the research group and documented in [
25]. This antecedent work employed an adaptive threshold method for real-time action potential detection. This precursor dataset facilitated the derivation of feature matrices capturing statistical attributes of the action potentials. These matrices were then subjected to three distinct clustering algorithms: K-means, hierarchical clustering, and Self-Organizing Maps (SOMs). Notably, within the specific context of K-means, PCA was integrated to reduce dimensionality and enhance the overall outcomes.
The article is structured as follows: First, the introduction is presented in
Section 1. Subsequently, the research methodology developed in this article is outlined in
Section 2. The biosignals and spike detection are covered in
Section 2.1. Unsupervised classification methods and results are presented in
Section 3. Finally, the discussion and the conclusions are drawn in
Section 4 and
Section 5, respectively.
2. Materials and Methods
Spike sorting typically encompasses two distinct stages: detecting action potentials and their subsequent classification. Each of these stages is further divided into sub-stages. The first stage involves initial processing steps, such as filtering, while the second stage involves extracting pertinent features for classification. Although these two stages are intrinsically interconnected, innovation does not necessarily unfold in both simultaneously. In this context, the current study extends the prior research undertaken by the same research group. In a previous endeavor detailed in [
25], our group developed a real-time action potential detection hardware implementation for the two distinct biosignals used in this work, a macaque monkey signal and a human pancreatic signal. In that study, the research team successfully devised an FPGA implementation of an adaptive threshold method tailored for detecting action potentials (spikes).
What is now proposed is to classify these spikes using various clustering methods, among which the use of Self-Organizing Maps stands out. To the best of our knowledge, SOM has not been applied to classifying these types of signals. We also propose using a combination of Principal Component Analysis and K-means, which have been independently used in other works. Finally, the implementation of hierarchical clustering is suggested, a technique which, according to our literature review, has also not been utilized in these type of signals.
The specific proposal is depicted at the bottom of
Figure 1. We assume all detected spikes have been stored, from which we extract their statistical attributes. These attributes are subsequently normalized and serve as inputs for the unsupervised classification methods to execute their clustering procedures. Principal Component Analysis is also used to reduce the dimensionality of the data.
2.1. Biosignals and Spike Detection
In this study, two distinct biosignals are utilized: the first, captured in vivo from a macaque monkey (
Figure 2a), has a duration of 559 s, from which only 25 s were used in this work, and a sampling frequency of 40 kHz; the second type, acquired in vitro for 13 s from human pancreatic cells (
Figure 2b), is characterized by a sampling frequency of 10 kHz. The acquisition of these signals was not carried out in this work.
Spikes are identified within the signals illustrated in
Figure 2, showcasing specific instances of the raw biosignals acquired in vivo from a macaque monkey and in vitro from a human pancreas (see
Figure A1 for some of the spike shapes found in the macaque monkey and human pancreatic biosignals). The spike detection process employs an adaptive thresholding method [
26], automating the procedure while dynamically adjusting the threshold to remain above the signal’s background noise level. Initial spike detection was performed in a previous study [
25]. Our primary emphasis in this current research lies in thoroughly analyzing these spikes and classifying them.
Table 1 shows a subset of the statistical data extracted from 12 detected spikes within the monkey signal. A similar table exists for the spikes in the human pancreatic signal. In total, 327 spikes were identified within the monkey signals, while 386 spikes were detected in the human pancreatic signals. These data were subsequently utilized as inputs for clustering algorithms, enabling the aggregation of spikes exhibiting similar statistical characteristics. The table employs a color scale to indicate value intensity, revealing a notable level of variability within the dataset. This inherent variability has been addressed within this study through data normalization as follows:
This normalization primarily involves extracting the mean and scaling the data based on the standard deviation. This process aims to center the features and align the standard deviations, thereby mitigating the potential dominance of features with larger amplitudes within the clustering algorithms. This precaution prevents any feature from overpowering the learning process, ensuring that the estimator effectively learns from all features.
Upon normalizing the feature matrix presented in
Table 1, the resulting data are illustrated in
Table 2 for macaque monkey data and similarly for the human pancreatic data in
Table 3. Unlike the former data, it is evident that the values are no longer widely separated, yet they maintain the same underlying distribution. Consequently, the clustering algorithms can effectively learn from all the features without the undue influence of any particular feature on the learning process.
The datasets presented in
Table 1,
Table 2 and
Table 3 constitute the feature matrices used in the subsequent description of the clustering algorithms. These algorithms have undergone validation for both feature matrices, and the outcomes of these validations are presented in the subsequent sections.
2.2. Unsupervised Classification Methods
Three distinct methods were employed to classify the identified spikes for both signals: K-means, hierarchical clustering, and Self-Organizing Maps (SOMs). The protocol and parameters used during experiments are depicted in
Figure 3. In this work, we chose to avoid using features incurring high computational costs. Therefore, we only utilized time-domain statistics as features. Below are the features utilized during the experiments:
Mean Absolute Value (
MAV). It is the average of the absolute values of the
N samples taken:
Variance (
VAR). It defines the dispersion of the data with respect to the mean:
Root Mean Square (
RMS) is a scalar value corresponding to the root mean square. It is used to help obtain the amplitude of the signal:
The Integral of the Absolute Value (
IAV). It represents the sum of the absolute values of the signal in a period of time:
Simple Square Integral (
SSI). It calculates the energy of the signal:
Waveform Length (
WL). It specifies the cumulative length of the waveform shape in a particular segment:
Entropy (
H). Entropy measures the complexity of an uncertain system. It is a statistical method for quantifying the unpredictability of variations in both deterministic and stochastic signals:
where
is the corresponding probability of each of the
N-states.
Figure 3.
Protocol and parameters used during experiments with each unsupervised classification method.
Figure 3.
Protocol and parameters used during experiments with each unsupervised classification method.
To enhance the differentiation between action potentials, additional features based on their waveform characteristics were calculated. These features included the zero-crossing rate (the number of times the waveform crosses zero), the peak-to-peak distance (the distance between samples at the minimum and maximum peaks), and the peak amplitude. This focus on waveform properties aimed to improve the ability to distinguish between action potentials. The following sections delineate the outcomes attained through the application of these methodologies.
4. Discussion
The comprehensive exploration of clustering methods within the context of spike sorting in both macaque monkey and human pancreatic signals has yielded valuable insights into the intricacies of neural signal analysis. The amalgamation of advanced computational techniques with the distinct characteristics of neural recordings underscores the multi-faceted nature of this endeavor.
The initial step of spike detection formed the foundation for subsequent analysis. The application of an adaptive threshold, as described, facilitated the automatic identification of action potentials while efficiently adapting to background noise levels. Notably, this strategy allowed us to focus on the nuanced shapes and patterns of the detected spikes without being encumbered by noise artifacts.
Feature extraction emerged as an intermediate stage, enhancing the interpretability of the data while reducing their dimensionality. The utilization of Principal Component Analysis (PCA) for signal dimensionality reduction effectively captured essential information in both signals. This reduction in dimensionality proved beneficial for subsequent clustering algorithms, enabling more effective differentiation among distinct spike shapes. In the context of the macaque monkey signal, this approach enabled the identification of a cluster of spikes that were initially misinterpreted as noise due to their similar signal amplitude. In the scenario of the human pancreatic signal, the combined utilization of PCA and K-means led to enhanced classification outcomes. Specifically, it transformed a scenario with only two distinct groups achieved through K-means alone into one featuring three well-defined groups, underscoring the complementary power of these methods when employed together.
The integration of Self-Organizing Maps (SOM) introduced a novel dimension to the study. The SOM methodology offered an unsupervised learning framework that revealed underlying data topology. The resulting clusters enabled the identification of similar neural patterns, thereby contributing to a refined understanding of neural activity. The delineation of clusters as showcased through density graphs and distance measurements provided a visual representation of the spatial distribution of these neural patterns.
The hierarchical clustering approach further refined the clustering process, allowing for the formation of cohesive groups based on the proximity of nodes. This hierarchical arrangement effectively organized the neural patterns into clusters that aligned with their inherent similarities. The discernment of optimal group numbers through dendrogram analysis attested to the efficacy of this approach in capturing meaningful clusters while avoiding over-segmentation. The results of this method are similar to those obtained jointly by PCA and K-means. This indicates that the intermediate use of PCA can be omitted if we focus on hierarchical clustering.
A comparison of the results achieved through different methods unveils noteworthy findings. The identification of the six types of potentials demonstrates the ability of the proposed approach to disentangle complex neural patterns. Furthermore, the resemblance of the results to the K-means method augmented with PCA in the identification of distant potentials underscores the robustness of the methodology.
5. Conclusions
This study presents a significant advancement in spike sorting by strategically combining established techniques with a pioneering application: Self-Organizing Maps (SOMs) for biosignal analysis. SOMs excel in unsupervised learning and dimensionality reduction, revealing the complexities of neural signal analysis from macaque monkey and human pancreatic signals. This multi-faceted endeavor unveils the nuanced effectiveness of SOMs and leverages them to form cohesive neural patterns through hierarchical clustering. Our approach successfully classified the neural data, achieving results comparable to established methods. Building on the foundation of adaptive thresholding, which effectively isolated action potentials while filtering background noise, PCA emerged as a crucial step for dimensionality reduction. This enhanced data interpretability and facilitated the identification of previously misclassified noise spikes in macaque monkey signals. The combined power of PCA and K-means in human pancreatic signals transformed a binary classification into one with three distinct groups. The introduction of SOMs added a novel unsupervised learning dimension. SOMs delineated clusters based on spatial distribution by revealing underlying data topology, offering a refined perspective on neural signal organization. Hierarchical clustering further refined this process, forming cohesive groups based on node proximity. This method effectively captured significant clusters without over-segmentation, achieving results comparable to PCA and K-means, suggesting PCA might be optional for specific analyses.The proposed approach successfully disentangled complex neural patterns, identifying six types of potentials. This robustness, mirrored in the similarity of results to the PCA-augmented K-means method, underscores the efficacy of the methodologies. Future research can explore additional clustering algorithms, feature extraction methods, and more sophisticated noise-filtering techniques. Extending this analysis to various real-world scenarios where other types of biosignals could validate the generalizability of these methods, this will be imperative for future research. Additionally, investigating real-time implementations and integrating these techniques into clinical applications or brain–computer interfaces is essential for improving signal processing and information decoding for real-world applications, thus offering promising avenues for advancing neural science and its practical applications.