Electroencephalogram signal recognition method based on pulse neural network and related device

Through a method based on pulse neural networks, human EEG signals are converted into synaptic currents to stimulate neurons to generate pulse signals, which solves the problems of large computational complexity and high energy consumption of traditional deep neural networks and realizes efficient and accurate recognition of human EEG signals on low-power devices.

CN119548152BActive Publication Date: 2025-10-10INST OF AUTOMATION CHINESE ACAD OF SCI +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411463918.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-10-10
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

Existing methods for recognizing human EEG signals rely on traditional deep neural networks, which results in large computational complexity and high energy consumption, making them unsuitable for real-time processing in portable or low-power devices.

Method used

A method based on spiking neural networks is used to convert human EEG signals into synaptic currents to stimulate neurons to generate pulse signals. Calculations are performed only when neurons emit pulses, and the event-driven characteristics of spiking neural networks are used to reduce the amount of calculation and energy consumption.

Benefits of technology

It significantly reduces the computational complexity and energy consumption of human EEG signal processing, improves recognition accuracy and efficiency, and is suitable for real-time processing in portable or low-power devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119548152B_ABST
    Figure CN119548152B_ABST
Patent Text Reader

Abstract

A kind of electroencephalogram signal recognition method based on pulse neural network and related equipment, it is related to electroencephalogram signal processing technical field.Therein, method includes: obtaining target electroencephalogram signal;The target electroencephalogram signal is input to pulse neural network, obtains the recognition result output by the pulse neural network;Wherein, the recognition result is obtained by the pulse neural network based on target pulse signal decoding, the target pulse signal is generated by the synaptic current of the target electroencephalogram signal corresponding persistent stimulation neuron in the pulse neural network, and the pulse neural network is obtained by training.The technical scheme provided by the present application can reduce the calculation amount and energy consumption of electroencephalogram signal processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of human electroencephalogram (EEG) signal processing, and in particular to a method for recognizing human electroencephalogram (EEG) signals based on a spiking neural network and related equipment. Background Art

[0002] With the rapid development of neuroscience and artificial intelligence, human-computer interaction systems based on electroencephalography (EEG) signals have become a research hotspot. These systems analyze and interpret EEG signals to identify and predict human intentions, and have broad application prospects in medical diagnosis, rehabilitation training, intelligent control, and other fields. However, accurately identifying and interpreting complex EEG signals remains a major challenge in this field.

[0003] Currently, common methods for recognizing human EEG signals rely primarily on traditional deep neural networks. Typically, the EEG signal undergoes preprocessing and feature extraction, followed by recognition using a deep neural network based on the extracted features. However, traditional deep neural networks require a large number of continuous operations regardless of the input EEG signal characteristics. This results in a high computational load and high energy consumption, making them unsuitable for real-time processing of EEG signals on portable or low-power devices. Summary of the Invention

[0004] The present invention provides a method for recognizing human electroencephalogram (EEG) signals based on a pulse neural network and related equipment, which can reduce the computational complexity and energy consumption of human EEG signal processing.

[0005] In a first aspect of the present invention, a method for recognizing human electroencephalogram signals based on a spiking neural network is provided, comprising:

[0006] Obtaining the target person's EEG signal;

[0007] Inputting the target person's electroencephalogram signal into a spiking neural network to obtain a recognition result output by the spiking neural network;

[0008] In which, the recognition result is obtained by decoding the pulse neural network based on the target pulse signal, and the target pulse signal is generated by the synaptic current corresponding to the target person's electroencephalogram signal continuously stimulating the neurons in the pulse neural network, and the pulse neural network is obtained through training.

[0009] In a second aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for recognizing human electroencephalogram signals based on a pulse neural network as described above is implemented.

[0010] In a third aspect of the present invention, a non-transitory computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for recognizing human electroencephalogram signals based on a pulse neural network as described above is implemented.

[0011] In a fourth aspect of the present invention, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements any of the above-described methods for recognizing human electroencephalogram signals based on a pulse neural network.

[0012] In summary, one or more technical solutions provided in the present invention have at least the following technical effects or advantages:

[0013] By inputting the target person's EEG signal into a trained spiking neural network, the synaptic current corresponding to the target person's EEG signal is used to continuously stimulate the neurons in the spiking neural network, generating a target pulse signal. This target pulse signal is then decoded to obtain the recognition result. This method fully utilizes the event-driven nature of spiking neural networks, performing calculations only when neurons are stimulated and generate pulses. This avoids the problem of traditional deep neural networks that require a large number of continuous calculations regardless of the characteristics of the input signal.

[0014] Therefore, the present invention significantly reduces the computational complexity and energy consumption of human EEG signal processing, making it more suitable for real-time processing of human EEG signals on portable or low-power devices. Furthermore, the working mechanism of spiking neural networks is closer to that of biological neural systems, enabling them to better capture and process the temporal dynamics of human EEG signals, thereby improving recognition accuracy and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0016] Figure 1 This is a flow chart of a method for recognizing human electroencephalogram signals based on a spiking neural network provided by an embodiment of the present invention.

[0017] Figure 2 This is a flow chart of a pulse neural network training method provided by an embodiment of the present invention.

[0018] Figure 3 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0020] Please refer to Figure 1 , Figure 1 This is a flow chart of a method for recognizing human EEG signals based on a spiking neural network, provided by an embodiment of the present invention. This method can be implemented using a computer program, a single-chip microcomputer, or run on a von Neumann-based system for recognizing human EEG signals based on a spiking neural network. The computer program can be integrated into an application or run as a standalone tool application. Specifically, the method may include the following steps:

