Epilepsy diagnosis system based on electroencephalogram data channel selection and KAN convolutional spiking neural network

By introducing KAN convolutional pulse neural network and adaptive channel selection mechanism in epilepsy electroencephalopathy detection, the problems of low prediction accuracy and high computing burden in the existing technology are solved, and personalized epilepsy diagnosis with high accuracy and low power consumption are achieved .

CN119480077AInactive Publication Date: 2025-02-18DONGHUA UNIV

Patent Information

Application Number
CN202411565851.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing epilepsy EEG detection methods have limited prediction accuracy, high computational burden and limited network architecture, making it difficult to capture the subtle features of complex EEG signals and fail to achieve personalized diagnosis.

Method used

The epilepsy diagnosis system based on EEG data channel selection and KAN convolutional pulse neural network is adopted. Through the data processing module, channel feature extraction module, adaptive channel selection module and feature classification module, personalized channel selection and efficient feature extraction are realized.

Benefits of technology

It significantly improves the recognition accuracy of epilepsy signals, reduces the computing burden and power consumption, is suitable for application on portable devices, and achieves personalized diagnostic effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119480077A_ABST
    Figure CN119480077A_ABST
Patent Text Reader

Abstract

The technical scheme of the invention discloses an epilepsy diagnosis system based on electroencephalogram data channel selection and a KAN convolutional spiking neural network, which is characterized by comprising a data processing module, a channel feature extraction module, a self-adaptive channel selection module and a feature classification module. According to the method, an effective solution is provided by introducing KAN convolution, channel selection and a spiking neural network. The introduced attention mechanism allows the model to dynamically pay attention to the most relevant EEG channel and signal characteristics, so that personalized channel selection is realized. Through the mechanism, the model can distribute different weights for different individuals, only key signals most related to epileptic seizure are selected, the calculation burden of redundant channels is avoided, and meanwhile the classification precision is improved. Finally, the artificial neural network is converted into the pulse neural network, an event-driven calculation mode is adopted, energy consumption is effectively reduced, and the method is particularly suitable for being applied to portable equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an epilepsy diagnosis system based on electroencephalogram (EEG) data channel selection and KAN convolutional spike neural network, belonging to electroencephalogram (EEG) data analysis, epilepsy diagnosis, and the application of spike neural network. Background Art

[0002] Epilepsy is a chronic disease caused by abnormal discharges of brain neurons, which seriously affects the quality of life of patients. Advances in modern medical technology have continuously improved the diagnosis and treatment of epilepsy, but due to the suddenness and uncertainty of epileptic seizures, accurately predicting epileptic seizures remains an important challenge. Epileptic seizures not only endanger the health of patients, but may also affect their daily life, work and study. Therefore, accurately predicting epileptic seizures is of great significance for reducing the frequency of seizures, optimizing treatment plans and improving the quality of life of patients. In recent years, electroencephalogram (EEG) technology has become a core tool for epilepsy prediction research. EEG can record and analyze the electrical activity of the brain in real time, helping researchers monitor and evaluate changes in brain function before epileptic seizures. With the rapid development of deep learning technology, EEG-based epilepsy prediction models have performed well. Researchers use deep learning models to automatically extract and learn complex features in EEG signals, improving the accuracy and reliability of early prediction of epileptic seizures. These advances have significantly enhanced the ability to identify the risk of epileptic seizures and provide patients with more effective intervention and treatment methods. At present, there are patents related to epilepsy prediction based on EEG signals, but there is still a lot of room for innovation, especially in the use of pulse neural networks combined with EEG channel selection for accurate prediction. At present, there are many patents related to epilepsy diagnosis based on EEG signals, but most of them are based on artificial neural networks, and there are relatively few patents based on pulse neural networks, such as "Epilepsy EEG Detection System Based on Feedforward Spike Neural Network" (application number: CN202211178565.X) applied by Northwest Normal University and "A Method for Recognizing Epileptic EEG Signals Based on Hybrid Spike Deep Network" (application number: CN202410432089.2) applied by Anhui University. Among them, the first patent discloses an epilepsy EEG detection system based on a feedforward spike neural network, defines the error function of the pulse sequence and the learning rules of the synaptic weights, and explores a network model suitable for epilepsy EEG recognition. In order to verify the performance of the algorithm based on the reconstruction of the expected pulse sequence, the author constructs a three-layer feedforward spike neural network structure, then sets the expected output pulse sequence of the spike neural network, and uses the learning algorithm based on the reconstruction of the expected pulse sequence to adjust the synaptic weights of the neural network. According to the results of the pulse sequence learning and the changes in the synaptic weights before and after learning, it is judged that the learning algorithm framework based on the reconstruction of the expected pulse sequence has good learning ability.The second patent involves the field of EEG signal processing technology, which solves the technical problem that the existing technology is difficult to integrate the time-frequency information of EEG signals with the time-space information. In particular, it involves a method for identifying epileptic EEG signals, including obtaining original EEG signal data sampled at a fixed frequency and saved as a single channel; segmenting the original EEG signal data to obtain EEG signal data segments; inputting the EEG signal data segments into the time-frequency representation layer to obtain multi-channel EEG signals of different frequency bands, and enhancing the time-frequency features through the attention network layer; and constructing a pulse coding layer to encode the multi-channel EEG signals into a multi-channel binary pulse sequence. Summary of the invention

