Classification method and apparatus for neural spike data

CN122045877BActive Publication Date: 2026-11-03SHANGHAI NEURO XESS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202512027839.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-11-03
Estimated Expiration
2045-12-30

AI Technical Summary

Technical Problem

Existing technologies suffer from high computational complexity and excessive memory consumption when dealing with large-scale neural spike data, leading to increased processing latency. Furthermore, simple random sampling strategies may destroy intra-class structural information, affecting classification accuracy and stability.

Method used

By selecting a representative peak waveform subset for fine clustering, the first neuron classification result is formed. Clustering is performed using density peak points and density estimation. This results in a representative waveform subset that is then aggregated to form a representative waveform analysis. Clustering is then performed using local maxima points determined by amplitude thresholds. This analysis is repeated, and density peak points are used for further analysis. Combined with representative waveform analysis and clustering of the representative waveform subset, the first neuron classification result is obtained. Clustering of the representative waveform subset yields the second neuron classification result. The integrated technical solution uses density estimation and clustering of the representative waveform subset to obtain multiple neuron classification results.

Benefits of technology

While reducing computational and storage overhead, it ensures the accuracy and efficiency of classification results, achieving a balance between speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122045877B_ABST
    Figure CN122045877B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for classifying neural spike data, wherein the method for classifying neural spike data can be applied to the technical field of neural engineering, and the method comprises the following steps: acquiring a plurality of spike waveforms detected in a preprocessed neural signal; in the case that the number of the plurality of spike waveforms exceeds a processing scale threshold, selecting, from the plurality of spike waveforms, partial waveforms representing overall distribution characteristics of the plurality of spike waveforms to form a representative waveform subset; performing clustering processing on the representative waveform subset to obtain a first neuron classification result; distributing the remaining spike waveforms in the plurality of spike waveforms which are not selected into the representative waveform subset to corresponding neuron categories in the first neuron classification result to obtain a second neuron classification result; and integrating the first neuron classification result and the second neuron classification result to obtain a neuron classification result of the plurality of spike waveforms. The application reduces the calculation and storage overhead and improves the processing efficiency, and meanwhile ensures the accuracy of the classification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of neural engineering technology, and in particular to a method and apparatus for classifying neural spike data. Background Technology

[0002] In recent years, with the rapid development of multi-channel neuroelectrophysiological acquisition technology, a single experiment can now simultaneously record neural signals from dozens to hundreds of electrode channels, generating massive amounts of spike waveform data. Especially in applications involving high-density electrode arrays and long-term continuous recording, the number of acquired spike events often reaches hundreds of thousands or even millions. Faced with such large-scale data, traditional spike detection and classification processes—which typically include waveform feature extraction, dimensionality reduction, cluster analysis, and template matching—face severe computational challenges. The computational complexity of these methods often increases linearly or even superlinearly with the number of spikes. With the rapid expansion of data scale, this can easily lead to excessive memory usage and significantly increased processing latency, severely restricting their deployment and application in real-time or near-real-time neural signal decoding, brain-computer interfaces, and other applications with high timeliness requirements.

[0003] Current mainstream spike classification methods generally rely on constructing neighborhood relationships or performing clustering operations in high-dimensional feature spaces on the entire dataset. This not only easily leads to memory overflow issues but can also create significant computational bottlenecks, resulting in low overall processing efficiency. Furthermore, the temporal and spatial distribution of spikes in actual neural recordings is often uneven, with significant differences in firing frequencies among different neurons, leading to a disparity in the number of samples in each category. In this context, using simple random sampling strategies to reduce computational load can easily destroy the potential intra-class structural information in the original data, thereby impairing the accuracy and stability of subsequent classification. Therefore, there is an urgent need for an efficient acceleration strategy that can adapt to large-scale spike data while significantly reducing computational overhead and memory consumption, while ensuring the accuracy of spike classification. Summary of the Invention

[0004] To address the problems of existing technologies, this application provides a method and apparatus for classifying neural spike data. The technical solution is as follows: On the one hand, a classification method for neural spike data is provided, the method comprising: Acquire multiple spike waveforms detected in the preprocessed neural signal; If the number of multiple spike waveforms exceeds the processing scale threshold, select a subset of waveforms that represent the overall distribution characteristics of the multiple spike waveforms to form a representative waveform subset. Clustering is performed on the representative waveform subset to obtain the classification result of the first neuron; The remaining spike waveforms that were not selected into the representative waveform subset from the plurality of spike waveforms are assigned to the corresponding neuron category in the first neuron classification result to obtain the second neuron classification result. By integrating the classification results of the first neuron and the classification results of the second neuron, the neuron classification results of the multiple spike waveforms are obtained.

[0005] On the other hand, a classification device for neural spike data is provided, the device comprising: The spike acquisition module is used to acquire multiple spike waveforms detected in the preprocessed neural signal; The waveform selection module is used to select a subset of waveforms that represent the overall distribution characteristics of the multiple peak waveforms from the multiple peak waveforms when the number of multiple peak waveforms exceeds the processing scale threshold, thereby forming a representative waveform subset. The first classification module is used to perform clustering processing on the representative waveform subset to obtain the classification result of the first neuron. The second classification module is used to assign the remaining peak waveforms that were not selected into the representative waveform subset from the plurality of peak waveforms to the corresponding neuron category in the first neuron classification result, so as to obtain the second neuron classification result. The result integration module is used to integrate the first neuron classification result and the second neuron classification result to obtain the neuron classification result of the multiple spike waveforms.

[0006] In one exemplary embodiment, the waveform selection module includes: The dimension reduction module is used to perform dimension reduction processing on the multiple peak waveforms to obtain the representation of the multiple peak waveforms in a low-dimensional space; The initial partitioning module is used to partition the multiple peak waveforms into a preset number of initial clusters based on the representation of the multiple peak waveforms in low-dimensional space; The ratio determination module is used to determine the sampling ratio based on the ratio between the processing scale threshold and the number of the plurality of spike waveforms; The random sampling module is used to randomly sample peak waveforms from each of the initial clusters according to the sampling ratio, and merge them to form the representative waveform subset.

[0007] In one exemplary embodiment, the second classification module includes: The template generation module is used to, for each neuron category in the first neuron classification result, use the average waveform of the spike waveforms contained in the neuron category as the template waveform corresponding to the neuron category; The coefficient calculation module is used to calculate the waveform correlation coefficient between each remaining peak waveform and each template waveform for each remaining peak waveform; A target determination module is used to determine a target waveform correlation coefficient among a plurality of waveform correlation coefficients; the target waveform correlation coefficient is greater than any waveform correlation coefficient other than the target waveform correlation coefficient among the plurality of waveform correlation coefficients corresponding to the remaining spike waveform; The waveform allocation module is used to allocate the remaining spike waveform to the neuron category corresponding to the template waveform corresponding to the target waveform correlation coefficient if the correlation coefficient of the target waveform exceeds the first correlation coefficient threshold.