[0021] S101. Obtain an EEG signal of a target person.

[0022] The target EEG signal refers to the recording of brain electrical activity from the specific target subject to be identified. It is an electrophysiological signal reflecting the activity of a population of neurons in the brain, typically acquired via an electrode array placed on the scalp. The target EEG signal can be understood as a set of multi-channel time series data, with each channel corresponding to an electrode at a specific location on the scalp, recording the potential difference at that location over time.

[0023] Furthermore, the target person's EEG signals provide input data for the spiking neural network, forming the foundation of the entire recognition process. They carry information about the target person's brain activity over a specific time period, potentially reflecting specific intentions, cognitive states, or emotional changes. By analyzing and identifying these signals, the present invention aims to accurately interpret human intentions or brain states, providing critical information input for various brain-computer interface-based applications.

[0024] For example, in a specific application scenario, the target person's EEG signals might come from a user attempting to control an external device through thought. These signals might contain brain activity patterns indicating the user's intention to perform a specific action, such as moving a cursor to the left. By accurately identifying and decoding these signals, the system can translate the user's intent into actual control commands, thereby enabling EEG-based human-computer interaction.

[0025] Furthermore, in order to more accurately capture and process the dynamic characteristics of human EEG signals, thereby providing higher quality input data for the subsequent signal recognition process, based on the above embodiment, as an optional embodiment, in S101: the process of obtaining the target human EEG signal may further include the following steps:

[0026] S201 : Obtain n first time blocks obtained by integrating a human electroencephalogram sequence of a target object collected by a sensor.

[0027] Specifically, the above-mentioned sensors can be multiple electrodes in a specialized EEG acquisition device, which are usually placed on the scalp of the target subject, covering different functional areas of the brain. The commonly used electrode placement scheme follows the international 10-20 system to ensure the standardization and comparability of data acquisition. During the acquisition process, these electrodes continuously record the potential changes in different areas of the brain to form multi-channel time series data. The sampling frequency is usually set between 250Hz and 1000Hz to ensure that the high-frequency components of brain activity are captured.

[0028] Since EEG signals are continuous time series data, directly processing this data may lead to complex calculations and analysis. Therefore, dividing the continuous EEG signal into n fixed-length first time blocks can help the system capture the dynamic changes of the signal at a local time scale.

[0029] The first time block refers to dividing the continuously acquired human EEG sequence into fixed-length data segments. This fixed length is an adjustable parameter, typically selected based on the specific application scenario and EEG signal characteristics, with a typical value between 0.5 and 2 seconds. Each first time block can be understood as an N×T multidimensional data matrix, where N represents the number of EEG electrodes and T is the number of sampling points per v second, which depends on the sampling frequency.

[0030] Specifically, the design of the first time block aims to achieve local analysis of EEG signals. By dividing the continuous signal into segments of fixed length, each first time block represents the EEG activity within a local time range. This approach enables the system to more finely analyze the changes in the signal over time, especially to capture short-term changes in EEG activity, such as sudden changes in movement intention. At the same time, this block strategy also greatly reduces the complexity of processing large-scale data, because each time block can be regarded as an independent analysis unit.

[0031] S202: Determine mutation points in the n first time blocks according to the accumulated deviations between the frequency quantities in the n first time blocks.

[0032] Specifically, due to the high dynamics of EEG signals, significant state changes can occur at different time points, especially in tasks involving mind control or motor intention. These changes may correspond to different brain activity states or intention transitions. To accurately capture significant changes in EEG signals, it is necessary to identify the mutation points in the EEG signals.

[0033] A mutation point is a time point or time period where a significant state change occurs in the EEG signal, marking a sharp shift in the pattern of EEG activity. These shifts typically reflect significant changes in cognitive state, motor intention, or emotional state. A mutation point can be understood as a specific location in the EEG signal time series where the signal's statistical characteristics (such as frequency distribution, amplitude, or phase) undergo a significant change, exceeding the normal range of fluctuations, indicating a qualitative shift in brain activity.

[0034] Furthermore, the identification of mutation points enables the system to dynamically adjust the analysis time window, ensuring that each analysis unit contains complete state information. This dynamic adjustment mechanism significantly improves the accuracy of signal processing and helps distinguish between true changes in EEG activity and random noise. In real-time control applications, the detection of mutation points can trigger a rapid system response, enabling timely capture and response to changes in intent. This is of great significance for building efficient and reliable brain-computer interface systems.

[0035] Optionally, this embodiment of the present invention uses a test statistic based on the cumulative sum (CUSUM) to detect mutation points. The CUSUM is a classic and effective technique, particularly suitable for detecting mutations in time series. Its core principle is to detect changes by calculating the cumulative deviation of the signal.

[0036] Specifically, a CUSUM test is applied to the spectrum quantity in each time block and frequency band. The CUSUM statistic accumulates over time. When the cumulative value of the statistic deviates significantly from the baseline value, it indicates that a mutation point may exist.

[0037] Because the cumulative sum statistics of the CUSUM accumulate over time, if left unchecked, this can lead to the detection of excessively unnecessary or false mutation points. To improve the accuracy and reliability of detection, embodiments of the present invention introduce the concept of thresholded CUSUMs. By setting a predefined threshold, a time point is considered a candidate mutation point only when the CUSUM statistic exceeds the threshold. This thresholding method significantly improves the accuracy and sensitivity of mutation point detection, effectively avoiding false detections caused by noise interference.