[0003] The technical problem to be solved by the present invention is that the existing epilepsy EEG detection methods still have problems such as limited prediction accuracy, heavy computational burden and network architecture limitations. Although the feedforward pulse neural network and the hybrid pulse deep network improve the model learning ability and accuracy through pulse sequence and time-frequency feature processing, it is difficult to capture subtle features when processing complex EEG signals, resulting in a bottleneck in improving the prediction accuracy. At the same time, the computational complexity of the multi-channel EEG signal processing process is relatively high, especially in time-frequency feature extraction and multi-channel signal encoding, the amount of calculation is large and the power consumption is high, which limits the application on portable devices. In addition, these methods usually use fixed channel configurations, fail to take into account the individual differences of different individuals in epileptic seizures, and cannot achieve personalized diagnosis. This not only increases the computational burden brought by redundant channels, but also reduces the accuracy of diagnosis.

[0004] In order to solve the above technical problems, the technical solution of the present invention is to disclose an epilepsy diagnosis system based on EEG data channel selection and KAN convolutional spike neural network, which is characterized by comprising: a data processing module, a channel feature extraction module, an adaptive channel selection module, and a feature classification module, wherein:

[0005] In the data processing module: the raw EEG data is segmented by a fixed-size sliding window; STFT is applied to each window to convert the EEG signal into an image spectrum;

[0006] The channel feature extraction module consists of a depthwise separable convolution layer, which uses depthwise separable convolution to extract EEG data features;

[0007] The adaptive channel selection module uses the attention mechanism to assign attention weights to each channel according to the local correlation between channels. When selecting channels, the first K channels with the highest attention weight scores are selected;

[0008] The feature classification module includes KAN convolution layer, batch normalization layer, maximum pooling layer and fully connected layer: the input data is feature extracted and abstracted through two KAN convolution layers; the features are standardized through the batch normalization layer; the features are downsampled through the maximum pooling layer; the pooled features are mapped to the predefined category space through the fully connected layer to make classification decisions.

[0009] Preferably, in the adaptive channel selection module:

[0010] Perform global average pooling and global maximum pooling operations on all EEG data after STFT and channel feature extraction to generate two different one-dimensional vectors F avg and F max , respectively represent the average pooling features of all channel data and the maximum pooling features of all channel data;

[0011] The average pooling feature F avg And the maximum pooling feature F max Forwarded to the channel weight generation module, the channel weight generation module uses fast one-dimensional convolution to capture cross-channel interaction information, as shown in the following formula:

[0012] W0=Conv1D3(F avg )

[0013] W1=Conv1D3(F max )

[0014] Where W0 and W1 represent output features, Conv1D3 represents a fast one-dimensional convolution with a convolution kernel of 3;

[0015] Use element-wise summation to merge the output feature vectors W0 and W1 and calculate the attention weights;