[0008] In one exemplary implementation, the first classification module includes: The feature projection module is used to project each peak waveform in the representative waveform subset to a low-dimensional space to obtain the projection features of each peak waveform in the representative waveform subset. The density estimation module is used to calculate the kernel density estimate based on the projection characteristics of each peak waveform in the representative waveform subset; The peak identification module is used to identify local maxima points where the kernel density estimate exceeds the density peak threshold, and to identify these as density peak points. A peak point allocation module is used to determine, for each peak waveform in the representative waveform subset, a target density peak point corresponding to the peak waveform based on the projection characteristics of the peak waveform among the density peak points; wherein, in the low-dimensional space, the distance between the projection characteristics of the peak waveform and the target density peak point is less than the distance between the projection characteristics of the peak waveform and any density peak point other than the target density peak point among the density peak points; The category association module is used to assign the spike waveform to the neuron category associated with the target density peak point.

[0009] In one exemplary embodiment, the apparatus further includes a neuron cluster merging module for merging excessively splitting neuron clusters, the neuron cluster merging module comprising: The category evaluation module is used to calculate the waveform correlation coefficient between the average waveforms corresponding to any two neuron categories in the neuron classification results. The conflict determination module is used to determine whether there is a conflict in the peak firing time patterns of the two neuron categories based on the projection characteristics of each peak waveform in the two neuron categories if the waveform correlation coefficient exceeds the second correlation coefficient threshold. The category merging module is used to merge the two neuron categories if it is determined that there is no conflict.

[0010] In one exemplary embodiment, the apparatus further includes a matrix multiplexing module for multiplexing the projection matrix to process the remaining spike waveform, the matrix multiplexing module comprising: The projection acquisition module is used to acquire a projection matrix for projecting the spike waveforms in the representative waveform subset onto a low-dimensional space. The remaining dimensionality reduction module is used to reduce the dimensionality of the remaining peak waveforms based on the projection matrix to obtain the projection features of each remaining peak waveform.

[0011] In one exemplary embodiment, the spike acquisition module includes: The signal acquisition module is used to acquire preprocessed neural signals; A point detection module is used to detect points in the preprocessed neural signal whose amplitude exceeds a signal amplitude threshold; the signal amplitude threshold is set based on the standard deviation of the neural signal. The refractory period determination module is used to determine, for each point that exceeds the signal amplitude threshold, whether there is a point with an amplitude greater than the corresponding amplitude within the target time window of the point; the target time window is a time window that traces back the absolute refractory period from the time corresponding to the point. The event determination module is used to determine the point as a spike event if the result of the determination is negative. The waveform extraction module is used to extract signal segments of fixed time length centered on the occurrence time of each of the spike events, forming the multiple spike waveforms.

[0012] In one exemplary embodiment, the apparatus further includes a dynamic threshold module for dynamically determining a processing scale threshold, the dynamic threshold module comprising: The resource acquisition module is used to obtain the total amount of currently available computing resources; The threshold determination module is used to determine the processing scale threshold based on the total amount of computing resources, the computing resource overhead required to process a single spike waveform, and the fixed computing resource overhead.

[0013] In one exemplary embodiment, the device further includes a full clustering module, which is used to perform clustering processing on the plurality of spike waveforms when the number of the plurality of spike waveforms is less than or equal to the processing scale threshold, so as to obtain the neuron classification result.

[0014] On the other hand, an electronic device is provided, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the classification method for neural spike data in any of the above aspects.

[0015] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement a classification method for neural spike data as described above.

[0016] On the other hand, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the neural spike data classification method described above.

[0017] This application's embodiments, when the number of peak waveforms exceeds the system's processing scale threshold, first extract a representative subset that preserves the overall distribution characteristics of the data for fine-grained clustering. This ensures that the representative samples extracted from massive amounts of data truly reflect the overall distribution characteristics, avoiding information distortion and classification performance degradation caused by simple random sampling. This establishes a reliable initial neuron classification framework, i.e., the first neuron classification result, with minimal computational overhead. Subsequently, this framework is used to efficiently classify the remaining large number of waveforms, avoiding the repeated execution of complex similarity calculations and iterative clustering operations on the entire dataset. Fundamentally, computational resources are concentrated on classifying representative data, rather than being consumed by processing massive amounts of samples one by one. This reduces computational and storage overhead and improves processing efficiency while ensuring the overall accuracy of the final classification result relative to the original data, achieving a balance between speed and accuracy. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating a method for classifying neural spike data provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a method for classifying neural spike data provided in an embodiment of this application; Figure 3 This is a flowchart illustrating a method for sampling neural spike data provided in an embodiment of this application; Figure 4 This is a flowchart illustrating the classification method for residual spike waveforms provided in an embodiment of this application; Figure 5 This is a comparison chart showing the time consumption of different classification methods provided in the embodiments of this application as a function of the number of spikes; Figure 6 This is a structural block diagram of a neural spike data classification device provided in an embodiment of this application; Figure 7 This is a hardware structure block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0021] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0022] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0023] Please see Figure 1 , 2The diagram illustrates a flowchart of a method for classifying neural spike data according to an embodiment of this application. It should be noted that while this specification provides method steps as shown in the embodiments or flowcharts, more or fewer steps may be included based on conventional or non-inventive methods. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only possible execution order. In actual system or product execution, the method can be executed sequentially according to the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). Specifically, as shown in the figure, the method may include: S101, acquire multiple spike waveforms detected in the preprocessed neural signal.

[0024] Specifically, the raw neural signals undergo a systematic preprocessing process to optimize signal quality, laying the foundation for subsequent peak detection and classification. This preprocessing mainly covers three core steps: spatial filtering, frequency band selection, and channel normalization. Specifically, spatial filtering is performed using Common Average Reference (CAR) technology to effectively suppress common-mode noise in the electrode array; bandpass filtering (300–6000 Hz) is implemented using a Butterworth zero-phase filter to retain key frequency components of the peak signal and avoid phase distortion; and channel whitening is performed using Zero-Phase Component Analysis (ZCA) to eliminate inter-channel correlation and achieve signal normalization. After these steps, the peak waveforms in the neural signal are clearly highlighted, and can then be reliably detected and extracted into multiple peak waveforms for classification.