[0038] However, relying solely on thresholded CUSUMs may not be sufficient to completely avoid false detections. To this end, embodiments of the present invention introduce a further evaluation and confirmation mechanism. Around candidate mutation points, the system further evaluates the CUSUM statistic to confirm the authenticity of these mutation points. This reduces false mutation points caused by noise or other non-EEG interference. Only after further verification confirms that the change in the CUSUM statistic truly represents a true change in the signal will the time point be finally marked as an actual mutation point.

[0039] S203 . Integrate n first time blocks into m second time blocks based on the mutation point to obtain an electroencephalogram signal of the target person, where n and m are positive integers, and m is less than or equal to n.

[0040] Specifically, to optimize the temporal structure of EEG signals and better reflect the true dynamic changes in brain activity, the first time block is integrated based on the mutation point to obtain a set of more accurate and meaningful time units, providing a more reliable data foundation for subsequent feature extraction and intent recognition.

[0041] Specifically, the mutation point can be used as a dividing line to reorganize the originally fixed-length n first time blocks into m variable-length second time blocks. Here, n and m are both positive integers, and m is less than or equal to n, which means that the number of time blocks after integration will not increase, but will usually decrease.

[0042] Optionally, the integration process follows the following principle: all first time blocks between two adjacent mutation points are merged into a second time block; if the interval between two mutation points is less than a predefined minimum time block length, multiple such small intervals may be merged into a larger second time block.

[0043] By adopting this technical solution, state changes in EEG signals can be more accurately captured. Traditional fixed-length segmentation methods may artificially segment a complete state change process, while integration based on mutation points ensures that each second time block contains a relatively complete and consistent pattern of EEG activity. Secondly, this method improves the signal-to-noise ratio of the data. Because each second time block corresponds to a relatively stable brain state, noise interference during state transitions is reduced, making the signal characteristics within each time block purer and more significant.

[0044] Furthermore, this dynamic time-block integration strategy enhances the system's adaptability to EEG activity at varying timescales. Some brain states may be short-lived, while others may persist for longer periods. By allowing the length of the second time block to dynamically vary based on actual EEG activity, the system can more flexibly capture brain states of varying durations, avoiding the potential for information loss or redundancy associated with fixed time windows.

[0045] The resulting m second-time chunks form the final target EEG signal. This signal not only retains the key information of the original EEG data but also enhances the meaningfulness of its temporal structure through intelligent segmentation. Each second-time chunk now represents a relatively independent and complete brain state or intention phase, providing an ideal data unit for subsequent feature extraction and classification tasks.

[0046] Furthermore, since EEG signals contain not only the activity information of a single channel, but also the interactions between different brain regions. In order to further extract and analyze the complex information contained in the EEG signals, the embodiment of the present invention introduces coherence analysis related technologies. By performing coherence analysis on the EEG signals, these interactions can be captured, providing a richer information basis for subsequent feature extraction and classification tasks. Especially in complex tasks such as mind control, the coordinated activities of different brain regions can often better reflect the user's true intentions than the activities of a single region.

[0047] Based on the above embodiment, as an optional embodiment, after S201, obtaining n first time blocks obtained by integrating the EEG sequence of the target object collected by the sensor, the following steps may be further included:

[0048] S301 : Determine coherence values ​​of n first time blocks according to a ratio between auto-spectra and cross-spectra corresponding to the n first time blocks.

[0049] Specifically, the Welch periodogram method is first applied to each first time block to estimate the autospectrum and cross-spectrum. As an improved power spectral density (PSD) estimation technique, the Welch method further divides the time block into multiple overlapping segments, applies a window function (such as a Hanning window) to each segment, and then calculates the periodogram. Finally, these periodograms are averaged to obtain a power spectrum estimate for the entire time block. The advantage of this method is that it can significantly reduce random fluctuations and improve the stability and reliability of the spectrum estimation.

[0050] Based on the Welch method, the autospectrum and cross-spectrum are calculated separately. The autospectrum reflects the power distribution of a single EEG channel and provides important information for analyzing the intensity of activity in specific brain regions. The cross-spectrum is used to assess the relationship between two different EEG channels, helping to capture information exchange and coordinated activity between different brain regions. By comparing the autospectrum and cross-spectrum, a coherence value can be obtained, a value ranging from 0 to 1 that quantifies the degree of synchronization between different EEG channels.

[0051] To further improve the reliability of coherence estimation, this embodiment of the present invention employs an averaging strategy for multiple estimates. Specifically, for each first time block, multiple overlapping short-term analyses are performed, each yielding a coherence estimate. The final result is then averaged over these estimates. This approach effectively reduces the variance of the estimate and improves the stability of the results.

[0052] S302: Perform normalization processing on the n first time blocks based on the coherence value.

[0053] Specifically, to make the comparison between different spectra and coherence more consistent and reliable, the embodiment of the present invention also introduces Fisher-z transformation to normalize the coherence value. The core idea of ​​Fisher-z transformation is to convert the coherence value into data with an approximate normal distribution.

[0054] Through the above technical solutions, the embodiments of the present invention significantly enhance the ability to characterize the spatiotemporal characteristics of EEG signals. Coherence analysis not only provides a method for quantifying the strength of functional connectivity between different brain regions, but also enables the system to capture more subtle changes in brain activity patterns.

[0055] S102. Input the target person's electroencephalogram signal into the spiking neural network to obtain a recognition result output by the spiking neural network, wherein the recognition result is obtained by decoding the spiking neural network based on the target pulse signal, and the target pulse signal is generated by the synaptic current corresponding to the target person's electroencephalogram signal continuously stimulating the neurons in the spiking neural network, and the spiking neural network is obtained through training.