[0016] According to the calculated attention weights, the first K channel features with the highest attention weights are selected for weighted pooling to generate the final feature F′.

[0017] Preferably, the trained artificial neural network of the epilepsy diagnosis system is converted into a spiking neural network for inference. During the conversion process, the ANN neurons are converted into few-spiking neurons using time coding, which can realize the dynamic simulation of the activation function, wherein the activation function in the ANN neurons is simulated as:

[0018]

[0019] Where x is the input value, s(t) is the pulse sequence generated by the neuron, and d(t) represents the weight obtained by pre-training.

[0020] The present invention provides an effective solution by introducing KAN convolution, channel selection and pulse neural network. First, KAN convolution, as an improvement on ordinary convolution, can better extract the spatiotemporal features in complex EEG signals and significantly improve the recognition accuracy of epileptic signals. Secondly, the introduced attention mechanism allows the model to dynamically focus on the most relevant EEG channels and signal features, thereby realizing personalized channel selection. Through this mechanism, the model can assign different weights to different individuals, select only the key signals most relevant to epileptic seizures, avoid the computational burden of redundant channels, and improve classification accuracy. Finally, the artificial neural network is converted into a pulse neural network, which adopts an event-driven computing method, effectively reduces energy consumption, and is particularly suitable for application on portable devices. Overall, the method disclosed in the present invention has obvious advantages while ensuring high-precision recognition, greatly reducing the computational burden and power consumption.

[0021] Under the premise of ensuring the accuracy of epileptic EEG signal recognition, the present invention reduces the data load and volume of the network, improves the network operation speed, and reduces energy consumption through pulse-shaped network learning and information transmission, and has broad application prospects in portable devices. The innovation points of the present invention are mainly divided into three parts:

[0022] 1. Combination of personalized channel selection and attention mechanism: The system of the present invention realizes personalized channel selection for EEG signals by introducing the attention mechanism. Different from the traditional method of using fixed channel configuration, the attention mechanism can dynamically adjust the importance of each channel, automatically identify and focus on the most relevant channels and signal features for each individual's different epileptic seizure data, thereby improving the accuracy and personalization level of diagnosis.

[0023] 2. Deep learning automatic feature extraction: The system of the present invention combines the KAN convolutional neural network to automatically extract complex EEG features from raw EEG data, breaking away from the limitations of traditional manual feature selection. The powerful learning ability of the KAN convolution enables the model to effectively capture deep neural activity patterns, improve the efficiency and accuracy of epileptic seizure diagnosis, and overcome the limitations of traditional machine learning algorithms in feature extraction and generalization capabilities.

[0024] 3. Pulsing neural network: The system of the present invention innovatively converts the traditional artificial neural network (ANN) into a spiking neural network (SNN), combining the powerful computing power of ANN and the energy-saving advantages of SNN. By pulse-converting the weights and activation functions of ANN, the present invention significantly reduces the energy consumption of the model without significantly sacrificing accuracy, especially in low-power devices or edge computing scenarios. The asynchronous computing method of the spiking neural network enables it to process neuronal pulse signals in an event-driven manner, thereby further reducing redundant computing and power consumption. This conversion enables the model of the present invention to have energy efficiency optimization in hardware implementation while diagnosing epilepsy with high precision.

[0025] Compared with the prior art solutions, the present invention has the following beneficial effects:

[0026] First, in terms of social effects, by accurately diagnosing and early predicting epileptic seizures, patients can better manage their condition and reduce the frequency of seizures, thereby significantly improving the quality of life and reducing the burden on families and society. In terms of economic effects, the method disclosed in the present invention has the characteristics of low computational complexity and low power consumption, making it particularly suitable for application on wearable devices, providing patients with convenient real-time monitoring and management solutions. This series of effects will bring tangible benefits to patients, families and society. In terms of technical effects, the present invention is based on KAN convolution and pulse neural networks, which not only promotes the development of deep learning and electroencephalogram technology, but also significantly improves the accuracy and reliability of epileptic seizure prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 The overall architecture of the epilepsy diagnosis method based on EEG data channel selection and KAN convolutional spike neural network is illustrated;