[0025] Furthermore, after acquiring the preprocessed neural signal, points whose amplitude exceeds the signal amplitude threshold are detected in the preprocessed neural signal. The signal amplitude threshold is set based on the standard deviation of the neural signal. For each point that exceeds the signal amplitude threshold, it is determined whether there is a point with an amplitude greater than the corresponding amplitude within the target time window of the point. The target time window is a time window that traces back the absolute refractory period from the time corresponding to the point. If the result of the determination is negative, the point is identified as a spike event. A signal segment of fixed time length centered on the occurrence time of each spike event is extracted to form multiple spike waveforms.

[0026] The signal amplitude threshold is usually set to a number of times the signal standard deviation, such as 4 times.

[0027] The absolute refractory period corresponds to the non-response time window of a neuron after a single firing.

[0028] Specifically, within a single channel, the signal is scanned and judged point by point based on preset conditions. When the amplitude of a signal sampling point X(t) exceeds the signal amplitude threshold (usually 4), the signal is considered to be at a higher level. When the point is initially marked, it is then traced back a length of [missing information]. A time window (i.e., the absolute refractory period, typically 1.5 ms) is used to check if any other points within this window have an amplitude greater than the current point |X(t)|. Only when no points with higher amplitudes exist within this window is the current time t finally confirmed as a valid spike event. For each confirmed spike event, its waveform is completely preserved by extracting a fixed-length segment of the original signal centered at the event's occurrence time t, thus forming a series of spike waveforms for subsequent processing. That is, the amplitude of a spike event should satisfy the following conditions: (1) (2) in, The moment when the amplitude exceeds the signal amplitude threshold. The standard deviation of the preprocessed neural signal. This is the absolute refractory period.

[0029] As can be seen from the above technical solutions of the embodiments of this application, the embodiments of this application provide a specific implementation of peak detection. By combining amplitude threshold and refractory period constraint, it effectively suppresses repeated detection and noise false alarms, improves the accuracy and specificity of peak detection, and provides high-quality input data for subsequent classification.

[0030] After acquiring the spike waveform, the resulting data can be represented as a matrix. ,in The total number of detected waveforms, The number of sampling points (i.e., feature dimension) contained in each waveform. To improve the separability of subsequent waveform features, the matrix is... Calculate the second derivative This operation effectively enhances the curvature characteristics of the waveform and suppresses interference caused by low-frequency baseline drift. The processed second-order derivative waveform... This will serve as the core feature, driving the subsequent waveform analysis and clustering computation steps.

[0031] S103, determine whether the number of multiple spike waveforms exceeds the processing scale threshold.

[0032] Specifically, if the result of the judgment is yes, then step S105 can be executed; otherwise, if the result of the judgment is no, then step S1013 can be executed.

[0033] Specifically, if the total number of waveforms is determined If the processing scale threshold is exceeded, a preliminary division is performed based on the characteristic distribution of multiple spike waveforms using a fast clustering algorithm (such as K-means). Waveforms are randomly selected from each preliminary cluster according to the sampling ratio to form a representative waveform subset with a significantly reduced size. Cluster analysis is performed on this subset to obtain the classification result of the first neuron. The remaining spike waveforms that were not selected are assigned to the neuron categories of the first neuron classification result, thus completing the classification of multiple spike waveforms.

[0034] The processing scale threshold refers to the upper limit of the data volume dynamically set based on available computing resources, used to determine whether a sampling strategy needs to be enabled. Obtaining the processing scale threshold involves the following steps: obtaining the total amount of currently available computing resources; determining the processing scale threshold based on the total amount of computing resources, the computing resource overhead required to process a single spike waveform, and the fixed computing resource overhead.

[0035] The total computing resources include memory, video memory, or the number of processor cores. Fixed computing resource overhead refers to the basic resources required for the algorithm to run.

[0036] Specifically, dynamic evaluation and quantification are performed based on the system's current computing resources. For example, in a GPU-based computing environment, the total computing resources can be specified as the currently available video memory size. The system first reads the currently available video memory (denoted as...). ), and through a lightweight probe run, the fixed memory overhead required for the estimation algorithm itself (denoted as ) Meanwhile, based on the average memory usage of a single peak waveform in the complete processing flow of feature extraction, dimensionality reduction, and classification (denoted as...), The upper limit of the number of spike waveforms that can be efficiently processed in one go under the current resource environment can be calculated by formula (3). This upper limit is set as a dynamic processing scale threshold, such as 50,000.

[0037] (3) As can be seen from the above technical solutions of the embodiments of this application, the embodiments of this application enable the method to automatically optimize the running parameters in different hardware environments by dynamically setting the threshold for resource adaptation, thereby improving the cross-platform applicability and resource utilization efficiency of the method and avoiding running failure or low efficiency due to insufficient resources.

[0038] S105: Select a subset of waveforms that represent the overall distribution characteristics of the multiple peak waveforms from the multiple peak waveforms to form a representative waveform subset.

[0039] Among them, the representative waveform subset refers to the subset selected from the full waveform that can reflect the overall distribution characteristics.

[0040] Among them, the overall distribution feature emphasizes the coverage and representativeness of the subset in the feature space, rather than random selection.

[0041] Specifically, when the total number of detected spike waveforms exceeds the processing scale threshold, it indicates that the scale of data to be processed has exceeded the optimal load for a single processing run under the current computing environment. Forcing a complete cluster analysis on all waveforms would lead to resource constraints, excessively long processing times, and even memory overflow. To address this issue, a representative subset of waveforms is purposefully selected from the multiple spike waveforms. This subset, while significantly reducing the size of the selected spike waveforms, still retains the overall distribution characteristics of the detected spike waveforms. By covering the main distribution patterns of the detected spike waveforms in the multidimensional feature space, this subset provides equivalent statistical representativeness for subsequent cluster analysis, thereby achieving an order-of-magnitude improvement in computational efficiency while maintaining classification accuracy.

[0042] In practice, the selection of representative waveform subsets can employ strategies such as stratified sampling, density-based sampling, or cluster center selection, and is not limited to random sampling.

[0043] In one exemplary implementation, such as Figure 3 As shown, step S105 above may include: S301 performs dimensionality reduction processing on multiple peak waveforms to obtain a representation of the multiple peak waveforms in a low-dimensional space.

[0044] Dimensionality reduction typically refers to methods such as PCA (principal components analysis), t-SNE (t-Distributed Stochastic Neighbor Embedding), and UMAP (Uniform Manifold Approximation and Projection). In practice, autoencoders can also be used for dimensionality reduction.

[0045] In this context, the representation in low-dimensional space refers to low-dimensional coordinates that retain the main features after dimensionality reduction.

[0046] S303, based on the representation of multiple peak waveforms in a low-dimensional space, divides multiple peak waveforms into a preset number of initial clusters.