[0056] A spiking neural network (SNN) is an artificial neural network model that mimics the working principles of biological neural systems. In the present invention, it can be understood as a computational model that uses discrete pulse signals as information carriers and processes and transmits information by simulating the dynamics of biological neurons. SNNs are used to convert complex EEG signals into interpretable control commands, enabling efficient and accurate mind control.

[0057] Compared to traditional deep learning neural networks, SNNs have the following significant characteristics and advantages: First, in terms of information encoding, deep learning networks typically use continuous numerical values ​​to represent the activation state of neurons, while SNNs employ discrete pulse trains. This pulse encoding is closer to the workings of biological neural systems and can more naturally process time series data, such as EEG signals. Second, in terms of computational efficiency, the event-driven nature of SNNs means that calculations are performed only when neurons fire. This stands in stark contrast to the continuous matrix operations in deep learning networks, significantly reducing energy consumption and making it particularly suitable for implementing real-time brain-computer interfaces on low-power devices.

[0058] Furthermore, SNNs have a natural advantage in processing temporal dynamics. While deep learning networks typically require additional structures to handle temporal dependencies, SNNs can directly integrate temporal information into their dynamics, better capturing both transient changes and long-term dependencies in EEG signals. This characteristic enables SNNs to excel at processing highly dynamic EEG signals, enabling them to more accurately identify and interpret complex patterns of brain activity.

[0059] Specifically, after acquiring the target person's EEG signal, the next step is to input it into a spiking neural network to obtain recognition results. When the target person's EEG signal is input into the SNN, it is first converted into synaptic current. This conversion process simulates the mechanism by which biological neurons receive external stimuli. As a continuous source of stimulation, synaptic current continuously acts on neurons in the network. In biological neural systems, neurons accumulate the current they receive. When the accumulated potential exceeds a certain threshold, the neuron will emit an action potential, that is, generate the target pulse signal.

[0060] Unlike traditional deep neural networks, SNNs perform computations only when neurons fire. This means the network's computing resources are efficiently allocated to the information that actually needs to be processed, rather than requiring a large number of continuous matrix operations regardless of the input signal's characteristics, as is the case with traditional networks. This computing model significantly reduces the amount of computation and energy consumption during processing, making the system particularly suitable for real-time EEG signal processing on portable or low-power devices.

[0061] Furthermore, the operating mechanism of spiking neural networks is closer to that of biological neural systems. This similarity enables the network to better process the complex temporal dynamics of EEG signals. In biological neural systems, the encoding and transmission of information often depends on the temporal pattern of neuronal firing, not just the firing frequency. By simulating this temporal encoding mechanism, spiking neural networks can capture subtle temporal features that traditional deep neural networks may overlook, thereby improving recognition accuracy and efficiency.

[0062] Based on the above embodiment, as an optional embodiment, in S102, the step of inputting the target person's EEG signal into the spiking neural network and obtaining the recognition result output by the spiking neural network may further include the following steps:

[0063] S401. Input the target person's EEG signal into a spiking neural network, and convert the target person's EEG signal into a synaptic current based on the spatial features in the target person's EEG signal through the spiking neural network, wherein the spatial features are used to characterize the dependency relationship between different brain regions.

[0064] Specifically, EEG signals are collected from different brain regions using multiple electrodes. Each electrode corresponds to a spatial location, and the collected signal represents brain activity at that location. To preserve the spatial dependencies of these channels, the signals can be mapped into a two-dimensional matrix. This mapping preserves the topological structure of the electrodes in physical space, allowing subsequent convolution operations to capture the spatial relationships between the electrodes.

[0065] Specifically, multi-channel EEG signals are mapped onto a two-dimensional matrix, preserving the topological structure of the electrodes on the scalp. For example, if the international 10-20 system is used for electrode placement, the signals collected by these electrodes are mapped into a two-dimensional matrix, ensuring that the signals of adjacent electrodes also maintain proximity in the matrix. This mapping method lays the foundation for subsequent spatial feature extraction, allowing the network to capture the spatial correlation between electrodes.

[0066] Next, the mapped two-dimensional EEG signal is input into a convolutional spike coding layer. This layer cleverly combines convolution with spike coding to automatically convert continuous EEG signals into discrete spike signals. The essence of the convolution operation is to extract features by sliding a kernel function within a local region, which is ideal for capturing local spatial dependencies in EEG signals. For example, motor imagery tasks may activate adjacent motor cortical areas, and this local activity pattern can be effectively captured by the convolution operation.

[0067] For example, the postsynaptic potential function of the convolutional layer can be expressed as:

[0068] ;

[0069] Where, Represents the postsynaptic potential of the neuron at position (i, j) in the convolution layer, that is, the output of the neuron. This neuron belongs to the convolution channel f of the kth layer. represents the pulse signal of the cth channel of the k-1th layer at time step t, at the position (i-m, j-n), Represents the weight of the convolution kernel, which represents the convolution kernel weight connecting the cth channel of the k-1th layer to the fth channel of the kth layer. The size of the convolution kernel is M×N, that is, it performs weighted calculation on the local area of ​​M×N. Represents the bias term of the convolution kernel, which is used to adjust the convolution result.

[0070] The above operations enable the network to extract more complex spatial features, such as coordinated activity patterns between different brain regions. For example, in complex cognitive tasks, the frontal and parietal lobes may show synchronous activity, and this cross-regional correlation can be captured through multi-channel convolution operations.

[0071] To further enhance the network's feature extraction capabilities and computational efficiency, average pooling layers are inserted between convolutional layers. Pooling not only reduces the computational burden of subsequent layers but also enhances the network's robustness to subtle changes in the EEG signal. This is particularly important because EEG signals are susceptible to various noise and interferences, and the translational invariance of the pooling layer can offset these interferences to a certain extent.