[0028] Figure 2 An adaptive channel selection module is illustrated;

[0029] Figure 3 Schematic diagram of the conversion of ANN to SNN. DETAILED DESCRIPTION

[0030] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.

[0031] The epilepsy diagnosis system based on EEG data channel selection and KAN convolutional spike neural network proposed in the embodiment of the present invention is composed of four consecutive basic components, such as Figure 1As shown, it includes a data processing module, a channel feature extraction module, an adaptive channel selection module, and a feature classification module.

[0032] The data processing module is divided into two processes: the first process is to split the original EEG data through a sliding window of fixed size; the second process is to apply STFT to each window to convert the EEG signal into an image spectrum. The channel feature extraction module consists of a deep separable convolution layer. The deep separable convolution is used to extract EEG data features, which can effectively capture spatial information, reduce the number of parameters, reduce the risk of overfitting, and retain the correlation between channels, which helps to better understand the characteristics and patterns of EEG data. The adaptive channel selection module is designed to provide personalized solutions for patients. It uses the attention mechanism to assign attention weights to each channel according to the local correlation between channels. These weight scores reflect the importance of the channel, so that the most representative channel data can be effectively screened out. When selecting channels, the top K channels with the highest weight scores are selected to ensure that the most important data are retained for subsequent analysis. This approach not only eliminates the need for prior expertise, but also significantly reduces the computational burden of subsequent data processing. The model selects channel data suitable for different patients for analysis according to their conditions, realizing adaptive channel selection. The feature classification module includes a KAN convolution layer, a batch normalization layer, a pooling layer, and a fully connected layer. First, two KAN convolutional layers are used to extract and abstract the input data, followed by a batch normalization layer to normalize the features to speed up the training process and improve the generalization ability of the model. After that, the features are downsampled through the maximum pooling layer to reduce the number of parameters and the amount of computation. Finally, the pooled features are mapped to the predefined category space through the fully connected layer for classification decisions.

[0033] Data preprocessing: Since EEG signals are non-stationary, simple time domain analysis cannot capture the frequency characteristics of the signal that change over time, which makes it difficult to identify important EEG patterns. In order to analyze EEG signals more effectively, it has become a common method to use short-time Fourier transform (STFT) to convert the signal into a time-frequency diagram. Through STFT, the EEG signal is divided into multiple small time windows, and Fourier transform is performed in each window, thereby converting the original time domain signal into a frequency distribution at different time points. This time-frequency diagram can show the time and frequency changes of the signal, providing more dimensional information for EEG signal analysis. Short-time Fourier transform (STFT) is an enhanced mathematical method derived from discrete Fourier transform (DFT) and is used to explore the instantaneous frequency and instantaneous amplitude of local waves with time-varying characteristics. For discrete digital signals, its short-time Fourier transform (STFT) is defined as:

[0034]

[0035] Wherein, x[n] is the time domain signal to be transmitted, X(t,f) is the STFT at time t and frequency f, and j is a complex unit. w(·) is a window function. In the system disclosed in the embodiment of the present invention, a Hanning window with a window size of N=256 is used, which is defined as follows:

[0036]

[0037] Among them, w(n) is the value of the window function at discrete time point n, and N is the length of the window.

[0038] Adaptive channel selection module: In visual tasks, the attention mechanism can be viewed as a dynamic selection process that is implemented by adaptively weighting features according to the importance of the input. In deep learning, the attention mechanism is the ability of a model to learn how to allocate resources or focus on different parts of the model input. Since not every epilepsy data channel has the same characteristics for the recognition result, adding an attention mechanism to focus on features with more information can improve the efficiency of the system when computing resources are limited.

