Meta-decoupling based cross-subject motor imagery brain-computer interface non-calibration decoding method and system
Patent Information
- Application Number
- CN202611159361.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-01
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-08-01
AI Technical Summary
[0005]为了改善跨被试MI-BCI无校准解码中存在的个体差异大及目标被试不可见导致无法适配数据分布问题,本发明提供基于元解耦的跨被试运动想象脑机接口无校准解码方法及系统
[0047] First, it requires no labeled or unlabeled calibration data from the target subjects, thus meeting the needs of truly uncalibrated BCI applications. Second, it utilizes not only task-related information shared among subjects but also subject-specific information related to brain decoding task labels, avoiding the loss of individual information caused by simple domain-invariant learning. This solves the problem that existing technologies often overlook the existence of effective components related to motor imagery labels in subject-specific information, making it more suitable for motor imagery tasks with significant individual differences. Third, it reduces the coupling relationship between the two types of features through covariance minimization constraints, improving the interpretability of feature representation. Fourth, it simulates the subject distribution shift during real testing by dividing the metasource domain and metatarget domain, thereby enhancing the model's generalization ability to unknown new subjects.
Smart Images

Figure CN122673771B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of brain-computer interface signal processing and motor imagery decoding technology, specifically to a calibration-free decoding method and system for cross-subject motor imagery brain-computer interface based on meta-decoupling. Background Technology
[0002] Motor imagery (MI) is a typical active control paradigm in brain-computer interfaces (BCIs). Subjects can elicit corresponding brain electrical activity simply by imagining movements of their left hand, right hand, foot, or tongue. The system then recognizes the patterns and converts them into control commands. Electroencephalograms (EEGs) are widely used in this research due to their non-invasiveness, low cost, and high temporal resolution. However, they exhibit significant non-stationarity and individual variability: when different subjects perform the same task, the data distribution varies significantly due to factors such as brain structure, imagery strategies, attention, and electrode placement, leading to the failure of traditional BCI decoding models. Therefore, traditional motor imagery-based brain-computer interface (MI-BCI) systems typically require new users to complete a lengthy calibration process to collect data and adjust model parameters. This time-consuming and labor-intensive process limits the rapid deployment and practical application of the system.
[0003] Existing cross-subject motor imagery decoding methods mostly employ transfer learning or domain adaptation, using a small amount of target subject calibration data to fine-tune the model or align its distribution. While these methods can reduce calibration time, they still rely on target subject data. In real-world BCI applications such as early stroke rehabilitation assessment, security control, military applications, or lie detection, target subject data is difficult to obtain in advance. Therefore, there is a need to research calibration-free decoding methods that do not rely on any target subject calibration data, enabling brain-computer interface decoding systems to quickly adapt to new subjects.
[0004] Domain generalization methods can train models using only multiple existing source domain participant data and directly apply them to unseen target participants. Existing domain generalization methods for uncalibrated brain-computer interfaces (BCIs) often focus on extracting domain-invariant features shared among participants while discarding participant-specific features, easily overlooking potentially relevant components of participant-specific information that are relevant to motor imagery labels. It is generally assumed that different participants have individual differences in motor imagery performance styles, movement habits, and brain region activation patterns, but some of these differences may be helpful in motor imagery classification, especially when significant individual differences exist. Therefore, how to simultaneously extract both participant-shared and participant-specific information and utilize only available source domain participant data to facilitate uncalibrated decoding is a crucial issue in current cross-participant MI-BCI research. Summary of the Invention
[0005] To address the issues of significant individual variability and the inability to adapt data distribution due to the unobservable target subject in cross-subject MI-BCI calibration-free decoding, this invention provides a calibration-free decoding method and system for cross-subject motor imagery brain-computer interfaces based on meta-decoupling. This method first preprocesses and aligns the multi-source subject EEG data with Euclidean space distribution. Then, it constructs a subject information decoupling network, aiming to decouple EEG signal features into subject-invariant features reflecting task relevance between subjects and subject-specific features reflecting individual subject variability through domain adversarial training, identity classification training, and covariance minimization constraints. Simultaneously, it simulates the distribution shift of unknown target subjects through meta-learning, optimizing the subject-specific feature extractor to enhance the model's generalization ability to unknown target domains. Finally, the fused subject-invariant and subject-specific features are input into a motor imagery classifier to obtain the decoding results of the subject's EEG data. This aims to enable the model to complete cross-subject motor imagery decoding without using any target subject calibration data.
[0006] To achieve the above-mentioned technical objectives, the present invention provides the following technical solution:
[0007] A calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling specifically includes the following steps:
[0008] Source domain EEG data of subjects were collected, and the source domain EEG data were preprocessed and aligned with Euclidean space data distribution to obtain aligned EEG data.
[0009] Construct a subject information decoupling network, which includes a subject-invariant feature extractor, a subject-specific feature extractor, a first subject identity discriminator, a second subject identity discriminator, and a motor imagery classifier;
[0010] The subject-invariant feature extractor was used to extract subject-invariant features reflecting task relevance shared among subjects from aligned EEG data. The subject-invariant feature extractor was then trained in domain adversarial mode using a first subject identity discriminator and a gradient backpropagation layer.
[0011] The subject-specific feature extractor was used to extract subject-specific features reflecting individual differences from aligned EEG data, and the subject-specific feature extractor was trained for identity classification by a second subject identity discriminator.
[0012] In the process of domain adversarial training and identity classification training, a covariance minimization constraint is introduced to decouple the subject-invariant feature extractor and the subject-specific feature extractor during training.
[0013] The source domain subjects are divided into the meta-source domain and the meta-target domain. The meta-source domain simulates the subjects who have already been trained, and the meta-target domain simulates the subjects with unknown targets. The meta-learning strategy is optimized for the subject-specific feature extractor that has been decoupled and trained.
[0014] Subject-invariant features are re-acquired using a decoupled-trained subject-invariant feature extractor, and subject-specific features are re-acquired using a subject-specific feature extractor optimized by a meta-learning strategy. Subject-invariant features and subject-specific features are fused to obtain fused features, which are then input into a motor imagery classifier to obtain the predicted classification results of the subject's EEG signals.
[0015] Furthermore, the acquisition of source domain subject EEG data, the preprocessing of the source domain subject EEG data, and the alignment of the source domain subject EEG data with Euclidean space distribution to obtain aligned EEG data specifically involve:
[0016] Motor imagery EEG data were collected from N source domain subjects. The motor imagery EEG data were preprocessed, including: bandpass filtering, data segmentation, downsampling and standardization.
[0017] After preprocessing, the sample covariance matrix of each EEG data sample is calculated, and then the mean of the sample covariance matrices of all subjects in the same source domain is calculated to obtain the reference covariance matrix of the subjects in that source domain. The reference covariance matrix is used to whiten the EEG data samples to obtain aligned EEG samples.
[0018] Furthermore, the step of extracting subject-invariant features reflecting shared task relevance among subjects from aligned EEG data using a subject-invariant feature extractor, and then training the subject-invariant feature extractor against domain adversarial scenarios using a subject identity discriminator, specifically involves:
[0019] The aligned EEG data is then input into the subject invariant feature extractor. The invariant characteristics of the subjects were obtained. ;
[0020] Using the first subject's identity discriminator right Perform identity classification and output. The probability of belonging to each source domain participant is calculated, and the identity classification loss is calculated.
[0021] Perform domain adversarial training: Update the first subject's identity discriminator with the goal of minimizing the identity classification loss. The parameters, and in the subject-invariant feature extractor Compared with the first subject's identity discriminator A gradient inversion layer is added between the layers to invert the gradient of the identity classification loss and then backpropagate it to the input layer. ,renew The parameters; the formula for the domain adversarial training objective is expressed as:
[0022] ;
[0023] in, For the input EEG data sample, X represents the source domain participant identity label, and D represents the source domain participant identity label space. , These are the parameters of the subject invariant feature extractor and the first subject identity discriminator, respectively. The loss is based on the identity classification of subjects' invariant features; This represents the expectation over the joint distribution of data; This represents a minimax game.
[0024] Furthermore, the step of using a subject-specific feature extractor to extract subject-specific features reflecting individual differences from the aligned EEG data, and then training the subject-specific feature extractor for identity classification using a subject identity discriminator, specifically involves:
[0025] The aligned EEG data is then input into a subject-specific feature extractor. To obtain specific characteristics of the subjects ;
[0026] Using the second subject identity discriminator right Perform identity classification and output. The probability of belonging to each source domain participant is calculated, and the identity classification loss is calculated.
[0027] The second participant's identity discriminator is updated with the goal of minimizing the identity classification loss. The parameters are then used to backpropagate the gradient of the identity classification loss to... ,renew The parameters; the formula for the identity classification training objective is expressed as:
[0028] ;
[0029] in, For the input EEG data sample, X represents the source domain participant identity label, and D represents the source domain participant identity label space. , These are the parameters for the subject-specific feature extractor and the second subject identity discriminator, respectively. For identity classification loss based on specific characteristics of the participants; This represents the expectation over the joint distribution of data; This indicates minimization.
[0030] Furthermore, the specific steps for decoupling the subject-invariant feature extractor and the subject-specific feature extractor during domain adversarial training and identity classification training are as follows:
[0031] During domain adversarial training and identity classification training, invariant features of the subjects are calculated. With specific characteristics of the subjects The covariance matrix between The L2 norm of the covariance matrix is used as the decoupling loss. The formula is expressed as:
[0032] ;
[0033] in, Represents the matrix norm;
[0034] Perform decoupling training to minimize decoupling loss. With the goal of, The gradient of the identity classification loss and the gradient of the identity classification loss are simultaneously backpropagated to the subject identity discriminator, the subject invariant feature extractor, or the subject specific feature extractor, updating the discriminator and feature extractor parameters.
[0035] Furthermore, the process of dividing the source domain subjects into a meta-source domain and a meta-target domain, with the meta-source domain simulating existing trained subjects and the meta-target domain simulating unknown target subjects, and optimizing the meta-learning strategy for the decoupled trained subject-specific feature extractor, specifically involves:
[0036] Given For each of the source domains of the subjects, one source domain is selected as the meta-target domain in each training iteration. The remaining Each source domain is used as the meta-source domain. The training is performed iteratively between the source domain and the target domain until a preset number of rounds is reached and training stops.
[0037] In each training iteration, subject-invariant and subject-specific features are extracted and fused, then input into the motion imagery classifier to obtain the metasource domain. Minimize the motion imagery classification loss, update the subject information decoupled network, and obtain the temporary model parameters after one update; then, based on the temporary model parameters, perform another update in the meta-target domain. The meta-target domain motion imagery classification loss is calculated, and the subject-specific feature extractor is adjusted based on the meta-target domain motion imagery classification loss. The parameters.
[0038] Furthermore, this application also discloses a calibration-free decoding system for a cross-subject motor imagery brain-computer interface based on meta-decoupling, which is used to perform the method described above, specifically including:
[0039] The input and preprocessing module is used to collect the EEG data of the source subjects' motor imagery, and to perform preprocessing and Euclidean space data distribution alignment to obtain aligned EEG data;
[0040] The feature decoupling and training module includes a subject-invariant feature extractor, a subject-specific feature extractor, and a subject identity discriminator. It is used to extract decoupled subject-invariant and subject-specific features from aligned EEG data by performing domain adversarial training on the subject-invariant feature extractor, identity classification training on the subject-specific feature extractor, and decoupling training on the two feature extractors. Simultaneously, it enhances the model's generalization ability to unknown new subjects by further optimizing the subject-specific feature extractor through meta-learning strategies.
[0041] The feature fusion and task classification module includes a fusion layer and a motion imagery classifier. It is used to fuse the subject-invariant features and subject-specific features from the feature decoupling and training module, and input the fused features into the motion imagery classifier to obtain the decoding result.
[0042] An electronic device is also disclosed, comprising a memory and a processor, wherein:
[0043] Memory is used to store computer programs that can run on a processor;
[0044] The processor is configured to, while running the computer program, execute the calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling as described above.
[0045] Also disclosed is a computer-readable storage medium storing computer instructions for causing a processor to execute and implement the calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling as described above.
[0046] Based on the above technical solution, the present invention has at least the following beneficial effects:
[0047] First, it requires no labeled or unlabeled calibration data from the target subjects, thus meeting the needs of truly uncalibrated BCI applications. Second, it utilizes not only task-related information shared among subjects but also subject-specific information related to brain decoding task labels, avoiding the loss of individual information caused by simple domain-invariant learning. This solves the problem that existing technologies often overlook the existence of effective components related to motor imagery labels in subject-specific information, making it more suitable for motor imagery tasks with significant individual differences. Third, it reduces the coupling relationship between the two types of features through covariance minimization constraints, improving the interpretability of feature representation. Fourth, it simulates the subject distribution shift during real testing by dividing the metasource domain and metatarget domain, thereby enhancing the model's generalization ability to unknown new subjects. Attached Figure Description
[0048] Figure 1 This is a flowchart illustrating the calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling proposed in this invention.
[0049] Figure 2 This is a schematic diagram of the Subject Information Decoupling Network (SIDN) in an embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0051] Although the steps in this invention are arranged by reference numerals, this is not intended to limit the order of the steps. Unless the order of the steps is explicitly stated or the execution of a step requires other steps as a basis, the relative order of the steps can be adjusted. It is understood that the term "and / or" as used herein refers to and covers any and all possible combinations of one or more of the associated listed items.
[0052] like Figure 1 As shown, this application proposes a calibration-free decoding method for cross-subject motor imagery brain-computer interfaces based on meta-decoupling, which specifically includes the following steps:
[0053] S1. Collect source domain EEG data from the subjects, preprocess the source domain EEG data and align the EEG data distribution in Euclidean space (EA alignment) to obtain aligned EEG data;
[0054] In a preferred embodiment, step S1 specifically comprises:
[0055] Motor imagery EEG data were collected from N source domain subjects. The motor imagery EEG data were preprocessed, including: bandpass filtering, data segmentation, downsampling and standardization.
[0056] Specifically, the raw EEG signals are first bandpass filtered to retain the μ and β rhythm components relevant to the motor imagery task, while removing low-frequency drift, high-frequency electromyographic noise, and power line interference. Secondly, the continuous EEG data are segmented into trials based on the time points of the motor imagery task prompts, extracting EEG segments within the effective time window of motor imagery. Then, the EEG signals are downsampled to a preset sampling rate to reduce computational complexity and retain the main temporal changes during motor imagery. Finally, the data from each channel are normalized or standardized to ensure consistent amplitude scales across different subjects, channels, and trials, providing stable input for subsequent data distribution alignment and feature decoupling.
[0057] After preprocessing, the resulting single EEG data sample is denoted as Where E represents the number of electrode channels and T represents the number of time sampling points. Represents a real matrix. For sample index;
[0058] The sample covariance matrix of each EEG data sample is calculated using the following formula:
[0059] ;
[0060] in, for transpose, Let represent the covariance matrix of the i-th EEG data sample;
[0061] Next, calculate the mean of the covariance matrices of all samples from subjects in the same source domain to obtain the reference covariance matrix for subjects in that source domain. The formula is as follows:
[0062] ;
[0063] in, Represents the reference covariance matrix. express The total number of samples from subjects in the source domain;
[0064] The EEG data samples are whitened using a reference covariance matrix to obtain aligned EEG samples, as expressed by the formula:
[0065] ;
[0066] in, For the aligned i-th EEG data sample; The existing source domain participants constitute a multi-source domain dataset. As subsequent input, the first Source domain datasets Represented as:
[0067] ;
[0068] in, This represents the j-th aligned EEG data sample from the k-th source domain subject, where j is the sample index. for The total number of samples from subjects in the source domain; This represents the motor imagery category label corresponding to the j-th EEG data sample from the k-th source domain subject, such as left hand, right hand, foot, or tongue.
[0069] By whitening, the average covariance matrix of the aligned samples of the same subject approaches the identity matrix, thereby reducing the marginal distribution shift caused by differences in electrode position, brain structure and signal amplitude among different subjects.
[0070] S2. Construct a decoupling network for subject information, such as Figure 2As shown, the subject information decoupling network includes a subject-invariant feature extractor, a subject-specific feature extractor, a subject identity discriminator, and a motor imagery classifier;
[0071] In this embodiment, the feature extractor uses EEGNet, a compact convolutional neural network based on electroencephalography (EEG), ShallowConvNet, DeepConvNet, and other deep feature extraction networks suitable for MI-BCI.
[0072] The subject information decoupling network designed in this application models cross-subject shared information and subject individual difference information through a two-branch structure. At the same time, it introduces a covariance minimization constraint to suppress the statistical correlation between the two types of information, thereby achieving full decoupling between the two. This allows the model to learn common discrimination patterns in motor imagery tasks while preserving the differences among different subjects in motor imagery execution methods, brain activity patterns, and spatial activation areas.
[0073] S3. Use the subject invariant feature extractor to extract subject invariant features that reflect the shared task relevance among subjects from the aligned EEG data. Then, use the first subject identity discriminator and the gradient backpropagation layer to perform domain adversarial training on the subject invariant feature extractor.
[0074] In a preferred embodiment, step S3 specifically comprises:
[0075] The aligned EEG data is then input into the subject invariant feature extractor. The invariant characteristics of the subjects were obtained. ;
[0076] Using the first subject's identity discriminator right Perform identity classification (i.e., discrimination) (The subject belongs to the source domain), output The probability of a subject belonging to each source domain is calculated, and the identity classification loss (usually cross-entropy loss) is calculated.
[0077] Perform domain adversarial training: Update the first subject's identity discriminator with the goal of minimizing the identity classification loss. The parameters, and in the subject-invariant feature extractor Compared with the first subject's identity discriminator A gradient inversion layer is added between the layers to invert the gradient of the identity classification loss and then backpropagate it to the input layer. ,renew The parameters; the formula for the domain adversarial training objective is expressed as:
[0078] ;
[0079] in, For the input EEG data sample, X represents the source domain participant identity label, and D represents the source domain participant identity label space. , These are the parameters of the subject invariant feature extractor and the first subject identity discriminator, respectively. The loss is based on the identity classification of subjects' invariant features; This represents the expectation over the joint distribution of data; This represents a minimax game.
[0080] The addition of the gradient inversion layer improves the first subject's identity discriminator. The subject-invariant feature extractor aims to identify the subject's identity as accurately as possible. During the backpropagation process, the identities of the participants should be obscured as much as possible.
[0081] Through domain adversarial training, The participant identity information is weakened, while shared information related to the motor imagery category is preserved, making the feature distribution of participants from different source domains more similar in the latent space and enhancing the model's cross-participant generalization ability on unseen target participants. The participant invariant feature extractor trained with domain adversarial methods can extract relatively stable shared motor imagery features from multiple source domains, reducing the interference of participant identity differences on the decoding task.
[0082] S4. Use the subject-specific feature extractor to extract subject-specific features reflecting individual differences from the aligned EEG data, and use the second subject identity discriminator to train the subject-specific feature extractor for identity classification.
[0083] In a preferred embodiment, step S4 specifically comprises:
[0084] The aligned EEG data is then input into a subject-specific feature extractor. To obtain specific characteristics of the subjects ;
[0085] Using the second subject identity discriminator right Perform identity classification and output. The probability of belonging to each source domain participant is calculated, and the identity classification loss is calculated.
[0086] The second participant's identity discriminator is updated with the goal of minimizing the identity classification loss. The parameters are then used to backpropagate the gradient of the identity classification loss to... ,renew The parameters; the formula for the identity classification training objective is expressed as:
[0087] ;
[0088] in, For the input EEG data sample, X represents the source domain participant identity label, and D represents the source domain participant identity label space. , These are the parameters for the subject-specific feature extractor and the second subject identity discriminator, respectively. For identity classification loss based on specific characteristics of the participants; This represents the expectation over the joint distribution of data; This indicates minimization.
[0089] Training through identity classification, and constraints Learning enables the differentiation of individual characteristics among different subjects, thus... It preserves specific information about individual executive styles, brain region activation patterns, and spatial distribution differences among different participants in motor imagery tasks.
[0090] S5. In the process of domain adversarial training and identity classification training, to avoid excessive information overlapping with subject-invariant features in subject-specific features, a covariance minimization constraint is introduced to decouple the subject-invariant feature extractor and the subject-specific feature extractor during training. and Suppress the statistical correlation between them;
[0091] In a preferred embodiment, step S5 specifically comprises:
[0092] During domain adversarial training and identity classification training, invariant features of the subjects are calculated. With specific characteristics of the subjects The covariance matrix between The L2 norm of the covariance matrix is used as the decoupling loss. The formula is expressed as:
[0093] ;
[0094] in, Represents the matrix norm;
[0095] Perform decoupling training to minimize decoupling loss. With the goal of, The gradients of the identity classification loss and the gradients of the identity classification loss are simultaneously backpropagated to the subject identity discriminator, the subject invariant feature extractor, or the subject-specific feature extractor, updating the discriminator and feature extractor parameters.
[0096] By minimizing the decoupling loss, the two types of features are statistically independent, thereby effectively separating shared task information from individual difference information, avoiding the repetition of the same information, and ultimately improving the interpretability and effectiveness of the subject's specific features in the motor imagery classification task.
[0097] S6. Without calibration settings, the target subject data is completely invisible during the training phase. Therefore, this application divides the source domain subjects into the meta-source domain and the meta-target domain. The meta-source domain simulates the existing trained subjects, and the meta-target domain simulates the unknown target subjects. Meta-learning strategies are optimized for the subject-specific feature extractor that has been decoupled and trained.
[0098] In a preferred embodiment, step S6 specifically comprises:
[0099] Given For each of the source domains of the subjects, one source domain is selected as the meta-target domain in each training iteration. The remaining Each source domain is used as the meta-source domain. The training is performed iteratively between the source domain and the target domain until a preset number of rounds is reached and training stops.
[0100] In each training iteration, subject-invariant and subject-specific features are extracted and fused, then input into the motion imagery classifier to obtain the metasource domain. Minimize the motion imagery classification loss (usually using cross-entropy classification loss) on the target domain, update the subject information, decouple the network, and obtain the temporary model parameters after the first update; based on the temporary model parameters, then in the meta-target domain... The test loss is calculated, requiring the model to still have a low classification error in the meta-target domain. The subject-specific feature extractor is then adjusted based on the test loss. The parameters.
[0101] The optimization process of meta-learning strategy can be represented as:
[0102] ;
[0103] in, This represents the model parameters that participate in meta-learning optimization. This represents the loss function for motion image classification. This represents the loss gradient calculated over the source domain. This represents the temporary model parameters after one inner loop update based on the source domain loss. This represents the meta-learning objective loss calculated on the meta-objective domain and used for optimization.
[0104] Meta-learning strategies optimize the performance of the subject-specific feature extractor. This allows the model to learn the distribution shift patterns between subjects from different source domains, thereby improving its generalization ability on subjects in unknown target domains.
[0105] S7. Reacquire subject-invariant features using a decoupled-trained subject-invariant feature extractor, and reacquire subject-specific features using a subject-specific feature extractor optimized by a meta-learning strategy; fuse the subject-invariant features and subject-specific features to obtain the fused features, expressed by the formula:
[0106] ;
[0107] in, As a feature of fusion, This indicates a feature splicing or fusion operation.
[0108] Input the fused features into the motion image classifier The predicted classification results of the subjects' electroencephalogram (EEG) signals were obtained. During the testing phase, the target subject data does not participate in any training or calibration process; after training is completed, the target subject data is directly input into the trained decoding model, which outputs the corresponding motion imagery category. This achieves calibration-free decoding across subject MI-BCI.
[0109] Furthermore, this application also discloses a calibration-free decoding system for a cross-subject motor imagery brain-computer interface based on meta-decoupling, which is used to perform the method described above, specifically including:
[0110] The input and preprocessing module is used to collect the EEG data of the source subjects' motor imagery, and to perform preprocessing and Euclidean space data distribution alignment to obtain aligned EEG data;
[0111] The feature decoupling and training module includes a subject-invariant feature extractor, a subject-specific feature extractor, and a subject identity discriminator. It is used to extract decoupled subject-invariant and subject-specific features from aligned EEG data by performing domain adversarial training on the subject-invariant feature extractor, identity classification training on the subject-specific feature extractor, and decoupling training on the two feature extractors. Simultaneously, it enhances the model's generalization ability to unknown new subjects by further optimizing the subject-specific feature extractor through meta-learning strategies.
[0112] The feature fusion and task classification module includes a fusion layer and a motion imagery classifier. It is used to fuse the subject-invariant features and subject-specific features from the feature decoupling and training module, and input the fused features into the motion imagery classifier to obtain the decoding result.
[0113] An electronic device is also disclosed, comprising a memory and a processor, wherein:
[0114] Memory is used to store computer programs that can run on a processor;
[0115] The processor is configured to, while running the computer program, execute the calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling as described above.
[0116] Also disclosed is a computer-readable storage medium storing computer instructions for causing a processor to execute and implement the calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling as described above.
[0117] To verify the effectiveness of the method and system of this invention, this embodiment uses the classic motor imagery dataset BCI Competition IV 2a for a brain-computer interface uncalibrated experiment. This dataset consists of EEG data from 9 subjects. Classification brain decoding studies were conducted using left-hand and right-hand motor imagery tasks based on this dataset. The experiment employed a subject-independent leave-one-out cross-validation setting, sequentially using one subject as the target subject and the remaining 8 subjects as the source subjects. The uncalibrated brain-computer interface decoding condition was set so that no target subject data participated in the model training process.
[0118] Table 1 shows the decoding accuracy results of the method of the present invention compared with other methods. E1-E9 represent subjects 1-9, and each column shows the decoding results when the subject is the target subject in turn.
[0119] Table 1. Comparison of the method of the present invention with other methods
[0120]
[0121] The results show that the cross-subject decoding network proposed in this study achieved the best decoding accuracy on the BCI Competition IV 2a dataset, at 81.35 ± 10.36% (accuracy ± standard deviation). Observing the results when each subject was used as the target subject sequentially reveals that the method in this study achieved optimal or near-optimal performance on most subjects, while most suboptimal methods were concentrated in the adaptive decoding method HGLAN. This indicates that using domain adaptation or domain generalization methods to address subject differences, combined with prior knowledge from MI cognitive neuroscience and subject information, can further improve decoding results.
[0122] In summary, this invention proposes a calibration-free decoding method and system for cross-subject motor imagery brain-computer interfaces based on meta-decoupling. Compared with traditional cross-subject transfer methods that rely on calibration data from the target subject, this method can alleviate the performance degradation of brain-computer interface decoding models caused by individual EEG differences under conditions of unknown target data distribution, improve the generalization ability of cross-subject brain-computer interface decoding models, and complete efficient and accurate motor imagery decoding under conditions where the target subject is not visible, thus having better practical application value.
[0123] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0124] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0125] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling, characterized in that, Specifically, the following steps are included: EEG data of the subjects in the source domain were collected, and the source domain EEG data were preprocessed and aligned with the Euclidean space data distribution to obtain aligned EEG data. Construct a subject information decoupling network, which includes a subject-invariant feature extractor, a subject-specific feature extractor, a first subject identity discriminator, a second subject identity discriminator, and a motor imagery classifier; A subject-invariant feature extractor was used to extract subject-invariant features reflecting shared task relevance among subjects from aligned EEG data. The subject-invariant feature extractor was then trained in a domain adversarial manner using a first subject identity discriminator and a gradient backpropagation layer. Specifically: The aligned EEG data is then input into the subject invariant feature extractor. The invariant characteristics of the subjects were obtained. ; Using the first subject's identity discriminator right Perform identity classification and output. The probability of belonging to each source domain participant is calculated, and the identity classification loss is calculated. Perform domain adversarial training: Update the first subject's identity discriminator with the goal of minimizing the identity classification loss. The parameters, and in the subject-invariant feature extractor Compared with the first subject's identity discriminator A gradient inversion layer is added between the layers to invert the gradient of the identity classification loss and then backpropagate it to the input layer. ,renew Parameters; The subject-specific feature extractor was used to extract subject-specific features reflecting individual differences from aligned EEG data, and the subject-specific feature extractor was trained for identity classification by a second subject identity discriminator. In the process of domain adversarial training and identity classification training, a covariance minimization constraint is introduced to decouple the subject-invariant feature extractor and the subject-specific feature extractor during training. The source domain subjects are divided into the meta-source domain and the meta-target domain. The meta-source domain simulates the subjects who have already been trained, and the meta-target domain simulates the subjects with unknown targets. The meta-learning strategy is optimized for the subject-specific feature extractor that has been decoupled and trained. Subject-invariant features are re-acquired using a decoupled-trained subject-invariant feature extractor, and subject-specific features are re-acquired using a subject-specific feature extractor optimized by a meta-learning strategy. By fusing subject-invariant features with subject-specific features, a fused feature is obtained. This fused feature is then input into a motor imagery classifier to obtain a predicted classification result for the subject's EEG signals.
2. The calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling according to claim 1, characterized in that, The process of collecting source domain EEG data from participants, preprocessing the source domain EEG data, and aligning it with the Euclidean spatial data distribution to obtain aligned EEG data is as follows: Motor imagery EEG data were collected from N source domain subjects. The motor imagery EEG data were preprocessed, including: bandpass filtering, data segmentation, downsampling and standardization. After preprocessing, the sample covariance matrix of each EEG data sample is calculated, and then the mean of the sample covariance matrices of all subjects in the same source domain is calculated to obtain the reference covariance matrix of the subjects in that source domain. The reference covariance matrix is used to whiten the EEG data samples to obtain aligned EEG samples.
3. The calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling according to claim 1, characterized in that, The formula for the domain adversarial training objective is expressed as: ; in, For the input EEG data sample, X represents the source domain participant identity label, and D represents the source domain participant identity label space. , These are the parameters of the subject invariant feature extractor and the first subject identity discriminator, respectively. The loss is based on the identity classification of subjects' invariant features; This represents the expectation over the joint distribution of data; This represents a minimax game.
4. The calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling according to claim 1, characterized in that, The process of extracting subject-specific features from aligned EEG data using a subject-specific feature extractor, reflecting individual differences among subjects, and then training the subject-specific feature extractor for identity classification using a second subject identity discriminator, specifically involves: The aligned EEG data is then input into a subject-specific feature extractor. To obtain specific characteristics of the subjects ; Using the second subject identity discriminator right Perform identity classification and output. The probability of belonging to each source domain participant is calculated, and the identity classification loss is calculated. The second participant's identity discriminator is updated with the goal of minimizing the identity classification loss. The parameters are then used to backpropagate the gradient of the identity classification loss to... ,renew The parameters; the formula for the identity classification training objective is expressed as: ; in, For the input EEG data sample, X represents the source domain participant identity label, and D represents the source domain participant identity label space. , These are the parameters for the subject-specific feature extractor and the second subject identity discriminator, respectively. For identity classification loss based on specific characteristics of the participants; This represents the expectation over the joint distribution of data; This indicates minimization.
5. The calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling according to claim 1, characterized in that, In the process of domain adversarial training and identity classification training, the introduction of covariance minimization constraints to decouple the subject-invariant feature extractor and the subject-specific feature extractor during training is specifically as follows: During domain adversarial training and identity classification training, invariant features of the subjects are calculated. With specific characteristics of the subjects The covariance matrix between The L2 norm of the covariance matrix is used as the decoupling loss. The formula is expressed as: ; in, Represents the matrix norm; Perform decoupling training to minimize decoupling loss. With the goal of, The gradient of the identity classification loss and the gradient of the identity classification loss are simultaneously backpropagated to the subject identity discriminator, the subject invariant feature extractor, or the subject specific feature extractor, updating the discriminator and feature extractor parameters.
6. The calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling according to claim 1, characterized in that, The process of dividing the source domain subjects into a meta-source domain and a meta-target domain, with the meta-source domain simulating existing trained subjects and the meta-target domain simulating subjects with unknown targets, and optimizing the meta-learning strategy for the subject-specific feature extractor after decoupling training, specifically involves: Given For each of the source domains of the subjects, one source domain is selected as the meta-target domain in each training iteration. The remaining Each source domain is used as the meta-source domain. The training is performed iteratively between the source domain and the target domain until a preset number of rounds is reached and training stops. In each training iteration, subject-invariant and subject-specific features are extracted and fused, then input into the motion imagery classifier to obtain the metasource domain. Minimize the motion imagery classification loss, update the subject information decoupled network, and obtain the temporary model parameters after one update; then, based on the temporary model parameters, perform another update in the meta-target domain. The meta-target domain motion imagery classification loss is calculated, and the subject-specific feature extractor is adjusted based on the meta-target domain motion imagery classification loss. The parameters.
7. A calibration-free decoding system for a cross-subject motor imagery brain-computer interface based on meta-decoupling, the system being used to perform the method as described in any one of claims 1-6, characterized in that, Specifically, it includes: The input and preprocessing module is used to collect the EEG data of the source subjects' motor imagery, and to perform preprocessing and Euclidean space data distribution alignment to obtain aligned EEG data; The feature decoupling and training module includes a subject-invariant feature extractor, a subject-specific feature extractor, and a subject identity discriminator. It is used to extract decoupled subject-invariant and subject-specific features from aligned EEG data by performing domain adversarial training on the subject-invariant feature extractor, identity classification training on the subject-specific feature extractor, and decoupling training on the two feature extractors. At the same time, it enhances the model's generalization ability to unknown new subjects by performing additional meta-learning strategy optimization on the subject-specific feature extractor. The feature fusion and task classification module includes a fusion layer and a motion imagery classifier. It is used to fuse the subject-invariant features and subject-specific features from the feature decoupling and training module, and input the fused features into the motion imagery classifier to obtain the decoding result.
8. An electronic device, characterized in that, The electronic device includes a memory and a processor, wherein: Memory is used to store computer programs that can run on a processor; A processor, configured to, while running the computer program, execute the calibration-free decoding method for cross-subject motor imagery brain-computer interface based on meta-decoupling as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute and implement, as described in any one of claims 1-6, a calibration-free decoding method for a cross-subject motor imagery brain-computer interface based on meta-decoupling.
Citation Information
Patent Citations
Multi-scale motor imagery cross-subject identification method combining global and subdomain adaptation
CN118709069A
Feature cascade-based multi-source domain adaptive cross-subject motor imagery electroencephalogram decoding method
CN121144812A