[0072] The synaptic currents generated by this method not only contain the temporal information of the original EEG signal, but also encode complex spatial dependencies. For example, if the prefrontal and parietal regions of the brain show strong coordinated activity when performing a certain task, the synaptic currents corresponding to these regions may show similar pulse patterns or intensity changes.

[0073] Furthermore, brain activity is not only spatially complex but also temporally continuous and dependent. Therefore, simply considering the spatial features of the current moment is insufficient, as brain activity is a continuous process, and current activity is often influenced by previous states. Therefore, the present invention proposes capturing temporal features while extracting spatial features, thereby enabling a more accurate interpretation of the information contained in EEG signals.

[0074] Based on the above embodiment, as an optional embodiment, the step of converting the target person's EEG signal into a synaptic current by using a spiking neural network based on the spatial features in the target person's EEG signal in S401 may further include the following steps:

[0075] S501: Extracting the spatial features of the target person's EEG signal at the current moment through a spiking neural network.

[0076] S502: Integrate the spatial features of the current moment with the spatial features of the previous moment to obtain spatiotemporal features.

[0077] Specifically, this integration is primarily achieved through the postsynaptic potential function of the recurrent layer. Recurrent layers (also known as loop layers) are capable of capturing more complex temporal dependencies, particularly nonlinear relationships at larger time scales. Recurrent layers further integrate temporal information by using the neuron state at the previous moment as input at the current moment.

[0078] For example, the postsynaptic potential function of the recurrent layer can be expressed as:

[0079] ;

[0080] Where, represents the weight matrix of the feedforward connection in the recurrent layer, which acts on the input pulse at the current time step t , represents the bias term of the feedforward connection, represents the weight matrix of the recursive connection, which converts the previous time step Pulse Integrate into the current time step, Represents the bias term of the recursive connection.

[0081] Among them, the weight matrix of the recursive connection and bias are trainable parameters. By optimizing these parameters through gradient descent, the network automatically learns how to best combine current and historical information. This self-learning mechanism enables the model to adapt to different types of EEG signal patterns and handle a variety of complex temporal dependencies without human intervention.

[0082] By integrating spatiotemporal features, the model's ability to understand continuous EEG signals can be improved, enabling the system to capture complex patterns of brain activity, such as ongoing thought processes or gradually changing cognitive states. Secondly, by considering temporal continuity, this method enhances the model's robustness to noise and short-term fluctuations because it not only relies on information at a single moment, but also comprehensively considers activity patterns over a period of time. Furthermore, this method improves the model's performance when handling tasks with long-term dependencies, such as recognizing ongoing intentions or complex cognitive processes.

[0083] S503: Convert the target person's EEG signal into synaptic current based on the spatiotemporal features.

[0084] For example, the generation formula of the prominent current can be expressed as:

[0085] ;

[0086] Where, represents the synaptic current of the k-th layer neuron at time step t. This is the current signal obtained by integrating the input signal received by the neuron; represents a non-negative vector, called the current decay factor. It indicates the degree of current decay over time. The synaptic current of a neuron does not remain constant, but gradually decays over time. Each layer of neurons has its own decay factor; represents the synaptic current of the k-th layer neuron at the previous time step t-1. The current synaptic current depends not only on the input pulse of the current time step, but also on the synaptic current of the previous moment. Therefore, the current of the neuron has time dependence and memory.

[0087] S402. Continuously stimulate neurons in the pulse neural network through synaptic current, so that a target pulse signal is output when the membrane voltage of the neurons accumulates to a threshold value.

[0088] In order to further enhance the network's ability to capture information at different time scales, the embodiment of the present invention also introduces an adaptive emission threshold mechanism:

[0089] ;

[0090] ;

[0091] Where, Indicates that when the neuron fired a pulse in the previous time step , the threshold will increase , which means that the neuron becomes more difficult to activate after firing a pulse, thereby temporarily reducing the firing frequency. This mechanism simulates the phenomenon of post-pulse hyperpolarization of biological neurons, that is, the neuron becomes less excited after firing; if the neuron did not fire a pulse in the previous time step, the threshold will gradually decay according to Attenuation is performed, but it cannot fall below a minimum threshold This ensures that neurons become more susceptible to firing after prolonged periods without firing.

[0092] This mechanism enables neurons to dynamically adjust their sensitivity based on their recent activity. When neurons fire frequently, their threshold increases, making them less likely to activate, mimicking the fatigue effect of biological neurons. Conversely, neurons that remain inactive for extended periods experience a lower threshold, making them more susceptible to activation. This adaptive mechanism enables the network to flexibly integrate information across different timescales, enabling it to capture rapidly changing transient features while also recognizing slowly evolving long-term patterns.

[0093] To reduce the reliance on manual tuning of hyperparameters, some key parameters in the model are set as trainable and optimized via gradient descent:

[0094] and : These are the decay factors for the synaptic current and membrane voltage, respectively. These parameters control how a neuron decays past activity over time. By making them trainable, the model can automatically adjust these values ​​to suit the needs of different tasks.

[0095] Threshold related parameters: It can also be optimized through training, thus reducing the reliance on manual parameter settings.

[0096] S403: Decode the target pulse signal into a recognition result through a pulse neural network, and output the decoding result.

[0097] Specifically, the target pulse signal is implemented as follows: First, the target pulse signal output by the last layer (K-1 layer) of the SNN is input to the pulse fully connected layer of the decoding module. This layer integrates and linearly transforms the input pulse signal through the post-synaptic potential function, as follows:

