Training methods and applications of EEG signal classification models for weak asymmetric visual stimuli
By combining adaptive modal decomposition algorithm and convolutional neural network, an end-to-end EEG signal classification model is constructed, which solves the problem of extracting highly discriminative and low-redundancy features from EEG signals subjected to weak asymmetric visual stimulation, thereby improving the efficiency and accuracy of EEG signal classification and making it suitable for brain-computer interface systems.
Patent Information
- Application Number
- CN202510532442.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-04-25
AI Technical Summary
Existing algorithms for classifying EEG signals induced by weak asymmetric visual stimuli are unable to effectively extract highly discriminative and low-redundancy feature subsets, leading to a decline in the recognition performance of brain-computer interface systems. In particular, when the amount of training data is insufficient, the spatial filter is inaccurate and cannot meet the needs of practical applications.
An adaptive modal decomposition algorithm is used to map EEG signals from the time domain to the frequency domain. By combining the modal decomposition matrix with a convolutional neural network, modalities that meet the narrowband condition are generated, maximizing the orthogonality of different modalities and the discriminativeness of features, and constructing 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, enhances the efficiency of feature subset mining and classification accuracy, and reduces feature loss and redundancy.
Smart Images

Figure CN120597079B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electroencephalogram (EEG) signal classification technology, and in particular to a training method and application of an EEG signal classification model for weak asymmetric visual stimuli. Background Technology
[0002] Electroencephalograms (EEGs) exhibit nonlinearity, non-stationarity, and low signal-to-noise ratios, resulting in relatively weak information features. Furthermore, EEG features evoked by weak asymmetric visual stimuli, compared to traditional steady-state visual evoked potentials (SSVEPs), exhibit low entropy, feature redundancy, less information content, and weaker discriminative ability. This makes it difficult to select highly discriminative and low-redundancy feature subsets, posing a significant challenge to pattern recognition and classification tasks based on EEGs evoked by weak asymmetric visual stimuli. Simultaneously, achieving high recognition accuracy in decoding algorithms often relies on large amounts of training data. Pre-training helps algorithms learn from individual EEG data and generate spatial filters and evoked EEG signal templates that match the subject's EEG characteristics, thus achieving satisfactory recognition results. However, as brain-computer interfaces move towards practical application, the need to reduce calibration burden becomes increasingly urgent. Traditional training algorithms, precisely because they require the prior collection of large amounts of EEG data for model training, cannot meet the needs of real-world application scenarios.
[0003] Most current EEG classification algorithms based on weak asymmetric visual stimulus-evoked responses 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, neglecting the fact that responses in different frequency bands evoked by weak asymmetric visual stimuli also possess spatial characteristics. This results in a limited number of extracted feature subsets and an incomplete feature space. Similarly, the deep learning baseline algorithm EEGnet extracts frequency domain features from EEG using fixed-length convolutions. However, the fixed convolution length leads to invariant frequency domain resolution, and the lack of orthogonality constraints between different frequency domains results in redundant feature subsets. Even after applying low-rank constraints, the number of extracted feature subsets remains small, and the feature space is still incomplete. Likewise, due to the low efficiency in mining highly discriminative and low-redundancy feature subsets, most current learning-based algorithms face the problem of inaccurate spatial filters when training data is insufficient, leading to a decrease in the overall recognition performance of brain-computer interface systems.
[0004] Therefore, there is an urgent need to propose a training method for EEG signal classification models that improves the efficiency of mining highly discriminative and low-redundancy feature subsets. Summary of the Invention
[0005] The purpose of this invention is to provide a training method and application for a classification model of EEG signals based on weak asymmetric visual stimuli. This method combines features of different frequencies into a modality, encourages different modal features to have different center frequencies, minimizes the similarity between different center frequencies, and generates modalities that meet narrowband conditions. This maximizes 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 high-discriminative and low-redundancy feature subsets.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a method for training a classification model of electroencephalogram (EEG) signals for weak asymmetric visual stimuli, comprising the following steps:
[0008] The original EEG signal is divided into segments to obtain the original EEG signal dataset. The original EEG signal dataset includes multiple elements. The positive frequency signal in the frequency domain corresponding to each element is obtained. The positive frequency signal in the frequency domain is composed of multiple positive frequency signals.
[0009] The frequency domain positive frequency signal dataset is divided into a training set, a test set, and a validation set according to a preset ratio;
[0010] A brainwave signal classification model is constructed, which includes a mode decomposition matrix, a convolutional neural network, and a fully connected layer; the mode decomposition matrix with propagable gradients is initialized.
[0011] The training of the EEG signal classification model is as follows: Divide the training set into at least two mutually exclusive subsets, and calculate the center band loss, bandwidth loss, reconstruction loss, and classification loss for each mutually exclusive subset; iteratively update the mode decomposition matrix using backpropagation of the center band loss, bandwidth loss, reconstruction loss, and classification loss; iteratively update the parameters of the convolutional neural network and the fully connected layer using backpropagation of the classification loss, including weights and biases; repeat this step until all mutually exclusive subsets have been trained, which is counted as one training round, and a total of N training rounds are performed, where N≥2;
[0012] After each training round, the EEG signal classification model is frozen without backpropagation. The discrimination performance of the EEG signal classification model is verified using a validation set, and the parameters of the EEG signal classification model with the best discrimination performance are saved. The EEG signal classification model with the best discrimination performance parameters is evaluated using a test set.
[0013] As one possible implementation, training the EEG signal classification model based on each mutually exclusive subset includes the following sub-steps:
[0014] Normalize the mutually exclusive subsets to obtain normalized mutually exclusive subsets;
[0015] By adaptively decomposing the elements of the normalized mutually exclusive subset using the modality decomposition matrix, a subset of positive frequency EEG signals in the multimodal frequency domain is obtained, where the modality is a combination of different frequencies. Based on the elements in the subset of positive frequency EEG signals in the multimodal frequency domain, the center band loss, bandwidth loss, and reconstruction loss are calculated. By utilizing the conjugate symmetry of positive and negative frequencies, the negative frequencies of the elements in the subset of positive frequency EEG signals in the multimodal frequency domain are recovered, and a frequency domain-time domain transformation is performed to obtain a subset of time-domain EEG signals in the multimodal frequency domain.
[0016] Intermodulate the dimension of the number of leads in the subset of multimodal time-domain EEG signals with the dimension of the number of different frequency combinations to be decomposed in the modality decomposition matrix;
[0017] The dimension of the number of element sampling points in the downsampled multimodal time-domain EEG signal subset;
[0018] The downsampled subset of multimodal time-domain EEG signals is input into a convolutional neural network for feature extraction, and then the classification result is output through a fully connected layer to calculate the classification loss.
[0019] The mode decomposition matrix is updated iteratively using backpropagation to calculate the center frequency loss, bandwidth loss, reconstruction loss, and classification loss based on the mutually exclusive subset. The parameters of the convolutional neural network and the fully connected layer are updated iteratively using backpropagation of the classification loss, including weights and biases.
[0020] As one possible implementation, the normalized mutual exclusion subset includes multiple normalized elements. The adaptive decomposition of the elements in the normalized mutual exclusion subset using the mode decomposition matrix includes the following steps:
[0021] Each normalized element is copied and expanded to the same dimension as the modality decomposition matrix, and then multiplied element by element with the modality decomposition matrix to obtain the initial multimodal EEG signal. The negative frequency of the initial multimodal EEG signal is recovered by utilizing the conjugate symmetry of positive and negative frequencies, and the full frequency spectrum is obtained based on the negative frequency and the positive frequency 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 the reconstructed spectrum.
[0023] The reconstructed spectrum is transformed from the frequency domain to the time domain to obtain the time domain signal;
[0024] The non-periodic extended portion of the time-domain signal is retained to obtain the multimodal time-domain signal, which is composed of multiple multimodal time-domain signals to form a subset of multimodal time-domain EEG signals.
[0025] As one possible implementation, the mode decomposition matrix is h. Where, N imf N represents the number of different frequency combinations to be decomposed. t h is the number of sampling points; h is the real part of the matrix h. r From the interval Obtained by random sampling from a uniform distribution; the imaginary part of h is... i h is obtained by random sampling from a uniform distribution in the interval [-π, π], and is calculated as follows:
[0026] h = h r ⊙cos(h i )+ih r ⊙sin(h i )
[0027] Where ⊙ is the Hadema product and i is the imaginary part.
[0028] As one possible implementation, obtaining the positive frequency signal in the frequency domain corresponding to each element specifically includes:
[0029] Periodically extend the elements to obtain the extended elements;
[0030] Perform a time-domain to 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 the migrated spectrum;
[0032] The positive frequency of the transferred spectrum is retained to obtain the positive frequency component of the extended element spectrum. Multiplying the positive frequency component by two yields the frequency domain positive frequency signal corresponding to each element.
[0033] As one possible implementation, the classification loss is denoted as loss. cls It is obtained by calculation as follows:
[0034]
[0035] Where, N n N represents the total number of categories in the original EEG signal dataset. train y represents the number of trials performed on the training set under a certain category. a,c p represents the category of an element in the training set. a.c This represents the probability predicted by an EEG signal classification model for a given element.
[0036] As one possible implementation, the center band loss is denoted as loss. freq It is obtained by calculation as follows:
[0037]
[0038] Where, N imf N represents the number of different frequency combinations desired for decomposition. c N represents the number of leads in the original EEG signal dataset. n N represents the total number of categories in the original EEG signal dataset. train θ represents the number of trials performed on the training set under a certain category. a,b,c,i and θ a,b,c,j θ represents the center frequency 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 errors; i and j represent different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset; where θ a,b,c,i It is obtained through the following calculation: For a certain element in the training set, For w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive mode decomposition is the element in the multimodal frequency domain positive frequency EEG signal subset.
[0039] As one possible implementation, the bandwidth loss is denoted as loss. band It is obtained by calculation as follows:
[0040]
[0041] Where, N train N represents the number of trials performed on the training set for a given category. imf N represents the number of different frequency combinations desired for decomposition. n N represents the total number of categories in the original EEG signal dataset. c N represents the number of leads in the original EEG signal dataset; t θ is the number of sampling points for each element in the original EEG signal dataset. d The values are {1,2,…N} t};θ a,b,c,i The center frequency of different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset. ′ a,b,c,i Elements in the multimodal frequency domain positive frequency EEG signal subset. Where, θ a,b,c,i It is obtained through the following calculation: For a certain element in the training set, For w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive mode decomposition is the element in the multimodal frequency domain positive frequency EEG signal subset.
[0042] As one possible implementation, the reconstruction loss is denoted as loss. org It is obtained by calculation as follows:
[0043]
[0044] N train N represents the number of trials performed on the training set for a given category. n N represents the total number of categories in the original EEG signal dataset. c The number of leads in the original EEG signal dataset; , where N is an element in the training set; imf w′ represents the number of different frequency combinations desired for decomposition. a,b,c,i Elements in the multimodal frequency domain positive frequency EEG signal subset.
[0045] Secondly, the present invention provides an application of an EEG signal classification model for weak asymmetric visual stimuli. The EEG signal classification model obtained by training the EEG signal classification model for weak asymmetric visual stimuli using the training method of 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 beneficial effects of the present invention are as follows:
[0047] 1. This invention proposes a training method for a classification model of EEG signals under weak asymmetric visual stimuli. An adaptive mode decomposition algorithm is presented, mapping EEG signals from the time domain to the frequency domain. Through a linear transformation between the complex mode decomposition matrix and the frequency domain signal of the EEG, frequency components are decomposed and recombine into different modes. The mode decomposition matrix is optimized by maximizing the Euclidean distance between the center frequencies of different modes and establishing narrowband constraints for different modes, reducing redundancy between different modes and increasing orthogonality. Simultaneously, the mode decomposition matrix is simultaneously optimized using the constraint that minimizes the energy loss of the linear combination of all modes compared to the original signal, reducing feature loss during information transmission, improving the efficiency of mining highly discriminative and low-redundancy feature subsets, and significantly improving the classification performance of EEG signals.
[0048] 2. The adaptive modal decomposition algorithm proposed in this invention encourages different modal features to have different center frequencies, minimizes the similarity between different center frequencies, and at the same time, the algorithm tends to generate modalities that meet the narrowband conditions, maximizes the orthogonality of different modalities while reducing the energy loss of the original signal after linear superposition of different modalities, thus ensuring the integrity of the features. It is suitable for brain-computer interface systems with few leads and little training.
[0049] 3. The training method for the EEG signal classification model of weak asymmetric visual stimulation proposed in this invention constructs an end-to-end EEG signal classification model, combines modality decomposition with convolutional neural networks to extract discriminative features, and further optimizes the modality decomposition matrix, convolutional neural network and fully connected layer through classification loss, so that the feature difference of modalities under the same category after decomposition is minimized and the feature difference of modalities under different categories is maximized, thereby increasing the discriminability of features.
[0050] 4. The training method for the EEG signal classification model based on weak asymmetric visual stimuli proposed in this invention explores and develops an end-to-end EEG signal classification model dominated by frequency domain analysis, breaking away from the simple combination of mode decomposition and convolutional neural networks. This model can explore and discriminate relevant features in the frequency space, overcoming the limitations of traditional deep learning models that are mainly based on time domain analysis. Attached Figure Description
[0051] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0052] Figure 1 This is a flowchart illustrating the training method for a classification model of weak asymmetric visual stimuli based on EEG signals in an embodiment of the present invention.
[0053] Figure 2 This is a schematic diagram illustrating the length of elements extended through periodic continuation in an embodiment of the present invention.
[0054] Figure 3 This is a schematic diagram illustrating the acquisition of the migration spectrum from the low-frequency and high-frequency components in the migration spectrum in an embodiment of the present invention.
[0055] Figure 4 This is a diagram illustrating the training principle of the EEG signal classification model in this embodiment of the invention.
[0056] Figure 5 This invention provides a comparison of the performance of different algorithms under 3-fold cross-validation in 9-lead 1-8 trials.
[0057] Figure 6This invention provides a comparison of the performance of different algorithms under 5-fold cross-validation in 9-lead 1-8 trials.
[0058] Figure 7 This invention provides a comparison of the performance of different algorithms under 10-fold cross-validation in 9-lead 1-8 trials.
[0059] Figure 8 This invention provides a comparison of the performance of different algorithms in 1 to 8 trials under 3-fold cross-validation in 9 leads, and other algorithms in 21 leads.
[0060] Figure 9 This invention provides a comparison of the performance of different algorithms in 1 to 8 trials under 5-fold cross-validation in a 9-lead configuration, and other algorithms in a 21-lead configuration.
[0061] Figure 10 This invention provides a comparison of the performance of different algorithms in 10-fold cross-validation under 9 leads and other algorithms under 21 leads in 1 to 8 trials.
[0062] Figure 11 This is a comparison of the performance of different algorithms in 1 to 3 trials with 9 leads in the embodiments of the present invention. Detailed Implementation
[0063] To facilitate a clear description of the technical solutions in the embodiments of the present invention, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, the first threshold and the second threshold are merely used to distinguish different thresholds and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" are not necessarily different.
[0064] It should be noted that in this invention, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0065] In this invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one" or similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, "at least one of a, b, or c" can represent: a, b, c, a combination of a and b, a combination of a and c, a combination of b and c, or a, b, and c, where a, b, and c can be single or multiple.
[0066] This invention aims to provide a training method and application for a classification model of EEG signals based on weak asymmetric visual stimuli. This method combines features of different frequencies into a modality, encourages different modal features to have different center frequencies, minimizes the similarity between different center frequencies, and generates modalities that meet narrowband conditions. This 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 high-discriminative and low-redundancy feature subsets.
[0067] See Figure 1 The training method proposed in this embodiment includes the following steps:
[0068] The original EEG signal is divided into segments to obtain the original EEG signal dataset. The original EEG signal dataset includes multiple elements, and the positive frequency signal in the frequency domain corresponding to each element is obtained.
[0069] As an example, the raw EEG signal (unprocessed EEG signal) is first segmented. The segment length is not specifically limited; this embodiment uses a segmentation of 250ms as an example to illustrate the process, thereby obtaining the raw EEG signal dataset. Where, N n N represents the number of categories of the original electroencephalogram (EEG) signals. s N represents the number of trials, that is, the number of repeated experiments conducted within the same category; c N represents the number of leads. t Let R represent the number of sampling points, and R represent the set of real numbers. The original EEG signal dataset X contains multiple elements x. x i ∈R.
[0070] As one possible implementation, obtaining the positive frequency signal in the frequency domain corresponding to each element specifically includes:
[0071] Periodically extend the elements to obtain the extended elements;
[0072] As an example, the element x is periodically extended using the following method 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 [link / reference]. Figure 2 The total length of the elements is extended to N through periodic extension. t +2M t .
[0075] Perform a time-domain to frequency-domain transformation on the extended elements to obtain the initial spectrum;
[0076] As an example, the Fast Fourier Transform is used to extend the element x. pad Perform time-domain to frequency-domain transformation to obtain the initial spectrum. The calculation process is as follows:
[0077]
[0078] Where n is the extended element x pad The index 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 the migrated spectrum;
[0080] As an example, the following method can be used to obtain the migration spectrum.
[0081]
[0082] See 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] represents a positive frequency.
[0083] The positive frequency of the transferred spectrum is retained to obtain the positive frequency component of the extended element spectrum. Multiplying the positive frequency component by two yields the frequency domain positive frequency signal corresponding to each element.
[0084] As an example, retaining the positive frequencies of the migration spectrum w′ yields the extended element spectrum x. pad positive frequency components The positive frequency component w + Multiply by two to obtain the positive frequency signal in the frequency domain corresponding to each element.
[0085] Composed of multiple positive frequency signals w in the frequency domain f Constructing a positive frequency signal dataset in the frequency domain
[0086] The frequency domain positive frequency signal dataset is divided into a training set, a test set, and a 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 model's discrimination performance, the parameters of the EEG signal classification model with the best discrimination performance are saved, and the test set is used to evaluate the model with the best discrimination performance parameters.
[0087] As an example, a dataset of positive frequency signals in the frequency domain. The dataset was divided into training sets according to a predetermined ratio. test set and verification set Where, N train N represents the number of trials in the training set. test N represents the number of trials in the test set. val N represents the number of trials in the validation set. train +N test +N val =N s The training set and verification set The first two dimensions are expanded into one dimension, that is... test set Transform into Where k represents the number of trials in the superposition. The partitioning method is calculated as follows:
[0088] N val =0.1·N train (4)
[0089] N train +N val =n fold ·N test (5)
[0090] Where, n fold This means randomly dividing the training set into n parts. fold There are n mutually exclusive subsets of similar size. For example, each time n is used... fold -1 subsets, randomly selected from nfold -90% of the trials in one subset are used as the training set, the remaining 10% as the validation set, and the remaining subset as the test set. Repeat n times. fold Each time, a different version of myself is chosen as the test set, ultimately resulting in n. fold There are n evaluation results. fold The average of the evaluation results is used as the final evaluation index for the EEG signal classification model.
[0091] As an example, the mode decomposition matrix is h. Where, N imf N represents the number of different frequency combinations to be decomposed. t The number of sampling points; the real part of the mode decomposition matrix h. r From the interval The imaginary part of the mode decomposition matrix h is obtained by random sampling from a uniform distribution. i The mode decomposition matrix h is obtained by random sampling from a uniform distribution in the interval [-π, π], and is calculated as follows:
[0092] h = h r ⊙cos(h i )+ih r ⊙sin(h i (6)
[0093] Where ⊙ represents the Hadema product and i is the imaginary part.
[0094] A brainwave signal classification model is constructed, which includes a mode decomposition matrix, a convolutional neural network, and a fully connected layer; the mode decomposition matrix with propagable gradients is initialized.
[0095] For training the EEG signal classification model, see [link / reference]. 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 modality decomposition matrix is iteratively updated using the backpropagation of the center frequency band loss, bandwidth loss, reconstruction loss, and classification loss. The parameters of the convolutional neural network and the fully connected layer are iteratively updated using the backpropagation of the classification loss. The parameters include 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 iteration, the gradient is calculated for each mutually exclusive subset, and the model parameters, including weights and biases, are updated. Then, adaptive mode decomposition is performed, followed by feature extraction using a convolutional neural network, and finally, the classification result is output through a fully connected layer.
[0098] As one possible implementation, the classification loss is denoted as loss. cls The cross-entropy loss between the classification result output by the fully connected layer and the actual class is calculated as follows:
[0099]
[0100] Where, N n N represents the total number of categories in the original EEG signal dataset. train y represents the number of trials performed on the training set under a certain category. a,c p represents the category of an element in the training set. a.c This represents the probability predicted by an EEG signal classification model for a given element.
[0101] As one possible implementation, the center band loss is denoted as... It is obtained through the following calculation:
[0102]
[0103] Where, N imf N represents the number of different frequency combinations desired for decomposition. c N represents the number of leads in the original EEG signal dataset. n N represents the total number of categories in the original EEG signal dataset. train θ represents the number of trials performed on the training set under a certain category. a,b,c,i and θ a,b,c,j θ represents the center frequency 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 errors; i and j represent different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset; where θ a,b,c,i It is obtained through the following calculation: For a certain element in the training set, For w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive mode decomposition is the element in the multimodal frequency domain positive frequency EEG signal subset.
[0104] As one possible implementation, the bandwidth loss is denoted as loss. band It is obtained by calculation as follows:
[0105]
[0106] Where, Ntrain N represents the number of trials performed on the training set for a given category. imf N represents the number of different frequency combinations desired for decomposition. n N represents the total number of categories in the original EEG signal dataset. c N represents the number of leads in the original EEG signal dataset; t θ is the number of sampling points for each element in the original EEG signal dataset. d The values are {1,2,…N} t};θ a,b,c,i w represents the center frequency of different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset. ′ a,b,c,i Elements in the multimodal frequency domain positive frequency EEG signal subset. Where, θ a,b,c,i The following calculation was performed:
[0107]
[0108] For a certain element in the training set, For w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive mode decomposition is the element in the multimodal frequency domain positive frequency EEG signal subset.
[0109] Bandwidth loss tends to generate modes that conform to narrowband conditions.
[0110] As one possible implementation, the reconstruction loss is denoted as loss. org It is obtained by calculation as follows:
[0111]
[0112] N train N represents the number of trials performed on the training set for a given category. n N represents the total number of categories in the original EEG signal dataset. c The number of leads in the original EEG signal dataset; For an element in the training set; N imf w′ represents the number of different frequency combinations desired for decomposition. a,b,c,i Elements in the multimodal frequency domain positive frequency EEG signal subset. Calculate N in the frequency domain imf The sum of the modes and the mean square error of the original signal are used to reduce the energy loss of the original signal after the linear superposition of different modes.
[0113] As one possible implementation, training the EEG signal classification model based on each mutually exclusive subset includes the following sub-steps:
[0114] Normalize the mutually exclusive subsets to obtain normalized mutually exclusive subsets;
[0115] By adaptively decomposing the elements of the normalized mutually exclusive subset using the modality decomposition matrix, a subset of positive frequency EEG signals in the multimodal frequency domain is obtained, where the modality is a combination of different frequencies. Based on the elements in the subset of positive frequency EEG signals in the multimodal frequency domain, the center band loss, bandwidth loss, and reconstruction loss are calculated. By utilizing the conjugate symmetry of positive and negative frequencies, the negative frequencies of the elements in the subset of positive frequency EEG signals in the multimodal frequency domain are recovered, and a frequency domain-time domain transformation is performed to obtain a subset of time-domain EEG signals in the multimodal frequency domain.
[0116] As one possible implementation, the normalized mutual exclusion subset includes multiple normalized elements. The elements in the normalized mutual exclusion subset are adaptively decomposed using a mode decomposition matrix, including the following steps:
[0117] Each normalized element is copied and expanded to the same dimension as the modality decomposition matrix, and then multiplied element by element with the modality decomposition matrix to obtain the initial multimodal EEG signal.
[0118] The negative frequency of the initial multimodal EEG signal is recovered by utilizing the conjugate symmetry of positive and negative frequencies, and the full frequency spectrum is obtained based on the negative frequency and the positive frequency 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 the reconstructed spectrum.
[0120] The reconstructed spectrum is transformed from the frequency domain to the time domain to obtain the time domain signal;
[0121] The non-periodic extended portion of the time-domain signal is retained to obtain the multimodal time-domain signal, which is composed of multiple multimodal time-domain signals to form a subset of multimodal time-domain EEG signals.
[0122] Intermodulate the dimension of the number of leads in the subset of multimodal time-domain EEG signals with the dimension of the number of different frequency combinations to be decomposed in the modality decomposition matrix;
[0123] The dimension of the number of element sampling points in the downsampled multimodal time-domain EEG signal subset;
[0124] The downsampled subset of multimodal time-domain EEG signals is input into a convolutional neural network for feature extraction, and then the classification result is output through a fully connected layer to calculate the classification loss function.
[0125] The following uses the i-th subset Let's take an example to illustrate the training phase.
[0126] First, the mutually exclusive subsets are normalized. The normalized mutually exclusive subsets are obtained by the following calculation:
[0127]
[0128] Wherein, the covariance matrix
[0129] Cov(·) represents the covariance. Representing a subset Expectations for The real part, for The imaginary part of , where γ and β are the parameters to be learned.
[0130] Then, the normalized mutually exclusive subsets are adaptively decomposed using the mode decomposition matrix. The elements in the normalized mutual exclusion subset include multiple normalized elements. The elements in the normalized mutual exclusion subset are adaptively decomposed using the mode decomposition matrix, including the following steps:
[0131] First, the normalized mutual exclusion subsets are... elements in Decomposed into different modes, in The decomposed modes are obtained through the following calculations:
[0132]
[0133] Where expon(·) will store the elements Copying and extending to the same dimension as the mode decomposition matrix h yields... For w imf Zero-padding yields the initial multimodal EEG signal. For example, the zero-padding method is as follows:
[0134]
[0135] Then, the initial multimodal EEG signal w is recovered using the conjugate symmetry of positive and negative frequencies. imfpad The negative frequency is used to obtain the full-frequency spectrum w′ based on the negative frequency and the positive frequency of the initial multimodal EEG signal. imfpad :
[0136]
[0137] The full frequency spectrum w′ imfpad The low-frequency components in the 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 the reconstructed spectrum. The calculation is as follows:
[0138]
[0139] For the reconstructed spectrum w shift Perform a frequency-to-time domain transformation to obtain the time-domain signal. For example, the inverse fast Fourier transform is used to reconstruct the spectrum w. shift Perform a frequency-to-time domain transformation, and calculate as follows:
[0140]
[0141] Preserve the time-domain signal x ifft The non-periodic extension portion of the signal yields multimodal time-domain EEG signals. Performing the above operation on each element in the mutually exclusive subset yields multiple multimodal time-domain EEG signals, which together constitute a subset of multimodal time-domain EEG signals.
[0142] A subset of multimodal time-domain EEG signals X i imf The dimension N of the number of leads c The dimension N is the number of different frequency combinations expected to be decomposed in the mode decomposition matrix. imf Interchange: Downsampled multimodal time-domain EEG signal subset X i imf The dimension N of the number of element sampling points t Specifically Downsampling: The downsampled subset of multimodal time-domain EEG signals is input into a convolutional neural network for feature extraction, and then the classification result is output through a fully connected layer to calculate the classification loss.
[0143] The mode decomposition matrix is updated iteratively using backpropagation to calculate the center frequency loss, bandwidth loss, reconstruction loss, and classification loss based on the mutually exclusive subset. The parameters of the convolutional neural network and the fully connected layer are updated iteratively using backpropagation 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, 64 filters, and N convolutional kernels. c ×(N t / 4), with a step size of 1×1; a batch normalization layer; a random deactivation layer with a probability p=0.5 for randomly discarding neurons; and an average pooling layer with a size of 1×8 and a step size of 1×8.
[0146] sequentially n bn Perform the above operations on mutually exclusive subsets of similar size, and synchronously update the covariance matrix V and the expectation E. The update method is as follows:
[0147]
[0148] Where i and k represent distinct mutually exclusive subsets.
[0149] After each training session, the EEG signal classification model is frozen and not backpropagated; a validation set is then used. Verify the discriminative performance of the EEG signal classification model, save the parameters of the EEG signal classification model with the best discriminative performance, and evaluate the EEG signal classification model with the best discriminative performance parameters using a test set.
[0150] As an example, the test set
[0151] Input into the model for testing, and then... elements in Let's take an example to illustrate the evaluation process. in Output the confidence score for each category separately, then sum the confidence scores for each category across k trials, and take the category with the highest confidence score as the classification result. The classification result is obtained as follows:
[0152]
[0153] in This represents the confidence score of each category output by the model, k represents the number of trials to be stacked, and argmax is the decision category with the highest confidence score.
[0154] Secondly, embodiments of the present invention provide an application of an EEG signal classification model for weak asymmetric visual stimuli. The EEG signal classification model obtained by training using the training method of the EEG signal classification model for weak asymmetric visual stimuli provided in 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 trained using the training method provided in this embodiment is configured in the EEG signal processing system, and the EEG signal processing system is used to classify EEG signals. Data from 14 subjects were collected, with each subject containing 4×1800×9×250, corresponding to the EEG category, number of trials, number of leads, and number of sampling points, respectively. Figures 5 to 7The results show that, under 3-fold, 5-fold, and 10-fold cross-validation, the present application has a significant advantage in discrimination performance when all trials are superimposed. Figures 8 to 10 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 advantageous and all trials are superimposed. Figure 11 To compare the performance of different algorithms under 1-3 trials in 9 leads (training and validation using only 1-3 trials), the results show that under 3-fold, 5-fold, and 10-fold cross-validation, the proposed method has a significant advantage in classification accuracy when all trials are superimposed in the low-trial scenario.
[0156] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, the disclosure, and the description of the drawings, in carrying out the claimed invention. In this specification, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple components. A single processor or other unit can implement several of the functions listed in the specification. While certain measures are described in different embodiments, this does not mean that these measures cannot be combined to produce good results.
[0157] Although the invention has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made therein without departing from the spirit and scope of the invention. Accordingly, this specification and drawings are merely illustrative of the invention and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if such modifications and modifications fall within the scope of the invention and its equivalents, the invention is also intended to include such modifications and modifications.
Claims
1. A training method for a classification model of EEG signals from weak asymmetric visual stimuli, characterized in that, Includes the following steps: The original EEG signal is divided into segments to obtain the original EEG signal dataset. The original EEG signal dataset includes multiple elements. The positive frequency signal in the frequency domain corresponding to each element is obtained. The positive frequency signal in the frequency domain is composed of multiple positive frequency signals. The frequency domain positive frequency signal dataset is divided into a training set, a test set, and a validation set according to a preset ratio; A brainwave signal classification model is constructed, which includes a mode decomposition matrix, a convolutional neural network, and a fully connected layer; the mode decomposition matrix with propagable gradients is initialized. The training of the 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 mode 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 layers using backpropagation of the classification loss, including the weights and biases. Repeat this step until all mutually exclusive subsets have been trained, which is counted as one round of training. A total of N rounds of training are conducted, where N≥2. After each training round, the EEG signal classification model is frozen without backpropagation. The discrimination performance of the EEG signal classification model is verified using a validation set, and the parameters of the EEG signal classification model with the best discrimination performance are saved. The EEG signal classification model with the best discrimination performance parameters is evaluated using a test set.
2. The training method for the EEG signal classification model of weak asymmetric visual stimulation according to claim 1, characterized in that, Training the EEG signal classification model based on each mutually exclusive subset includes the following sub-steps: Normalize the mutually exclusive subsets to obtain normalized mutually exclusive subsets; By adaptively decomposing the elements of the normalized mutually exclusive subset using the modality decomposition matrix, a subset of positive frequency EEG signals in the multimodal frequency domain is obtained, where the modality is a combination of different frequencies. Based on the elements in the subset of positive frequency EEG signals in the multimodal frequency domain, the center band loss, bandwidth loss, and reconstruction loss are calculated. By utilizing the conjugate symmetry of positive and negative frequencies, the negative frequencies of the elements in the subset of positive frequency EEG signals in the multimodal frequency domain are recovered, and a frequency domain-time domain transformation is performed to obtain a subset of time-domain EEG signals in the multimodal frequency domain. Intermodulate the dimension of the number of leads in the subset of multimodal time-domain EEG signals with the dimension of the number of different frequency combinations to be decomposed in the modality decomposition matrix; The dimension of the number of element sampling points in the downsampled multimodal time-domain EEG signal subset; The downsampled subset of multimodal time-domain EEG signals is input into a convolutional neural network for feature extraction, and then the classification result is output through a fully connected layer to calculate the classification loss. The mode decomposition matrix is updated iteratively using backpropagation to calculate the center frequency loss, bandwidth loss, reconstruction loss, and classification loss based on the mutually exclusive subset. The parameters of the convolutional neural network and the fully connected layer are updated iteratively using backpropagation of the classification loss, including weights and biases.
3. The training method for the EEG signal classification model of weak asymmetric visual stimulation according to claim 2, characterized in that, The normalized mutually exclusive subset includes multiple normalized elements. The adaptive decomposition of the elements in the normalized mutually exclusive subset using the mode decomposition matrix includes the following steps: Each normalized element is copied and expanded to the same dimension as the modality decomposition matrix, and then multiplied element by element with the modality decomposition matrix to obtain the initial multimodal EEG signal. The negative frequency of the initial multimodal EEG signal is recovered by utilizing the conjugate symmetry of positive and negative frequencies, and the full frequency spectrum is obtained based on the negative frequency and the positive frequency 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 the reconstructed spectrum. The reconstructed spectrum is transformed from the frequency domain to the time domain to obtain the time domain signal; The non-periodic extended portion of the time-domain signal is retained to obtain the multimodal time-domain signal, which is composed of multiple multimodal time-domain signals to form a subset of multimodal time-domain EEG signals.
4. The training method for the EEG signal classification model of weak asymmetric visual stimulation according to claim 1, characterized in that, The mode decomposition matrix is h. Where, N imf N represents the number of different frequency combinations to be decomposed. t h is the number of sampling points; h is the real part of the matrix h. r From the interval Obtained by random sampling from a uniform distribution; the imaginary part of h is... i h is obtained by random sampling from a uniform distribution in the interval [-π, π], and is calculated as follows: h=h r ⊙cos(h i )+ih r ⊙sin(h i ) Where ⊙ is the Hadema product and i is the imaginary part.
5. The training method for the EEG signal classification model of weak asymmetric visual stimulation according to claim 1, characterized in that, Obtaining the positive frequency signal in the frequency domain corresponding to each element specifically includes: Periodically extend the elements to obtain the extended elements; Perform a time-domain to 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 the migrated spectrum; The positive frequency of the transferred spectrum is retained to obtain the positive frequency component of the extended element spectrum. Multiplying the positive frequency component by two yields the frequency domain positive frequency signal corresponding to each element.
6. The training method for the EEG signal classification model of weak asymmetric visual stimulation according to claim 1, characterized in that, Classification loss is denoted as loss cls It is obtained by calculation as follows: Where, N n N represents the total number of categories in the original EEG signal dataset. train y represents the number of trials performed on the training set under a certain category. a,c p represents the category of an element in the training set. a.c This represents the probability predicted by an EEG signal classification model for a given element.
7. The training method for the EEG signal classification model of weak asymmetric visual stimulation according to claim 1, characterized in that, Center band loss is denoted as It is obtained through the following calculation: Where, N imf N represents the number of different frequency combinations to be decomposed. c N represents the number of leads in the original EEG signal dataset. n N represents the total number of categories in the original EEG signal dataset. train θ represents the number of trials performed on the training set under a certain category. a,b,c,i and θ a,b,c,j θ represents the center frequency 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 errors; i and j represent different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset; where θ a,b,c,i It is obtained through the following calculation: For a certain element in the training set, For w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive mode decomposition is the element in the multimodal frequency domain positive frequency EEG signal subset.
8. The training method for the EEG signal classification model of weak asymmetric visual stimulation according to claim 1, characterized in that, Bandwidth loss is denoted as loss band It is obtained by calculation as follows: Where, N train N represents the number of trials performed on the training set for a given category. imf N represents the number of different frequency combinations to be decomposed. n N represents the total number of categories in the original EEG signal dataset. c N represents the number of leads in the original EEG signal dataset; t θ is the number of sampling points for each element in the original EEG signal dataset. d The values are {1,2,…N} t };θ a,b,c,i w′ represents the center frequency of different frequency combinations of elements in the multimodal frequency domain positive frequency EEG signal subset. a,b,c,i Elements in the multimodal frequency domain positive frequency EEG signal subset. Where, θ a,b,c,i It is obtained through the following calculation: For a certain element in the training set, For w a,b,c The multimodal frequency domain positive frequency EEG signal obtained through adaptive mode decomposition is the element in the multimodal frequency domain positive frequency EEG signal subset.
9. The training method for the EEG signal classification model of weak asymmetric visual stimulation according to claim 1, characterized in that, Reconstruction loss is denoted as It is obtained through the following calculation: N train N represents the number of trials performed on the training set for a given category. n N represents the total number of categories in the original EEG signal dataset. c The number of leads in the original EEG signal dataset; N is an element in the training set; imf w′ represents the number of different frequency combinations desired for decomposition. a,b,c,i Elements in the multimodal frequency domain positive frequency EEG signal subset.
10. Application of a brainwave signal classification model for weak asymmetric visual stimuli, characterized in that, The EEG signal classification model trained using the training method of the weak asymmetric visual stimulation classification model 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 emotion classification method based on electroencephalogram space-time-frequency characteristics and eye movement characteristics
CN115099311A
Adaptive continuous variation electroencephalogram mode decomposition method based on narrowband constraint enhancement
CN117462150A