[0039] The attention network proposed in this invention is Figure 2 As shown, first, the features of all channels are extracted by global pooling and used as the input of the weight generator. The two features are used to greatly improve the representation ability of the network. The weight generator generally uses a multi-layer perceptron (MLP), which generates channel weights by using two fully connected (FC) layers and a nonlinear Sigmoid function. The dimensionality reduction operation in the MLP may have a negative impact on channel attention prediction. In the fully connected layer, the model captures the correlation between all EEG channels, but this often fails to preserve the spatial structure information of the channel well, but instead increases the complexity of the model. Therefore, a more effective and lightweight channel weight generation module is proposed in the system of the present invention, which is beneficial for resource-constrained devices. Specifically, the channel weight generation module uses a fast one-dimensional convolution with a convolution kernel size of 3 to capture the local correlation of the current channel and its adjacent channels and a nonlinear Sigmoid function to generate channel weights. The process is as follows:

[0040] First, all EEG data after STFT and channel feature extraction are subjected to global average pooling and global maximum pooling operations to integrate the information of channel feature maps and generate two different one-dimensional vectors: F avg and F max , respectively represent the average pooling features of all channel data and the maximum pooling features of all channel data. For the input data Represents the EEG data consisting of C channels. Its global average pooling F avg and global maximum pooling F max It can be expressed as:

[0041] F avg =AvgPool(X)#(3)

[0042] F max =MaxPool(X)#(4)

[0043] The two features are then forwarded to the channel weight generation module. In order to reduce parameters, fast one-dimensional convolution is used to capture cross-channel interaction information instead of using a fully connected layer, which is defined as follows:

[0044] W0=Conv1D3(F avg )#(5)

[0045] W1=Conv1D3(F max )#(6)

[0046] Where W0 and W1 represent the output features, and Conv1D3 represents a fast one-dimensional convolution with a convolution kernel of 3. Subsequently, the output feature vectors W0 and W1 are merged using element-wise summation, and the weights are calculated. In short, the channel attention feature map M C (F) is calculated as follows:

[0047] M C (F)=σ(Conv1D3(AvgPool(X))+Conv1D3(MaxPool(X)))#(7)

[0048] Where σ represents the sigmoid activation function, is the input data.

[0049] Finally, according to the calculated attention weights, the first K channel features with the highest weights are selected for weighted pooling to generate the final feature F′. The overall process can be described as:

[0050] M K (F)=TopK(M C (F))#(8)

[0051]

[0052] Among them, TopK(·) is the function to extract the top K maximum values, M K (F) is M C (F) The first K largest weight values, represents element-by-element multiplication, and X′ is the original input data corresponding to the channel with the selected weight.

[0053] The output of the channel selection algorithm is a set of feature data containing K channels, which are considered to have high importance or relevance in predicting epileptic seizures. The larger the value of K, the more channels are selected, but in fact only a few key channels are needed to achieve a high-accuracy diagnosis. After our testing, only 30% of the original number of channels is needed to achieve the best balance between performance and computational effort.

[0054] The feature classification module extracts and abstracts the input data through two KAN convolution layers, and then standardizes the features through a batch normalization layer to speed up the training process and improve the generalization ability of the model. KAN convolution is an improvement on ordinary convolution. The main difference between KAN convolution and the convolution used in CNN is the kernel. In CNN, the kernel is composed of weights, while in KAN convolution, each element of the kernel is a learnable nonlinear function. Each element is defined as follows:

[0055]

[0056] Where w is the weight matrix, spline(x) is the B-spline function, and silu(x) = x·sigmoid(x).

[0057] After that, the features are downsampled through the maximum pooling layer to reduce the number of parameters and the amount of computation. The pooled features are mapped to the predefined category space through the fully connected layer to make classification decisions. Finally, the artificial neural network is converted into a spiking neural network. The conversion process is as follows Figure 3 As shown:

[0058] By converting ANN neurons to few-spike neurons using time coding, dynamic simulation of the activation function can be achieved. In the converted SNN, each neuron only generates 2 spikes on average. In contrast, the spike model based on rate coding requires about 550 time steps and generates a large number of spikes per neuron. In addition, the few-spike neurons can accurately simulate the activation function, thereby improving classification accuracy. The few-spike conversion can be described as

[0059] v(t+1)=v(t)-r(t)s(t)#(11)

[0060] Where v(t) is the membrane potential, r(t) is the reset potential, and s(t) is the spike train generated by the neuron. It can be given by