[0047] The initial clusters refer to the coarse groupings obtained through fast clustering (such as K-means). In practice, the initial clustering can also use Mini-Batch K-means to further accelerate the process.

[0048] In practice, principal component analysis is used to... Compression is performed to reduce the high-dimensional... Projecting onto a two-dimensional space yields the dimensionality-reduced feature representation matrix. Based on this two-dimensional feature, the K-Means clustering algorithm is used to initially divide the multiple spike waveforms into a fixed number of clusters (e.g., 100), denoted as . Each cluster It contains several waveforms, the number of which is denoted as . This step aims to quickly capture the distribution structure of waveforms on a large scale with low computational cost, laying the foundation for subsequent representative sampling.

[0049] S305, determine the sampling ratio based on the ratio between the processing scale threshold and the number of multiple spike waveforms.

[0050] Among them, sampling ratio This is to ensure that the size of the representative waveform subset ultimately used for fine-grained classification does not exceed the processing scale threshold. Therefore, the sampling proportion The total number of spike waveforms With processing scale threshold The decision was made jointly, and the specific calculation method is as follows: (4) Specifically, take the ratio of the value 1. The smaller of the two, when the total number of peak waveforms Not exceeding the threshold At that time, sampling ratio =1 (meaning all waveforms participate in subsequent processing); while when > At that time, it will be proportional. = Sampling is performed so that the size of the representative waveform subset is just within the limits of available resources.

[0051] S307. According to the sampling ratio, peak waveforms are randomly selected from each initial cluster and merged to form a representative waveform subset.

[0052] Specifically, the proportion Applied to each initial cluster , Randomly select approximately These waveforms constitute the sample set of the cluster. The sampling results from each cluster are combined to form a global representative waveform subset. The subset has a controllable size and, because it covers all initial clusters proportionally, it can effectively preserve the distribution structure of multiple detected spike waveforms in the full feature space. This data is used for subsequent fine-grained dimensionality reduction and clustering analysis, significantly improving overall processing speed when dealing with large datasets without sacrificing the representativeness and reliability of the classification. The waveforms that were not selected collectively constitute the remaining spike waveform subset. This will be allocated quickly in subsequent steps.

[0053] As can be seen from the above technical solutions of the embodiments of this application, the embodiments of this application ensure that the representative waveform subset uniformly covers all types of waveforms in the feature space by overall dimensionality reduction, fast clustering and proportional sampling, avoiding the omission of categories caused by simple random sampling, and greatly reducing the computational cost of the sampling process while ensuring the representativeness of the subset.

[0054] S107, perform clustering on the representative waveform subset to obtain the classification result of the first neuron.

[0055] Specifically, each spike waveform in the representative waveform subset is projected into a low-dimensional space to obtain the projection features of each spike waveform in the representative waveform subset; based on the projection features of each spike waveform in the representative waveform subset, the kernel density estimate is calculated; local maxima points where the kernel density estimate exceeds the density peak threshold are identified as density peak points; for each spike waveform in the representative waveform subset, the target density peak point corresponding to the spike waveform is determined among the density peak points based on the projection features of the spike waveform; wherein, in the low-dimensional space, the distance between the projection features of the spike waveform and the target density peak point is less than the distance between the projection features of the spike waveform and any density peak point other than the target density peak point; the spike waveform is assigned to the neuron category associated with the target density peak point.

[0056] Among them, the projection to the low-dimensional space adopts manifold learning methods such as Locality Preserving Projections (LPP).

[0057] Kernel density estimation is used to identify density peaks in a low-dimensional space, and these peaks correspond to potential class centers.

[0058] In practice, a local preservation projection algorithm is used to represent a subset of waveforms. Projecting onto a two-dimensional feature space yields the projected feature matrix. In this process, LPP constructs an adjacency matrix using a K-nearest neighbor graph to preserve the local structure of the data manifold, as shown in formula (5): (5) Specifically, LPP constructs a K-nearest neighbor graph to define the adjacency relationships between samples, and then obtains the projected features by solving the generalized eigenvalue problem. The projection matrix that best preserves the local neighborhood relationships of the original data Among them, matrix It is the output of the LPP algorithm, which maps high-dimensional waveform data to a two-dimensional space for subsequent density estimation and peak detection. .

[0059] Based on two-dimensional projection features, the Gaussian kernel density estimation (KDE) method is used to calculate... kernel density estimate Density peak threshold Determined adaptively using formula (6): (6) in, The median of the kernel density estimates represents the density level of ordinary points in the dataset. The interquartile range of the kernel density estimate is used to identify significant local density maxima as density peaks. For each sample, the Euclidean distance to each density peak is calculated, and the sample is assigned to the neuron category corresponding to the nearest density peak, thus forming K initial clustering results. This refers to the classification result of the first neuron. This method can adaptively determine the cluster centers and their number while preserving the local structure of the data.

[0060] As can be seen from the above technical solutions of the embodiments of this application, the embodiments of this application adopt the idea of ​​density peak clustering, which does not require a preset number of categories and adaptively determines the number of categories. It has good robustness to non-spherical distribution and uneven category size data, and is suitable for scenarios where the number of categories is unknown in neural peak data. Moreover, the calculation is concentrated in a low-dimensional space, which further reduces the computational burden.

[0061] S109, the remaining peak waveforms that were not selected into the representative waveform subset from the multiple peak waveforms are assigned to the corresponding neuron categories in the first neuron classification result to obtain the second neuron classification result.

[0062] In one exemplary implementation, such as Figure 4 As shown, step S109 above may include: S401, for each neuron category in the first neuron classification result, the average waveform of the spike waveforms contained in the neuron category is used as the template waveform corresponding to the neuron category.

[0063] The template waveform refers to the average shape of waveforms of each category. In practice, the template waveform can also be the median waveform or a PCA-reconstructed waveform to enhance robustness.

[0064] Specifically, for each neuron category that has been obtained The template waveform is generated by calculating the arithmetic mean of all spike waveforms within the class. The calculation reference formula (7) is as follows: (7) in, Indicates category The number of waveforms contained therein Represents the first in this category A spike waveform. This results in... The average firing waveform morphology of this type of neuron was characterized, serving as a matching benchmark for subsequent allocation of the remaining spike waveforms.

[0065] S403, for each remaining spike waveform, calculate the waveform correlation coefficient between the remaining spike waveform and each template waveform.

[0066] The waveform correlation coefficient is used to measure the similarity in shape between two waveforms. In practice, similarity can also be measured using Euclidean distance, cosine similarity, or dynamic time warping (DTW).

