A cross-subject EEG signal classification method based on channel correlation reconstruction
By using a data augmentation method based on channel correlation reconstruction to change the channel correlation of training samples and generate new domains, the problem of poor performance of cross-subject EEG signal classification models on new subjects is solved, achieving efficient cross-subject EEG signal classification and promoting the application of brain-computer interfaces.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF SCI & TECH OF CHINA
- Filing Date
- 2024-07-08
- Publication Date
- 2026-06-30
AI Technical Summary
Existing cross-subject EEG signal classification models perform poorly on new subjects, resulting in an excessive calibration burden for users and making it difficult to achieve efficient cross-subject brain-computer interface applications.
A data augmentation method based on channel correlation reconstruction is adopted. By constructing a neural network model, a probabilistic mixed feature vector matrix is generated using the cross-source domain covariance matrix. This changes the channel correlation of the training samples, generates a new domain to increase diversity, and improves the domain generalization ability.
It significantly improves the accuracy of cross-subject EEG signal classification without the need for calibration data, reduces the calibration burden on new subjects, and promotes the practical application of brain-computer interfaces.
Smart Images

Figure CN118861769B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electroencephalogram (EEG) signal processing, specifically a cross-subject EEG signal classification method based on channel correlation reconstruction. Background Technology
[0002] Brain-computer interfaces (BCIs) utilize an individual's neural activity to establish a direct communication channel between the brain and external devices. Due to their portability and safety, electroencephalography (EEG) is a commonly used method for recording neural signals in BCI applications. By classifying and decoding EEG signals, users can control external devices through BCIs without engaging in any physical activity. This is particularly beneficial for users with severe motor impairments, who can improve their quality of life by controlling assistive technologies such as text input systems or wheelchair control systems through BCIs.
[0003] In brain-computer interface applications, improving the classification performance of EEG signals is crucial. In recent years, deep learning-based algorithms have demonstrated outstanding performance in EEG signal classification. However, maintaining the high performance of these deep learning methods requires training the model using individual calibration data, leading to a time-consuming and user-unfriendly data acquisition process. To address this issue, some studies have introduced transfer learning into EEG signal classification tasks. Transfer learning is a widely adopted technique that leverages existing subject data (source domain) to alleviate the calibration burden on new subjects (target domain), or even achieve zero calibration burden for new subjects. However, due to significant differences among subjects, cross-subject EEG signal classification models trained using existing subject data perform poorly on unseen new subject EEG signal data. Therefore, effectively learning task-related knowledge (domain-invariant features) from source domain data is an effective way to improve cross-subject EEG signal classification models. Summary of the Invention
[0004] The present invention addresses the shortcomings of the prior art by proposing a cross-subject EEG signal classification method based on channel correlation reconstruction. This method aims to enhance the diversity of source domain data and improve the ability to learn domain-invariant features from the source domain, thereby improving the classification performance of cross-subject EEG signals.
[0005] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0006] The present invention provides a cross-subject classification method for EEG signals based on channel correlation reconstruction, characterized by the following steps:
[0007] Step 1: Acquire EEG signal data from multiple source domains and preprocess the EEG signal data using a bandpass filter to form a preprocessed source domain dataset;
[0008] Step 2: Building an artificial neural network model ,in, express Network parameters;
[0009] Step 3: Select a mini-batch sample set containing B samples from the preprocessed source domain dataset. ,in, The i-th training sample, N c For the number of channels, d represents the number of sampling points contained in each channel. s F represents the length of the training samples. s Indicates the sampling rate of the data;
[0010] Step 4: Use a data augmentation method based on channel correlation reconstruction to augment the mini-batch sample set. Reconstruction is performed to obtain the reconstructed mini-batch sample set. ;in, This represents the i-th training sample after reconstruction.
[0011] Step 5: Based on Neural networks Network parameters Update until network parameters are updated. The model converges until a cross-subject EEG signal classification model is obtained, which is used to classify and identify EEG signal data.
[0012] This invention provides a cross-subject EEG signal classification method based on channel correlation reconstruction, characterized in that the data augmentation method based on channel correlation reconstruction in step 4 includes:
[0013] Step 4.1: Calculate X using equation (1) i covariance matrix :
[0014] (1)
[0015] In equation (1), T represents the matrix transpose; It is X i The channel average value;
[0016] Step 4.2: Use equation (2) to analyze the covariance matrix. Decompose:
[0017] (2)
[0018] In equation (2), It is by The matrix composed of eigenvectors, It is the i-th diagonal matrix, and the diagonal elements are eigenvalues; , It is an identity matrix;
[0019] Step 4.3: Use equation (3) to obtain channel-correlation-free samples. :
[0020] (3)
[0021] Step 4.4: Obtain using equation (4) Mixed eigenvector matrix :
[0022] (4)
[0023] In equation (4), It is the mixing ratio, and it is sampled from a Beta distribution. , The parameter representing the Beta distribution; U j For small batch sample sets The j-th training sample X is randomly selected from the data. j eigenvector matrix;
[0024] Step 4.5: Obtain the reconstructed i-th training sample using equation (5). :
[0025] (5)
[0026] The present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the cross-subject EEG signal classification method based on channel correlation reconstruction, and the processor is configured to execute the program stored in the memory.
[0027] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the method for classifying cross-subject EEG signals based on channel correlation reconstruction.
[0028] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0029] 1. The cross-subject EEG signal classification method of the present invention enables the cross-subject EEG signal classification model to show good cross-subject classification performance on new subject EEG signal data without the need for calibration data, thereby reducing the calibration burden on new subjects and promoting the application of brain-computer interfaces in the real world.
[0030] 2. This invention proposes a novel data augmentation method called channel correlation reconstruction, which reconstructs training samples using a probabilistic mixed eigenvector matrix derived from the cross-source domain covariance matrix. This process alters the channel correlation of the training samples, thereby implicitly creating a new synthetic domain. By increasing the diversity of source domains, this method enhances the domain generalization ability of cross-subject EEG signal classification models and improves their classification performance on new subject EEG signal data. Attached Figure Description
[0031] Figure 1 This is a flowchart of the method of the present invention;
[0032] Figure 2 The overall architecture of the neural network model built for this invention;
[0033] Figure 2a This refers to the multi-scale module in the neural network model constructed in this invention.
[0034] Figure 2b This refers to the Transformer module in the neural network model constructed in this invention.
[0035] Figure 2c This refers to the multi-head attention mechanism module in the Transformer module used in this invention;
[0036] Figure 2d This refers to the feedforward neural network module in the Transformer module used in this invention;
[0037] Figure 3 This is a schematic diagram of the data augmentation method based on channel correlation reconstruction proposed in this invention. Detailed Implementation
[0038] In this embodiment, a cross-subject EEG signal classification method based on channel correlation reconstruction (RCC) is described. This method uses RCC to reconstruct mini-batch samples, implicitly altering the channel correlation of the samples to generate new domains, thereby increasing domain diversity and enhancing the domain generalization ability of the cross-subject EEG signal classification model. This, in turn, improves the classification performance of the cross-subject EEG signal classification model on new subject EEG signal data. Specifically, as... Figure 1As shown, proceed as follows:
[0039] Step 1: Acquire EEG signal data from multiple source domains and preprocess the EEG signal data using a bandpass filter to form a preprocessed source domain dataset;
[0040] In practice, the method was tested on a publicly available steady-state visual evoked potential dataset benchmark. In the dataset, one subject equals one domain, and leave-one-out cross-validation was used in this embodiment. The dataset was divided into 5 groups; subjects in one group were used as target domain subjects to test the model performance, while subjects in the other groups were used as source domain subjects to train the model, and this was repeated 5 times.
[0041] Step 2: Building an artificial neural network model ,in, express Network parameters;
[0042] In specific implementation, the neural network model used in this invention The CNN-Former model proposed by Ding et al. in the paper "A Novel Data Augmentation Approach Using Mask Encoding for Deep Learning-BasedAsynchronous SSVEP-BCI"; the neural network architecture built is as follows Figure 2 As shown in the figure, the input and features are represented by d s = 1 s as an example; in addition, "kernel" represents the kernel size, "step size" represents the stride, "BN" represents batch normalization, "Activation" represents the activation function and in this invention the activation function is "ELU", "Dense" represents a fully connected layer, "padding=same" means to use zero padding, and "padding=valid" means not to use zero padding; Figure 2 For the overall architecture of the neural network model, due to the length d of the input data... s For 1 second, the sampling rate F s With a frequency of 250 Hz and 9 channels, the input data shape is as follows: Reshaped into First, the input data is processed through a convolutional kernel. The convolutional layers allow each output unit to contain spatial information from nine channels; then, the extracted features are passed through a multi-scale module, such as... Figure 2a As shown, convolutional kernels of different sizes, such as , and The aim is to learn feature information at different time scales; next, using features... A convolutional layer with a convolutional kernel; a large convolutional kernel ensures that each output unit contains sufficient temporal information; then the features are passed through a Transformer module, such as... Figure 2b As shown; the Transformer module contains a positional encoder and an encoder consisting of N identical layers; each layer has two sub-layers: a multi-head attention mechanism ( Figure 2c ) and fully connected feedforward networks ( Figure 2d Dropout is applied after the multi-head attention mechanism and the fully connected feedforward network. For each sub-layer, dropout is first applied to the output, then the input and output of the sub-layer are added together using residual connections, and then layer normalization is applied. The Transformer module aims to learn the global temporal dependencies of features. The features after passing through the Transformer module are flattened into vectors, and then passed through a fully connected layer with a softmax activation function to obtain scores for 40 categories. The category with the highest score is determined as the predicted category. In this invention, the parameters in the Transformer module are configured as follows: N = 2 and dropout = 0.1; in addition, dropout1 = 0.5 and dropout2 = 0.95.
[0043] Step 3: During training, the artificial neural network Each parameter iteration requires selecting a mini-batch of samples containing B samples from the preprocessed source domain dataset. ,in, The i-th training sample, N c For the number of channels, d represents the number of sampling points contained in each channel. s F represents the length of the training samples. s Indicates the sampling rate of the data;
[0044] In practice, the artificial neural network model requires B=512 samples for each iteration to update the network parameters. The random selection process for samples is as follows: first, a subject from the source domain is randomly selected; then, a segment of original data corresponding to a category is randomly selected; finally, a segment with N sampling points is randomly extracted from this segment of original data. s The data is used as training samples; the sampling rate F of the dataset. s 250 Hz; d s In two verification experiments, the time was set to 1 s and 2 s respectively; this invention uses data from 9 channels: Pz, PO5, PO3, POz, PO4, PO6, O1, Oz, and O2, therefore the number of EEG channels N is... c= 9; Since the signal-to-noise ratio of signals above 50 Hz is relatively low, the filtering range of the bandpass filter in this invention is 6-50 Hz.
[0045] Step 4: As Figure 3 As shown, a data augmentation method based on channel correlation reconstruction is used to augment mini-batch sample sets. Reconstruction is performed to obtain the reconstructed mini-batch sample set. ;in, This represents the i-th training sample after reconstruction; the specific steps of RCC are as follows:
[0046] Step 4.1: Calculate X using equation (1) i covariance matrix :
[0047] (1)
[0048] In equation (1), T represents the matrix transpose; It is X i The channel average value;
[0049] Step 4.2: Use equation (2) to analyze the covariance matrix. Decompose:
[0050] (2)
[0051] In equation (2), It is by The matrix composed of eigenvectors, It is the i-th diagonal matrix, and the diagonal elements are eigenvalues; , It is an identity matrix;
[0052] Step 4.3: Use equation (3) to obtain channel-correlation-free samples. :
[0053] (3)
[0054] Step 4.4: Obtain using equation (4) Mixed eigenvector matrix :
[0055] (4)
[0056] In equation (4), It is the mixing ratio, and it is sampled from a Beta distribution. , The parameters represent the Beta distribution; in practice, The value was set to 0.3; Uj For small batch sample sets The j-th training sample X is randomly selected from the data. j eigenvector matrix;
[0057] Step 4.5: Obtain the reconstructed i-th training sample using equation (5). :
[0058] (5)
[0059] Step 5: Based on Neural networks Network parameters Update.
[0060] Step 6: Repeat steps 3, 4, and 5 until the network parameters are correct. The process continues until convergence, resulting in a cross-subject EEG signal classification model for classifying and recognizing EEG signal data. In practice, one model requires 40,000 iterations, therefore steps 3, 4, and 5 need to be repeated a total of 40,000 times.
[0061] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.
[0062] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.
[0063] To fully verify the effectiveness of the proposed cross-subject EEG signal classification method based on channel correlation reconstruction, it was compared with a cross-subject EEG signal classification method without channel correlation reconstruction (referred to as the Baseline). Experiments were conducted on the publicly available steady-state visual evoked potential dataset benchmark, with 35 participants. The dataset involved a 40-classification task. The classification accuracy of the EEG signals was used as the evaluation metric, defined as: classification accuracy for each participant = number of correctly classified samples / total number of samples. 100% represents the average classification accuracy across a single dataset. The average classification accuracy is defined as the sum of the classification accuracies of each participant on that dataset divided by the number of participants on that dataset. In the experiment, the data length is d. s The time was set to 1s and 2s respectively, and the experimental results are shown in Table 1.
[0064] Table 1. Comparison of experimental results from different methods (average classification accuracy) (Standard deviation)
[0065]
[0066] This invention, when faced with a limited number of source domains, modifies the channel correlation of samples through a proposed channel correlation reconstruction data augmentation method. This implicitly generates new domains, increases domain diversity, and enhances the domain generalization ability of the cross-subject EEG signal classification model, thereby improving the classification performance of the cross-subject EEG signal classification model on new subject EEG signal data. Results show that the cross-subject EEG signal classification method based on channel correlation reconstruction proposed in this invention can achieve higher cross-subject EEG signal classification accuracy, promoting the real-world application of brain-computer interfaces.
Claims
1. A method for cross-subject classification of electroencephalogram signals based on channel correlation reconstruction, characterized in that, The procedure is as follows: Step 1: Acquire EEG signal data from multiple source domains and preprocess the EEG signal data using a bandpass filter to form a preprocessed source domain dataset; Step 2: Building an artificial neural network model Artificial neural network model For the CNN-Former model, where, express Network parameters; Step 3: Select a mini-batch sample set containing B samples from the preprocessed source domain dataset. ,in, The i-th training sample, N c For the number of channels, d represents the number of sampling points contained in each channel. s F represents the length of the training samples. s Indicates the sampling rate of the data; Step 4: Use a data augmentation method based on channel correlation reconstruction to augment the mini-batch sample set. Reconstruction is performed to obtain the reconstructed mini-batch sample set. ;in, This represents the i-th training sample after reconstruction. The data augmentation method based on channel correlation reconstruction in step 4 includes: Step 4.1: Calculate X using equation (1) i covariance matrix : (1) In equation (1), T represents the matrix transpose; It is X i The channel average value; Step 4.2: Use equation (2) to analyze the covariance matrix. Decompose: (2) In equation (2), It is by The matrix composed of eigenvectors, It is the i-th diagonal matrix, and the diagonal elements are eigenvalues; , It is an identity matrix; Step 4.3: Use equation (3) to obtain channel-correlation-free samples. : (3) Step 4.4: Obtain using equation (4) Mixed eigenvector matrix : (4) In equation (4), It is the mixing ratio, and it is sampled from a Beta distribution. , The parameter representing the Beta distribution; U j For small batch sample sets The j-th training sample X is randomly selected from the data. j eigenvector matrix; Step 4.5: Obtain the reconstructed i-th training sample using equation (5). : (5) Step 5: Based on Neural networks Network parameters Update until network parameters are updated. The model converges until a cross-subject EEG signal classification model is obtained, which is used to classify and identify EEG signal data.
2. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the cross-subject EEG signal classification method based on channel correlation reconstruction as described in claim 1, and the processor is configured to execute the program stored in the memory.
3. A computer-readable storage medium storing a computer program, characterized in that, The computer program, when run by the processor, executes the steps of the cross-subject EEG signal classification method based on channel correlation reconstruction as described in claim 1.