[0061]

[0062] Where θ(·) is the Heaviside step function and T(t) is the dynamic threshold. x is the input value, which can be positive or negative. The activation function in ANN can be simulated as

[0063]

[0064] Where d(t) represents the weight obtained by pre-training.

[0065] Three trainable parameters r(t), T(t) and s(t) are defined in the few-pulse neuron, and their values ​​are different for different activation functions. The present invention mainly adopts ReLU, Sigmoid and SiLU as activation functions. Specifically, we train the few-pulse neuron model through the time back propagation algorithm in the parameter interval [-10,10] based on the aforementioned simulation process to achieve accurate fitting of the activation function. For the case where the Heaviside step function does not have a derivative, the triangular pseudo-derivative is introduced to solve the derivation problem, thereby obtaining the pulse neuron parameters r(t), T(t) and d(t) corresponding to the activation function.

Claims

1. An epilepsy diagnosis system based on EEG data channel selection and KAN convolutional spike neural network, characterized in that: include: Data processing module, channel feature extraction module, adaptive channel selection module, feature classification module, among which: In the data processing module: the raw EEG data is segmented by a fixed-size sliding window; STFT is applied to each window to convert the EEG signal into an image spectrum; The channel feature extraction module consists of a depthwise separable convolution layer, which uses depthwise separable convolution to extract EEG data features; The adaptive channel selection module uses the attention mechanism to assign attention weights to each channel according to the local correlation between channels. When selecting channels, the first K channels with the highest attention weight scores are selected; The feature classification module includes KAN convolution layer, batch normalization layer, maximum pooling layer and fully connected layer: the input data is feature extracted and abstracted through two KAN convolution layers; the features are standardized through the batch normalization layer; the features are downsampled through the maximum pooling layer; the pooled features are mapped to the predefined category space through the fully connected layer to make classification decisions.

2. An epilepsy diagnosis system based on EEG data channel selection and KAN convolutional spike neural network as claimed in claim 1, characterized in that: In the adaptive channel selection module: Perform global average pooling and global maximum pooling operations on all EEG data after STFT and channel feature extraction to generate two different one-dimensional vectors F avg and F max , respectively represent the average pooling features of all channel data and the maximum pooling features of all channel data; The average pooling feature F avg And the maximum pooling feature F max Forwarded to the channel weight generation module, the channel weight generation module uses fast one-dimensional convolution to capture cross-channel interaction information, as shown in the following formula: W0=Conv1D3(F avg ) W1=Conv1D3(F max ) Where W0 and W1 represent output features, Conv1D3 represents a fast one-dimensional convolution with a convolution kernel of 3; Use element-wise summation to merge the output feature vectors W0 and W1 and calculate the attention weights; According to the calculated attention weights, the first K channel features with the highest attention weights are selected for weighted pooling to generate the final feature F ′ .

3. The epilepsy diagnosis system based on EEG data channel selection and KAN convolutional spike neural network as claimed in claim 1, characterized in that: The trained artificial neural network of the epilepsy diagnosis system is converted into a spiking neural network for inference. During the conversion process, the ANN neurons are converted into few-spiking neurons using time coding, which can realize the dynamic simulation of the activation function. The activation function in the ANN neurons is simulated as: Where x is the input value, s(t) is the pulse sequence generated by the neuron, and d(t) represents the weight obtained by pre-training.

Citation Information

Patent Citations

  • Epilepsy electroencephalogram detection system based on feed-forward pulse neural network

    CN115414054A

  • Epilepsy electroencephalogram signal identification method based on mixed pulse deep network

    CN118021324A

Cited By

  • ADHD classification method based on electroencephalogram signals and channel selection attention mechanism

    CN119646692A

  • Neural stress injury diagnosis method based on electroencephalogram data channel selection and deep learning neural network

    CN119648703A

  • Human brain discharge channel detection method and device, program product and electronic equipment

    CN119700135A

  • Web-based big data driven stroke risk prediction method

    CN120913862A

  • Space-time joint spiking neural network electroencephalogram signal identification method and system

    CN122163230A