[0067] Specifically, the assignment of remaining spike waveforms to existing neuron categories is based on the waveform morphology correlation coefficient (CC). This is achieved by calculating the waveform correlation coefficient between each remaining spike waveform and each template waveform. This coefficient quantifies the shape consistency between two waveform sequences for a subset of remaining waveforms. The remaining spike waveform With template waveform Its waveform correlation coefficient The calculation formula is referenced in formula (8): (8) in, This is the feature dimension of the waveform, that is, the number of sampling points contained in each waveform. and Representing the remaining spike waveforms and template waveform In the The amplitude at each sampling point and These are the average values ​​of the corresponding waveforms. The range of values ​​for the waveform correlation coefficient is [...]. [1,1], the closer the value is to 1, the stronger the positive correlation between the two waveforms and the more similar their shapes. Calculate each remaining spike waveform sequentially. With each template waveform waveform correlation coefficient This provides a quantitative similarity measure for subsequent category assignment.

[0068] S405, among multiple waveform correlation coefficients, determine the target waveform correlation coefficient; the target waveform correlation coefficient is greater than any waveform correlation coefficient other than the target waveform correlation coefficient among the multiple waveform correlation coefficients corresponding to the remaining spike waveforms.

[0069] S407, if the correlation coefficient of the target waveform exceeds the first correlation coefficient threshold, the remaining spike waveforms are assigned to the neuron category corresponding to the template waveform corresponding to the correlation coefficient of the target waveform.

[0070] The first correlation coefficient threshold is used to determine whether the match is reliable, and is usually set between 0.7 and 0.9. In practice, the first correlation coefficient threshold can be dynamically adjusted according to the signal-to-noise ratio.

[0071] Specifically, the neuron category matching each remaining waveform is determined based on the waveform correlation coefficient. The specific allocation rules are referenced in formula (9): (9) For a residual spike waveform First, find the maximum value from the corresponding waveform correlation coefficients, which determines the target category index. Make This maximum value is the target waveform correlation coefficient. It is then determined whether the target waveform correlation coefficient exceeds a preset first correlation coefficient threshold. (For example =0.7). If satisfied Then the waveform Assign the neuron to the template waveform corresponding to the correlation coefficient of the target waveform. If this condition is not met, then the waveform... The data might be noise or artifacts, or it might belong to a new, undiscovered neuron type. In such cases, no forced assignment is made to avoid contaminating existing categories. This thresholding mechanism ensures the reliability of the assignment and avoids misclassification due to low similarity.

[0072] In practice, after allocating the remaining peak waveforms based on the template waveform, the projection features of each peak waveform in the representative waveform subset are combined with the projection features of the remaining peak waveforms for subsequent post-processing. Specifically, a projection matrix is ​​obtained to project the peak waveforms in the representative waveform subset to a low-dimensional space; the remaining peak waveforms are then dimensionality-reduced based on the projection matrix to obtain the projection features of each remaining peak waveform.

[0073] The projection matrix refers to the dimension reduction mapping matrix learned from the representative waveform subset.

[0074] Specifically, in step S107, by analyzing the representative waveform subset... By executing the LPP algorithm, the projection matrix used to map high-dimensional waveform data to a low-dimensional feature space has been obtained. The matrix As a feature transformation model learned from representative data, it fully preserves the local structural information of the data manifold. For the remaining waveform subset to be processed in step S109... There is no need to retrain the dimensionality reduction model; the obtained projection matrix can be directly reused. Efficient projection is achieved. By directly applying the learned linear transformation, the computational complexity is low, and the representation of the entire data (representative waveform subset and remaining spike waveforms) is guaranteed in a unified low-dimensional feature space. This provides a consistent and comparable feature basis for subsequent possible post-processing steps such as category merging verification and outlier cleaning.

[0075] Specifically, the projection matrix is ​​determined by training on a subset of representative waveforms. This can be directly used for dimensionality reduction processing of the remaining spike waveforms. Remaining waveform subset The projection features are obtained by performing fast projection using the projection matrix A. , and the projection features representing a subset of waveforms Merge to form a set of projected features This merged feature set It contains the coordinates of multiple spike waveforms detected in neural signals in a unified low-dimensional space, providing a complete and consistent data foundation for performing subsequent post-processing steps (such as outlier detection, category merging and verification, etc.).

[0076] As can be seen from the above technical solutions of the embodiments of this application, the embodiments of this application transform the classification problem of a large number of remaining peak waveforms into a similarity calculation problem with a few templates, which has high computational efficiency, and threshold filtering can effectively reduce the risk of mismatch. By reusing the matrix, the dimensionality reduction model of the remaining peak waveforms is avoided, further saving computational resources, significantly reducing redundant calculations, and ensuring that all data is processed in a unified feature space, which is beneficial to subsequent analysis and visualization.

[0077] S1011 integrates the classification results of the first neuron and the classification results of the second neuron to obtain neuron classification results with multiple spike waveforms.

[0078] S1013 performs clustering processing on multiple spike waveforms to obtain neuron classification results.

[0079] Specifically, when the number of multiple spike waveforms is less than or equal to the processing scale threshold, full clustering is directly applied to all spike waveforms to avoid unnecessary overhead introduced by sampling. This ensures that the method can run efficiently under different data scales, improving the robustness and practicality of the overall solution.

[0080] When the total number of detected spike waveforms N does not exceed the dynamically determined processing scale threshold This indicates that the entire dataset can be processed efficiently with current computing resources, without the need for sampling. In this case, step S1013 is executed, skipping the representative waveform selection step S105, and the second derivative features of the detected multiple peak waveforms are directly used. As input, the clustering process is essentially the same as in step S107. Specifically, multiple peak waveforms are first projected into a low-dimensional space using methods such as LPP. Based on the low-dimensional projection features, kernel density estimation, density peak point identification, and allocation are performed, thereby directly obtaining the neuron classification results for the full dataset. This full-scale clustering path is a simplified special case representing the waveform subset clustering path when the data volume is small. The core clustering algorithms and processes remain consistent, ensuring the consistency of the method's logic and the reliability of the results under different data scales. Therefore, the specific implementation details of this step can be directly referred to the description in the relevant sections above, and will not be repeated here.

[0081] The neuron classification results obtained in steps S1011 and S1013 are only preliminary results, which may contain over-splitting categories, unfiltered low-quality units, or noise generated during the clustering process. Therefore, they are usually not directly used as the final output. To obtain accurate, stable, and physiologically meaningful classification results, post-processing is required after steps S1011 and S1013. Specifically, to prevent over-splitting of neuron categories, a post-processing step, category merging and verification, is introduced after obtaining the neuron classification results. This step aims to merge categories with highly similar morphologies and compatible firing patterns to more accurately correspond to real biological neuron units. Specifically, for any two neuron categories in the neuron classification results, the waveform correlation coefficient between the average waveforms corresponding to the two neuron categories is calculated. If the waveform correlation coefficient exceeds the second correlation coefficient threshold, the peak firing time patterns of the two neuron categories are judged to have conflict based on the projection features of each peak waveform in the two neuron categories. If no conflict is determined, the two neuron categories are merged.

