CN113011330A - Electroencephalogram signal classification method based on multi-scale neural network and cavity convolution - Google Patents

Electroencephalogram signal classification method based on multi-scale neural network and cavity convolution Download PDF

Info

Publication number
CN113011330A
CN113011330A CN202110294362.6A CN202110294362A CN113011330A CN 113011330 A CN113011330 A CN 113011330A CN 202110294362 A CN202110294362 A CN 202110294362A CN 113011330 A CN113011330 A CN 113011330A
Authority
CN
China
Prior art keywords
spatial
time
sequence
scale
electroencephalogram signal
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
Application number
CN202110294362.6A
Other languages
Chinese (zh)
Other versions
CN113011330B (en
Inventor
陈勋
高逸凯
刘爱萍
吴乐
梁邓
钱若兵
张勇东
吴枫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by University of Science and Technology of China USTC filed Critical University of Science and Technology of China USTC
Priority to CN202110294362.6A priority Critical patent/CN113011330B/en
Publication of CN113011330A publication Critical patent/CN113011330A/en
Application granted granted Critical
Publication of CN113011330B publication Critical patent/CN113011330B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/12Classification; Matching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/46Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
    • G06V10/462Salient features, e.g. scale invariant feature transforms [SIFT]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2218/00Aspects of pattern recognition specially adapted for signal processing
    • G06F2218/08Feature extraction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Probability & Statistics with Applications (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Signal Processing (AREA)
  • Multimedia (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-scale neural network and cavity convolution, which comprises the following steps: 1, preprocessing an original electroencephalogram signal in a data set, including channel selection and slice segmentation; 2, establishing a classification model based on a multi-scale neural network and cavity convolution, and initializing network parameters; designing a loss function, and establishing a classification model optimization target; and 4, inputting data to train the network, optimizing network parameters and obtaining an optimal classification model. Compared with the traditional method, the method can obviously improve the classification accuracy of the electroencephalogram signals, thereby improving the application value of the electroencephalogram signals in the fields of medical treatment and the like.

Description

Electroencephalogram signal classification method based on multi-scale neural network and cavity convolution
Technical Field
The invention belongs to the field of electroencephalogram signal processing, and particularly relates to an electroencephalogram signal classification method based on a multi-scale neural network and cavity convolution.
Background
Electroencephalogram (EEG) is a powerful tool for recording electroencephalogram activity and can reflect the brain state of a subject, so that the effective electroencephalogram classification method can greatly improve the application value of the electroencephalogram in the fields of medical treatment and the like, and has great research significance. At present, electroencephalogram classification methods can be divided into two categories: traditional methods and methods based on deep learning.
In the traditional method for classifying the electroencephalogram signals, the key point is feature extraction, and features with high discrimination need to be designed manually. The commonly used electroencephalogram signals are mainly characterized by three types: time domain features, frequency domain features, and time-frequency domain features. The time domain features mainly include expectation, variance, Hjorth descriptors, etc., the frequency domain features mainly include spectral energy, wavelet energy, etc., and the time-frequency domain features mainly include wavelet decomposition coefficients, etc. The above features require artificial design of effective features based on signal characteristics, which requires researchers to have in-depth physiological knowledge and limited generalization ability.
In recent years, deep learning can automatically extract features with high discrimination, so that the features are widely applied to classification of electroencephalogram signals. Common electroencephalogram signal classification network structures include a convolutional neural network, a cyclic neural network and the like. The deep learning drives the artificial neural network to automatically extract the characteristics in the signals in a data driving mode, so that the classification is realized, and a better classification effect is obtained in the classification of the electroencephalogram signals.
The electroencephalogram signal is a complex electrical signal with multi-scale property, wherein the multi-scale property means that the electroencephalogram signal comprises various time and space components, in the time dimension, the time scale of some electroencephalograms is millisecond grade, but some electroencephalograms are several seconds long; in the spatial dimension, an abnormal firing of a neuron may be associated with only one electrode channel or may be associated with multiple electrode channels. However, most current electroencephalogram signal classification methods ignore the multi-scale property of electroencephalogram signals and adopt a single-scale research method. The single-scale method is difficult to fully extract the characteristics of the electroencephalogram signals, and the accuracy of classification of the electroencephalogram signals is limited.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, and provides the electroencephalogram signal classification method based on the multi-scale neural network and the cavity convolution, so that the multi-scale characteristics of the electroencephalogram signal can be considered, the space-time multi-scale characteristics of the electroencephalogram signal are extracted, and the accuracy of electroencephalogram signal classification can be improved.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention discloses an electroencephalogram signal classification method based on a multi-scale neural network and cavity convolution, which is characterized by comprising the following steps of:
step 1, acquiring an electroencephalogram signal data set with labeled categories, and preprocessing original electroencephalogram signals in the data set, wherein the preprocessing comprises channel selection and slice segmentation;
step 1.1, selecting electroencephalogram signals on C channels shared by original electroencephalogram signals from a data set, dividing the electroencephalogram signals into N sections of electroencephalogram signal segments with time length t by using a sliding window method, and recording the N sections of electroencephalogram signal segments as a training sample set X ═ X1,X2,...,Xn,...,XN};XnRepresents the nth EEG signal sample, and Xn={Xn 1,Xn 2,…,Xn c,…,Xn C},Xn cRepresenting the electroencephalogram signal data of the c-th channel in the n-th electroencephalogram signal sample, and Xn c={x1 c,x2 c,...,xr c,...,xt×s c};xr cRepresenting the r-th data point of the c-th channel in the n-th electroencephalogram signal sample, and s represents the sampling rate of the electroencephalogram signal in the data set; n is 1,2,. cndot.n; c1, 2,. C; r 1,2, t × s;
step 2, establishing a classification model based on a multi-scale neural network and a cavity convolution, wherein the classification model comprises the following steps: a characteristic extraction stage consisting of a time multi-scale stage and a space multi-scale stage, and a classification stage consisting of a classification module; the time multi-scale stage and the space multi-scale stage are both composed of a multi-scale neural network module and a cavity convolution module;
step 2.1, initializing weight values: initializing parameters of the convolution layer of the classification model;
2.2, the multi-scale neural network module consists of three parallel network branches, each branch comprises two convolution layers and two pooling layers, and convolution kernels of different branches have different sizes so as to extract features of different scales; the cavity convolution module comprises three parallel network branches and an attention mechanism module for feature fusion, and each branch comprises cavity convolution layers with different expansion rates;
step 2.2.1, inputting the training sample set X into a time multi-scale stage, and outputting a first time characteristic sequence through a multi-scale neural network module of the time multi-scale stage
Figure BDA0002983753730000021
Second time signature sequence
Figure BDA0002983753730000022
Third temporal signature sequence
Figure BDA0002983753730000023
Wherein, Fn 1Represents the firstTime signature sequence F1N-th feature map of (1), Fn 2Representing a second temporal signature sequence F2N-th feature map of (1), Fn 3Representing a third temporal signature sequence F3The nth feature map of (1);
step 2.2.2, three time characteristic sequences F1,F2,F3Respectively sending the time characteristic sequence { F) to the cavity convolution modules in the time multi-scale stage, and outputting the time characteristic sequence { F) through the cavity convolution layers with different expansion rates, namely the first time cavity convolution layer, the second time cavity convolution layer and the third time cavity convolution layeri,1,Fi,2,Fi,31,2,3, where { F | i ═ 1,2,3}, wherei,1I | -1, 2,3} represents a time signature sequence obtained by the i-th time signature sequence passing through the first time hole convolution layer, { Fi,2I | -1, 2,3} represents a time signature sequence obtained by subjecting the ith time signature sequence to the second time hole convolution layer, { Fi,3I is 1,2,3, which represents the time characteristic sequence obtained by the ith time characteristic sequence passing through the third time hole convolution layer;
time feature series Fi,1,Fi,2,Fi,3Sending 1,2 and 3 to an attention mechanism module for feature fusion: first, the time feature sequence { Fi,1,Fi,2,Fi,3Sending the | i ═ 1,2 and 3} into the global pooling layer, and then obtaining a time characteristic sequence { F ] through the first full-connection layer and the second full-connection layeri,1,Fi,2,Fi,3Time weighting factor { alpha } of | i ═ 1,2,3}i,1i,2i,3I ═ 1,2,3}, the temporal signature sequence { Fi,1,Fi,2,Fi,3I | ═ 1,2,3} and the temporal weighting factor { αi,1i,2i,3Correspondingly multiplying | i ═ 1,2,3} to obtain three output time characteristic sequences F of the cavity convolution moduled 1,Fd 2,Fd 3(ii) a Wherein, Fd 1,Fd 2,Fd 3Respectively representing a first time scale characteristic sequence, a second time scale characteristic sequence and a third time obtained by the electroencephalogram signal through a time multi-scale stageA sequence of scale features;
step 2.2.3, outputting the time characteristic sequence Fd 1,Fd 2,Fd 3Sending the data into a multi-scale neural network module at a spatial multi-scale stage, and outputting a first spatial feature sequence
Figure BDA0002983753730000031
Second spatial feature sequence
Figure BDA0002983753730000032
Third spatial signature sequence
Figure BDA0002983753730000033
Wherein the content of the first and second substances,
Figure BDA0002983753730000034
representing a first sequence of spatial features G1The n' th feature map in (1),
Figure BDA0002983753730000035
representing a second spatial signature sequence G2The n' th feature map in (1),
Figure BDA0002983753730000036
representing a third spatial signature sequence G3The n' th feature map in (1);
step 2.2.4, three spatial feature sequences G1,G2,G3Respectively sending into the cavity convolution modules in spatial multi-scale stages, and outputting a spatial characteristic sequence { G ] through the cavity convolution layers with different expansion rates, namely a first spatial cavity convolution layer, a second spatial cavity convolution layer and a third spatial cavity convolution layeri,1,Gi,2,Gi,31,2,3, where Gi,1I | -1, 2,3} represents a spatial signature sequence obtained by subjecting the ith spatial signature sequence to the first spatial hole convolution layer, { G { (G) }i,2I | -1, 2,3} represents a spatial signature sequence obtained by subjecting the ith spatial signature sequence to the second spatial hole convolution layer, { G { (G) }i,3I ═ 1,2,3} means that the ith spatial feature sequence passes through the thirdSpatial feature sequences obtained by the spatial cavity convolution layers;
will space the characteristic sequence Gi,1,Gi,2,Gi,3Sending 1,2 and 3 to an attention mechanism module for feature fusion: first, the spatial feature sequence { G }i,1,Gi,2,Gi,3Sending the | i ═ 1,2 and 3} into the global pooling layer, and then obtaining a spatial feature sequence { G ] through a third full-connection layer and a fourth full-connection layeri,1,Gi,2,Gi,3Spatial weighting factor { β } of | i ═ 1,2,3}i,1i,2i,31,2,3, and converting the spatial feature sequence { G | i ═ G |i,1,Gi,2,Gi,31,2,3 and spatial weighting factor { beta |i,1i,2i,3Correspondingly multiplying | i ═ 1,2,3} to obtain three output space characteristic sequences G of the cavity convolution moduled 1,Gd 2,Gd 3(ii) a Wherein G isd 1,Gd 2,Gd 3Respectively representing a first spatial scale characteristic sequence, a second spatial scale characteristic sequence and a third spatial scale characteristic sequence of the electroencephalogram signal obtained through a spatial multi-scale stage;
step 2.3, outputting three output space characteristic sequences Gd 1,Gd 2,Gd 3The probability of the corresponding category of each electroencephalogram signal sample is obtained through the convolution layer, the global pooling layer and the full-connection layer of the classification module;
step 3, adopting focal length as a loss function of the classification model, and updating each weight in the classification model by using an optimization algorithm at a fixed learning rate to enable the loss function to tend to be stable, so as to obtain a trained classification model;
and 4, classifying any electroencephalogram signal sample by using the trained classification model to obtain a probability value of a corresponding class, and performing binarization classification on the probability value according to a set threshold value to obtain a final classification result.
Compared with the prior art, the invention has the beneficial effects that:
1. the invention takes the time-space multi-scale characteristics of the electroencephalogram signal into consideration, constructs the electroencephalogram signal classification method based on the multi-scale neural network and the cavity convolution, and fully excavates the time-space multi-scale characteristics of the electroencephalogram signal. Compared with the method using the same database reported in periodicals, the electroencephalogram signal classification method provided by the invention greatly improves the accuracy of electroencephalogram signal classification;
2. the invention constructs a multi-scale neural network module, and extracts the time-space multi-scale characteristics of the electroencephalogram signal from two dimensions of time and space through convolution kernels with different sizes to obtain electroencephalogram signal characteristics with more discrimination;
3. according to the invention, a cavity convolution module based on an attention mechanism is constructed, so that the receptive field of the network is enlarged, and the global and local information of the electroencephalogram signal is effectively integrated.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is an overall framework diagram of the classification model of the present invention;
FIG. 3 is a block diagram of a hole convolution module of the method of the present invention;
FIG. 4 is a schematic diagram of a modular design of the present invention.
Detailed Description
In this embodiment, a method for classifying electroencephalograms based on a multi-scale neural network and a cavity convolution, as shown in fig. 1, includes the following steps:
step 1, acquiring an electroencephalogram signal data set with labeled categories, and preprocessing original electroencephalogram signals in the data set, wherein the preprocessing comprises channel selection and slice segmentation;
step 1.1, selecting electroencephalogram signals on C channels shared by original electroencephalogram signals from a data set, dividing the electroencephalogram signals into N sections of electroencephalogram signal segments with time length t by using a sliding window method, and recording the N sections of electroencephalogram signal segments as a training sample set X ═ X1,X2,...,Xn,...,XN};XnRepresents the nth EEG signal sample, and Xn={Xn 1,Xn 2,…,Xn c,…,Xn C},Xn cRepresenting the electroencephalogram signal data of the c-th channel in the n-th electroencephalogram signal sample, and Xn c={x1 c,x2 c,...,xr c,...,xt×s c};xr cRepresenting the r-th data point of the c-th channel in the n-th electroencephalogram signal sample, and s represents the sampling rate of the electroencephalogram signal in the data set; n is 1,2,. cndot.n; c1, 2,. C; r 1,2, t × s;
in specific implementation, for an 18-lead electroencephalogram signal data set, selecting C-18; for the sliding window method, the length of a window can be taken as 4 seconds, and the sliding step length is 2 seconds;
step 2, establishing a classification model based on a multi-scale neural network and a cavity convolution, wherein an overall frame diagram is shown in fig. 2, and the classification model comprises the following steps: a characteristic extraction stage consisting of a time multi-scale stage and a space multi-scale stage, and a classification stage consisting of a classification module; the time multi-scale stage and the space multi-scale stage are both composed of a multi-scale neural network module and a cavity convolution module;
step 2.1, initializing weight values: initializing parameters of the convolution layer of the classification model;
in a specific implementation, the weights in the classification model are initialized using a uniform distribution.
Step 2.2, the multi-scale neural network module is composed of three parallel network branches, each branch comprises two convolution layers and two pooling layers, sizes of convolution kernels of different branches are different so as to extract features of different scales, and exemplarily, in a time multi-scale stage, the size of a two-dimensional convolution kernel is as follows: 32 × 1, 64 × 1, 128 × 1, three convolution kernel sizes corresponding to three time scales; in the spatial multi-scale stage, the size of the two-dimensional convolution kernel is: the sizes of the three convolution kernels are 1 × 2, 1 × 3 and 1 × 5, and correspond to three spatial scales. The hole convolution module comprises three parallel network branches and an attention mechanism module for feature fusion, wherein each branch comprises hole convolution layers with different expansion rates, and the expansion rates are 1,2 and 5 respectively. Specifically, the network structure of the void convolution module is shown in fig. 3, and the network structure of the attention mechanism module is shown in fig. 4;
step 2.2.1, inputting the training sample set X into a time multi-scale stage, and outputting a first time characteristic sequence through a multi-scale neural network module of the time multi-scale stage
Figure BDA0002983753730000051
Second time signature sequence
Figure BDA0002983753730000052
Third temporal signature sequence
Figure BDA0002983753730000053
Wherein, Fn 1Representing a first time characteristic sequence F1N-th feature map of (1), Fn 2Representing a second temporal signature sequence F2N-th feature map of (1), Fn 3Representing a third temporal signature sequence F3The nth feature map of (1);
step 2.2.2, three time characteristic sequences F1,F2,F3Respectively sending the time characteristic sequence { F) to the cavity convolution modules in the time multi-scale stage, and outputting the time characteristic sequence { F) through the cavity convolution layers with different expansion rates, namely the first time cavity convolution layer, the second time cavity convolution layer and the third time cavity convolution layeri,1,Fi,2,Fi,31,2,3, where { F | i ═ 1,2,3}, wherei,1I | -1, 2,3} represents a time signature sequence obtained by the i-th time signature sequence passing through the first time hole convolution layer, { Fi,2I | -1, 2,3} represents a time signature sequence obtained by subjecting the ith time signature sequence to the second time hole convolution layer, { Fi,3I is 1,2,3, which represents the time characteristic sequence obtained by the ith time characteristic sequence passing through the third time hole convolution layer;
time feature series Fi,1,Fi,2,Fi,3Sending 1,2 and 3 to an attention mechanism module for feature fusion: first, the time feature sequence { Fi,1,Fi,2,Fi,3Sending the information I to a global pooling layer, and obtaining time characteristics through a first full-connection layer and a second full-connection layer with activation functionsSequence { Fi,1,Fi,2,Fi,3Time weighting factor { alpha } of | i ═ 1,2,3}i,1i,2i,3I ═ 1,2,3}, the temporal signature sequence { Fi,1,Fi,2,Fi,3I | ═ 1,2,3} and the temporal weighting factor { αi,1i,2i,3Correspondingly multiplying | i ═ 1,2,3} to obtain three output time characteristic sequences F of the cavity convolution moduled 1,Fd 2,Fd 3(ii) a Wherein, Fd 1,Fd 2,Fd 3Respectively representing a first time scale characteristic sequence, a second time scale characteristic sequence and a third time scale characteristic sequence of the electroencephalogram signal obtained through a time multi-scale stage.
In a specific implementation, the activation function of the first fully-connected layer is a sigmoid function, and the activation function of the second fully-connected layer is a softmax function.
Step 2.2.3, outputting the time characteristic sequence Fd 1,Fd 2,Fd 3Sending the data into a multi-scale neural network module at a spatial multi-scale stage, and outputting a first spatial feature sequence
Figure BDA0002983753730000061
Second spatial feature sequence
Figure BDA0002983753730000062
Third spatial signature sequence
Figure BDA0002983753730000063
Wherein the content of the first and second substances,
Figure BDA0002983753730000064
representing a first sequence of spatial features G1The n' th feature map in (1),
Figure BDA0002983753730000065
representing a second spatial signature sequence G2The n' th feature map in (1),
Figure BDA0002983753730000066
representing a third spatial signature sequence G3The n' th feature map in (1);
step 2.2.4, three spatial feature sequences G1,G2,G3Respectively sending into the cavity convolution modules in spatial multi-scale stages, and outputting a spatial characteristic sequence { G ] through the cavity convolution layers with different expansion rates, namely a first spatial cavity convolution layer, a second spatial cavity convolution layer and a third spatial cavity convolution layeri,1,Gi,2,Gi,31,2,3, where Gi,1I | -1, 2,3} represents a spatial signature sequence obtained by subjecting the ith spatial signature sequence to the first spatial hole convolution layer, { G { (G) }i,2I | ═ 1,2,3} represents a spatial feature sequence obtained by subjecting the ith spatial feature sequence to the second spatial hole convolution layer, { Gi,3I is 1,2,3, which represents the spatial feature sequence obtained by the ith spatial feature sequence through the third spatial hole convolution layer, i is 1,2, 3;
will space the characteristic sequence Gi,1,Gi,2,Gi,3Sending 1,2 and 3 to an attention mechanism module for feature fusion: first, the spatial feature sequence Gi,1,Gi,2,Gi,3Sending the | i ═ 1,2 and 3} into a global pooling layer, and obtaining a spatial feature sequence { G ] through a third full-connection layer and a fourth full-connection layer with activation functionsi,1,Gi,2,Gi,3Spatial weighting factor { β } of | i ═ 1,2,3}i,1i,2i,31,2,3, and converting the spatial feature sequence { G | i ═ G |i,1,Gi,2,Gi,31,2,3 and spatial weighting factor { beta |i,1i,2i,3Correspondingly multiplying | i ═ 1,2,3} to obtain three output space characteristic sequences G of the cavity convolution moduled 1,Gd 2,Gd 3(ii) a Wherein G isd 1,Gd 2,Gd 3Respectively representing a first spatial scale characteristic sequence, a second spatial scale characteristic sequence and a third spatial scale characteristic sequence of the electroencephalogram signal obtained through a spatial multi-scale stage.
In a specific implementation, the activation function of the third fully-connected layer is a sigmoid function, and the activation function of the fourth fully-connected layer is a softmax function.
Step 2.3, outputting three output space characteristic sequences Gd 1,Gd 2,Gd 3The probability of the corresponding category of each electroencephalogram signal sample is obtained through the convolution layer, the global pooling layer and the full-connection layer of the classification module;
and 3, adopting focal length as a loss function of the classification model:
Figure BDA0002983753730000071
wherein n is the number of samples, yiIs the true label of the sample, y'iAlpha is used for adjusting the unbalance of positive and negative samples, and gamma is used for adjusting the unbalance of difficult and easy samples. In this embodiment, α is 0.5 and γ is 2.
Updating each weight in the classification model by using an optimization algorithm at a fixed learning rate to enable a loss function to tend to be stable, so as to obtain a trained classification model;
in a specific implementation, the gradient descent method adopted is the Adam method.
And 4, classifying any electroencephalogram signal sample by using the trained classification model to obtain the probability value of the corresponding class, and performing binarization classification on the probability value according to the set threshold value to obtain the final classification result.
In order to illustrate the performance of the scheme, the classification performance of the electroencephalogram signals reported in recent periodical literature is compared with the performance obtained by the scheme, and the compared index adopts an evaluation index commonly used for classification of the electroencephalogram signals, namely sensitivity and false alarm rate, wherein the sensitivity is the ratio of a positive class to all positive classes which are correctly predicted, and the false alarm rate is the average number of times of predicting the negative class into the positive class per hour.
In the specific implementation, four methods reported in journal literature are used for comparison, as shown in table 1: truong et al extract the time-frequency representation of an electroencephalogram signal by using short-time Fourier transform (STFT), classify the electroencephalogram signal by using a Convolutional Neural Network (CNN), and obtain the performances of average sensitivity of 81.2% and average false alarm rate of 0.160/hour; khan et al adopt Wavelet Transform (WT) to obtain wavelet coefficient of EEG signal, classify with convolutional neural network, have achieved the average sensitivity 87.8%, the performance of the average rate of false alarm 0.147/hour; ozcan et al manually designs the characteristics of the electroencephalogram signals and classifies the characteristics by using 3D-CNN, so that the performances of 85.7% of average sensitivity and 0.096/hour of average false alarm rate are obtained; zhang et al extract the features of the EEG signal through the Common Space Pattern (CSP), classify by CNN, have achieved the performance of average sensitivity 92.2%, average false alarm rate 0.120/hour.
TABLE 1 prediction of Performance of different methods on CHB-MIT dataset
Average sensitivity (%) Average false alarm rate (/ hour)
STFT-CNN 81.2 0.160
WT-CNN 87.8 0.147
3DCNN 85.7 0.096
CSP-CNN 92.2 0.120
Method of the invention 93.3 0.007
The data sources of the comparison method are all public CHB-MIT data sets, and Table 1 shows the comparison result of the method and the comparison method, the method achieves the average sensitivity of 93.3 percent and the average false alarm rate of 0.007 per hour, and the performance of the method is superior to that of all the comparison methods.

Claims (1)

1. An electroencephalogram signal classification method based on a multi-scale neural network and cavity convolution is characterized by comprising the following steps:
step 1, acquiring an electroencephalogram signal data set with labeled categories, and preprocessing original electroencephalogram signals in the data set, wherein the preprocessing comprises channel selection and slice segmentation;
step 1.1, selecting electroencephalogram signals on C channels shared by original electroencephalogram signals from a data set, dividing the electroencephalogram signals into N sections of electroencephalogram signal segments with time length t by using a sliding window method, and recording the N sections of electroencephalogram signal segments as a training sample set X ═ X1,X2,...,Xn,...,XN};XnRepresents the nth EEG signal sample, and Xn={Xn 1,Xn 2,…,Xn c,…,Xn C},Xn cRepresenting the electroencephalogram signal data of the c-th channel in the n-th electroencephalogram signal sample, and Xn c={x1 c,x2 c,...,xr c,...,xt×s c};xr cRepresenting the r-th data point of the c-th channel in the n-th electroencephalogram signal sample, and s represents the sampling rate of the electroencephalogram signal in the data set; n is 1,2,. cndot.n; c1, 2,. C; the ratio of r to 1,2,...,t×s;
step 2, establishing a classification model based on a multi-scale neural network and a cavity convolution, wherein the classification model comprises the following steps: a characteristic extraction stage consisting of a time multi-scale stage and a space multi-scale stage, and a classification stage consisting of a classification module; the time multi-scale stage and the space multi-scale stage are both composed of a multi-scale neural network module and a cavity convolution module;
step 2.1, initializing weight values: initializing parameters of the convolution layer of the classification model;
2.2, the multi-scale neural network module consists of three parallel network branches, each branch comprises two convolution layers and two pooling layers, and convolution kernels of different branches have different sizes so as to extract features of different scales; the cavity convolution module comprises three parallel network branches and an attention mechanism module for feature fusion, and each branch comprises cavity convolution layers with different expansion rates;
step 2.2.1, inputting the training sample set X into a time multi-scale stage, and outputting a first time characteristic sequence through a multi-scale neural network module of the time multi-scale stage
Figure FDA0002983753720000011
Second time signature sequence
Figure FDA0002983753720000012
Third temporal signature sequence
Figure FDA0002983753720000013
Wherein, Fn 1Representing a first time characteristic sequence F1N-th feature map of (1), Fn 2Representing a second temporal signature sequence F2N-th feature map of (1), Fn 3Representing a third temporal signature sequence F3The nth feature map of (1);
step 2.2.2, three time characteristic sequences F1,F2,F3Respectively sent into a cavity convolution module of a time multi-scale stage,and passing through the void convolutional layers with different expansion rates, namely a first time void convolutional layer, a second time void convolutional layer and a third time void convolutional layer, thereby outputting a time characteristic sequence { Fi,1,Fi,2,Fi,31,2,3, where { F | i ═ 1,2,3}, wherei,1I | -1, 2,3} represents a time signature sequence obtained by the i-th time signature sequence passing through the first time hole convolution layer, { Fi,2I | -1, 2,3} represents a time signature sequence obtained by subjecting the ith time signature sequence to the second time hole convolution layer, { Fi,3I is 1,2,3, which represents the time characteristic sequence obtained by the ith time characteristic sequence passing through the third time hole convolution layer;
time feature series Fi,1,Fi,2,Fi,3Sending 1,2 and 3 to an attention mechanism module for feature fusion: first, the time feature sequence { Fi,1,Fi,2,Fi,3Sending the | i ═ 1,2 and 3} into the global pooling layer, and then obtaining a time characteristic sequence { F ] through the first full-connection layer and the second full-connection layeri,1,Fi,2,Fi,3Time weighting factor { alpha } of | i ═ 1,2,3}i,1i,2i,3I ═ 1,2,3}, the temporal signature sequence { Fi,1,Fi,2,Fi,3I | ═ 1,2,3} and the temporal weighting factor { αi,1i,2i,3Correspondingly multiplying | i ═ 1,2,3} to obtain three output time characteristic sequences F of the cavity convolution moduled 1,Fd 2,Fd 3(ii) a Wherein, Fd 1,Fd 2,Fd 3Respectively representing a first time scale characteristic sequence, a second time scale characteristic sequence and a third time scale characteristic sequence of the electroencephalogram signal obtained through a time multi-scale stage;
step 2.2.3, outputting the time characteristic sequence Fd 1,Fd 2,Fd 3Sending the data into a multi-scale neural network module at a spatial multi-scale stage, and outputting a first spatial feature sequence
Figure FDA0002983753720000021
Second spatial feature sequence
Figure FDA0002983753720000022
Third spatial signature sequence
Figure FDA0002983753720000023
Wherein the content of the first and second substances,
Figure FDA0002983753720000024
representing a first sequence of spatial features G1The n' th feature map in (1),
Figure FDA0002983753720000025
representing a second spatial signature sequence G2The n' th feature map in (1),
Figure FDA0002983753720000026
representing a third spatial signature sequence G3The n' th feature map in (1);
step 2.2.4, three spatial feature sequences G1,G2,G3Respectively sending into the cavity convolution modules in spatial multi-scale stages, and outputting a spatial characteristic sequence { G ] through the cavity convolution layers with different expansion rates, namely a first spatial cavity convolution layer, a second spatial cavity convolution layer and a third spatial cavity convolution layeri,1,Gi,2,Gi,31,2,3, where Gi,1I | -1, 2,3} represents a spatial signature sequence obtained by subjecting the ith spatial signature sequence to the first spatial hole convolution layer, { G { (G) }i,2I | -1, 2,3} represents a spatial signature sequence obtained by subjecting the ith spatial signature sequence to the second spatial hole convolution layer, { G { (G) }i,3I is 1,2,3, which represents the spatial feature sequence obtained by the ith spatial feature sequence through the third spatial hole convolution layer;
will space the characteristic sequence Gi,1,Gi,2,Gi,3Sending 1,2 and 3 to an attention mechanism module for feature fusion: first, the spatial feature sequence { G }i,1,Gi,2,Gi,3Sending the | i ═ 1,2,3} into the global pooling layer, and then passing throughThe third full connection layer and the fourth full connection layer obtain a spatial feature sequence { G }i,1,Gi,2,Gi,3Spatial weighting factor { β } of | i ═ 1,2,3}i,1i,2i,31,2,3, and converting the spatial feature sequence { G | i ═ G |i,1,Gi,2,Gi,31,2,3 and spatial weighting factor { beta |i,1i,2i,3Correspondingly multiplying | i ═ 1,2,3} to obtain three output space characteristic sequences G of the cavity convolution moduled 1,Gd 2,Gd 3(ii) a Wherein G isd 1,Gd 2,Gd 3Respectively representing a first spatial scale characteristic sequence, a second spatial scale characteristic sequence and a third spatial scale characteristic sequence of the electroencephalogram signal obtained through a spatial multi-scale stage;
step 2.3, outputting three output space characteristic sequences Gd 1,Gd 2,Gd 3The probability of the corresponding category of each electroencephalogram signal sample is obtained through the convolution layer, the global pooling layer and the full-connection layer of the classification module;
step 3, adopting focal length as a loss function of the classification model, and updating each weight in the classification model by using an optimization algorithm at a fixed learning rate to enable the loss function to tend to be stable, so as to obtain a trained classification model;
and 4, classifying any electroencephalogram signal sample by using the trained classification model to obtain a probability value of a corresponding class, and performing binarization classification on the probability value according to a set threshold value to obtain a final classification result.
CN202110294362.6A 2021-03-19 2021-03-19 Electroencephalogram signal classification method based on multi-scale neural network and cavity convolution Active CN113011330B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110294362.6A CN113011330B (en) 2021-03-19 2021-03-19 Electroencephalogram signal classification method based on multi-scale neural network and cavity convolution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110294362.6A CN113011330B (en) 2021-03-19 2021-03-19 Electroencephalogram signal classification method based on multi-scale neural network and cavity convolution

Publications (2)

Publication Number Publication Date
CN113011330A true CN113011330A (en) 2021-06-22
CN113011330B CN113011330B (en) 2022-09-02

Family

ID=76402914

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110294362.6A Active CN113011330B (en) 2021-03-19 2021-03-19 Electroencephalogram signal classification method based on multi-scale neural network and cavity convolution

Country Status (1)

Country Link
CN (1) CN113011330B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114564991A (en) * 2022-02-28 2022-05-31 合肥工业大学 Electroencephalogram signal classification method based on Transformer guide convolution neural network
CN114595725A (en) * 2022-03-15 2022-06-07 合肥工业大学 Electroencephalogram signal classification method based on addition network and supervised contrast learning

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503799A (en) * 2016-10-11 2017-03-15 天津大学 Deep learning model and the application in brain status monitoring based on multiple dimensioned network
CN109344883A (en) * 2018-09-13 2019-02-15 西京学院 Fruit tree diseases and pests recognition methods under a kind of complex background based on empty convolution
CN109871882A (en) * 2019-01-24 2019-06-11 重庆邮电大学 Method of EEG signals classification based on Gauss Bernoulli convolution depth confidence network
US20190336024A1 (en) * 2018-05-07 2019-11-07 International Business Machines Corporation Brain-based thought identifier and classifier
CN110522412A (en) * 2019-03-20 2019-12-03 天津大学 Method based on multiple dimensioned brain function network class EEG signals
CN110929581A (en) * 2019-10-25 2020-03-27 重庆邮电大学 Electroencephalogram signal identification method based on space-time feature weighted convolutional neural network
CN111444747A (en) * 2019-01-17 2020-07-24 复旦大学 Epileptic state identification method based on transfer learning and cavity convolution
CN111616701A (en) * 2020-04-24 2020-09-04 杭州电子科技大学 Electroencephalogram multi-domain feature extraction method based on multivariate variational modal decomposition
CN112001306A (en) * 2020-08-21 2020-11-27 西安交通大学 Electroencephalogram signal decoding method for generating neural network based on deep convolution countermeasure
CN112465069A (en) * 2020-12-15 2021-03-09 杭州电子科技大学 Electroencephalogram emotion classification method based on multi-scale convolution kernel CNN

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503799A (en) * 2016-10-11 2017-03-15 天津大学 Deep learning model and the application in brain status monitoring based on multiple dimensioned network
US20190336024A1 (en) * 2018-05-07 2019-11-07 International Business Machines Corporation Brain-based thought identifier and classifier
CN109344883A (en) * 2018-09-13 2019-02-15 西京学院 Fruit tree diseases and pests recognition methods under a kind of complex background based on empty convolution
CN111444747A (en) * 2019-01-17 2020-07-24 复旦大学 Epileptic state identification method based on transfer learning and cavity convolution
CN109871882A (en) * 2019-01-24 2019-06-11 重庆邮电大学 Method of EEG signals classification based on Gauss Bernoulli convolution depth confidence network
CN110522412A (en) * 2019-03-20 2019-12-03 天津大学 Method based on multiple dimensioned brain function network class EEG signals
CN110929581A (en) * 2019-10-25 2020-03-27 重庆邮电大学 Electroencephalogram signal identification method based on space-time feature weighted convolutional neural network
CN111616701A (en) * 2020-04-24 2020-09-04 杭州电子科技大学 Electroencephalogram multi-domain feature extraction method based on multivariate variational modal decomposition
CN112001306A (en) * 2020-08-21 2020-11-27 西安交通大学 Electroencephalogram signal decoding method for generating neural network based on deep convolution countermeasure
CN112465069A (en) * 2020-12-15 2021-03-09 杭州电子科技大学 Electroencephalogram emotion classification method based on multi-scale convolution kernel CNN

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
INAN GULER 等: "Multiclass Support Vector Machines for EEG-Signals Classification", 《IEEE TRANSACTIONS ON INFORMATION TECHNOLOGY IN BIOMEDICINE》 *
李玉花 等: "基于卷积神经网络的脑电信号分类", 《科学技术与工程》 *
贾子钰 等: "基于多尺度特征提取与挤压激励模型的运动想象分类方法", 《计算机研究与发展》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114564991A (en) * 2022-02-28 2022-05-31 合肥工业大学 Electroencephalogram signal classification method based on Transformer guide convolution neural network
CN114564991B (en) * 2022-02-28 2024-02-20 合肥工业大学 Electroencephalogram signal classification method based on transducer guided convolutional neural network
CN114595725A (en) * 2022-03-15 2022-06-07 合肥工业大学 Electroencephalogram signal classification method based on addition network and supervised contrast learning
CN114595725B (en) * 2022-03-15 2024-02-20 合肥工业大学 Electroencephalogram signal classification method based on addition network and supervised contrast learning

Also Published As

Publication number Publication date
CN113011330B (en) 2022-09-02

Similar Documents

Publication Publication Date Title
CN110693493B (en) Epilepsia electroencephalogram prediction feature extraction method based on convolution and recurrent neural network combined time multiscale
CN109934089B (en) Automatic multi-stage epilepsia electroencephalogram signal identification method based on supervised gradient raiser
CN112244873A (en) Electroencephalogram time-space feature learning and emotion classification method based on hybrid neural network
CN113011330B (en) Electroencephalogram signal classification method based on multi-scale neural network and cavity convolution
CN114176607B (en) Electroencephalogram signal classification method based on vision transducer
CN114564991A (en) Electroencephalogram signal classification method based on Transformer guide convolution neural network
CN109598222B (en) EEMD data enhancement-based wavelet neural network motor imagery electroencephalogram classification method
CN113554110B (en) Brain electricity emotion recognition method based on binary capsule network
CN108567418A (en) A kind of pulse signal inferior health detection method and detecting system based on PCANet
CN112766355A (en) Electroencephalogram signal emotion recognition method under label noise
CN113392733B (en) Multi-source domain self-adaptive cross-tested EEG cognitive state evaluation method based on label alignment
An et al. Electroencephalogram emotion recognition based on 3D feature fusion and convolutional autoencoder
CN111898526B (en) Myoelectric gesture recognition method based on multi-stream convolution neural network
CN113069117A (en) Electroencephalogram emotion recognition method and system based on time convolution neural network
CN113010013A (en) Wasserstein distance-based motor imagery electroencephalogram migration learning method
Wen et al. A deep learning-based classification method for different frequency EEG data
CN112465069A (en) Electroencephalogram emotion classification method based on multi-scale convolution kernel CNN
CN114595725B (en) Electroencephalogram signal classification method based on addition network and supervised contrast learning
CN107045624B (en) Electroencephalogram signal preprocessing and classifying method based on maximum weighted cluster
CN113076878B (en) Constitution identification method based on attention mechanism convolution network structure
CN113974655A (en) Epileptic seizure prediction method based on electroencephalogram signals
CN112084935B (en) Emotion recognition method based on expansion of high-quality electroencephalogram sample
CN113919387A (en) Electroencephalogram signal emotion recognition based on GBDT-LR model
CN113177482A (en) Cross-individual electroencephalogram signal classification method based on minimum category confusion
CN114366038B (en) Sleep signal automatic staging method based on improved deep learning algorithm 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