[0098] ;

[0099] wherein, represents the output pulse signal of the K-1 layer at time step t. It is a binary vector indicating whether each neuron of the layer fires a pulse at time step t, represents the weight matrix of the pulse fully connected layer from the K-1 layer to the K layer, which maps the output signal of the K-1 layer to the neurons of the next layer, represents the bias term of the pulse fully connected layer, used to adjust the output of each neuron.

[0100] Next, the neural network passes the output of the pulse fully connected layer to a non-pulse fully connected layer. The output of the non-pulse fully connected layer is a real-valued vector representing the probabilities of each class at time step t. The process is as follows:

[0101] ;

[0102] wherein, represents the output pulse signal or post-synaptic potential of the K layer at time step t. This output has been processed by the pulse fully connected layer, represents the weight matrix of the non-pulse fully connected layer. It maps the pulse signal of the K layer to the class space, outputting the score (unnormalized class probability) of each class, represents the bias term of the non-pulse fully connected layer. Through the above process, the pulse signal at each time step is converted into a vector wherein each element represents the non-normalized probability score of each class at that time step.

[0103] At each time step t, the output of the non-pulse fully connected layer is a class probability vector. This vector represents the predicted probability distribution of each class by the neural network at time step t. This process can convert the score to probability by applying the softmax function.

[0104] To consider the information of the entire time sequence, the final classification result is obtained by weighted sum of the output of the predicted probability distribution of each class:

[0105] ;

[0106] wherein, Represents the decoding weight at each time step t. This weight is used to weight the category probability at each time step .

[0107] The advantage of this decoding method is that it effectively leverages the strengths of SNNs in processing time series data while enabling flexible classification through non-spiking layers. Spiking layers preserve the temporal dynamics of the input signal and capture instantaneous neural activity patterns, while non-spiking layers integrate these temporal features to enable more complex decision making.

[0108] Please refer to Figure 2 , Figure 2 The flowchart of a spiking neural network training method provided in an embodiment of the present application is shown. The above embodiment describes the application process of the spiking neural network. Based on the above embodiment, the training process of the spiking neural network will be introduced below. Specifically, the process may further include the following steps:

[0109] S601: Construct an initial spiking neural network.

[0110] Specifically, the initial network construction needs to comprehensively consider the spatial distribution and temporal dynamic characteristics of the EEG signal, thus requiring a multi-layered design. First, the input layer is designed as a two-dimensional matrix to maintain the spatial topology of the EEG electrodes, which helps the subsequent convolutional layers extract spatial features.

[0111] Subsequently, multiple convolutional layers and average pooling layers are added to capture spatial dependencies at different scales. To process the temporal dynamics of EEG signals, recurrent layers are introduced into the network. The subsequent synaptic potential function can integrate current and historical information to capture complex temporal dependencies.

[0112] In addition, considering the nonlinear characteristics of EEG signals, a neuron model with adaptive firing threshold is added to the network, and its threshold update mechanism allows neurons to dynamically adjust their sensitivity according to activity.

[0113] Finally, a decoding module, consisting of spiking and non-spiking fully connected layers, was designed to convert the extracted features into the final classification results. This initial network architecture not only effectively processes the spatiotemporal characteristics of EEG signals, but also has low computational complexity and energy consumption, making it particularly suitable for implementing real-time brain-computer interface systems on portable devices.

[0114] S602: Obtain a sample human electroencephalogram signal, and forward-propagate the initial spiking neural network using the sample human electroencephalogram signal to obtain an output result.

[0115] Specifically, a large amount of labeled EEG sample data is first collected, which should contain brain electrical activity patterns for different mind control tasks. The obtained sample EEG signals undergo the same preprocessing steps as the target person's EEG signals, including filtering, artifact removal, and normalization.

[0116] Subsequently, the processed sample signal is input into the constructed initial spiking neural network. The network's forward propagation process first converts the EEG signal into synaptic current through the convolutional pulse coding layer and calculates the synaptic current of each layer. Then, the synaptic current continuously stimulates the neurons in the network. When the membrane voltage accumulates to the threshold, the neuron outputs the target pulse signal. The above process gradually extracts the spatial and temporal features of the EEG signal through multiple convolutional layers and recursive layers. The post-synaptic potential function of the recursive layer integrates the current moment and historical information to capture complex temporal dependencies. Finally, the decoding module converts the extracted features into a category probability vector for each time step and obtains the final classification result through weighted summation.

[0117] This forward propagation process not only evaluates the network's initial recognition of different EEG patterns but also provides the necessary intermediate computational results for subsequent backpropagation and parameter updates. By performing forward propagation on a large amount of sample data, we can comprehensively evaluate the network's performance in various mind control tasks, identify potential problems in the network structure or parameter settings, and provide clear guidance for subsequent optimization.

[0118] S603: Obtain the loss value between the output result and the label result.

[0119] Specifically, this paper uses the cross-entropy loss function as an evaluation metric, chosen based on its ability to effectively measure the difference between the predicted and true distributions. To calculate the loss, the class probability vector output by the network is first compared with the corresponding true labels. For each sample, the cross-entropy between its predicted probability distribution and the true label is calculated. This is then averaged across the entire batch of samples to produce a batch-level loss.

[0120] S604: Based on the loss value, perform back propagation on the initial spiking neural network to obtain a gradient value.

[0121] Specifically, after obtaining the loss value, in order to optimize the performance of the spiking neural network, it is necessary to calculate the gradient of the network parameters through the backpropagation algorithm to guide the parameter update. Traditional backpropagation algorithms are difficult to apply directly to spiking neural networks. This is because the output of spiking neurons is a discrete, non-continuous pulse signal that cannot be directly differentiated. To solve this problem, the embodiments of the present invention adopt an improved spatiotemporal backpropagation algorithm that can achieve efficient gradient calculation while preserving the temporal dynamic characteristics of spiking neural networks.

[0122] Specifically, the gradient of the pulse on the membrane voltage is first approximated using a rectangular function, which can be represented as:

[0123] ;

[0124] where z(v) represents the pseudo-gradient function, which is used to approximate the gradient of the pulse on the membrane voltage, is an amplifier used to control the strength of the pseudo-gradient, 、 is a trapezoidal threshold window used to adjust the range of the pseudo-gradient. This pseudo-gradient function approximates the change of the membrane voltage v at the time of pulse emission by a rectangular or trapezoidal function. In this way, the approximate gradient can be used to update the parameters in the traditional backpropagation algorithm.

[0125] In an example embodiment, the gradient values include at least one of a neuron state gradient value, a spatial convolution layer gradient value, a linear layer gradient value, a temporal convolution layer gradient value, a recurrent layer gradient value, and a decay factor gradient value.

[0126] where the neuron state gradient value refers to the partial derivative of the loss function with respect to the voltage, current, and output pulse of the neuron. In the embodiments of the present application, it can be understood as quantifying the degree of influence of the change in the internal state of the neuron on the overall performance of the network. It is used to guide the network to adjust the dynamic characteristics of the neuron to improve the recognition accuracy.

[0127] In the SNN, the state of the neuron includes the voltage (v) and the current (c) and the output pulse (o). The gradients of these states can be calculated by the following formulas:

[0128] For example, the voltage gradient can be represented as:

[0129] ;

[0130] where represents the gradient of the membrane voltage v with respect to the loss L in the k-th layer at the t-th time step, represents a pseudo-gradient function that approximates the derivative of the membrane voltage v with respect to the pulse o, represents the gradient of the output pulse o with respect to the loss L, represents a voltage decay factor used to control the influence between the current and future time steps. The formula shows that the voltage gradient is determined by the pseudo-gradient of the current time step plus the decay part of the voltage gradient of the future time step.

[0131] For example, the current gradient can be represented as:

[0132] ;

[0133] where Indicates the gradient of the current c with respect to the loss L in the kth layer at the tth time step, represents the current attenuation factor. This formula indicates that the current gradient is not only determined by the voltage gradient at the current time step, but also affected by the current gradient at future time steps.

[0134] For example, the output pulse gradient can be expressed as:

[0135]

[0136] Where, represents the transpose of the weight matrix from the kth layer to the next layer, Denotes the gradient of the output pulse o with respect to the loss L in the kth layer at the t−1th time step. The formula shows that the gradient of the output pulse is determined by the current gradient at the current time step and the connection weights between neurons.

[0137] The spatial convolutional layer gradient refers to the partial derivative of the convolution kernel weights and biases with respect to the loss function. In this embodiment, it can be understood as a measure of the contribution of spatial feature extraction capabilities to network performance. It is used to optimize convolutional layer parameters and improve the network's ability to capture the spatial features of EEG signals.

[0138] Correspondingly, the linear layer gradient value refers to the partial derivative of the loss function with respect to the fully connected layer weights and biases. In this embodiment of the present invention, this can be understood as an assessment of the impact of the linear transformation on the final classification result. It is used to adjust the fully connected layer parameters and improve the network's feature mapping and classification capabilities.

[0139] For example, the gradient values ​​of the spatial convolution layer and the linear layer can be expressed as:

[0140] ;

[0141] Where, Represents weight The gradient of loss L, Indicates bias These gradients are calculated by summing the errors over all time steps.

[0142] The temporal convolutional layer gradient refers to the partial derivative of the weights and biases of the convolution operation with respect to the loss function in the temporal dimension. In this embodiment, this can be understood as quantifying the importance of temporal feature extraction to the overall performance of the network. It is used to optimize the temporal convolutional layer and enhance the network's ability to capture the temporal dynamics of EEG signals.

[0143] For example, the temporal convolution layer gradient value can be expressed as:

[0144]

[0145] Where, It represents the gradient of the weight of the temporal convolution layer to the loss L. represents the gradient of the bias of the temporal convolutional layer with respect to the loss L.

[0146] The recurrent layer gradient value refers to the partial derivative of the loss function with respect to the weights and biases of the recurrent connections. In this embodiment of the present invention, this can be understood as evaluating the impact of long-term temporal dependency modeling on network performance. It is used to adjust recurrent layer parameters and improve the network's ability to process long sequences of EEG data.

[0147] For example, the gradient value of the cycle layer can be expressed as:

[0148] ;

[0149] Where, represents the gradient of the weight of the loop layer with respect to the loss L, represents the gradient of the bias of the recurrent layer with respect to the loss L.

[0150] The attenuation factor gradient value refers to the partial derivative of the voltage and current attenuation factors with respect to the loss function. In this embodiment of the present invention, this can be understood as quantifying the impact of a neuron's information retention capacity on network performance. This is used to optimize the memory properties of neurons and balance the modeling capabilities of short-term responses and long-term dependencies.

[0151] For example, the attenuation factor gradient value can be expressed as:

[0152] ;

[0153] S605: Update the weights and biases of the initial spiking neural network based on the gradient value to obtain a spiking neural network.

[0154] Specifically, the update process uses the gradient descent method to adjust the network parameters according to the calculated gradient value. For the spatial convolution layer, linear layer, temporal convolution layer and recurrent layer, the update formula for their weights and biases can be expressed as:

[0155]