[0082] The second correlation coefficient threshold is used to determine whether two categories are morphologically similar.

[0083] Among them, spike firing time pattern conflict refers to the overlap of spikes in two categories in time, which violates the neuronal refractory period principle.

[0084] In practice, for class pairs whose waveform correlation coefficients exceed the second correlation coefficient threshold (e.g., CC>0.7), temporal pattern conflicts are determined by calculating the cross-correlation histogram of their peak sequences in low-dimensional space (usually within a time window of ±0.5 seconds, with a resolution of 1 millisecond). If the histogram does not show a significant peak near time zero (corresponding to the absolute refractory period of the neuron), it is determined to be conflict-free and the two classes are merged.

[0085] As can be seen from the above technical solutions of the embodiments of this application, the embodiments of this application introduce a post-processing merging mechanism to prevent category redundancy caused by noise or excessive clustering, improve the biological rationality of the classification results, avoid misclassifying a neuron into multiple units, and improve the interpretability and practicality of the classification results.

[0086] Furthermore, quality filtering is performed, the average firing rate (FR) for each neuron category is calculated, and categories with excessively low firing rates (e.g., FR < 0.1 Hz) are removed.

[0087] Furthermore, the integrated projection features Outlier removal is performed. Specifically, this is based on the integrated projection features. The probability density distribution of the entire feature space is calculated using Gaussian kernel density estimation. This density distribution Local maxima points in the matrix are identified as density centers for each category, denoted as { Based on this, for each determined category and its density center... Calculate the distance from each point within each category to the center. Mahalanobis distance The system removes points whose distance exceeds a preset threshold, thereby obtaining pure and reliable neuron classification results.

[0088] Please see Figure 5This paper demonstrates a comparison of the processing time of the classification method provided in this application and two control methods when processing data of different scales. By simulating a dataset containing up to 200,000 spikes for testing, the results show that when the number of spikes is small, the processing time of the three methods is similar; however, as the data scale increases, the processing time differences become significant. Specifically, the baseline method without a sampling strategy shows an approximately linear increase in processing time with the number of spikes, reflecting the computational load characteristics of the traditional full-data processing mode. As a control, the ValleySeeking algorithm experiences a non-linear and sharp increase in processing time after the data volume exceeds 150,000, revealing its limitations in scalability under large-scale data. In contrast, the intelligent sampling-based classification method proposed in this application exhibits a very gentle growth in processing time, consistently maintaining a low processing time range in the second range. This fully verifies that the proposed method, through representative sampling, subset fine clustering, and rapid allocation of residual waveforms, can fundamentally reduce the algorithm's time complexity while ensuring classification accuracy, thereby significantly improving the practicality and efficiency of large-scale neural spike data processing and demonstrating excellent scalability.

[0089] As shown in Table 1, the classification accuracy of different methods under various data difficulty and noise levels was systematically evaluated on a recognized benchmark simulation dataset (Quiroga et al.'s public dataset). The experiment included four typical data scenarios (Difficult 1, Difficult 2, Easy 1, Easy 2) and four noise levels (0.05 to 0.20), comparing the performance of the ValleySeeking algorithm, the full-scale unsampling method, and representative subsets of methods with four sampling ratios (80%, 50%, 30%, and 10%). The results show that in most scenarios, the classification accuracy of the proposed sampling method is highly consistent with, or even completely equivalent to, the full-scale unsampling method, demonstrating the reliability of maintaining classification accuracy through intelligent sampling. The traditional ValleySeeking method shows slight fluctuations in performance in some high-difficulty, low-noise scenarios. With increasing data difficulty and noise level, the accuracy of all methods shows a reasonable decrease, but the proposed method maintains stable and excellent classification performance under all conditions. Without sacrificing classification accuracy, this application achieves an order-of-magnitude improvement in computational efficiency. For example, when processing large-scale data with up to 1 million spikes in a single channel (excluding front-end detection time), this application can complete the classification within 8 minutes, while traditional full-data processing methods typically require about 24 hours. When the number of spikes exceeds 50,000, this application can achieve a computational speedup of more than 4 times. This fully verifies the comprehensive advantages of the proposed technical solution in terms of accuracy preservation, efficiency leap, and strong scalability, and can effectively meet the classification requirements for high throughput and low latency in practical neural signal processing.

[0090] Table 1. Classification Accuracy Comparison Table

[0091] As can be seen from the above technical solutions of the embodiments of this application, the embodiments of this application establish an initial classification model through representative sampling and clustering, and then quickly classify the remaining data through template matching, thereby achieving efficient classification with small sample modeling and large sample allocation. This significantly reduces the computational complexity of the clustering algorithm, transforming the computational overhead that originally increased linearly or superlinearly with the amount of data into a fixed overhead that is only related to the size of the subset plus an allocation overhead that is linearly related to the amount of remaining data but is computationally simple. This is particularly suitable for real-time or near-real-time brain-computer interface scenarios.

[0092] Corresponding to the classification methods for neural spike data provided in the above embodiments, this application also provides a classification device for neural spike data. Since the classification device for neural spike data provided in this application corresponds to the classification methods for neural spike data provided in the above embodiments, the implementation methods of the aforementioned classification methods for neural spike data are also applicable to the classification device for neural spike data provided in this embodiment, and will not be described in detail in this embodiment.

[0093] Please see Figure 6 The diagram shows a structural schematic of a neural spike data classification device provided in an embodiment of this application. This device has the function of implementing the neural spike data classification method described in the above-described method embodiments. This function can be implemented by hardware or by hardware executing corresponding software. Figure 6 As shown, the device may include: The spike acquisition module 610 is used to acquire multiple spike waveforms detected in the preprocessed neural signal; The waveform selection module 620 is used to select a subset of waveforms that represent the overall distribution characteristics of the multiple peak waveforms from the multiple peak waveforms when the number of multiple peak waveforms exceeds the processing scale threshold, and form a representative waveform subset. The first classification module 630 is used to perform clustering processing on the representative waveform subset to obtain the classification result of the first neuron; The second classification module 640 is used to assign the remaining peak waveforms that were not selected into the representative waveform subset from multiple peak waveforms to the corresponding neuron category in the first neuron classification result, so as to obtain the second neuron classification result. The result integration module 650 is used to integrate the classification results of the first neuron and the classification results of the second neuron to obtain neuron classification results with multiple spike waveforms.

[0094] In one exemplary embodiment, the waveform selection module includes: The dimension reduction module is used to perform dimension reduction processing on multiple peak waveforms to obtain the representation of the multiple peak waveforms in a low-dimensional space. The initial partitioning module is used to partition multiple spike waveforms into a preset number of initial clusters based on the representation of multiple spike waveforms in low-dimensional space; The proportion determination module is used to determine the sampling proportion based on the ratio between the processing scale threshold and the number of multiple spike waveforms; The random sampling module is used to randomly sample peak waveforms from each initial cluster according to the sampling ratio and merge them to form a representative waveform subset.

[0095] In one exemplary implementation, the second classification module includes: The template generation module is used to generate a template waveform for each neuron category in the first neuron classification result, based on the average waveform of the spike waveforms contained in the neuron category. The coefficient calculation module is used to calculate the waveform correlation coefficient between the remaining peak waveform and each template waveform for each remaining peak waveform; The target determination module is used to determine the target waveform correlation coefficient among multiple waveform correlation coefficients; the target waveform correlation coefficient is greater than any waveform correlation coefficient other than the target waveform correlation coefficient among the multiple waveform correlation coefficients corresponding to the remaining spike waveforms. The waveform assignment module is used to assign the remaining spike waveforms to the neuron category corresponding to the template waveform corresponding to the target waveform if the correlation coefficient of the target waveform exceeds the first correlation coefficient threshold.

[0096] In one exemplary implementation, the first classification module includes: The feature projection module is used to project each peak waveform in the representative waveform subset onto a low-dimensional space to obtain the projection features of each peak waveform in the representative waveform subset. The density estimation module is used to calculate the kernel density estimate based on the projection characteristics of each peak waveform in the representative waveform subset; The peak identification module is used to identify local maxima points where the kernel density estimate exceeds the density peak threshold, and to identify these as density peak points. The peak point allocation module is used to determine the target density peak point corresponding to each peak waveform in the density peak points based on the projection characteristics of the peak waveform for each peak waveform in the representative waveform subset; wherein, in the low-dimensional space, the distance between the projection characteristics of the peak waveform and the target density peak point is less than the distance between the projection characteristics of the peak waveform and any density peak point other than the target density peak point. The category association module is used to assign peak waveforms to the neuron categories associated with the target density peak points.

[0097] In one exemplary embodiment, the apparatus further includes a neuron cluster merging module for merging excessively split neuron clusters, the neuron cluster merging module comprising: The category evaluation module is used to calculate the waveform correlation coefficient between the average waveforms corresponding to any two neuron categories in the neuron classification results. The conflict detection module is used to determine whether there is a conflict in the peak firing time patterns of the two neuron categories based on the projection features of each peak waveform in the two neuron categories if the waveform correlation coefficient exceeds the second correlation coefficient threshold. The category merging module is used to merge two neuron categories if no conflict is determined.

[0098] In one exemplary embodiment, the apparatus further includes a matrix multiplexing module for processing the remaining spike waveform using the projection matrix, the matrix multiplexing module including: The projection acquisition module is used to acquire the projection matrix for projecting the peak waveforms representing the waveform subset to a low-dimensional space. The remaining dimensionality reduction module is used to reduce the dimensionality of the remaining peak waveforms based on the projection matrix to obtain the projection features of each remaining peak waveform.

[0099] In one exemplary implementation, the spike acquisition module includes: The signal acquisition module is used to acquire preprocessed neural signals; The point detection module is used to detect points in the preprocessed neural signal whose amplitude exceeds the signal amplitude threshold; the signal amplitude threshold is set based on the standard deviation of the neural signal. The refractory period determination module is used to determine, for each point that exceeds the signal amplitude threshold, whether there is a point with an amplitude greater than the corresponding amplitude within the target time window of the point; the target time window is a time window that traces back the absolute refractory period from the time corresponding to the point. The event determination module is used to determine the point as a spike event if the result of the judgment is negative. The waveform extraction module is used to extract signal segments of fixed time length centered on the occurrence time of each spike event, forming multiple spike waveforms.

[0100] In one exemplary embodiment, the apparatus further includes a dynamic threshold module for dynamically determining a processing scale threshold, the dynamic threshold module comprising: The resource acquisition module is used to obtain the total amount of currently available computing resources; The threshold determination module is used to determine the processing scale threshold based on the total amount of computing resources, the computing resource overhead required to process a single spike waveform, and the fixed computing resource overhead.

[0101] In one exemplary embodiment, the device further includes a full clustering module, which is used to cluster multiple spike waveforms when the number of multiple spike waveforms is less than or equal to a processing scale threshold, to obtain neuron classification results.

[0102] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0103] This application provides an electronic device including a processor and a memory. The memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement any of the neural spike data classification methods provided in the above method embodiments.

[0104] Memory is used to store software programs and modules. The processor executes these stored software programs and modules to perform various functional applications and data processing. Memory can primarily consist of a program storage area and a data storage area. The program storage area stores the operating system, application programs required for functionality, etc.; the data storage area stores data created based on device usage, etc. Furthermore, memory can include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.

[0105] The method embodiments provided in this application can be executed in a computer terminal, server or similar computing device, that is, the above-mentioned electronic device may include a computer terminal, server or similar computing device. Figure 7 This is a hardware structure block diagram of a computer device for running a classification method for neural spike data, as provided in an embodiment of the present invention. Figure 7 As shown, the internal structure of this computer device may include, but is not limited to, a processor, a network interface, and a memory. The processor, network interface, and memory within the computer device can be connected via a bus or other means, as illustrated in the embodiments of this specification. Figure 7 Taking the example of a connection between China and Israel via a bus.

[0106] The processor (or CPU, Central Processing Unit) is the computing and control core of the computer device. The network interface may optionally include a standard wired interface or a wireless interface (such as Wi-Fi, mobile communication interface, etc.). Memory is the storage device in the computer device used to store programs and data. It is understood that the memory here can be a high-speed RAM storage device, or a non-volatile storage device, such as at least one disk storage device; optionally, it can also be at least one storage device located remotely from the aforementioned processor. The memory provides storage space, which stores the operating system of the electronic device, including but not limited to: Windows (an operating system), Linux (an operating system), Android (a mobile operating system), iOS (a mobile operating system), etc., which are not limited in this invention; and the storage space also stores one or more instructions suitable for being loaded and executed by the processor, which can be one or more computer programs (including program code). In the embodiments of this specification, the processor loads and executes one or more instructions stored in the memory to implement the neural spike data classification method provided in the above method embodiments.

[0107] Embodiments of this application also provide a computer-readable storage medium that can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a method for classifying neural spike data. The at least one instruction or the at least one program is loaded and executed by the processor to implement any of the neural spike data classification methods provided in the above-described method embodiments.

[0108] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0109] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0110] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0111] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0112] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for classifying neural spike data, characterized in that, The method includes: Acquire multiple spike waveforms detected in the preprocessed neural signal; If the number of multiple spike waveforms exceeds the processing scale threshold, select a subset of waveforms that represent the overall distribution characteristics of the multiple spike waveforms to form a representative waveform subset. Clustering is performed on the representative waveform subset to obtain the classification result of the first neuron; The remaining spike waveforms that were not selected into the representative waveform subset from the plurality of spike waveforms are assigned to the corresponding neuron category in the first neuron classification result to obtain the second neuron classification result. By integrating the classification results of the first neuron and the classification results of the second neuron, the neuron classification results of the multiple spike waveforms are obtained; The step of assigning the remaining peak waveforms that were not selected into the representative waveform subset from the plurality of peak waveforms to the corresponding neuron category in the first neuron classification result includes: for each neuron category in the first neuron classification result, using the average waveform of the peak waveforms contained in the neuron category as the template waveform corresponding to the neuron category; for each remaining peak waveform, calculating the waveform correlation coefficient between the remaining peak waveform and each of the template waveforms; determining a target waveform correlation coefficient among the plurality of waveform correlation coefficients; the target waveform correlation coefficient being greater than any waveform correlation coefficient other than the target waveform correlation coefficient among the plurality of waveform correlation coefficients corresponding to the remaining peak waveform; if the target waveform correlation coefficient exceeds a first correlation coefficient threshold, then assigning the remaining peak waveform to the neuron category corresponding to the template waveform corresponding to the target waveform correlation coefficient.

