Training method and application of weak asymmetric visual stimulation electroencephalogram signal classification model
Through adaptive modal decomposition and end-to-end EEG signal classification model, the problem of difficulty in extracting highly discriminative and low-redundancy features from weak asymmetric visual stimulation EEG signals is solved, and efficient EEG signal classification is achieved under conditions of few leads and little training.
Patent Information
- Application Number
- CN202510532442.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-04-25
AI Technical Summary
Existing EEG signal classification algorithms induced by weak asymmetric visual stimulation find it difficult to effectively extract highly discriminative and low-redundant feature subsets, resulting in reduced recognition performance of brain-computer interface systems, especially when the amount of training data is insufficient, and the spatial filter is inaccurate.
An adaptive modal decomposition algorithm is used to map EEG signals from the time domain to the frequency domain. The complex modal decomposition matrix is used to linearly transform the frequency domain signal and decompose and recombine the signals into different modes. The modal decomposition matrix is optimized by maximizing the Euclidean distance of the center frequency and using narrowband constraints to reduce redundancy between modalities and increase orthogonality. Feature extraction is then optimized through an end-to-end EEG signal classification model.
It significantly improves the classification performance of EEG signals, is suitable for brain-computer interface systems with few leads and little training, improves the mining efficiency and classification accuracy of feature subsets, and breaks the limitations of traditional time domain analysis.
Smart Images