[0156]

[0157] Where W and b represent weights and biases, respectively, η is the learning rate, and ∇WL and ∇bL are the gradients of the weights and biases, respectively. Simultaneously, the neuron's dynamic parameters, such as the decay factors of voltage and current, are updated in a similar manner. This comprehensive parameter update strategy ensures that the network effectively captures the characteristics of the EEG signal in both spatial and temporal dimensions.

[0158] In addition, the embodiment of the present invention introduces an adaptive learning rate mechanism that dynamically adjusts the learning rate based on changes in the gradient to balance learning speed and stability during training. Through this method, the network can converge to the optimal solution more quickly while avoiding falling into local optimality. After multiple rounds of iterative updates, the initial spiking neural network gradually evolves into a highly optimized model that can not only accurately identify different mind control modes, but also has strong generalization capabilities and can adapt to various complex situations in practical applications.

[0159] Figure 3 An example of a physical structure diagram of an electronic device is shown below. Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330, and a communication bus 340. The processor 310, the communications interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 may call logic instructions in the memory 330 to execute a method for recognizing human electroencephalogram signals based on a spiking neural network.

[0160] Furthermore, the logic instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0161] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a human electroencephalogram signal recognition method based on a pulse neural network provided by the above methods.

[0162] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute a human electroencephalogram signal recognition method based on a pulse neural network provided by the above methods.

[0163] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0164] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0165] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for recognizing human electroencephalogram signals based on a spiking neural network, characterized in that: include: Obtaining the target person's EEG signal; Inputting the target person's electroencephalogram signal into a spiking neural network to obtain a recognition result output by the spiking neural network; The recognition result is obtained by decoding the target pulse signal by the spiking neural network, and the target pulse signal is generated by continuously stimulating neurons in the spiking neural network by synaptic current corresponding to the target person's electroencephalogram signal, and the spiking neural network is obtained through training; and obtaining the target person's electroencephalogram signal includes: Obtaining n first time blocks obtained by integrating a human electroencephalogram sequence acquired by a sensor from a target subject; Determining a mutation point in the n first time blocks according to an accumulation of deviations between frequency quantities in the n first time blocks; Integrating the n first time blocks into m second time blocks based on the mutation point to obtain an electroencephalogram signal of the target person, wherein n and m are positive integers, and m is less than or equal to n; The step of integrating the n first time blocks into m second time blocks based on the mutation point to obtain an electroencephalogram signal of a target person includes: Using the mutation point as a dividing line, the n first time blocks of original fixed length are reorganized into m second time blocks of variable length; In the reorganization process, all first time blocks between two adjacent mutation points are merged into one second time block; when the interval between two mutation points is less than a predefined minimum time block length, multiple intervals less than the predefined minimum time block length are merged into one second time block; By integrating the mutation points, the internal EEG activity pattern of each second time block is kept relatively complete and consistent; After acquiring n first time blocks obtained by integrating the human electroencephalogram sequence collected by the sensor, the method further includes: determining coherence values ​​of the n first time blocks according to a ratio between the auto-spectra and the cross-spectra corresponding to the n first time blocks; performing normalization processing on the n first time blocks based on the coherence value; Inputting the target person's electroencephalogram signal into a spiking neural network and obtaining a recognition result output by the spiking neural network includes: Inputting the target person's electroencephalogram signal into a spiking neural network, and converting the target person's electroencephalogram signal into a synaptic current through the spiking neural network based on spatial features in the target person's electroencephalogram signal, wherein the spatial features are used to characterize the dependency relationship between different brain regions; Continuously stimulating neurons in the spiking neural network by the synaptic current so that a target pulse signal is output when the membrane voltage of the neuron accumulates to a threshold value; Decoding the target pulse signal into a recognition result through the pulse neural network, and outputting the decoding result; The step of converting the target person's electroencephalogram signal into a synaptic current based on the spatial features in the target person's electroencephalogram signal by the spiking neural network comprises: Extracting the spatial features of the target person's electroencephalogram signal at the current moment through the spiking neural network; Integrating the spatial features of the current moment with the spatial features of the previous moment to obtain spatiotemporal features; The target person's electroencephalogram signal is converted into a synaptic current based on the spatiotemporal characteristics.

2. The method for recognizing human electroencephalogram signals based on a spiking neural network according to claim 1, wherein: Before obtaining the target person's electroencephalogram signal, the method further includes: Construct an initial spiking neural network; Acquire a sample human electroencephalogram signal, and perform forward propagation on the initial spiking neural network using the sample human electroencephalogram signal to obtain an output result; Obtaining a loss value between the output result and the label result; Based on the loss value, backpropagating the initial spiking neural network to obtain a gradient value; The weights and biases of the initial spiking neural network are updated based on the gradient value to obtain the spiking neural network.

3. The method for recognizing human electroencephalogram signals based on a spiking neural network according to claim 2, wherein: The gradient value includes at least one of a gradient value of a neuron state, a spatial convolution layer gradient value, a linear layer gradient value, a temporal convolution layer gradient value, a recurrent layer gradient value, and an attenuation factor gradient value.

4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for recognizing human electroencephalogram signals based on a pulse neural network as claimed in any one of claims 1 to 3 is implemented.

5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for recognizing human electroencephalogram signals based on a spiking neural network as claimed in any one of claims 1 to 3 is implemented.

6. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for recognizing human electroencephalogram signals based on a spiking neural network as claimed in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

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

    CN114098764A

  • Cerebropathy detection system based on multi-field fusion features and deep learning

    CN117398111A

  • Nervous system signal processing method based on spiking neural network

    CN118013395A