CN114564990A - Electroencephalogram signal classification method based on multi-channel feedback capsule network - Google Patents
Electroencephalogram signal classification method based on multi-channel feedback capsule network Download PDFInfo
- Publication number
- CN114564990A CN114564990A CN202210188370.7A CN202210188370A CN114564990A CN 114564990 A CN114564990 A CN 114564990A CN 202210188370 A CN202210188370 A CN 202210188370A CN 114564990 A CN114564990 A CN 114564990A
- Authority
- CN
- China
- Prior art keywords
- capsule
- feedback
- network
- class
- state
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 239000002775 capsule Substances 0.000 title claims abstract description 116
- 238000000034 method Methods 0.000 title claims abstract description 33
- 238000012545 processing Methods 0.000 claims abstract description 13
- 238000007781 pre-processing Methods 0.000 claims abstract description 7
- 230000000694 effects Effects 0.000 claims description 32
- 239000013598 vector Substances 0.000 claims description 31
- 238000010586 diagram Methods 0.000 claims description 24
- 238000012549 training Methods 0.000 claims description 22
- 238000005070 sampling Methods 0.000 claims description 18
- 210000004556 brain Anatomy 0.000 claims description 9
- 238000006243 chemical reaction Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 claims description 9
- 230000008569 process Effects 0.000 claims description 7
- 239000011159 matrix material Substances 0.000 claims description 6
- 238000009826 distribution Methods 0.000 claims description 5
- 238000000605 extraction Methods 0.000 claims description 5
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 claims description 3
- 230000010365 information processing Effects 0.000 claims description 3
- 230000009467 reduction Effects 0.000 claims description 3
- 230000011218 segmentation Effects 0.000 claims description 3
- 241000764238 Isis Species 0.000 claims 1
- 238000013145 classification model Methods 0.000 abstract 2
- 238000005457 optimization Methods 0.000 abstract 1
- 238000000537 electroencephalography Methods 0.000 description 26
- 238000013527 convolutional neural network Methods 0.000 description 8
- 238000013135 deep learning Methods 0.000 description 7
- 238000004364 calculation method Methods 0.000 description 5
- 239000000284 extract Substances 0.000 description 5
- 230000005611 electricity Effects 0.000 description 4
- 210000004761 scalp Anatomy 0.000 description 4
- 230000007547 defect Effects 0.000 description 3
- 238000007917 intracranial administration Methods 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000011176 pooling Methods 0.000 description 3
- 241000282414 Homo sapiens Species 0.000 description 2
- 210000003710 cerebral cortex Anatomy 0.000 description 2
- 230000008451 emotion Effects 0.000 description 2
- 230000008713 feedback mechanism Effects 0.000 description 2
- 230000035945 sensitivity Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000007635 classification algorithm Methods 0.000 description 1
- 238000002790 cross-validation Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 201000010099 disease Diseases 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 206010015037 epilepsy Diseases 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 239000011541 reaction mixture Substances 0.000 description 1
- 238000012706 support-vector machine Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/369—Electroencephalography [EEG]
- A61B5/372—Analysis of electroencephalograms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/047—Probabilistic or stochastic networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/02—Preprocessing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/08—Feature extraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2218/00—Aspects of pattern recognition specially adapted for signal processing
- G06F2218/12—Classification; Matching
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- General Physics & Mathematics (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Mathematical Physics (AREA)
- Computing Systems (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Probability & Statistics with Applications (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Psychiatry (AREA)
- Psychology (AREA)
- Pathology (AREA)
- Heart & Thoracic Surgery (AREA)
- Medical Informatics (AREA)
- Surgery (AREA)
- Animal Behavior & Ethology (AREA)
- Public Health (AREA)
- Veterinary Medicine (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
The invention discloses an electroencephalogram signal classification method based on a multi-channel feedback capsule network, which comprises the following steps: 1, carrying out data selection and slice preprocessing on original electroencephalogram data; 2, establishing a multi-channel feedback capsule network classification model; designing a loss function, and establishing a classification model optimization target; and 4, inputting data to train the network, and finishing electroencephalogram signal classification by using the trained optimal model. The invention combines the advantages of the feedback network and the capsule network, can automatically complete signal classification without manually extracting features or processing signals of the original electroencephalogram signals, and can remarkably improve the accuracy of classification of the electroencephalogram signals, thereby increasing the application value of the electroencephalogram signals in the fields of medical treatment and the like.
Description
Technical Field
The invention relates to the field of electroencephalogram signal classification, in particular to a method for automatically classifying and predicting original electroencephalogram data of a subject through a deep learning method.
Background
The brain is an indispensable part of human daily life, and the electrical activity in the cerebral cortex contains abundant information, and the electrical activity may contain information of different emotions, motor imagery and diseases of human beings. With the development of brain-computer interface field and intelligent medical treatment, electroencephalogram signals have been widely applied to various fields such as emotion calculation, motor imagery, medical health and the like. If the information of the electroencephalogram information can be fully mined, different electroencephalogram signals can be accurately classified, and the use value of the electroencephalogram signals in the fields of medical treatment and the like can be increased.
Electroencephalography (EEG) is a portable device that records electrical activity in the cerebral cortex and can detect a variety of information related to the function of the brain electricity. Intracranial EEG signals are acquired by electrodes placed under the scalp, while scalp EEG signals are acquired by electrodes placed on the surface of the scalp. The intracranial brain electricity is suitable for a long-term implantable monitoring system, generally has higher signal-to-noise ratio, and the scalp brain electricity does not need to be implanted, and is noninvasive for a patient, so the intracranial brain electricity is common in practical use. Studies of EEG data of subjects show that some activity related to the EEG signal begins to show signs several minutes to hours before onset, so we can predictively classify the related activity by capturing the information in the EEG signal. However, analysis of EEG signals often requires a great deal of expertise and expertise, which is a time-consuming and labor-intensive project; moreover, EEG signals are continuous in time, and subjects can output EEG signals at any time, so that a system capable of automatically predicting and classifying EEG signals is needed.
In the conventional prediction classification algorithm based on the EEG signal, a researcher generally denoises the EEG signal first, extracts relevant features, and then classifies the obtained features by using a classifier to obtain a prediction effect. Common features such as Hjorth parameters, statistical moments, cumulative energy, auto-regressive coefficients, Lyapunov indices, etc. Commonly used classifiers include support vector machines, bayesian classifiers, and the like. However, extracting these features also requires a great deal of expert experience, and the effect of classification also depends largely on the extracted features, which may result in poor generalization effect; and the traditional classifier also has the defects in the aspect of improving the classification performance of the electroencephalogram signals.
In recent years, a deep learning method is widely applied to the field of brain-computer interfaces, can automatically learn more suitable characteristics from input, can learn tasks of characteristic extraction and classification at the same time, and obtains more accurate prediction effect in an electroencephalogram signal classification task. At present, most deep learning methods for classification of electroencephalogram signals use Convolutional Neural Networks (CNNs), and feature preprocessing is performed first. Although CNNs of different structures show different advantages in classification, CNNs have difficulty in delineating the link between local features and pooling may cause it to lose more spatial information that may be critical to the task of multi-channel electroencephalogram classification. The feature preprocessing process generally converts raw electroencephalogram data into features in various forms, and also includes operations such as filtering, denoising and the like, so that although more 'clean' data can be obtained, some important information may be lost.
Disclosure of Invention
The invention provides an electroencephalogram signal classification method based on a multi-channel feedback capsule network to overcome the defects of the prior art, so that classification of electroencephalogram signals can be automatically realized, and the classification accuracy of the electroencephalogram signals can be remarkably improved, so that the application value of the electroencephalogram signals in the fields of medical treatment and the like is increased.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention relates to an electroencephalogram signal classification method based on a multi-channel feedback capsule network, which is characterized by comprising the following steps of:
Step 2, establishing a multi-channel feedback capsule network model, wherein the multi-channel feedback capsule network model comprises a one-dimensional convolution layer, a feedback network and a capsule network;
the feedback network comprises: m feedback models, wherein each feedback model comprises a feedback module;
the capsule network comprises: a primary capsule layer, a state capsule layer;
step 2.1, initializing the model parameters:
initializing the weights of all convolution layers by using xavier _ uniform _ initialization, and initializing conversion matrixes in the capsule network state capsule layers by using random distribution which meets the standard positive distribution;
step 2.2, the nth EEG signal sample X is processedn∈RW×HInputting the data into the multi-channel feedback capsule network, and obtaining the nth characteristic sequence after the time characteristic extraction and the data dimension reduction operation of the one-dimensional convolution layerWherein,an nth signature sequence representing the one-dimensional convolution outputThe xth feature map of (1), C1Representing the n-th signature sequenceThe number of characteristic graphs in (1);
step 2.3, iterative processing of the feedback model;
step 2.3.1, defining the serial number of the current feedback model as m, and initializing m to be 1;
step 2.3.2, defining the maximum iteration times as t _ max and the current iteration times as t; and initializing t as 0;
step 2.3.3, the nth characteristic sequence is processedThe characteristic diagram of the mth feedback model input at the t time is recorded asThe characteristic diagram of the feedback module defining the mth feedback model and output at the t time is
Step 2.3.4, the characteristic diagram of the mth feedback model to the tth input by utilizing a convolution layerProcessing to obtain hidden state characteristics
Step 2.3.5, after assigning t +1 to t, judging t>Whether t _ max is true or not, if yes, indicating that t _ max +1 hidden state features are obtained, and executing the step 2.3.7; otherwise, when t is 1, it willIs assigned toThen step 2.3.6 is executed;
step 2.3.6, the mth feedback model utilizes a feedback module to pair feature mapsAndprocessing to obtain feedback informationReusing a convolutional layer for the feedback informationProcessing to obtain hidden state characteristicsThen, returning to the step 2.3.5;
step 2.3.7, t _ max +1 hidden state featuresThe characteristic diagram of the mth feedback model output obtained after 1 × 1 convolution operation is recorded asWherein,an nth signature sequence representing the output of the mth feedback modelThe xth feature map of (1); cm+1In the nth signature sequence representing the output of the mth feedback modelThe number of feature maps of (a);
step 2.3.8, after assigning m +1 to m, judging m>If M is true, executing step 2.4, otherwise, executing the n-th characteristic sequenceAs the input of the mth feedback model, and returning to the step 2.3.2 for sequential execution;
step 2.4, processing the capsule network;
step 2.4.1, the primary capsule layer comprises: a convolutional operating layer, low-level capsule;
the status capsule layer comprises: advanced capsule, state capsule, dynamic routing;
step 2.4.2, characteristics of feedback network outputInputting the data into the capsule network, extracting local space-time characteristics by a convolution operation layer in the primary capsule layer, converting the local space-time characteristics into a vector form, and storing the vector form in a low-level capsule un={un,1,un,2,...,un,k1In which k is1Indicating the number of low-grade capsules; u. un,k1K-th representing the n-th signature sequence1A lower grade capsule;
then storing the local space-time characteristics u in the form of vectors in the low-level capsulen={un,1,un,2,...,un,k1Inputting the data into a state capsule layer, and converting the local space-time characteristics u by using an initialized conversion matrixnSpatio-temporal features being tied to the wholeAnd stored in a high-grade capsule, wherein,indicating that the nth signature sequence belongs to the kth state1A low-grade capsule, j ═ 1, 2.., k2,k2Representing the number of classifications;
step 2.4.3, defining the iteration times of the dynamic route as R, and the current iteration times as R; and initializing r to 0;
let coefficients of class j state of ith high-grade capsule of the r iterationi=1,2,...,k1;j=1,2,...,k2;
Step 2.4.4, after r +1 is assigned to r, judging r>If R is true, then the activity vector is calculatedIs assigned to the nth EEG signal sample XnState of (v) capsulen={vn,1,vn,2,...,vn,k2}; wherein v isn,k2Denotes the kth2A state capsule of a class state; otherwise, the coefficients are processed by the "routing softmax" operationConversion into weight coefficientsAnd weighting and summing the space-time characteristics stored in the advanced capsule to obtain the activity vectorWherein,denotes the kth2Activity vectors of class states, and activity vectorsIs compressed to between 0 and 1, thereby obtaining a compressed activity vectorWherein,represents k2Class state pressureA reduced activity vector; finally, the compressed activity vector is utilizedObtaining coefficient of the r iterationAnd returning to the step 2.4.4;
step 2.5, for the state capsule vnCalculating L2Obtaining the nth EEG signal sample X by normnTo each state;
step 3, establishing an edge loss function L by using the formula (1)n:
Ln=Yclassmax(0,m+-||vn||2)2+λ(1-Yclass)max(0,||vn||2-m-)2 (1)
In the formula (1), class represents a class, and classes belongs to {0,1}, YclassA tag value representing the brain electrical state of the class I; if class is 0, then Y class0; if class is 1, then Yclass=1;||vn||2Representing the probability of the feedback capsule network predicting the two states; m is+And m-Is two threshold parameters, λ is the weight lost to misclassification for the two states;
and 4, training the multi-channel feedback capsule network model by using an Adam optimizer based on the training sample set X, calculating an edge loss function L, adjusting the learning rate in the training process by using an exponential decay method, and stopping after verifying that the loss is not reduced any more or the maximum training times is reached in continuous f times of training, so that the trained network model is obtained and is used for classifying the electroencephalogram signals.
The electroencephalogram signal classification method based on the multi-channel feedback capsule network is also characterized in that the feedback information in the step 2.3.6Is obtained by the following steps:
the feedback module utilizes the feedback informationFor characteristic diagramAdjusting to obtain refined input characteristic diagramAnd then a projection group is used to input the characteristic diagramObtaining a first downsampling characteristic after performing downsampling convolution operationThen the first down-sampled featureAfter the up-sampling convolution operation is carried out, a first reconstruction characteristic is obtained
Then toAndperforming downsampling convolution operation together to obtain second downsampled characteristicThen toAndperforming an upsampling convolution operation to obtain a second multiplicityStructural featuresIn the same way, z reconstruction characteristics are obtainedPerforming convolution operation with convolution kernel of 1 × 1 on z reconstruction features to obtain feedback information
1. The invention provides a multi-channel electroencephalogram feedback capsule network model based on deep learning, which is characterized in that a feedback network is used in electroencephalogram signal classification for the first time, higher-level characteristics are extracted by using low-level characteristics, the information of signals per se is explored more fully, and stronger characteristic representation is obtained, so that electroencephalogram signal information can be represented better, and the classification accuracy is improved.
2. The invention combines a feedback mechanism and a dynamic routing mechanism in the classification of the electroencephalogram signals for the first time, extracts stronger time information by using the feedback mechanism, combines the space information captured by a capsule network and other instantiation characteristics, overcomes the defects of the traditional CNN, and improves the classification performance of the electroencephalogram signals.
3. The invention is an end-to-end structure model, does not need to carry out manual denoising and characteristic preprocessing processes on an original EEG signal in advance, directly carries out training learning from the original EEG data, and is more in line with a deep learning data driving mode, thereby not needing a large amount of expert experience and professional knowledge and obtaining better generalization.
Drawings
FIG. 1 is a schematic diagram of a network architecture according to the present invention;
FIG. 2 is a conceptual diagram of a feedback model of the present invention;
FIG. 3 is a block diagram of a feedback module of the present invention;
FIG. 4 is a block diagram of dynamic routing of the present invention;
FIG. 5 is a graph comparing the effect of AUC in the classification of brain electrical signals in the CHB-MIT database;
FIG. 6 is a graph comparing the sensitivity effect of electroencephalogram classification in the CHB-MIT database;
FIG. 7 is a comparison graph of the effect of the electroencephalogram classification FPR in the CHB-MIT database.
Detailed Description
In this embodiment, an electroencephalogram signal classification method based on a multi-channel feedback capsule network mainly performs electroencephalogram signal classification by using a feedback network and a capsule network. The feedback network is used for extracting stronger time information, combines the correlation between the space information extracted by the capsule network and the local characteristics, and distributes the characteristic weight through a dynamic routing mechanism to finally achieve an accurate classification effect. As shown in fig. 1, specifically, the method comprises the following steps:
step 2, establishing a multi-channel feedback capsule network model, wherein the multi-channel feedback capsule network model comprises a one-dimensional convolution layer, a feedback network and a capsule network;
the feedback network includes: m feedback models, wherein each feedback model comprises a feedback module;
the capsule network comprises: a primary capsule layer and a state capsule layer;
step 2.1, initializing model parameters:
the weights of all the convolution layers are initialized by using a xavier _ uniform _ mode, and the conversion matrix in the capsule network state capsule layer is initialized by using a random mode which meets the standard and is distributed just over ten;
step 2.2, the nth EEG signal sample Xn∈RW×HInputting the data into a multi-channel feedback capsule network, and obtaining an nth characteristic sequence after the time characteristic extraction and the data dimension reduction operation of the one-dimensional convolution layerWherein,n-th signature sequence representing one-dimensional convolution outputThe xth feature map of (1), C1Representing the n-th signature sequenceThe number of characteristic graphs in (1); because the original electroencephalogram signal is used, the signal contains noise information, the function of denoising can be achieved by using one-dimensional convolution, the data dimension can be reduced, the convolution kernel used in the experiment is 11 multiplied by 1 in size, the step length is 1, and the maximum pooling operation size is 8 multiplied by 1;
step 2.3, iterative processing of a feedback model; the feedback network comprises feedback models, each feedback model comprises a feedback module, and each feature extraction is a process of carrying out loop iteration;
step 2.3.1, defining the serial number of the current feedback model as m, and initializing m to be 1;
step 2.3.2, defining the maximum iteration times as t _ max and the current iteration times as t; and initializing t as 0;
step 2.3.3, the nth characteristic sequenceThe characteristic diagram of the mth feedback model input at the t time is recorded as(ii) a The characteristic diagram of the feedback module defining the mth feedback model at the t-th output is
Step 2.3.4, the mth feedback model utilizes a feature map of convolutional layer to the tth inputProcessing to obtain hidden state characteristicsHidden state hereIs composed ofThe function is to connect more stable acquisition characteristic information as residual error;
step 2.3.5, after assigning t +1 to t, judging t>Whether t _ max is true or not, if yes, indicating that t _ max +1 hidden state features are obtained, and executing the step 2.3.7; otherwise, when t is 1, it willIs assigned toThen step 2.3.6 is executed;
step 2.3.6, the mth feedback model utilizes the feedback module to match the feature mapAndprocessing to obtain feedback informationReusing a convolutional layer pair feedback informationProcessing to obtain hidden state characteristicsThen, returning to the step 2.3.5; the specific calculation formula is as formula (2) and formula (3):
in formulae (2) and (3), fFBIndicating a feedback module, fConvThe convolution operation is represented, the size of a convolution kernel used in the method is 11 multiplied by 1, the step size is 1, and the maximum pooling size is 4 multiplied by 1;
step 2.3.7, t _ max +1 hidden state featuresThe characteristic diagram of the mth feedback model output obtained after 1 × 1 convolution operation is recorded asWherein,n characteristic sequence representing m feedback model outputThe xth profile of (1); cm+1In the nth signature sequence representing the output of the mth feedback modelThe number of feature maps of (a); calculating as shown in equation (4):
in the formula (4), the reaction mixture is,representing a convolution operation with a convolution kernel size of 1 and a step size of 1, fcatRepresenting a splicing operation; the feedback model extracts useful information of different levels by utilizing the characteristic information of each hidden state to obtain final characteristic output;
step 2.3.8, after m +1 is assigned to m, m is judged>If M is true, execute step 2.4, otherwise, execute the n-th characteristic sequenceAs the input of the mth feedback model, and returning to the step 2.3.2 for sequential execution;
step 2.4, processing the capsule network;
step 2.4.1, the primary capsule layer comprises: a convolutional operating layer, low-level capsule;
the state capsule layer comprises: advanced capsule, state capsule, dynamic routing;
step 2.4.2, characteristics of feedback network outputInputting into capsule network, extracting local space-time characteristics from convolution operation layer in primary capsule layer, converting into vector form, and storing in low-level capsuleIn which k is1Indicating the number of low-grade capsules; u. ofn,iThe i-th low-level capsule representing the n-th signature sequence, i ═ 1,21(ii) a The traditional CNN convolution operation generates scalar quantities which can only represent local features, and the capsule network converts the convolved scalar quantities into vector forms, so that the relation among the features can be enriched, and the feature relation among the local features is stored; the convolution operation in the primary capsule layer is convolution with convolution kernel size of 6 x 6 and step size of 2 and convolution with convolution kernel size of 5 x 5 and step size of 2;
then storing the local space-time characteristics in the form of vectors in the low-level capsuleInputting into the state capsule layer, converting the local space-time characteristics u by the initialized conversion matrixnSpatio-temporal features being tied to the wholeAnd stored in a high-grade capsule, wherein,i-th low-level capsule indicating that the nth signature sequence belongs to the j-th state, j being 1,22,k2Representing the number of classifications; the relation between local features and the whole can be enriched through the transformation matrix, and more instantiated features are stored in a high-level vector; the calculation formula is as follows:
step 2.4.3, defining the iteration times of the dynamic route as R, and the current iteration times as R; and initializing r to 0;
Step 2.4.4, after r +1 is assigned to r, judging r>If R is true, then the activity vector is calculatedIs assigned to the nth EEG signal sample XnState of the capsuleWherein,denotes the kth2A state capsule of a class state; otherwise, the coefficients are processed by the "routing softmax" operationConversion into weight coefficientsAnd weighting and summing the space-time characteristics stored in the advanced capsule to obtain an activity vectorWherein,denotes the kth2Activity vectors of class states, and activity vectorsIs compressed to between 0 and 1, thereby obtaining a compressed motion vectorWherein,represents k2Class state compressed activity vectors; finally, the compressed activity vector is utilizedObtaining the coefficient of the r-th iterationAnd returning to the step 2.4.4; the calculation formulas are shown in (6) to (9):
the method initializes the equal initial prior probability of each capsule, and then carries out iterative computation; the weight of the information with distinction is increased through the dynamic routing process, the weight of the information without distinction is reduced, and a better classification effect is achieved;
step 2.5, capsule of right stateCalculating L2Obtaining the nth EEG signal sample X by normnTo each state;
step 3, establishing an edge loss function L by using the formula (10)n:
In the formula (1), class represents a class, and classes belongs to {0,1}, YclassA tag value representing the brain state of the class; if class is 0, i.e. one of the states, then Y isclass0; if class is 1, another state, thenRepresenting the probability of the feedback capsule network predicting both states. m is a unit of+And m-Is two threshold parameters and λ is the weight lost to misclassification for the two states.
And 4, training the multi-channel feedback capsule network model by using an Adam optimizer based on the training sample set X, calculating an edge loss function L, adjusting the learning rate in the training process by using an exponential decay method, and stopping after verifying that the loss is not reduced any more or the maximum training times is reached in continuous 10 times of training, so that the trained network model is obtained and is used for classifying the electroencephalogram signals.
the feedback module utilizes the feedback informationFor characteristic diagramAdjusting to obtain refined input characteristic diagramThen using a projection group to input the characteristic diagramObtaining down-sampling characteristics after performing down-sampling convolution operationThen down-sampling featuresAfter the up-sampling convolution operation is carried out, a reconstruction characteristic is obtainedCan be reusedAndperforming downsampling convolution operation to obtainAnd performing up-sampling convolution operation on the down-sampling features to obtain reconstruction featuresThereby using the z projection pairs to refine the input feature mapProcessing to obtain z reconstruction characteristicsPerforming convolution operation with convolution kernel of 1 × 1 on z reconstruction features to obtain feedback informationThe calculation formula is shown in formula (11) to formula (14):
in the formula (11) to the formula (14), each projection layer includes an up-sampling and down-sampling operation, the down-sampling operation extracts feature information, and the up-sampling operation reconstructs features, so that the extracted features are more effective.A down-sampled feature map is represented,representing an up-sampled feature map. ConviAnd DeconviRepresenting the downsampling and upsampling operations for the ith projection layer, the convolution kernel size is 11 x 1 with a step size of 1.
In specific implementation, the multi-channel feedback capsule network (FB-CapsNet) is compared with some advanced electroencephalogram signal classification deep learning methods such as a deep convolutional neural network + a multi-layer perceptron (DCNN + MLP), a deep neural network + a bidirectional long-short term memory network (DCNN + Bi-LSTM), and a traditional capsule network model (CapsNet). The performance index on the CHB-MIT database is as follows:
TABLE 1 average performance of different methods on CHB-MIT database for classification of electroencephalograms
Sensitivity (%) | AUC | FPR(\h) | |
DCNN+MLP | 85.9 | 0.844 | 0.370 |
DCNN+Bi-LSTM | 87.7 | 0.877 | 0.275 |
CapsNet | 87.4 | 0.877 | 0.224 |
FB-CapsNet | 93.4 | 0.928 | 0.096 |
The leave-one-out cross-validation results for 19 subjects are shown in fig. 4, 5, and 6. And (4) analyzing results:
the experimental results in the table 1 show that compared with other deep learning methods DCNN + MLP and DCNN + Bi-LSTM in the field of electroencephalogram signal classification, FB-CapsNet improves all indexes, and reduces the false alarm times in the interval of onset while accurately predicting the early-stage type of onset on a CHB-MIT database. Compared with the original capsule network, the method also obviously improves the classification prediction performance, and verifies that the feedback network can better extract representative characteristics. In addition, as can be seen from fig. 4, 5 and 6, the model has obvious improvement on most subjects, and the type areas and signal distributions of different types of electroencephalogram signals are different for different subjects, which shows that the method has good identification capability and strong generalization effect on different subjects.
In conclusion, the invention fully utilizes rich EEG information contained in the original EEG signal, uses the feedback network to extract high-level time, combines the spatial characteristics and other instantiation information extracted by the capsule network, and then distributes the weight to the high-level characteristics through a dynamic routing mechanism, thereby achieving more accurate EEG signal classification effect. In the two-classification test of the public data set CHB-MIT, the electroencephalogram data of the early-stage attack class can be classified more accurately, the false alarm times in the inter-attack class are reduced, and the method is superior to the traditional convolutional neural network and the original capsule network.
Claims (2)
1. An electroencephalogram signal classification method based on a multi-channel feedback capsule network is characterized by comprising the following steps:
step 1, acquiring an electroencephalogram signal data set with labeled information, and preprocessing channel data selection and sample segmentation on an original electroencephalogram signal in the electroencephalogram signal data set, so as to obtain N segments of electroencephalogram signal samples with the time length of T and form a training sample set, wherein X is recorded as X ═ X1,X2,...,Xn,...,XNIn which Xn∈RW×HRepresenting the nth electroencephalogram signal sample, H representing the channel number of the electroencephalogram signal, W being T multiplied by s representing the number of sampling points, and s representing the sampling rate of the electroencephalogram signal used by the data set; let the nth EEG signal sample XnThe corresponding label type is marked as YnIf the training sample set X corresponds to a label set Y ═ Y1,Y2,...,Yn,...,YN};
Step 2, establishing a multi-channel feedback capsule network model, wherein the multi-channel feedback capsule network model comprises a one-dimensional convolution layer, a feedback network and a capsule network;
the feedback network comprises: m feedback models, wherein each feedback model comprises a feedback module;
the capsule network comprises: a primary capsule layer, a state capsule layer;
step 2.1, initializing model parameters:
initializing the weights of all convolution layers by using a xavier _ uniform _ initialization, and initializing a conversion matrix in a capsule layer of the capsule network state by using a random distribution which meets a standard positive distribution;
step 2.2, the nth EEG signal sample X is processedn∈RW×HInputting the data into the multi-channel feedback capsule network, and obtaining the nth characteristic sequence after the time characteristic extraction and the data dimension reduction operation of the one-dimensional convolution layerWherein,an nth signature sequence representing the one-dimensional convolution outputThe xth feature map of (1), C1Representing the n-th signature sequenceThe number of characteristic graphs in (1);
step 2.3, iterative processing of the feedback model;
step 2.3.1, defining the serial number of the current feedback model as m, and initializing m to be 1;
step 2.3.2, defining the maximum iteration times as t _ max and the current iteration times as t; and initializing t ═ 0;
step 2.3.3, the nth characteristic sequenceThe characteristic diagram of the mth feedback model input at the t time is recorded asThe characteristic diagram of the feedback module defining the mth feedback model and output at the t time is
Step 2.3.4, the characteristic diagram of the mth feedback model to the tth input by utilizing a convolution layerProcessing to obtain hidden state characteristics
Step 2.3.5, after assigning t +1 to t, judging t>Whether t _ max is true or not, if yes, indicating that t _ max +1 hidden state features are obtained, and executing the step 2.3.7; otherwise, when t equals 1, it willIs assigned toThen step 2.3.6 is executed;
step 2.3.6, the mth feedback model utilizes a feedback module to pair feature mapsAndto carry outProcessing to obtain feedback informationReusing a convolutional layer for the feedback informationProcessing to obtain hidden state characteristicsThen, returning to the step 2.3.5;
step 2.3.7, t _ max +1 hidden state featuresThe characteristic diagram of the mth feedback model output obtained after 1 × 1 convolution operation is recorded asWherein,an nth signature sequence representing the output of the mth feedback modelThe xth feature map of (1); cm+1In the nth signature sequence representing the output of the mth feedback modelThe number of feature maps of (a);
step 2.3.8, after m +1 is assigned to m, m is judged>If M is true, execute step 2.4, otherwise, execute the n-th characteristic sequenceAs the input of the mth feedback model, and returning to the step 2.3.2 for sequential execution;
step 2.4, processing the capsule network;
step 2.4.1, the primary capsule layer comprises: a convolution operation layer, low-grade capsule;
the status capsule layer comprises: advanced capsule, state capsule, dynamic routing;
step 2.4.2, characteristics of feedback network outputInputting the data into the capsule network, extracting local space-time characteristics by a convolution operation layer in the primary capsule layer, converting the local space-time characteristics into a vector form, and storing the vector form in a low-level capsuleIn which k is1Indicating the number of low-grade capsules;k-th representing the n-th signature sequence1A lower grade capsule;
then storing the local space-time characteristics in the form of vectors in the low-level capsuleInputting into the state capsule layer, converting the local space-time characteristics u by the initialized conversion matrixnSpatio-temporal features being tied to the wholeAnd stored in a high-grade capsule, wherein,indicating that the nth signature sequence belongs to the kth state1A low-grade capsule, j ═ 1, 2.., k2,k2Representing the number of classifications;
step 2.4.3, defining the iteration times of the dynamic route as R, and the current iteration times as R; and initializing r to 0;
Step 2.4.4, after r +1 is assigned to r, judging r>If R is true, then the activity vector is calculatedIs assigned to the nth EEG signal sample XnState of the capsuleWherein,denotes the kth2A state capsule of a class state; otherwise, the coefficients are processed by the "routing softmax" operationConversion into weight coefficientsAnd weighting and summing the space-time characteristics stored in the advanced capsule to obtain an activity vectorWherein,denotes the kth2Activity vectors of class states, and activity vectorsIs compressed to between 0 and 1, thereby obtaining a compressed motion vectorWherein,represents k2Class state compressed activity vectors; finally, the compressed activity vector is utilizedObtaining coefficient of the r iterationAnd returning to the step 2.4.4;
step 2.5, for the state capsule vnCalculating L2Obtaining the nth EEG signal sample X by normnTo each state;
step 3, establishing an edge loss function L by using the formula (1)n:
Ln=Yclassmax(0,m+-||vn||2)2+λ(1-Yclass)max(0,||vn||2-m-)2 (1)
In the formula (1), class represents a class, and classes belongs to {0,1}, YclassA tag value representing the brain electrical state of the class I; if class is 0, then Yclass0; if class is 1, then Yclass=1;||vn||2Representing the probability of the feedback capsule network predicting the two states; m is+And m-Is two threshold parameters, λ is the weight lost to misclassification for the two states;
and 4, training the multi-channel feedback capsule network model by using an Adam optimizer based on the training sample set X, calculating an edge loss function L, adjusting the learning rate in the training process by using an exponential decay method, and stopping after verifying that the loss is not reduced any more or the maximum training times is reached in continuous f times of training, so that the trained network model is obtained and is used for classifying the electroencephalogram signals.
2. The multi-based of claim 1The EEG signal classification method of the channel feedback capsule network is characterized in that the feedback information in the step 2.3.6 isIs obtained by the following steps:
the feedback module utilizes the feedback informationFor characteristic diagramAdjusting to obtain refined input characteristic diagramThen using a projection group to input the characteristic diagramObtaining a first downsampling characteristic after performing downsampling convolution operationThen the first down-sampled featureAfter the up-sampling convolution operation is carried out, a first reconstruction characteristic is obtained
Then toAndperforming downsampling convolution operation together to obtain a second downsampling characteristicThen toAndperforming an upsampling convolution operation to obtain a second reconstruction featureIn the same way, z reconstruction characteristics are obtainedPerforming convolution operation with convolution kernel of 1 × 1 on z reconstruction features to obtain feedback information
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210188370.7A CN114564990B (en) | 2022-02-28 | 2022-02-28 | Electroencephalogram signal classification method based on multichannel feedback capsule network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210188370.7A CN114564990B (en) | 2022-02-28 | 2022-02-28 | Electroencephalogram signal classification method based on multichannel feedback capsule network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114564990A true CN114564990A (en) | 2022-05-31 |
CN114564990B CN114564990B (en) | 2024-02-20 |
Family
ID=81715336
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210188370.7A Active CN114564990B (en) | 2022-02-28 | 2022-02-28 | Electroencephalogram signal classification method based on multichannel feedback capsule network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114564990B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115017960A (en) * | 2022-07-19 | 2022-09-06 | 合肥工业大学 | Electroencephalogram signal classification method based on space-time combined MLP network and application |
CN115130664A (en) * | 2022-08-30 | 2022-09-30 | 华南师范大学 | Emotion analysis method and device of electroencephalogram signals based on capsule network model |
CN116489236A (en) * | 2023-06-25 | 2023-07-25 | 中国科学院自动化研究所 | Electroencephalogram signal real-time lossless compression method and device, electronic equipment and storage medium |
WO2024051455A1 (en) * | 2022-09-05 | 2024-03-14 | 大连大学 | Capsule network-based motor imagery electroencephalography signal recognition method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190341152A1 (en) * | 2018-05-01 | 2019-11-07 | Blackthorn Therapeutics, Inc. | Machine learning-based diagnostic classifier |
CN111584032A (en) * | 2020-04-30 | 2020-08-25 | 天津大学 | Novel brain-controlled intelligent rehabilitation method based on capsule network and application |
US20200337625A1 (en) * | 2019-04-24 | 2020-10-29 | Interaxon Inc. | System and method for brain modelling |
CN112766355A (en) * | 2021-01-13 | 2021-05-07 | 合肥工业大学 | Electroencephalogram signal emotion recognition method under label noise |
CN113554110A (en) * | 2021-07-30 | 2021-10-26 | 合肥工业大学 | Electroencephalogram emotion recognition method based on binary capsule network |
CN113749657A (en) * | 2021-09-10 | 2021-12-07 | 合肥工业大学 | Brain wave emotion recognition method based on multitask capsules |
-
2022
- 2022-02-28 CN CN202210188370.7A patent/CN114564990B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190341152A1 (en) * | 2018-05-01 | 2019-11-07 | Blackthorn Therapeutics, Inc. | Machine learning-based diagnostic classifier |
US20200337625A1 (en) * | 2019-04-24 | 2020-10-29 | Interaxon Inc. | System and method for brain modelling |
CN111584032A (en) * | 2020-04-30 | 2020-08-25 | 天津大学 | Novel brain-controlled intelligent rehabilitation method based on capsule network and application |
CN112766355A (en) * | 2021-01-13 | 2021-05-07 | 合肥工业大学 | Electroencephalogram signal emotion recognition method under label noise |
CN113554110A (en) * | 2021-07-30 | 2021-10-26 | 合肥工业大学 | Electroencephalogram emotion recognition method based on binary capsule network |
CN113749657A (en) * | 2021-09-10 | 2021-12-07 | 合肥工业大学 | Brain wave emotion recognition method based on multitask capsules |
Non-Patent Citations (2)
Title |
---|
官金安;汪鹭汐;赵瑞娟;李东阁;吴欢;: "基于3D卷积神经网络的IR-BCI脑电视频解码研究", 中南民族大学学报(自然科学版), no. 04, 15 December 2019 (2019-12-15) * |
李玉花;柳倩;韦新;程永强;李海芳;: "基于卷积神经网络的脑电信号分类", 科学技术与工程, no. 15, 28 May 2020 (2020-05-28) * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115017960A (en) * | 2022-07-19 | 2022-09-06 | 合肥工业大学 | Electroencephalogram signal classification method based on space-time combined MLP network and application |
CN115017960B (en) * | 2022-07-19 | 2024-02-13 | 合肥工业大学 | Electroencephalogram signal classification method based on space-time combined MLP network and application |
CN115130664A (en) * | 2022-08-30 | 2022-09-30 | 华南师范大学 | Emotion analysis method and device of electroencephalogram signals based on capsule network model |
CN115130664B (en) * | 2022-08-30 | 2022-11-08 | 华南师范大学 | Emotion analysis method and device of electroencephalogram signals based on capsule network model |
WO2024051455A1 (en) * | 2022-09-05 | 2024-03-14 | 大连大学 | Capsule network-based motor imagery electroencephalography signal recognition method |
CN116489236A (en) * | 2023-06-25 | 2023-07-25 | 中国科学院自动化研究所 | Electroencephalogram signal real-time lossless compression method and device, electronic equipment and storage medium |
CN116489236B (en) * | 2023-06-25 | 2023-09-12 | 中国科学院自动化研究所 | Electroencephalogram signal real-time lossless compression method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114564990B (en) | 2024-02-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114564990B (en) | Electroencephalogram signal classification method based on multichannel feedback capsule network | |
JP6998959B2 (en) | Systems and methods for iterative classification using neurophysiological signals | |
CN108256629B (en) | EEG signal unsupervised feature learning method based on convolutional network and self-coding | |
CN112766355B (en) | Electroencephalogram signal emotion recognition method under label noise | |
CN112244873A (en) | Electroencephalogram time-space feature learning and emotion classification method based on hybrid neural network | |
CN114176607B (en) | Electroencephalogram signal classification method based on vision transducer | |
CN114595725B (en) | Electroencephalogram signal classification method based on addition network and supervised contrast learning | |
CN111540467B (en) | Schizophrenia classification identification method, operation control device and medical equipment | |
CN110135244B (en) | Expression recognition method based on brain-computer collaborative intelligence | |
CN115530788A (en) | Arrhythmia classification method based on self-attention mechanism | |
CN115804602A (en) | Electroencephalogram emotion signal detection method, equipment and medium based on attention mechanism and with multi-channel feature fusion | |
CN115496953A (en) | Brain network classification method based on space-time graph convolution | |
CN114983343A (en) | Sleep staging method and system, computer-readable storage medium and electronic device | |
CN114781441A (en) | EEG motor imagery classification method and multi-space convolution neural network model | |
CN114305452A (en) | Cross-task cognitive load identification method based on electroencephalogram and field adaptation | |
CN114224288A (en) | Microcapsule neural network training method and device for detecting epilepsia electroencephalogram signals | |
CN117338313B (en) | Multi-dimensional characteristic electroencephalogram signal identification method based on stacking integration technology | |
Kuila et al. | ECG signal classification using DEA with LSTM for arrhythmia detection | |
CN114764575B (en) | Multi-modal data classification method based on deep learning and time sequence attention mechanism | |
CN115017960B (en) | Electroencephalogram signal classification method based on space-time combined MLP network and application | |
CN116484290A (en) | Depression recognition model construction method based on Stacking integration | |
CN115909438A (en) | Pain expression recognition system based on depth time-space domain convolutional neural network | |
CN113177482A (en) | Cross-individual electroencephalogram signal classification method based on minimum category confusion | |
Yu et al. | PGMM—pre-trained Gaussian mixture model based convolution neural network for electroencephalography imagery analysis | |
CN110363096B (en) | Brain time signal processing method based on hidden Markov model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |