Electroencephalogram signal processing method, system and device based on gradient memory bank and medium
Through the EEG signal processing method based on gradient memory, the problem of noise and perturbation effects in EEG signals is solved, the accuracy and training efficiency of epilepsy spike wave detection are improved, and the computing resource requirements are reduced.
Patent Information
- Application Number
- CN202510860280.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-06-25
AI Technical Summary
The prior art is difficult to effectively remove noise and perturbation in epilepsy spike wave detection, affecting the quality of EEG signals, and the calculation overhead of deep learning methods is large and lacks systematic verification.
The EEG signal processing method based on gradient memory is adopted, and the EEG data is preprocessed and divided, and the gradient memory is constructed, and the historical gradient features are dynamically matched to generate significant features. The model parameters are updated in combination with the backpropagation of the loss function to optimize information transmission between network layers.
The accuracy of epilepsy spike wave detection is improved by about 12%, shortening the training cycle, reducing the hardware resource requirements, and improving the training efficiency and detection accuracy of the model.
Smart Images

Figure CN120345873A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artificial intelligence electroencephalogram (EEG) feature selection, and particularly relates to a method, system, device and medium for processing EEG signals based on a gradient memory bank. Background Art
[0002] Electroencephalogram (scalp EEG), or simply EEG for short, is a method for recording and measuring the physiological discharge activities of cerebral cortical neurons. It is now commonly used for epilepsy spike detection. Patients or subjects can be measured by wearing an electrode cap, and doctors can then analyze the spikes based on the measured EEG data to diagnose whether the patients or subjects have epilepsy. This measurement method is very convenient. However, due to this measurement method and the imaging characteristics of EEG, the EEG signal itself has some noise and disturbances. In general medical diagnoses, the sampling environment of EEG is relatively open during sampling, so there will be background noise in the sampled EEG signals. In addition, EEG mainly records the discharges of radial neurons in the cerebral cortex, but the discharges of radial neurons deeper in the cerebral cortex are mainly affected by other human organs such as the cerebellum and do not reflect the physiological activities of the cerebral cortex. Therefore, from the perspective of EEG imaging, there will inevitably be disturbances from non-cerebral cortical physiological electrical signals in the EEG signal. These noises and disturbances will more or less affect doctors' diagnoses and the development and research of epilepsy spike diagnosis algorithms.
[0003] Deep learning is a technology that has emerged in recent years. EEG epilepsy spike automatic diagnosis technologies based on deep learning are even more common, and these technologies all aim to learn better EEG deep representations. However, even after the most cumbersome preprocessing, the noise existing in the EEG signal cannot be completely removed, which will greatly affect the quality of the EEG deep representation. Therefore, it is particularly important to design an efficient EEG deep feature selection method.
[0004] EEG deep feature selection methods can be divided into two categories: traditional machine learning and deep learning. Traditional machine learning uses specific statistical learning methods to further purify EEG deep representations. For example, ensemble empirical mode decomposition is used to perform multi-order feature analysis on EEG features for feature extraction; there is also a method that uses Shapley value to analyze feature importance and then filters features with a classification tree. Although these methods are based on complete theoretical modeling, it is difficult for the methods themselves to be generalized and often only target a specific dataset. There are also many deep feature selection methods based on deep learning. For example, a multi-agent system is constructed using deep reinforcement learning methods, and a reward and punishment mechanism is set up to select features; another example is to use a three-branch attention structure to perceive three different dimensions of EEG two-dimensional convolution features, and then add the three features to achieve multi-dimensional feature selection. Although these deep methods are effective on multiple EEG datasets, some have high computational costs, some are only experimented with a single network structure, lack systematic verification, and also have great deficiencies. Summary of the Invention
[0005] The object of the present invention is to overcome the deficiencies of the prior art. To achieve the above object, an electroencephalogram signal processing method, system, device and medium based on a gradient memory bank are adopted to solve the problems raised in the above background technology.
[0006] The technical solution of the first aspect provides an electroencephalogram signal processing method based on a gradient memory bank, including the following steps: S1. Preprocess and partition the electroencephalogram data sampled from the subject to obtain a training set, a validation set, and a test set of segmented electroencephalograms; S2. Input the segmented electroencephalogram data with a fixed batch size into a neural network to obtain the output features and gradient features of the layer to be feature-selected, and construct and initialize a gradient memory bank; S3. Input the data of the training set in batches, match the historical gradient features in combination with the gradient memory bank, fuse and generate significant features and input them into the remaining layers of the network to obtain the output probability; S4. Calculate the loss function based on the output probability, update the model parameters by backpropagation, and synchronously update the features in the gradient memory bank; S5. Repeat steps S3 - S4 until the model converges, and finally evaluate the classification performance through the test set to complete the feature selection of the obtained electroencephalogram.
[0007] As a further solution of the present invention: The specific steps in S1 include: S11. Collect the electroencephalogram data of epileptic patients during the interictal period; S12. Perform band-pass filtering and notch filtering using the preset frequency band-pass filtering parameters; S13. For the electroencephalogram data after band-pass filtering and notch filtering, perform removal of heartbeat artifacts and eye shadow artifacts through the ICA decomposition-based algorithm for removing artifact components; S14. Finally, slice and divide the electroencephalogram data according to the labels to obtain the training set, validation set, and test set.
[0008] As a further solution of the present invention: The ratio of the training set, validation set, and test set is .
[0009] As a further solution of the present invention: The specific steps in S2 include: S21. Input the segmented electroencephalogram data of a fixed round size into the layer neural network with gradient inactivation , and the output features of any layer can be obtained . The formula is:
[0010] where, represents processing the data using the neural network of the previous layers ( ), are the neural network parameters, represents the current training round; represents the batch size parameter in the training of the deep learning model, represents the number of electroencephalogram channels, represents the number of electroencephalogram sampling points, represents the output features and the number of feature channel dimensions; S22. Obtain the gradient feature corresponding to this feature as according to the gradient direction propagation theorem; and construct a gradient memory bank with a size of based on the gradient feature . The formula is:
[0011] where, has a dimension size of , represents the gradient memory bank size, respectively represent the width dimension and height dimension of the feature.
[0012] As a further solution of the present invention: The specific steps in S3 include: S31. Input the electroencephalogram segmented data of the th batch with a fixed batch size into the network model for the first layer to obtain the output features of the current batch of data, and the formula is: ; wherein , are neural network parameters; S32. Based on the cosine similarity, select the memory feature from the gradient memory bank that is closest to the gradient feature , and use the memory feature and to jointly construct the significant feature , and the specific formula is:
[0013]
[0014]
[0015] wherein respectively represent the serial number of a certain gradient in a single batch and the serial number of the current historical round, represents the cosine similarity distance calculated between each gradient and each gradient in the memory bank , represents the subscript of the gradient selected as the closest from the medium gradient memory bank , represents the modulo operation; S33. Input the significant feature into the subsequent neural network to obtain the final output probability .
[0016] As a further solution of the present invention: the specific steps in S4 include: S41. Based on the obtained final output probability, construct a cross-entropy loss function, then use the loss function for gradient backpropagation to update the model parameters, and retain the optimal model parameters based on the validation set; S42. Obtain the gradients corresponding to the layer to be feature-selected of the neural network, and update the gradient feature library.
[0017] As a further solution of the present invention: the specific steps in S5 include: Repeat steps S3 and S4. When the loss function of the model is lower than the preset threshold and converges, stop training, and use the test set to test the model performance; According to the tested model, perform feature selection on the obtained electroencephalogram and output the result.
[0018] The technical solution of the second aspect provides a processing system including an electroencephalogram signal processing method based on a gradient memory bank as described in any one of the above, including: A preprocessing module for preprocessing and partitioning the sampled electroencephalogram data of the subject; A gradient memory bank management module for constructing and updating the gradient memory bank; A feature optimization module for generating significant features and controlling their transmission in the neural network; A model training module for optimizing network parameters through backpropagation; A test and evaluation module for evaluating the classification performance of the test set and completing feature selection for the obtained electroencephalogram.
[0019] The technical solution of the third aspect provides a device, further including: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements an electroencephalogram signal processing method based on a gradient memory bank as described in any one of the above.
[0020] The technical solution of the fourth aspect provides a storage medium storing instructions executable by a processor, and the instructions executable by the processor are used to implement an electroencephalogram signal processing method based on a gradient memory bank as described in any one of the above when executed by the processor.
[0021] Compared with the prior art, the present invention has the following technical effects: Adopting the above technical solution, by preprocessing and partitioning the original electroencephalogram data, the gradient memory bank is initialized with fixed batch data; in model training, historical gradient features are dynamically matched to generate significant features to optimize the information transmission between network layers, and the model parameters and the gradient memory bank are synchronously updated in combination with the backpropagation of the loss function. Finally, the spike detection performance is optimized through iterative convergence.
[0022] By screening historical optimal features through the gradient memory bank to construct significant features, the ability of the neural network to capture key features of epileptic spikes is effectively enhanced, and the classification accuracy is increased by about 12%. The gradient memory bank is dynamically updated using the first-in, first-out principle, avoiding the storage of redundant features, shortening the training cycle, and significantly reducing the hardware resource requirements of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The following combines the drawings to describe the specific embodiments of the present invention in detail: Figure 1 It is a schematic diagram of the steps of the deep electroencephalogram feature selection method for the disclosed embodiments of this application; Figure 2 An electroencephalogram slice data for an example of the disclosed embodiment of the present application; Figure 3 A schematic flow diagram of the feature selection layer for the disclosed embodiment of the present application; Figure 4 A schematic flow diagram of the gradient memory bank selection for the disclosed embodiment of the present application; Figure 5 A schematic flow diagram of the gradient memory bank update for the disclosed embodiment of the present application. Detailed implementation manners
[0024] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0025] Please refer to Figure 1 , in an embodiment of the present invention, a method for processing electroencephalogram signals based on a gradient memory bank includes the following steps: S1. Preprocess and partition the electroencephalogram data sampled from the subject to obtain a training set, a validation set, and a test set of segmented electroencephalograms. The specific steps include: S11. Collect electroencephalogram data during the interictal period of epileptic patients; In the detailed implementation manners, electroencephalogram data during the interictal period of epileptic patients are continuously collected under different types of conditions for subsequent research; S12. Perform band-pass filtering and notch filtering using preset frequency band-pass filtering parameters; For example: for the signal data sampled from the electroencephalogram task, perform band-pass filtering using band-pass filtering parameters of 1 Hz to 70 Hz; Perform notch filtering using notch filtering parameters of 60 Hz; S13. For the electroencephalogram data after band-pass filtering and notch filtering, perform heartbeat artifact and eye shadow artifact removal processing through the ICA decomposition to remove artifact components algorithm; For example: based on the reference electrocardiogram (abbreviation: ECG) and electrooculogram (abbreviation: EOG) channels, perform heartbeat artifact and eye movement artifact removal processing on the data after band-pass filtering through the ICA decomposition to remove artifact vector algorithm; Perform a normalization operation on the data after artifact removal processing to obtain the preprocessed electroencephalogram data; In the above steps, the parameters used can be changed according to the actual situation.
[0026] S14. Finally, slice and partition the electroencephalogram data according to the labels to obtain a training set, a validation set, and a test set.
[0027] Specifically, the ratio of the training set, the validation set, and the test set is .
[0028] As Figure 2 shown, the figure shows an example of electroencephalogram slice data; The specific data partitioning of the preprocessed electroencephalogram data is as follows: slice the preprocessed electroencephalogram data 500 ms before and after according to the time point of event occurrence. After slicing each annotation point, a piece of data with a dimension of 16×250 will be obtained , where 16 represents 16 electroencephalogram channels, 250 represents the total number of segment sampling points within 1 s (i.e., 500 ms before and after) at a sampling rate of 250 Hz, which is 250.
[0029] A total of , , training sets , validation sets and test sets are obtained, which are used to train the model, verify the training effect of the model to select the optimal model, and test and verify the depth electroencephalogram spike feature selection model based on the gradient memory bank after training to judge the training effect of the neural network.
[0030] S2. Input the segmented electroencephalogram data with a fixed batch size into the neural network, obtain the output features and gradient features of the layer to be feature-selected, and construct and initialize the gradient memory bank. The specific steps include: S21. Input the segmented electroencephalogram data with a fixed number of rounds into the neural network with gradient inactivation , and the output features of any layer can be obtained. The formula is: ; Among them, represents using the neural network of the previous layers ( ) to process the data, is the neural network parameter, represents the current training round; represents the batch size parameter in the training of the deep learning model, represents the number of electroencephalogram channels, represents the number of electroencephalogram sampling points, represents the output features of the feature channel dimension number; S22. Obtain the gradient feature corresponding to the feature according to the gradient direction propagation theorem as ; and construct a gradient memory bank with a size of according to the gradient feature , and the formula is: ; where has a dimension size of , represents the size of the gradient memory bank, respectively represent the width dimension and height dimension of the feature.
[0031] In the specific implementation steps, set b = 64, c = 16, t = 250, q = 8, = 32, w = 32, h = 8. The main body of the neural network model extracts features from the electroencephalogram signals based on the SpikeNet network model (《Development of Expert-Level Automated Detection of Epileptiform Discharges During Electroencephalogram Interpretation》). The SpikeNet network consists of 11 layers in total. Select the 7th layer of SpikeNet as the layer for feature selection of the neural network. The output feature shape is the same as the gradient shape, and can be respectively expressed as and . The gradient feature library is initialized as an all-zero array.
[0032] S3. Input the data of the training set in batches, match the historical gradient features in combination with the gradient memory bank, fuse and generate significant features and input them into the remaining layers of the network to obtain the output probability. The specific steps include: S31. Input the batch of electroencephalogram segmented data with a fixed batch size into the first layers of the network model to obtain the output feature of the current batch of data. The formula is: ; where, , are the neural network parameters; Specifically, select the seventh layer of SpikeNet as the feature selection layer, and input the electroencephalogram segmented data obtained after data preprocessing in step S1 into the first 7 layers of SpikeNet in batches, and output the feature with a size of ; This process can be expressed as: ; S32. Based on the cosine similarity, select from the gradient memory bank the memory feature with the closest distance to the gradient feature , and use the memory feature and to jointly construct the significant feature , and the specific formula is:
[0033]
[0034]
[0035] where represents the cosine similarity distance calculated for each gradient and each gradient in the memory bank , represents the subscript of the gradient with the closest distance selected from the middle gradient memory bank , represents the modulo operation; Specifically, as Figure 3 shown, the figure is a schematic diagram of the feature selection layer process. The method using cosine similarity measurement is used to find the memory feature in the gradient memory bank that is most similar to the gradient feature of the previous round to be selected by the feature selection layer, and the memory feature and the output feature are used to construct the significant feature. The specific steps are as follows: Based on the cosine similarity, calculate the gradient obtained in S31 and the feature with the closest distance in the gradient memory bank .
[0036]
[0037]
[0038] where respectively represent the serial number of a certain gradient in a single batch and the serial number of the current historical round, st represents the cosine similarity calculated for each gradient and each gradient in the memory bank , and its dimension is 12, represents the feature serial number selected from the feature memory bank according to the cosine similarity size, a total of 64, represents the subscripts of the K gradients with the largest similarity selected from the feature memory bank represents the modulo operation. Then, based on and construct significant features, and the specific steps are as follows:
[0039] First, take the average of the nearest gradient features selected from the gradient repository in the batch dimension and the gradient features of the (j - 1)-th round after attenuation by multiplying each element by the attenuation coefficient γ, and multiply them by the momentum coefficient m and 1 - m respectively to obtain the feature statistic . Among them, represents the average pooling operation; In this embodiment, the momentum coefficient m is taken as 0.1, and the attenuation coefficient is taken as 0.9.
[0040]
[0041]
[0042]
[0043] Among them, represents the subscript corresponding to the -dimensional longitudinal feature in the feature. In this embodiment, represents batch normalization, represents an activation function, which multiplies the feature statistic element-wise with the feature, and performs a normalization operation on each element through a batch normalization operation and a Sigmoid function. Finally, calculate the channel with the largest information volume in the spatio-temporal dimension element-wise and normalize its coefficient to .
[0044]
[0045] Add the output feature and the gradient enhancement feature element-wise to obtain the significant feature . Among them, are both of size , is the vector taken along the dimension after pooling the dimension along the batch dimension.
[0046] S33. Input the significant feature into the subsequent neural network to obtain the final output probability .
[0047] Specifically, asFigure 4 As shown in the figure, it is a schematic diagram of the gradient memory bank selection process. The significant features are input into the subsequent neural network to obtain the final output features . The formula is:
[0048] Then, the output features are input into the classifier to obtain the spike classification probability of the final output of the SpikeNet model , and the formula is:
[0049] Among them, is an activation function, is a fully connected neural network layer
[0050] S4. Based on the output probability, that is, the spike classification prediction result calculate the loss function, update the model parameters by backpropagation, and synchronously update the features in the gradient memory bank. The specific steps include: Specifically, based on the output spike classification prediction result, construct the loss function, update the model parameters by backpropagation and obtain the new gradient features; update the gradient memory bank based on the new gradient features, as Figure 5 shown in the figure, which is a schematic diagram of the gradient memory bank update process; S41. Based on the obtained final output probability, construct the cross-entropy loss function, then use the loss function to perform gradient backpropagation to update the model parameters, and retain the optimal model parameters based on the validation set; Specifically, based on the spike classification prediction result, the binary cross-entropy loss function of the model can be constructed to perform backpropagation to update the model parameters to achieve the purpose of training the model. The cross-entropy loss function is specifically as follows:
[0051] Among them, represents the average value of the loss function of all segmented electroencephalogram data on the model, is the zero-dimensional true label of each segmented electroencephalogram data, represents the zero-dimensional true label of the j-th segmented electroencephalogram data. 0 indicates that there are no spikes in the segmented electroencephalogram data, and 1 indicates that there are spikes in the segmented electroencephalogram data, represents the total number of slices of all electroencephalogram data in the training set, represents the classification prediction probability of the electroencephalogram task corresponding to the j-th segmented electroencephalogram data
[0052]
[0053] The model parameters are updated for a total of N rounds. At the end of the training, the deep EEG spike feature selection model based on the gradient memory bank after training is verified through the validation set. It is tested and verified to verify the training effect. If the effect does not meet the preset requirements, it will continue to be trained through the training set until the training effect meets the preset requirements, and the model parameters that minimize the loss function are retained. Among them, and are the labels of the data slices and the predicted probabilities of the model on the validation set respectively.
[0054] S42. Obtain the gradients corresponding to the layer to be feature-selected in the neural network and update the gradient feature library.
[0055] Obtain the gradients corresponding to the layer to be feature-selected in the neural network and update the gradient memory bank. . The specific steps are as follows: The gradient memory bank is a queue data structure that follows the principle of first in, last out. The gradient features extracted from the 7th layer of SpikeNet in the (j - 1)th round are filled into the gradient memory bank, and all the features saved in the gradient memory bank are multiplied by the decay coefficient to complete the update.
[0056]
[0057] S5. Repeat steps S3 - S4 until the model converges. Finally, evaluate the classification performance through the test set to complete the feature selection of the obtained electroencephalogram. The specific steps include: Repeat steps S3 and S4. When the loss function of the model is lower than the preset threshold until convergence, stop training and use the test set to test the model performance; According to the tested model, perform feature selection on the obtained electroencephalogram and output the results.
[0058] Repeat steps S3 and S4. When the loss function of the model is lower than a certain threshold, that is, when it converges, stop training and use the test set to test the model performance. The specific steps are as follows: When ,
[0059] Among them, are the parameters saved in the final model, ε is a fixed threshold constant, and its value is generally set to 0.001.
[0060] In summary, through steps S1 to S5, the depth EEG spike feature selection method based on the gradient memory bank enhances the segmented EEG data features, which not only suppresses a large amount of background noise existing in the EEG data but also fully utilizes the model training historical information. In this embodiment, the proposed feature enhancement method is applied to an advanced temporal spike detection model. The accuracy index of the model is improved from 90.78% to 93.58%, an increase of 2.80%. At the same time, the F1-score index is also improved from 89.75% to 90.79%, an increase of 1.04%.
[0061] The technical solution of the second aspect provides a processing system including an EEG signal processing method based on a gradient memory bank as described in any one of the above, including: A preprocessing module for preprocessing and partitioning the EEG data sampled from the subject; A gradient memory bank management module for constructing and updating the gradient memory bank; A feature optimization module for generating significant features and controlling their transmission in the neural network; A model training module for optimizing network parameters through backpropagation; A test and evaluation module for evaluating the classification performance of the test set and completing feature selection for the obtained EEG.
[0062] The technical solution of the third aspect provides a device: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements an EEG signal processing method based on a gradient memory bank as described above.
[0063] The content in the above method embodiments is applicable to the device embodiments of the present invention. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those of the above method embodiments.
[0064] The technical solution of the fourth aspect provides a storage medium storing instructions executable by a processor, and the instructions executable by the processor are used to implement an EEG signal processing method based on a gradient memory bank as described above when executed by the processor.
[0065] When these stored instructions are read and executed by a processor (such as the processor in the above-mentioned device), they precisely guide the processor to complete a series of operations, whose ultimate purpose and effect are to implement the complete process and functions of an electroencephalogram signal processing method based on a gradient memory bank as described in any one of the above. That is, this storage medium is the carrier for storing the code of the electroencephalogram signal processing method. When the code is executed by the processor, the functions of the method are embodied in the hardware.
[0066] Although the embodiments of the present invention have been shown and described, for those of ordinary skill in the art, it can be understood that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents, and all should be included within the protection scope of the present invention.
Claims
1. A method for processing electroencephalogram signals based on a gradient memory bank, characterized in that It includes the following steps: S1. Preprocess and partition the electroencephalogram (EEG) data sampled from the subjects to obtain the training set, validation set, and test set of segmented EEG; S2. Input the segmented EEG data with a fixed batch size into the neural network to obtain the output features and gradient features to be used in the feature selection layer, and construct and initialize the gradient memory bank; S3. Input the data of the training set in batches, match the historical gradient features in combination with the gradient memory bank, fuse and generate significant features, and input them into the remaining layers of the network to obtain the output probability; S4. Calculate the loss function based on the output probability, update the model parameters through backpropagation, and synchronously update the features in the gradient memory bank; S5. Repeat steps S3 - S4 until the model converges. Finally, evaluate the classification performance through the test set to complete the feature selection of the obtained EEG.
2. The method for processing electroencephalogram signals based on a gradient memory bank according to claim 1, wherein The specific steps in S1 include: S11. Collect the EEG data of epileptic patients during the interictal period; S12. Perform band-pass filtering and notch filtering using the preset frequency band-pass filtering parameters; S13. For the EEG data after band-pass filtering and notch filtering, perform removal of heartbeat artifacts and eye shadow artifacts through the ICA decomposition to remove artifact components algorithm; S14. Finally, slice and partition the EEG data according to the labels to obtain the training set, validation set, and test set.
3. The method for processing electroencephalogram signals based on a gradient memory bank according to claim 2, wherein The ratio of the training set, validation set, and test set is .
4. The electroencephalogram signal processing method based on a gradient memory bank according to claim 3, characterized in that The specific steps in S2 include: S21. Input the segmented electroencephalogram data of a fixed round size into the layer neural network with gradient inactivation to obtain the output features of any layer . The formula is: Among them, Indicates processing data using a neural network with layers ( ), is the neural network parameter, Indicates the current training round; Indicates the batch size parameter in the training of the deep learning model, Indicates the number of electroencephalogram channels, Indicates the number of electroencephalogram sampling points, Indicates the output feature in terms of the number of feature channel dimensions; S22. Obtain the gradient feature corresponding to the feature according to the gradient direction propagation theorem as ; and construct a gradient memory bank with a size of according to the gradient feature , and the formula is: Among them has a dimension size of , represents the gradient memory bank size, respectively represent the width dimension and height dimension of the feature.
5. The electroencephalogram signal processing method based on a gradient memory bank according to claim 4, wherein The specific steps in S3 include: S31. Input the batch electroencephalogram segmented data of a fixed batch size into the first several layers of the network model to obtain the output features of the current batch of data. The formula is as follows: Among them, , are neural network parameters; S32. Select, based on the cosine similarity, the memory feature from the gradient memory bank that is closest in distance to the gradient feature . Use the memory feature and to jointly construct the significant feature . Then the specific formula is: Among them, respectively represent the serial number of a certain gradient in a single batch and the serial number of the current historical round,[ represents the cosine similarity distance calculated for each gradient in the memory bank and each gradient,[ represents the subscript of the gradient with the closest distance selected from the medium-gradient memory bank and represents the modulo operation; S33. Input the significant feature into the subsequent neural network to obtain the final output probability .
6. The method for processing electroencephalogram signals based on a gradient memory bank according to claim 1, wherein The specific steps in S4 include: S41. Construct a cross-entropy loss function based on the finally obtained output probability, then use the loss function for gradient backpropagation to update the model parameters, and retain the optimal model parameters based on the validation set; S42. Obtain the corresponding gradient of the neural network layer to be used in the feature selection layer, and update the gradient feature library.
7. The method for processing electroencephalogram signals based on a gradient memory bank according to claim 1, wherein The specific steps in S5 include: Repeat steps S3 and S4. When the loss function of the model is lower than the preset threshold until convergence, stop the training and use the test set to test the model performance; According to the tested model, perform feature selection on the obtained EEG and output the results.
8. A processing system comprising an electroencephalogram signal processing method based on a gradient memory bank as described in any one of claims 1-7, characterized in that, It includes: A preprocessing module for preprocessing and partitioning the EEG data sampled from the subjects; A gradient memory bank management module for constructing and updating the gradient memory bank; A feature optimization module for generating significant features and controlling their transmission in the neural network; A model training module for optimizing the network parameters through backpropagation; A test evaluation module for evaluating the classification performance through the test set to complete the feature selection of the obtained EEG.
9. A device, characterized in that, It further includes: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements a method for processing EEG signals based on a gradient memory bank as described in any one of claims 1 - 7.
10. A storage medium storing instructions executable by a processor, characterized in that: The instructions executable by the processor are used to implement a method for processing EEG signals based on a gradient memory bank as described in any one of claims 1 - 7 when executed by the processor.
Citation Information
Patent Citations
Combined detection method of electroencephalogram epilepsy sharp and spike wave discharge based on long short term memory network (LSTM) multi-channels
CN111150393A
Emotion electroencephalogram recognition method of class-level informed discriminator against resistance domain adaptation network
CN117493849A
Electroencephalogram signal emotion recognition method and system
CN119719901A
Cooling device for high voltage battery
KR1020220144730A
Analyzing and selecting predictive electrocardiogram features
US20240378437A1