2. The method according to claim 1, characterized in that, Selecting a portion of waveforms representing the overall distribution characteristics of the plurality of peak waveforms from the plurality of peak waveforms includes: The multiple peak waveforms are subjected to dimensionality reduction processing to obtain their representations in a low-dimensional space. Based on the representation of the multiple peak waveforms in low-dimensional space, the multiple peak waveforms are divided into a predetermined number of initial clusters; The sampling ratio is determined based on the ratio between the processing scale threshold and the number of the plurality of spike waveforms; According to the sampling ratio, peak waveforms are randomly selected from each of the initial clusters and merged to form the representative waveform subset.

3. The method according to claim 1, characterized in that, The clustering process for the representative waveform subset includes: Projecting each peak waveform in the representative waveform subset onto a low-dimensional space yields the projection features of each peak waveform in the representative waveform subset. Based on the projection characteristics of each peak waveform in the representative waveform subset, the kernel density estimate is calculated; Local maxima where the kernel density estimate exceeds the density peak threshold are identified as density peak points; For each spike waveform in the representative waveform subset, a target density peak point corresponding to the spike waveform is determined among the density peak points based on the projection features of the spike waveform; wherein, in the low-dimensional space, the distance between the projection features of the spike waveform and the target density peak point is less than the distance between the projection features of the spike waveform and any density peak point other than the target density peak point. The spike waveform is assigned to the neuron category associated with the target density peak point.