Figure CN120597079A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electroencephalogram (EEG) signal classification, and in particular to a training method and application of an EEG signal classification model for weak asymmetric visual stimulation. Background Art
[0002] Electroencephalogram (EEG) signals exhibit nonlinearity, nonstationarity, and a low signal-to-noise ratio, resulting in relatively weak information features. Compared to traditional steady-state visual evoked potentials (SSVEPs), EEG signals evoked by weak asymmetric visual stimulation have low entropy, exhibiting feature redundancy, less information content, and weaker discriminative power. This makes it difficult to select highly discriminative and low-redundant feature subsets, posing a significant challenge for pattern recognition and classification based on EEG signals evoked by weak asymmetric visual stimulation. Furthermore, achieving high recognition accuracy in decoding algorithms often relies on a large amount of training data. Pre-training helps algorithms learn from individual EEG data and generate spatial filters and evoked EEG templates that match the subject's EEG characteristics, thereby achieving relatively satisfactory recognition results. However, as brain-computer interfaces (BCIs) move toward practical application, the need to reduce the calibration burden is becoming increasingly urgent. Traditional training algorithms, precisely because they require the collection of extensive EEG data for model training, are unable to meet practical application scenarios.
[0003] Most current EEG classification algorithms based on responses evoked by weak asymmetric visual stimulation struggle to extract highly discriminative and low-redundancy feature subsets. For example, the Multi Discriminative Spatial Patterns (MultiDSP) algorithm, a baseline algorithm based on traditional machine learning, focuses on global spatial filters, ignoring the fact that responses evoked by weak asymmetric visual stimulation also possess spatial characteristics across frequency bands. This results in a small number of extracted feature subsets and an incomplete feature space. Another example is the deep learning baseline algorithm EEGnet, which extracts EEG frequency domain features through fixed-length convolutions. However, the fixed, immutable convolution length results in constant frequency domain resolution. Furthermore, the lack of orthogonality constraints between different frequency domains results in relatively redundant feature subsets. Even after applying low-rank constraints, the number of extracted feature subsets is similarly small, and the feature space is similarly incomplete. Similarly, due to the low efficiency of mining highly discriminative and low-redundancy feature subsets, most current learning-based algorithms face the problem of inaccurate spatial filters when insufficient training data is available, resulting in reduced overall BCI recognition performance.
[0004] In view of this, it is urgent to propose an EEG signal classification model training method that can improve the efficiency of mining high-discriminative and low-redundancy feature subsets. Summary of the Invention
[0005] The purpose of the present invention is to provide a training method and application of an EEG signal classification model for weak asymmetric visual stimulation, combining features of different frequencies into one mode, encouraging different modal features to have different center frequencies, minimizing the similarity between different center frequencies, and generating modes that meet narrowband conditions. It can maximize the orthogonality of different modes while reducing the energy loss of the original signal after linear superposition of different modes, thereby improving the efficiency of mining feature subsets with high discriminability and low redundancy.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a method for training an EEG signal classification model for weak asymmetric visual stimulation, comprising the following steps:
[0008] Segmenting the original EEG signal to obtain an original EEG signal dataset, the original EEG signal dataset including multiple elements, obtaining a frequency domain positive frequency signal corresponding to each element, and forming a frequency domain positive frequency signal dataset from the multiple frequency domain positive frequency signals;
[0009] The frequency domain positive frequency signal data set is divided into a training set, a test set, and a validation set according to a preset ratio;
[0010] Construct an EEG signal classification model, which includes a modal decomposition matrix, a convolutional neural network, and a fully connected layer; initialize the modal decomposition matrix that can propagate gradients;
[0011] Training the EEG signal classification model, specifically: dividing the training set into at least two mutually exclusive subsets, calculating the center band loss, bandwidth loss, reconstruction loss, and classification loss for each mutually exclusive subset; iteratively updating the modal decomposition matrix using back propagation of the center band loss, bandwidth loss, reconstruction loss, and classification loss; iteratively updating the parameters of the convolutional neural network and the fully connected layer using back propagation of the classification loss, including weights and biases; repeating this step until all mutually exclusive subsets are trained, which is recorded as one round of training, and a total of N rounds of training, N ≥ 2;
[0012] After each round of training, the EEG signal classification model is frozen and back-propagation is not performed. The validation set is used to verify the discrimination performance of the EEG signal classification model, and the parameters of the EEG signal classification model with the best discrimination performance are saved; the test set is used to evaluate the EEG signal classification model with the best discrimination performance parameters.
[0013] As a possible implementation method, the training of the EEG signal classification model based on each mutually exclusive subset includes the following sub-steps:
[0014] Normalizing the mutually exclusive subsets to obtain normalized mutually exclusive subsets;
[0015] The modal decomposition matrix is used to adaptively decompose the elements in the normalized mutually exclusive subset to obtain a multimodal frequency-domain positive-frequency EEG signal subset, where the mode is a combination of different frequencies. The center frequency band loss, bandwidth loss, and reconstruction loss are calculated based on the elements in the multimodal frequency-domain positive-frequency EEG signal subset. The conjugate symmetry of positive and negative frequencies is used to restore the negative frequencies of the elements in the multimodal frequency-domain positive-frequency EEG signal subset, and a frequency-domain-time-domain transformation is performed to obtain a multimodal time-domain EEG signal subset.
[0016] The dimension of the number of leads in the multimodal time-domain EEG signal subset is intermodulated with the dimension of the number of different frequency combinations to be decomposed in the modal decomposition matrix;
[0017] The dimension of the number of sampling points of the elements in the downsampled multimodal time-domain EEG signal subset;
[0018] The downsampled multimodal time-domain EEG signal subset is input into the convolutional neural network for feature extraction, and then the classification results are output through the fully connected layer to calculate the classification loss;
[0019] The modal decomposition matrix is iteratively updated by back propagation of the center frequency loss, bandwidth loss, reconstruction loss, and classification loss calculated based on the mutually exclusive subset. The parameters of the convolutional neural network and the fully connected layer are iteratively updated by back propagation of the classification loss, including weights and biases.
[0020] As a possible implementation manner, the normalized mutually exclusive subset includes multiple normalized elements, and the adaptive decomposition of the elements in the normalized mutually exclusive subset using the modal decomposition matrix includes the following steps:
[0021] After each normalized element is copied and expanded to the same dimension as the modal decomposition matrix, it is then multiplied element-by-element with the modal decomposition matrix to obtain the initial multimodal EEG signal; the negative frequencies of the initial multimodal EEG signal are restored using the conjugate symmetry of positive and negative frequencies, and the full frequency spectrum is obtained based on the negative frequencies and the positive frequencies of the initial multimodal EEG signal;
[0022] The low-frequency components in the full-frequency spectrum are moved to both ends of the full-frequency spectrum, and the high-frequency components in the full-frequency spectrum are moved to the center of the full-frequency spectrum to obtain a reconstructed spectrum;
[0023] Perform frequency domain-time domain transformation on the reconstructed spectrum to obtain a time domain signal;
[0024] A multimodal time domain signal is obtained by retaining the non-periodic extended part in the time domain signal, and a multimodal time domain EEG signal subset is composed of multiple multimodal time domain signals.
[0025] As a possible implementation, the modal decomposition matrix is h, Among them, N imf N is the number of different frequency combinations that are expected to be decomposed. t is the number of sampling points; the real part matrix h r From the interval Obtained by random sampling from uniform distribution; the imaginary part matrix h i Randomly sampled from a uniform distribution in the interval [-π,π], h is calculated as follows:
[0026] h=h r ⊙cos(h i )+ih r ⊙sin(h i )
[0027] Where ⊙ is the Hadamard product and i is the imaginary part.
[0028] As a possible implementation method, obtaining the frequency domain positive frequency signal corresponding to each element specifically includes:
[0029] Periodically extend the elements to obtain the extended elements;
[0030] Perform time domain-frequency domain transformation on the extended elements to obtain the initial spectrum;
[0031] The low-frequency components in the initial spectrum are moved to the center of the initial spectrum, and the high-frequency components in the initial spectrum are moved to both ends of the initial spectrum to obtain a shifted spectrum;
[0032] The positive frequency of the shift spectrum is retained to obtain the positive frequency component of the extended element spectrum, and the positive frequency component is multiplied by two to obtain the frequency domain positive frequency signal corresponding to each element.
[0033] As a possible implementation method, the classification loss is recorded as loss cls , calculated as follows:
[0034]
[0035] Among them, N n is the total number of categories in the original EEG signal dataset; N train is the number of trials of the training set in a certain category; y a,c is the category of an element in the training set; p a.c It is the probability of an element predicted by the EEG signal classification model.
[0036] As a possible implementation, the center band loss is recorded as loss freq , calculated as follows:
[0037]
[0038] Among them, N imf N is the number of different frequency combinations that you want to decompose; c is the number of leads of the elements in the original EEG signal dataset, N n is the total number of categories in the original EEG signal dataset, N train is the number of trials of the training set in a certain category, θ a,b,c,i and θ a,b,c,j are the center frequencies of different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset; ζ is a small constant to prevent division by zero error; i and j are different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset; where θ a,b,c,i It is calculated as follows: is an element in the training set, w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive modal decomposition is an element in the multimodal frequency domain positive frequency EEG signal subset.
[0039] As a possible implementation, the bandwidth loss is recorded as loss band , calculated as follows:
[0040]
[0041] Among them, N train N is the number of trials in a certain category of the training set; imf N is the number of different frequency combinations that you want to decompose; n is the total number of categories in the original EEG signal dataset; N c is the number of leads of the elements in the original EEG signal dataset; N t is the number of sampling points of the elements in the original EEG signal dataset; θ d The values are {1,2,…N t};θ a,b,c,i is the center frequency of different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset. ′ a,b,c,i is an element in the multimodal frequency domain positive frequency EEG signal subset, Among them, θ a,b,c,i It is calculated as follows: is an element in the training set, w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive modal decomposition is an element in the multimodal frequency domain positive frequency EEG signal subset.
[0042] As a possible implementation, the reconstruction loss is recorded as loss org , calculated as follows:
[0043]
[0044] N train N is the number of trials in a certain category of the training set; n is the total number of categories in the original EEG signal dataset; N c is the number of leads of the elements in the original EEG signal dataset; , is an element in the training set; N imf is the number of different frequency combinations that we want to decompose; w′ a,b,c,i is an element in the multimodal frequency domain positive frequency EEG signal subset,
[0045] In the second aspect, the present invention provides an application of an EEG signal classification model for weak asymmetric visual stimulation. The EEG signal classification model obtained by training the EEG signal classification model for weak asymmetric visual stimulation according to the first aspect is configured in an EEG signal processing system for distinguishing the categories of EEG signals.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] 1. The present invention proposes a training method for an EEG signal classification model for weak asymmetric visual stimulation, and proposes an adaptive modal decomposition algorithm to map EEG signals from the time domain to the frequency domain. By linearly transforming the complex modal decomposition matrix and the EEG frequency domain signal, the frequency components are decomposed and recombined into different modes. By maximizing the Euclidean distance of the center frequency under different modes and establishing narrowband constraints under different modes to optimize the modal decomposition matrix, the redundancy between different modes is reduced and the orthogonality of different modes is increased. At the same time, the modal decomposition matrix is optimized synchronously using the constraint that the energy of the linear combination of all modes is minimized compared to the original signal, reducing feature loss during information transmission, improving the efficiency of mining highly discriminative and low-redundant feature subsets, and significantly improving the classification performance of EEG signals.
[0048] 2. The adaptive modal decomposition algorithm proposed in the present invention encourages different modal features to have different center frequencies and minimizes the similarity between different center frequencies. At the same time, the algorithm tends to generate modes that meet narrowband conditions, maximizes the orthogonality of different modes, and reduces the energy loss of the original signal after linear superposition of different modes, thereby ensuring the integrity of the features and being suitable for brain-computer interface systems with few leads and little training.
[0049] 3. The present invention proposes a training method for an EEG signal classification model for weak asymmetric visual stimulation, constructs an end-to-end EEG signal classification model, combines modal decomposition with a convolutional neural network to extract discriminant-related features, and further optimizes the modal decomposition matrix, convolutional neural network, and fully connected layer through classification loss, so that the feature differences of modalities in the same category after decomposition are minimized, and the feature differences of modalities in different categories are maximized, thereby increasing the discriminability of the features.
[0050] 4. This paper proposes a training method for EEG signal classification models for weak asymmetric visual stimuli. It explores and develops an end-to-end EEG signal classification model based on frequency domain analysis, moving beyond the simple combination of modal decomposition and convolutional neural networks. This model can explore features relevant to discrimination in frequency space, overcoming the limitations of traditional deep learning models that primarily rely on time domain analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0052] Figure 1 Flowchart of a training method for an EEG signal classification model for weak asymmetric visual stimulation according to an embodiment of the present invention;
[0053] Figure 2 Schematic diagram of extending the length of an element by periodic extension in an embodiment of the present invention;
[0054] Figure 3 A schematic diagram of obtaining a shifted spectrum by shifting low-frequency components and high-frequency components in a spectrum in an embodiment of the present invention;
[0055] Figure 4 Schematic diagram of the training principle of the EEG signal classification model in an embodiment of the present invention;
[0056] Figure 5 The comparison of the performance of different algorithms in 9-lead 1 to 8 trials under 3-fold cross validation in an embodiment of the present invention is shown;
[0057] Figure 6The comparison of the performance of different algorithms in 9-lead 1 to 8 trials under 5-fold cross validation in an embodiment of the present invention is shown;
[0058] Figure 7 The performance comparison of different algorithms in 9-lead 1 to 8 trials under 10-fold cross validation is shown in the embodiment of the present invention.
[0059] Figure 8 This is a comparison of the performance of different algorithms in 1 to 8 trials under 3-fold cross validation of the embodiment of the present invention, where the method is used for 9 leads and other algorithms are used for 21 leads;
[0060] Figure 9 This is a comparison of the performance of different algorithms in 1 to 8 trials under 5-fold cross validation of the embodiment of the present invention, where the method is used in 9 leads and other algorithms are used in 21 leads;
[0061] Figure 10 This is a comparison of the performance of different algorithms in 10-fold cross-validation under 9 leads for this method and 1 to 8 trials for other algorithms under 21 leads in an embodiment of the present invention;
[0062] Figure 11 The figure shows the performance comparison of different algorithms in the embodiment of the present invention under 9 leads 1 to 3 trials. DETAILED DESCRIPTION
[0063] To facilitate a clear description of the technical solutions of the embodiments of the present invention, the words "first" and "second" are used in the embodiments of the present invention to distinguish between identical or similar items with substantially the same functions and effects. For example, the first threshold and the second threshold are merely used to distinguish between different thresholds and do not limit their order. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean different.
[0064] It should be noted that, in the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present invention should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0065] In the present invention, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. The following at least one item (item) or similar expressions thereof refer to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one item (item) of a, b or c can represent: a, b, c, the combination of a and b, the combination of a and c, the combination of b and c, or the combination of a, b and c, where a, b, c can be single or multiple.
[0066] The embodiments of the present invention aim to provide a training method and application of an EEG signal classification model for weak asymmetric visual stimulation. This method combines features of different frequencies into one modality, encourages different modal features to have different center frequencies, minimizes the similarity between different center frequencies, and generates modalities that meet narrowband conditions. It can maximize the orthogonality of different modalities while reducing the energy loss of the original signal after linear superposition of different modalities, thereby improving the efficiency of mining feature subsets with high discriminability and low redundancy.
[0067] See also Figure 1 The training method proposed in this embodiment includes the following steps:
[0068] Segmenting the original EEG signal to obtain an original EEG signal data set, the original EEG signal data set includes multiple elements, and obtaining a frequency domain positive frequency signal corresponding to each element;
[0069] As an example, the original EEG signal (the EEG signal without any processing) is first segmented. The length of the segmentation is not specifically limited. This embodiment is explained by segmenting the signal with a duration of 250ms to obtain the original EEG signal dataset. Among them, N n Indicates the number of original EEG signal classifications; N s Represents the number of trials, that is, the number of trials collected by repeated experiments under the same classification; N c Indicates the number of leads, N t Represents the number of sampling points, R represents a real number set. The original EEG signal dataset X includes multiple elements x, x i ∈R.
[0070] As a possible implementation method, obtaining the frequency domain positive frequency signal corresponding to each element specifically includes:
[0071] Periodically extend the elements to obtain the extended elements;
[0072] As an example, the following method is used to periodically extend the element x to obtain the extended element
[0073] x pad [n]=x[n mod N t ], n=(―M t ,…,N t +M t ―1)+M t (1)
[0074] in, Indicates the extension length, see Figure 2 , by periodically extending the total length of the elements to N t +2M t .
[0075] Perform time domain-frequency domain transformation on the extended elements to obtain the initial spectrum;
[0076] As an example, the fast Fourier transform is used to transform the extended element x pad Perform time domain-frequency domain transformation to obtain the initial spectrum The calculation process is as follows:
[0077]
[0078] Among them, n is the extended element x pad The index of , that is, the number of sampling points, C represents the complex field, and i represents the imaginary part.
[0079] The low-frequency components in the initial spectrum are moved to the center of the initial spectrum, and the high-frequency components in the initial spectrum are moved to both ends of the initial spectrum to obtain a shifted spectrum;
[0080] As an example, the following method is used to obtain the migration spectrum
[0081]
[0082] See also Figure 3 , the migration spectrum w′ is in the interval [0,N t ―1] is a negative frequency, in the interval [N t ,N t +2M t ―1] is a positive frequency.
[0083] The positive frequency of the shift spectrum is retained to obtain the positive frequency component of the extended element spectrum, and the positive frequency component is multiplied by two to obtain the frequency domain positive frequency signal corresponding to each element.
[0084] As an example, retaining the positive frequencies of the shift spectrum w′ yields the extended element spectrum x pad The positive frequency component of The positive frequency component w + Multiply by two to get the frequency domain positive frequency signal corresponding to each element
[0085] Composed of multiple frequency domain positive frequency signals w f Construct frequency domain positive frequency signal data set
[0086] The frequency domain positive frequency signal data set is divided into training set, test set and validation set according to a preset ratio; the training set is used to train the EEG signal classification model, the validation set is used to verify the discriminant performance of the model, the parameters of the EEG signal classification model with the best discriminant performance are saved, and the test set is used to evaluate the model with the best discriminant performance parameters.
[0087] As an example, the frequency domain positive frequency signal dataset Divide into training sets according to the preset ratio Test set and validation set Among them, N train Indicates the number of trials in the training set, N test Indicates the number of trials in the test set, N val Indicates the number of trials of the validation set, N train +N test +N val =N s . The training set and validation set The first two dimensions of are expanded into one dimension, that is The test set Transformed into Where k represents the number of superposition trials. The division method is calculated as follows:
[0088] N val =0.1·N train (4)
[0089] N train +N val =n fold ·N test (5)
[0090] Among them, n fold Indicates that the training set is randomly divided into n fold mutually exclusive subsets of similar size. For example, each time n fold -1 subset, randomly select nfold - 90% of the trials in the 1st subset are used as the training set, the remaining 10% of the trials are used as the validation set, and the remaining 1st subset is used as the test set. Repeat n fold times, each time choosing a different self as the test set, and finally getting n fold evaluation results, take n fold The average of the evaluation results is used as the final evaluation indicator of the EEG signal classification model.
[0091] As an example, the modal decomposition matrix is h, Among them, N imf N is the number of different frequency combinations that are expected to be decomposed. t is the number of sampling points; the real part matrix h of the modal decomposition matrix h r From the interval The imaginary part matrix h of the modal decomposition matrix h is obtained by random sampling from the uniform distribution of i Random sampling is obtained from a uniform distribution in the interval [―π,π], and the modal decomposition matrix h is calculated as follows:
[0092] h=h r ⊙cos(h i )+ih r ⊙sin(h i ) (6)
[0093] Where ⊙ represents the Hadamard product and i is the imaginary part.
[0094] Construct an EEG signal classification model, which includes a modal decomposition matrix, a convolutional neural network, and a fully connected layer; initialize the modal decomposition matrix that can propagate gradients;
[0095] To train an EEG signal classification model, see Figure 4 Specifically, the training set is divided into at least two mutually exclusive subsets, the center frequency band loss, bandwidth loss, reconstruction loss, and classification loss of each mutually exclusive subset are calculated, the modal decomposition matrix is iteratively updated using the back propagation of the center frequency loss, bandwidth loss, reconstruction loss, and classification loss, and the parameters of the convolutional neural network and the fully connected layer are iteratively updated using the back propagation of the classification loss, including weights and biases;
[0096] As an example, the training set Randomly divided into n bn mutually exclusive subsets of similar size,
[0097] in, During each training session, the gradient is calculated for each mutually exclusive subset and the model parameters, including weights and biases, are updated. Adaptive modal decomposition is then performed, followed by feature extraction using a convolutional neural network. Finally, the classification results are output through a fully connected layer.
[0098] As a possible implementation method, the classification loss is recorded as loss cls , is the cross entropy loss between the classification result output by the fully connected layer and the actual category, which is calculated as follows:
[0099]
[0100] Among them, N n is the total number of categories in the original EEG signal dataset; N train is the number of trials of the training set in a certain category; y a,c is the category of an element in the training set; p a.c It is the probability of an element predicted by the EEG signal classification model.
[0101] As a possible implementation, the center band loss is denoted as It is calculated as follows:
[0102]
[0103] Among them, N imf N is the number of different frequency combinations that you want to decompose; c is the number of leads of the elements in the original EEG signal dataset, N n is the total number of categories in the original EEG signal dataset, N train is the number of trials of the training set in a certain category, θ a,b,c,i and θ a,b,c,j are the center frequencies of different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset; ζ is a small constant to prevent division by zero error; i and j are different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset; where θ a,b,c,i It is calculated as follows: is an element in the training set, w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive modal decomposition is an element in the multimodal frequency domain positive frequency EEG signal subset.
[0104] As a possible implementation, the bandwidth loss is recorded as loss band , calculated as follows:
[0105]
[0106] Among them, Ntrain N is the number of trials in a certain category of the training set; imf N is the number of different frequency combinations that you want to decompose; n is the total number of categories in the original EEG signal dataset; N c is the number of leads of the elements in the original EEG signal dataset; N t is the number of sampling points of the elements in the original EEG signal dataset; θ d The values are {1,2,…N t};θ a,b,c,i is the center frequency of different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset, w ′ a,b,c,i is an element in the multimodal frequency domain positive frequency EEG signal subset, Among them, θ a,b,c,i It is obtained by the following calculation:
[0107]
[0108] is an element in the training set, w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive modal decomposition is an element in the multimodal frequency domain positive frequency EEG signal subset.
[0109] The loss of bandwidth tends to generate modes that conform to the narrowband condition.
[0110] As a possible implementation, the reconstruction loss is recorded as loss org , calculated as follows:
[0111]
[0112] N train N is the number of trials in a certain category of the training set; n is the total number of categories in the original EEG signal dataset; N c is the number of leads of the elements in the original EEG signal dataset; is an element in the training set; N imf is the number of different frequency combinations that we want to decompose; w′ a,b,c,i is an element in the multimodal frequency domain positive frequency EEG signal subset, Calculate N in the frequency domain imf The purpose of this method is to reduce the energy loss of the original signal after the linear superposition of different modes.
[0113] As a possible implementation method, the training of the EEG signal classification model based on each mutually exclusive subset includes the following sub-steps:
[0114] Normalizing the mutually exclusive subsets to obtain normalized mutually exclusive subsets;
[0115] The modal decomposition matrix is used to adaptively decompose the elements in the normalized mutually exclusive subset to obtain a multimodal frequency-domain positive-frequency EEG signal subset, where the mode is a combination of different frequencies. The center frequency band loss, bandwidth loss, and reconstruction loss are calculated based on the elements in the multimodal frequency-domain positive-frequency EEG signal subset. The conjugate symmetry of positive and negative frequencies is used to restore the negative frequencies of the elements in the multimodal frequency-domain positive-frequency EEG signal subset, and a frequency-domain-time-domain transformation is performed to obtain a multimodal time-domain EEG signal subset.
[0116] As a possible implementation method, the normalized mutually exclusive subset includes multiple normalized elements, and the modal decomposition matrix is used to adaptively decompose the elements in the normalized mutually exclusive subset, including the following steps:
[0117] After each normalized element is copied and expanded to the same dimension as the modal decomposition matrix, it is then multiplied element-by-element with the modal decomposition matrix to obtain the initial multimodal EEG signal;
[0118] The conjugate symmetry of positive and negative frequencies is used to restore the negative frequencies of the initial multimodal EEG signal, and the full frequency spectrum is obtained based on the negative frequencies and the positive frequencies of the initial multimodal EEG signal.
[0119] The low-frequency components in the full-frequency spectrum are moved to both ends of the full-frequency spectrum, and the high-frequency components in the full-frequency spectrum are moved to the center of the full-frequency spectrum to obtain a reconstructed spectrum;
[0120] Perform frequency domain-time domain transformation on the reconstructed spectrum to obtain a time domain signal;
[0121] A multimodal time domain signal is obtained by retaining the non-periodic extended part in the time domain signal, and a multimodal time domain EEG signal subset is composed of multiple multimodal time domain signals.
[0122] The dimension of the number of leads in the multimodal time-domain EEG signal subset is intermodulated with the dimension of the number of different frequency combinations to be decomposed in the modal decomposition matrix;
[0123] The dimension of the number of sampling points of the elements in the downsampled multimodal time-domain EEG signal subset;
[0124] The downsampled multimodal time-domain EEG signal subset is input into the convolutional neural network for feature extraction, and then the classification results are output through the fully connected layer to calculate the classification loss function;
[0125] Next, we take the i-th subset The process of the training phase is described as an example.
[0126] First, the mutually exclusive subsets are normalized. The normalized mutually exclusive subsets are obtained by the following calculation:
[0127]
[0128] Among them, the covariance matrix
[0129] Cov(·) represents the covariance, Representation subset expectations, for The real part of for The imaginary part of , γ and β are the parameters to be learned.
[0130] Then the modal decomposition matrix is used to adaptively decompose the normalized mutually exclusive subsets The normalized mutually exclusive subset includes multiple normalized elements, and the modal decomposition matrix is used to adaptively decompose the elements in the normalized mutually exclusive subset, including the following steps:
[0131] First, the normalized mutually exclusive subset Elements in Decomposed into different modes, in The decomposed modes are calculated as follows:
[0132]
[0133] Among them, expn(·) converts the elements Copy and expand to the same dimension as the modal decomposition matrix h, and get to w imf Zero padding to obtain the initial multimodal EEG signal Exemplarily, the zero-padding method is as follows:
[0134]
[0135] Then the initial multimodal EEG signal w is restored by using the conjugate symmetry of positive and negative frequencies imfpad The full frequency spectrum w′ is obtained based on the negative frequency and the positive frequency of the initial multimodal EEG signal. imfpad :
[0136]
[0137] The full frequency spectrum w′ imfpad Move the low-frequency components in the full-frequency spectrum to both ends, and move the high-frequency components in the full-frequency spectrum to the center of the full-frequency spectrum to obtain the reconstructed spectrum. The calculation is as follows:
[0138]
[0139] Reconstructed spectrum w shift Perform frequency domain-time domain transformation to obtain time domain signal For example, the reconstructed spectrum w is transformed using inverse fast Fourier transform. shift Perform frequency domain-time domain transformation and calculate as follows:
[0140]
[0141] Keep the time domain signal x ifft The non-periodic extension part in the multimodal time domain EEG signal is obtained Perform the above operation on each element in the mutually exclusive subset to obtain multiple multimodal time-domain EEG signals, and the multiple multimodal time-domain EEG signals constitute a multimodal time-domain EEG signal subset.
[0142] The multimodal time domain EEG signal subset X i imf The dimension N of the number of leads c The dimension N of the number of different frequency combinations that are expected to be decomposed in the modal decomposition matrix imf Intermodulation: Downsampled multimodal time-domain EEG signal subset X i imf The dimension N of the number of sampling points of the elements in t , specifically Downsampling: The downsampled multimodal time-domain EEG signal subset is input into the convolutional neural network for feature extraction, and then the classification discrimination results are output through the fully connected layer to calculate the classification loss.
[0143] The modal decomposition matrix is iteratively updated by back propagation of the center frequency loss, bandwidth loss, reconstruction loss, and classification loss calculated based on the mutually exclusive subset. The parameters of the convolutional neural network and the fully connected layer are iteratively updated by back propagation of the classification loss, including weights and biases.
[0144] As an example, the structure of a convolutional neural network is as follows:
[0145] A convolutional layer with ELU, with 64 filters and the convolution kernel set to N c ×(N t / 4) with a stride of 1×1; a batch normalization layer; a random dropout layer that randomly drops neurons with probability p=0.5; and an average pooling layer with a size of 1×8 and a stride of 1×8.
[0146] Sequentially change n bn The above operations are performed on mutually exclusive subsets of similar size, and the covariance matrix V and expectation E are updated synchronously. The update method is as follows:
[0147]
[0148] Among them, i and k represent different mutually exclusive subsets.
[0149] After each training, freeze the EEG signal classification model without back propagation and apply the validation set. Verify the discriminative performance of the EEG signal classification model, save the parameters of the EEG signal classification model with the best discriminative performance; use the test set to evaluate the EEG signal classification model with the best discriminative performance parameters.
[0150] As an example, the test set
[0151] Input into the model for testing, then Elements in Take this as an example to illustrate the evaluation process. in Output the confidence of each category separately, then superimpose the confidence of each category of k trials, and take the category with the largest confidence as the discrimination result. The classification result is obtained by the following calculation:
[0152]
[0153] in Indicates that the model outputs the confidence of each category, k represents the number of superimposed trials, and argmax is to find the decision category with the largest confidence.
[0154] In the second aspect, an embodiment of the present invention provides an application of an EEG signal classification model for weak asymmetric visual stimulation. The EEG signal classification model obtained by training the EEG signal classification model for weak asymmetric visual stimulation provided by the first aspect is configured in an EEG signal processing system for distinguishing the categories of EEG signals.
[0155] Next, the EEG signal classification model obtained by training using the training method provided in this embodiment is configured in an EEG signal processing system, and EEG signal classification is performed using this EEG signal processing system. Data from 14 subjects were collected, with each subject containing 4 × 1800 × 9 × 250 pixels, corresponding to EEG category, number of trials, number of leads, and number of sampling points. Figures 5 to 7The performance of different algorithms is compared under 9-lead 1 to 8 trials. The results show that under 3-fold, 5-fold and 10-fold cross-validation, the discrimination performance of this application has a significant advantage when the trials are superimposed. Figures 8 to 10 The performance of this algorithm in 9 leads is compared with that of other algorithms in 21 leads in 1 to 8 trials. The results show that under 3-fold, 5-fold and 10-fold cross-validation, this application has a significant advantage in discrimination performance when the number of leads is not dominant and the trials are superimposed. Figure 11 The performance of different algorithms is compared under 9-lead 1-3 trials (only 1-3 trials are used for training and validation). The results show that under 3-fold, 5-fold and 10-fold cross-validation, the classification accuracy of this method has a significant advantage when the trials are superimposed under low trial conditions.
[0156] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art can understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the accompanying drawings. In the specification, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the specification. Certain measures are recorded in different embodiments, but this does not mean that these measures cannot be combined to produce good results.
[0157] Although the present invention has been described with reference to specific features and embodiments thereof, it will be apparent that various modifications and combinations thereof may be made without departing from the spirit and scope of the invention. Accordingly, this specification and drawings are merely illustrative of the present invention and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the invention. It will be apparent that various modifications and variations of the present invention may be made by those skilled in the art without departing from the spirit and scope of the invention. Thus, the present invention is intended to include such modifications and variations as fall within the scope of the invention and its equivalents.
Claims
1. A method for training an EEG signal classification model for weak asymmetric visual stimulation, characterized in that: The steps include: Segmenting the original EEG signal to obtain an original EEG signal dataset, the original EEG signal dataset including multiple elements, obtaining a frequency domain positive frequency signal corresponding to each element, and forming a frequency domain positive frequency signal dataset from the multiple frequency domain positive frequency signals; The frequency domain positive frequency signal data set is divided into a training set, a test set, and a validation set according to a preset ratio; Construct an EEG signal classification model, which includes a modal decomposition matrix, a convolutional neural network, and a fully connected layer; initialize the modal decomposition matrix that can propagate gradients; Training an EEG signal classification model involves: dividing the training set into at least two mutually exclusive subsets, calculating the center band loss, bandwidth loss, reconstruction loss, and classification loss for each mutually exclusive subset; iteratively updating the modal decomposition matrix using backpropagation of the center band loss, bandwidth loss, reconstruction loss, and classification loss; and iteratively updating the parameters of the convolutional neural network and fully connected layer, including weights and biases, using backpropagation of the classification loss. Repeat this step until all mutually exclusive subsets are trained, which is recorded as one round of training. There are N rounds of training in total, where N ≥ 2. After each round of training, the EEG signal classification model is frozen and back-propagation is not performed. The validation set is used to verify the discrimination performance of the EEG signal classification model, and the parameters of the EEG signal classification model with the best discrimination performance are saved; the test set is used to evaluate the EEG signal classification model with the best discrimination performance parameters.
2. The method for training an EEG signal classification model for weak asymmetric visual stimulation according to claim 1, characterized in that: The training of the EEG signal classification model based on each mutually exclusive subset includes the following sub-steps: Normalizing the mutually exclusive subsets to obtain normalized mutually exclusive subsets; The modal decomposition matrix is used to adaptively decompose the elements in the normalized mutually exclusive subset to obtain a multimodal frequency-domain positive-frequency EEG signal subset, where the mode is a combination of different frequencies. The center frequency band loss, bandwidth loss, and reconstruction loss are calculated based on the elements in the multimodal frequency-domain positive-frequency EEG signal subset. The conjugate symmetry of positive and negative frequencies is used to restore the negative frequencies of the elements in the multimodal frequency-domain positive-frequency EEG signal subset, and a frequency-domain-time-domain transformation is performed to obtain a multimodal time-domain EEG signal subset. The dimension of the number of leads in the multimodal time-domain EEG signal subset is intermodulated with the dimension of the number of different frequency combinations to be decomposed in the modal decomposition matrix; The dimension of the number of sampling points of the elements in the downsampled multimodal time-domain EEG signal subset; The downsampled multimodal time-domain EEG signal subset is input into the convolutional neural network for feature extraction, and then the classification results are output through the fully connected layer to calculate the classification loss; The modal decomposition matrix is iteratively updated by back propagation of the center frequency loss, bandwidth loss, reconstruction loss, and classification loss calculated based on the mutually exclusive subset. The parameters of the convolutional neural network and the fully connected layer are iteratively updated by back propagation of the classification loss, including weights and biases.
3. The training method of the EEG signal classification model for weak asymmetric visual stimulation according to claim 2, characterized in that: The normalized mutually exclusive subset includes a plurality of normalized elements. Adaptively decomposing the elements in the normalized mutually exclusive subset using the modal decomposition matrix includes the following steps: After each normalized element is copied and expanded to the same dimension as the modal decomposition matrix, it is then multiplied element-by-element with the modal decomposition matrix to obtain the initial multimodal EEG signal; the negative frequencies of the initial multimodal EEG signal are restored using the conjugate symmetry of positive and negative frequencies, and the full frequency spectrum is obtained based on the negative frequencies and the positive frequencies of the initial multimodal EEG signal; The low-frequency components in the full-frequency spectrum are moved to both ends of the full-frequency spectrum, and the high-frequency components in the full-frequency spectrum are moved to the center of the full-frequency spectrum to obtain a reconstructed spectrum; Perform frequency domain-time domain transformation on the reconstructed spectrum to obtain a time domain signal; A multimodal time domain signal is obtained by retaining the non-periodic extended part in the time domain signal, and a multimodal time domain EEG signal subset is composed of multiple multimodal time domain signals.
4. The training method of the EEG signal classification model for weak asymmetric visual stimulation according to claim 1, characterized in that: The modal decomposition matrix is h, Among them, N imf N is the number of different frequency combinations that are expected to be decomposed. t is the number of sampling points; the real part matrix h r From the interval Obtained by random sampling from uniform distribution; the imaginary part matrix h i Randomly sampled from a uniform distribution in the interval [-π,π], h is calculated as follows: h=h r ⊙cos(h i )+ih r ⊙sin(h i ) Where ⊙ is the Hadamard product and i is the imaginary part.
5. The method for training an EEG signal classification model for weak asymmetric visual stimulation according to claim 1, wherein: Obtaining the frequency domain positive frequency signal corresponding to each element specifically includes: Periodically extend the elements to obtain the extended elements; Perform time domain-frequency domain transformation on the extended elements to obtain the initial spectrum; The low-frequency components in the initial spectrum are moved to the center of the initial spectrum, and the high-frequency components in the initial spectrum are moved to both ends of the initial spectrum to obtain a shifted spectrum; The positive frequency of the shift spectrum is retained to obtain the positive frequency component of the extended element spectrum, and the positive frequency component is multiplied by two to obtain the frequency domain positive frequency signal corresponding to each element.
6. The method for training an EEG signal classification model for weak asymmetric visual stimulation according to claim 1, characterized in that: Classification loss is recorded as loss cls , calculated as follows: Among them, N n is the total number of categories in the original EEG signal dataset; N train is the number of trials of the training set in a certain category; y a,c is the category of an element in the training set; p a.c It is the probability of an element predicted by the EEG signal classification model.
7. The method for training an EEG signal classification model for weak asymmetric visual stimulation according to claim 1, characterized in that: The center band loss is recorded as It is calculated as follows: Among them, N imf N is the number of different frequency combinations that you want to decompose; c is the number of leads of the elements in the original EEG signal dataset, N n is the total number of categories in the original EEG signal dataset, N train is the number of trials of the training set in a certain category, θ a,b,c,i and θ a,b,c,j are the center frequencies of different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset; ζ is a small constant to prevent division by zero error; i and j are different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset; where θ a,b,c,i It is calculated as follows: is an element in the training set, w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive modal decomposition is an element in the multimodal frequency domain positive frequency EEG signal subset.
8. The method for training an EEG signal classification model for weak asymmetric visual stimulation according to claim 1, characterized in that: Bandwidth loss is recorded as loss band , calculated as follows: Among them, N train N is the number of trials in a certain category of the training set; imf N is the number of different frequency combinations that you want to decompose; n is the total number of categories in the original EEG signal dataset; N c is the number of leads of the elements in the original EEG signal dataset; N t is the number of sampling points of the elements in the original EEG signal dataset; θ d The values are {1,2,…N t };θ a,b,c,i is the center frequency of different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset, w′ a,b,c,i is an element in the multimodal frequency domain positive frequency EEG signal subset, Among them, θ a,b,c,i It is calculated as follows: is an element in the training set, w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive modal decomposition is an element in the multimodal frequency domain positive frequency EEG signal subset.
9. The method for training an EEG signal classification model for weak asymmetric visual stimulation according to claim 1, characterized in that: The reconstruction loss is denoted as It is calculated as follows: N train N is the number of trials in a certain category of the training set; n is the total number of categories in the original EEG signal dataset; N c is the number of leads of the elements in the original EEG signal dataset; is an element in the training set; N imf is the number of different frequency combinations that we want to decompose; w′ a,b,c,i is an element in the multimodal frequency domain positive frequency EEG signal subset, 10. Application of an EEG signal classification model for weak asymmetric visual stimulation, characterized in that: The EEG signal classification model obtained by training the EEG signal classification model for weak asymmetric visual stimulation according to any one of claims 1 to 9 is configured in an EEG signal processing system for distinguishing the categories of EEG signals.
Citation Information
Patent Citations
Multi-modal signal-based motor imagery intention recognition method
CN113951900A
Motor imagery electroencephalogram signal classification method based on one-dimensional convolution kernel
CN114492500A
Multi-modal emotion classification method based on electroencephalogram space-time-frequency characteristics and eye movement characteristics
CN115099311A
Space-time frequency domain effective channel attention motor imagery electroencephalogram decoding method based on comparative learning
CN117009780A
Adaptive continuous variation electroencephalogram mode decomposition method based on narrowband constraint enhancement
CN117462150A