4. The method according to claim 3, characterized in that, The method further includes: For any two neuron categories in the neuron classification results, calculate the waveform correlation coefficient between the average waveforms corresponding to the two neuron categories; If the waveform correlation coefficient exceeds the second correlation coefficient threshold, then based on the projection characteristics of each spike waveform in the two neuron categories, it is determined whether there is a conflict in the spike firing time patterns of the two neuron categories. If no conflict is determined, the two neuron categories are merged.

5. The method according to claim 4, characterized in that, The method further includes: Obtain a projection matrix for projecting the spike waveforms in the representative waveform subset onto a low-dimensional space; The remaining peak waveforms are dimensionality reduced based on the projection matrix to obtain the projection features of each remaining peak waveform.

6. The method according to claim 1, characterized in that, The acquisition of multiple spike waveforms detected in the preprocessed neural signal includes: Acquire preprocessed neural signals; In the preprocessed neural signal, points whose amplitude exceeds a signal amplitude threshold are detected; the signal amplitude threshold is set based on the standard deviation of the neural signal. For each point that exceeds the signal amplitude threshold, determine whether there is a point with an amplitude greater than the amplitude corresponding to the point within the target time window corresponding to the point; the target time window is a time window that traces back the absolute refractory period from the time corresponding to the point. If the result of the judgment is negative, the point is identified as a spike event; Extract signal segments of fixed time length centered on the occurrence time of each of the said spike events to form the multiple spike waveforms.

7. The method according to claim 1, characterized in that, The method further includes: Get the total amount of currently available computing resources; The processing scale threshold is determined based on the total amount of computing resources, the computing resource overhead required to process a single spike waveform, and the fixed computing resource overhead.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: If the number of the plurality of spike waveforms is less than or equal to the processing scale threshold, the plurality of spike waveforms are clustered to obtain the neuron classification result.

9. A classification device for neural spike data, characterized in that, The device includes: The spike acquisition module is used to acquire multiple spike waveforms detected in the preprocessed neural signal; The waveform selection module is used to select a subset of waveforms that represent the overall distribution characteristics of the multiple peak waveforms from the multiple peak waveforms when the number of multiple peak waveforms exceeds the processing scale threshold, thereby forming a representative waveform subset. The first classification module is used to perform clustering processing on the representative waveform subset to obtain the classification result of the first neuron. The second classification module is used to assign the remaining peak waveforms that were not selected into the representative waveform subset from the plurality of peak waveforms to the corresponding neuron category in the first neuron classification result, so as to obtain the second neuron classification result. The result integration module is used to integrate the first neuron classification result and the second neuron classification result to obtain the neuron classification result of the multiple spike waveforms; The second classification module includes: a template generation module, used to, for each neuron category in the first neuron classification result, use the average waveform of the peak waveforms contained in the neuron category as the template waveform corresponding to the neuron category; a coefficient calculation module, used to calculate the waveform correlation coefficient between each remaining peak waveform and each template waveform for each remaining peak waveform; a target determination module, used to determine a target waveform correlation coefficient among multiple waveform correlation coefficients; the target waveform correlation coefficient is greater than any waveform correlation coefficient other than the target waveform correlation coefficient among multiple waveform correlation coefficients corresponding to the remaining peak waveform; and a waveform allocation module, used to allocate the remaining peak waveform to the neuron category corresponding to the template waveform corresponding to the target waveform correlation coefficient if the target waveform correlation coefficient exceeds a first correlation coefficient threshold.

Citation Information

Patent Citations

  • Neuron spike potential online classification method based on density peak clustering algorithm

    CN108846346A

  • Data loading method and device, electronic equipment and storage medium

    CN113377998A