A method for constructing a brain-computer interface decoding model and a method for recognizing electroencephalogram signals

By constructing a brain-computer interface decoding model through alignment, enhancement, and adversarial training, the problems of accuracy, robustness, and privacy protection of EEG systems are solved, and brain-computer interface decoding with high accuracy, robustness, and privacy protection is achieved.

CN119646587BActive Publication Date: 2025-12-05HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411809105.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-12-05
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

Existing EEG-based brain-computer interface systems face challenges in terms of accuracy, adversarial vulnerability, and privacy protection, making it difficult to simultaneously achieve high accuracy, robustness, and privacy protection.

Method used

Brain-computer interface decoding models are constructed using alignment, augmentation, adversarial training, and ensemble learning methods, including data alignment, data augmentation, adversarial example generation, and model ensemble. This reduces signal differences among users, expands data diversity, and improves model robustness in adversarial and noisy environments while protecting user privacy.

Benefits of technology

It improves the accuracy and adversarial robustness of brain-computer interface decoding models, takes into account privacy protection, is applicable to various privacy protection scenarios, and enhances the overall performance of EEG decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646587B_ABST
    Figure CN119646587B_ABST
Patent Text Reader

Abstract

The application discloses a brain-computer interface decoding model construction method and an electroencephalogram signal recognition method, and belongs to the technical field of electroencephalogram detection. The brain-computer interface decoding model construction method firstly performs an alignment operation on electroencephalogram samples in an original calibration set of a target domain, so that the accuracy of cross-user migration is improved; then each electroencephalogram sample in the aligned calibration set is enhanced to obtain a target data set, so that the generalization ability of the model is improved; under a plurality of different random seeds, an initial brain-computer interface decoding model is subjected to adversarial training by using adversarial samples generated by each electroencephalogram sample X in the target data set, so that an updated brain-computer interface decoding model corresponding to each random seed is obtained; the model maintains high robustness when facing adversarial samples and noise data; and the updated brain-computer interface decoding models corresponding to each random seed are integrated to obtain a target brain-computer interface decoding model, so that the classification accuracy and adversarial robustness are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of electroencephalogram detection, and more particularly relates to a method for constructing a brain-computer interface decoding model and an electroencephalogram signal recognition method. BACKGROUND

[0002] A brain-computer interface (BCI) creates a direct communication pathway between the brain and external devices, enabling the assistance, enhancement or restoration of a user's cognitive and / or sensory-motor functions. BCI has been widely applied in many fields such as neurorehabilitation, tactile exploration, robot control, language synthesis, etc. BCI is mainly divided into three categories: non-invasive, partially invasive and fully invasive. Among them, non-invasive BCI usually uses electroencephalogram (EEG) signals, and due to its ease of use and low cost, it has become the most popular way. Motor imagery (MI) is a classic paradigm in EEG-based BCI. In this process, the user activates different brain areas by imagining the movement of a specific body part (e.g., left hand, right hand, both feet or tongue), and these imagined movements can be converted into instructions to control external devices through decoding.

[0003] Although EEG-based BCI has the advantages of non-invasiveness and low cost, it still faces at least the following three major challenges in practical application:

[0004] Accuracy: The collection process of EEG signals is time-consuming and laborious, so the amount of training data is usually small. In addition, EEG responses vary significantly between different users, making it difficult to directly apply a user's decoding model to another user's data. This data scarcity and individual variability significantly reduces the accuracy of EEG decoding.

[0005] Adversarial vulnerability: The output of BCI is vulnerable to adversarial attacks. Previous studies have found that adversarial samples can significantly reduce the decoding accuracy of EEG-BCI, making it unreliable. In addition, subsequent studies have also developed general adversarial perturbations, but they have exposed the serious problem of BCI system security, making adversarial robustness a key consideration factor.

[0006] User privacy: EEG data contains a large amount of sensitive personal information, such as credit card numbers, personal identification numbers, known contacts and addresses, which can be inferred from EEG signals. In addition, studies have found that even resting-state EEG data can reveal a user's personality traits and cognitive abilities. Therefore, privacy protection has become an important issue that cannot be ignored for BCI systems.

[0007] A large number of studies have explored the above three challenges respectively. For example, transfer learning improves the BCI classification accuracy by using EEG data of other users; adversarial detection and robust training improve the robustness of BCI; and privacy-preserving machine learning and data perturbation help protect the privacy of EEG data. However, solving one problem often introduces performance degradation in other aspects, for example, cross-user transfer learning can improve the EEG model decoding accuracy, but may lead to source user privacy leakage; adversarial defense can improve the accuracy of the model under adversarial attacks, but may reduce the classification accuracy of normal samples. That is, there is no research to simultaneously solve all three challenges to achieve an accurate, robust and privacy-preserving BCI decoding model. SUMMARY

[0008] In view of the above defects or improvement needs of the prior art, the present application provides a brain-computer interface decoding model construction method and an electroencephalogram signal recognition method, which aims to solve the technical problem of how to construct an accurate, robust and privacy-protected BCI decoding model.

[0009] To achieve the above-mentioned purpose, according to one aspect of the present application, a brain-computer interface decoding model construction method is provided, comprising:

[0010] S1: performing an alignment operation on electroencephalogram samples in a target domain original calibration set to obtain an aligned calibration set wherein N T is the number of electroencephalogram samples in the target domain, is an electroencephalogram sample with c channels and t sampling points, is the label of the electroencephalogram sample in the target domain, i = 1,...,N T ;

[0011] S2: enhancing each electroencephalogram sample X' in the aligned calibration set to obtain an enhanced electroencephalogram sample X" T,i , and the corresponding enhanced calibration set T,i

[0012] S3: merging the enhanced calibration set and the original calibration set to obtain a target data set

[0013] S4: using the target data set under multiple different random seeds ​Adversarial examples generated from each EEG sample X are used to adversarially train the initial brain-computer interface decoding model, resulting in updated brain-computer interface decoding models corresponding to each random seed.

[0014] S5: Integrate the updated brain-computer interface decoding models corresponding to each of the random seeds to obtain the target brain-computer interface decoding model.

[0015] In one embodiment, S1 includes: using a formula The original calibration set for the target domain Alignment operations are performed on the EEG samples to obtain the alignment calibration set. Among them, the arithmetic mean of the spatial covariance matrix of all samples

[0016] In one embodiment, S2 includes: using formula X" T,i =X′ T,i ·(1+β) or X" T,i =X′ T,i • (1-β) The alignment calibration set The various EEG samples X′ T,i Enhancement was performed to obtain enhanced EEG sample X". T,i The corresponding enhanced calibration set β is the scaling factor for the EEG sample.

[0017] In one embodiment, before S4, the method further includes: in a centralized passive domain transfer learning scenario, performing intra-user alignment on the source domain dataset of the source domain users, and using the source domain dataset before and after alignment to train the initial brain-computer interface decoding model.

[0018] In one embodiment, before S4, the method further includes: in a federated passive domain transfer learning scenario, where data between source domain users cannot be merged, aligning the source domain datasets for each user, and using a federated algorithm to train the initial brain-computer interface decoding model using the aligned source domain datasets.

[0019] In one embodiment, the training optimization problem of updating the brain-computer interface decoding model in S4 is expressed as:

[0020]

[0021] in, It is X T The center ∈ l is the radius ∞ Ball, C θ It is an updated brain-computer interface decoding model with parameter θ. Let X be the cross-entropy loss function. adv For adversarial examples.

[0022] In one of the embodiments, given an electroencephalogram sample X, an adversarial sample is generated by using the following formula:

[0023] X adv,0 = X + ξ;

[0024]

[0025] where X adv,i ∈ [X adv,1 ,..., X adv,N-1 ] is the adversarial sample generated after i iterations of the electroencephalogram sample X, ξ is random noise uniformly sampled from the interval (-∈, ∈), α ≤ ∈ is the iteration step size, Proj X,∈ ensures that X adv,i is within the field of X, and meets the constraint of the l ∞ norm, sign() is the sign function, is the gradient of the i-th adversarial sample, C θ (X adv,i-1 ) is the output of the classifier C adv,i-1 when the input is X θ , y is the label of the electroencephalogram sample X, is the expectation.

[0026] In one of the embodiments, before S4, it further includes: in the source data perturbation scenario: aligning the source domain data set of each user, and performing data perturbation on the source domain data set to obtain a source domain data set;

[0027] The S4 includes: using the perturbed source domain data set and the target data set The corresponding adversarial sample pair randomly initializes the brain-computer interface decoding model, and performs adversarial training under multiple different random seeds to obtain an updated brain-computer interface decoding model corresponding to each random seed.

[0028] In one of the embodiments, the training optimization problem of the updated brain-computer interface decoding model in the S4 is represented as:

[0029]

[0030] where is an l T ball with X ∞ as the center and ∈ as the radius, C θ is a brain-computer interface decoding model with parameters θ, is a cross-entropy loss function, is the generated target domain electroencephalogram adversarial sample, is the perturbed source domain electroencephalogram sample, For the perturbated source domain EEG dataset, As expected.

[0031] According to another aspect of the present invention, an apparatus for constructing a brain-computer interface decoding model is provided, comprising:

[0032] Alignment module for the original calibration set of the target domain. Alignment operations are performed on the EEG samples to obtain an alignment calibration set. Where, N T The number of EEG samples in the target domain. Given an EEG sample with c channels and t sampling points, y T,i ∈{1,…,K} represents the label of the EEG sample in the target domain, i=1,...,N T ;

[0033] Enhancement module for adding the alignment calibration set The various EEG samples X′ T,i Enhancement was performed to obtain enhanced EEG sample X". T,i The corresponding enhanced calibration set

[0034] The merging module is used to merge the enhanced calibration set. and the original calibration set Merge to obtain the target dataset

[0035] Training module for utilizing the target dataset under multiple different random seeds. Adversarial examples generated from each EEG sample X are used to adversarially train the initial brain-computer interface decoding model, resulting in updated brain-computer interface decoding models corresponding to each random seed.

[0036] An integration module is used to integrate the updated brain-computer interface decoding models corresponding to each of the random seeds to obtain the target brain-computer interface decoding model.

[0037] According to another aspect of the present invention, a method for recognizing brain signals is provided, comprising: inputting the brain signals of the current user of the brain-computer interface into the target brain-computer interface decoding model obtained by the above-described method for constructing the brain-computer interface decoding model, and obtaining a recognition result corresponding to the brain signals of the current user.

[0038] According to another aspect of the present invention, an electroencephalogram (EEG) signal recognition device is provided, comprising:

[0039] The device for constructing the aforementioned brain-computer interface decoding model;

[0040] The recognition device is used for inputting the brain electrical signal of a current user of a brain-computer interface into the target brain-computer interface decoding model obtained by the method for constructing the brain-computer interface decoding model, to obtain a recognition result corresponding to the brain electrical signal of the current user.

[0041] According to another aspect of the present application, an electronic device is provided, comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the method for constructing a brain-computer interface decoding model or the method for recognizing brain electrical signals when executing the computer program.

[0042] According to another aspect of the present application, a computer readable storage medium is provided, storing a computer program, and the computer program implementing the steps of the method for constructing a brain-computer interface decoding model or the method for recognizing brain electrical signals when executed by a processor.

[0043] Overall, compared with the prior art, the above technical solutions conceived by the present application can achieve the following beneficial effects:

[0044] (1) The present application provides a method for constructing a brain-computer interface decoding model. First, the electroencephalogram samples in the original calibration set of the target domain are subjected to an alignment operation, which reduces the signal distribution difference between different users and improves the accuracy of cross-user migration. Then, each electroencephalogram sample in the aligned calibration set is enhanced to obtain a target data set, which expands the diversity of the data and improves the generalization ability of the model. Adversarial samples generated by each electroencephalogram sample X in the target data set and the perturbed source domain data set are used to perform adversarial training on the random initial electroencephalogram decoding model. Alternatively, adversarial samples generated by each electroencephalogram sample X in the target data set are used to perform adversarial training on the initial electroencephalogram decoding model (source domain model) obtained by training the source domain data set, to obtain an updated brain-computer interface decoding model corresponding to each random seed. The model maintains high robustness when facing adversarial samples and noisy data. The updated brain-computer interface decoding model corresponding to each random seed is integrated to obtain a target brain-computer interface decoding model. By training multiple randomly initialized neural networks and integrating them, the accuracy and adversarial robustness of the classification are effectively improved. The present application combines data alignment, data enhancement, adversarial training, and ensemble learning to improve the classification accuracy and robustness of the target brain-computer interface decoding model, and takes into account the requirements of accuracy, adversarial robustness, and privacy protection.

[0045] (2) The present application uses Euclidean alignment technology to perform spatial alignment on EEG signals, reducing the signal distribution difference between different users and improving the accuracy of cross-user migration.

[0046] (3) The scheme adopts amplitude scaling data enhancement to enhance the target domain data, which is simple and easy to implement, does not change the relative size relationship between the electroencephalogram channels, does not affect the task information carried by the electroencephalogram samples, and effectively expands the sample size.

[0047] (4) The scheme uses the model trained on the training set composed of multiple source domain electroencephalogram samples to initialize the target domain brain-computer interface decoding model in the centralized passive domain transfer learning scenario. It effectively utilizes the electroencephalogram task knowledge carried by the source domain electroencephalogram samples, and does not need to provide source domain electroencephalogram samples to the target user, protecting the privacy of the source domain user; it considers the privacy of the source domain user to the target domain user, and realizes the effective utilization of the electroencephalogram task knowledge learned by the brain-computer interface decoding model on the source domain electroencephalogram samples to help improve the electroencephalogram decoding effect of the target domain user while protecting the privacy of the source domain user to the target domain user.

[0048] (5) In the federated passive domain transfer learning scenario, the electroencephalogram samples of each source domain cannot be centralized to train the brain-computer interface decoding model, and the electroencephalogram model of the source domain can only be trained on the electroencephalogram samples of each source domain by time period; it considers the privacy of the source domain user to the target domain user, as well as the privacy between the source domain users; it realizes the learning of electroencephalogram task knowledge from each electroencephalogram sample of the source domain, and uses the knowledge learned by the model to help improve the electroencephalogram decoding effect of the target domain user while protecting the privacy of the source domain user to the target domain user and the privacy between the source domain users.

[0049] (6) The scheme represents the training optimization problem of updating the brain-computer interface decoding model as: It considers the vulnerability of the brain-computer interface decoding model and realizes the robustness of the enhanced brain-computer interface decoding model.

[0050] (7) The scheme uses X adv,0 = X + ξ and generates adversarial samples; it considers the time efficiency of generating adversarial samples and the diversity of generated samples, and realizes fast and diverse adversarial sample generation.

[0051] (8) The scheme considers how to share the source domain electroencephalogram data while protecting the user privacy information in the source domain data set in the source data perturbation scenario, and realizes the sharing of the source domain electroencephalogram samples while protecting the user privacy information therein.

[0052] (9) The scheme represents the training optimization problem of updating the brain-computer interface decoding model in the source data perturbation scenario as: Considering the electroencephalogram task knowledge in the source domain sample, the training time cost and the improvement of the target domain electroencephalogram decoding performance, the robust target domain brain-computer interface decoding model is trained faster while the source domain disturbance data is utilized. BRIEF DESCRIPTION OF DRAWINGS

[0053] Figure 1 The flowchart of the construction method of the electroencephalogram decoding model provided for the embodiment 1 of the present application is shown in the figure.

[0054] Figure 2 The schematic diagram of the effects of data alignment, data enhancement and adversarial training in the construction method of the electroencephalogram decoding model provided for the embodiment 1 of the present application is shown in the figure.

[0055] Figure 3 The application scenario diagram of the brain-computer interface system provided for the embodiment 1 of the present application is shown in the figure.

[0056] Figure 4 The schematic diagram of the initial brain-computer interface decoding model in the centralized passive domain transfer learning scenario provided for the embodiment 1 of the present application is shown in the figure.

[0057] Figure 5 The schematic diagram of the initial brain-computer interface decoding model in the federated passive domain transfer learning scenario provided for the embodiment 1 of the present application is shown in the figure.

[0058] Figure 6 The schematic diagram of the initial brain-computer interface decoding model in the source domain data set disturbance scenario provided for the embodiment 1 of the present application is shown in the figure. DETAILED DESCRIPTION

[0059] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application 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 only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0060] Embodiment 1

[0061] As shown in the figures, Figure 1 and Figure 2 the construction method of the electroencephalogram decoding model of the present embodiment includes S1-S5. Wherein, Figure 3 The brain-computer interface system of the electroencephalogram decoding model construction method proposed by the present application realizes electroencephalogram decoding.

[0062] S1: Perform alignment operation on the electroencephalogram samples in the original calibration set of the target domain to obtain the aligned calibration set Wherein, N T is the number of electroencephalogram samples in the target domain, For an electroencephalogram sample with c channels and t sampling points, y T,i ∈{1,…,K} is the label of the target domain electroencephalogram sample, i=1,...,N T S2: Enhance each electroencephalogram sample X' in the alignment calibration set T,i to obtain an enhanced electroencephalogram sample X" T,i , and the original calibration set S3: Merge the enhanced calibration set and the original calibration set to obtain a target data set S4: Perform adversarial training on a random initial electroencephalogram decoding model using the perturbed source domain data set and the adversarial samples generated from each electroencephalogram sample X in the target data set, or perform adversarial training on an initial electroencephalogram decoding model (source domain model) obtained by training the source domain data set using the adversarial samples generated from each electroencephalogram sample X in the target data set, to obtain an updated electroencephalogram decoding model corresponding to each random seed.

[0063] The embodiment aims to solve the challenges of current brain-computer interface decoding models in simultaneously achieving accuracy, robustness, and privacy protection, and proposes a method for constructing an electroencephalogram decoding model, which can be used to realize precise and robust BCI decoding while meeting the requirements of high accuracy, adversarial robustness, and privacy protection for BCI decoding.

[0064] Specifically, the method for constructing an electroencephalogram decoding model proposed in the embodiment includes the following steps:

[0065] 1. Data alignment: Spatially align EEG signals to reduce signal distribution differences between different users and improve the accuracy of cross-user transfer.

[0066] 2. Data augmentation: Perform amplitude scaling-based data augmentation on target domain data to expand the diversity of data and improve the generalization ability of the model.

[0067] 3. Adversarial training: Generate adversarial samples and perform training to make the model highly robust when facing adversarial samples and noisy data.

[0068] 4. Ensemble learning: Train multiple randomly initialized neural networks and integrate their results to effectively improve the accuracy and adversarial robustness of classification.

[0069] Further, S1 includes: using the formula to obtain the original calibration set ​Alignment operations are performed on the EEG samples to obtain an alignment calibration set. Among them, the arithmetic mean of the spatial covariance matrix of all samples

[0070] First, an alignment (EA) operation is performed on the samples in the calibration dataset of the target domain to reduce data distribution discrepancies. Data alignment makes the EEG data distribution more consistent. After EA processing, the EEG is whitened, meaning the mean spatial covariance matrix becomes an identity matrix.

[0071] Furthermore, S2 includes: using formula X" T,i =X′ T,i ·(1+β) or X" T,i =X′ T,i • (1-β) will align the calibration set The various EEG samples X′ in T,i Enhancement was performed to obtain enhanced EEG sample X". T,i The corresponding enhanced calibration set β is the scaling factor for the EEG sample.

[0072] The augmented sample can be either X′=X·(1+β) or X′=X·(1-β). We applied both augmentation methods to each target domain sample. After data augmentation, the target domain calibration dataset... It contains both the original samples and the enhanced samples.

[0073] This embodiment applies the EEG decoding model construction method to three privacy-preserving scenarios (centralized passive transfer learning, federated passive transfer learning, and source data perturbation) to achieve accurate decoding, security and robustness, and privacy protection in brain-computer interface decoding.

[0074] Furthermore, prior to S4, it also includes: in the centralized passive domain transfer learning scenario, the source domain datasets of source domain users are first aligned within users and then aligned between users, and the initial EEG decoding model is trained using the aligned source domain datasets.

[0075] Among them, centralized passive domain transfer learning is seen Figure 4 In this scenario, source users can share data, but not directly with target users. Source user data can be merged and used to train a source domain model, which is then only publicly disclosed to ensure the privacy of the source user data. The EEG decoding model is then built upon the given source domain model, using target domain EEG samples for optimization. The optimization steps are, in sequence, the data alignment, data augmentation, adversarial training, and ensemble learning described above.

[0076] Further, before S4, further comprising: in the federated source domain transfer learning scenario, the data between the source domain users cannot be merged, aligning the source domain data set of each user, and using the aligned source domain data set to train an initial electroencephalogram decoding model using a federated algorithm.

[0077] wherein the federated source domain transfer learning is Figure 5 In this scenario, the original data cannot be shared between source users and between target users. A central server manages the global source domain model and distributes it to each source user for parameter updating. The updated model is aggregated into the global server, and only the global model can be shared. The method of constructing the electroencephalogram decoding model is subsequently optimized on the given source domain model using target domain electroencephalogram samples. The optimization steps are data alignment, data augmentation, adversarial training, and ensemble learning described above.

[0078] Further, to improve the robustness of the model, the embodiment uses adversarial training of the electroencephalogram decoding model. Given the target domain calibration data set and a neural network model (which can be an electroencephalogram model trained on the source domain data set); the training optimization problem of updating the electroencephalogram decoding model in S4 is represented as:

[0079]

[0080] wherein, is an l T ball with X ∞ as the center and ∈ as the radius, C θ is the updated electroencephalogram decoding model with parameters θ, is the cross-entropy loss function, and X adv is the adversarial sample.

[0081] Further, given an electroencephalogram sample X, the adversarial sample is generated using the following formula:

[0082] X adv,0 = X + ξ;

[0083]

[0084] wherein X adv,i ∈ [X adv,1 ,..., X adv,N-1 ] is the adversarial sample generated after i iterations of the electroencephalogram sample X, ξ is random noise uniformly sampled from the interval (-∈, ∈), α ≤ ∈ is the iteration step size, Proj X,∈ ensures that X adv,i is within the ∈ field of X and meets the l ∞ norm constraint, sign() is the sign function, is the gradient of the i-th adversarial sample, and Cθ (X adv,i-1 ) is the input X adv,i-1 , y is the label of the EEG sample X, θ is the expectation.

[0085] Further, before S4, further comprising: in the source data perturbation scenario: aligning the source domain data set of each user, and performing data perturbation on the source domain data set to obtain a source domain data set; S4 comprises: using the perturbed source domain data set and the target data set The random initial brain-computer interface decoding model is subjected to adversarial training under multiple different random seeds to obtain an updated brain-computer interface decoding model corresponding to each random seed.

[0086] Wherein, the source data perturbation scenario is shown in Figure 6 By applying user-specific perturbation to the source domain data set, the identity information of the user cannot be learned, but the task-related information is still retained. The perturbed data can be used to assist the training of the target model without revealing the user's privacy. Given the source domain data set N S is the number of target domain samples, is an EEG sample with c channels and t sampling points, y T,i ∈{1,…,K} is the source domain sample label, u i ∈{1,…,U} is the source domain user label. We add user-based perturbation to each EEG sample X S,i Generate a private EEG training data set that cannot be learned For each source domain EEG sample X S,i , This embodiment uses the synthetic noise method proposed in document [6] to calculate The construction method of the EEG decoding model is subsequently optimized with the perturbed source domain data set and the target domain data given to the randomly initialized EEG model. The steps are data alignment, data enhancement, adversarial training and ensemble learning described above.

[0087] Further, in the source data perturbation scenario, the source domain data set is provided with privacy protection The EEG decoding model is randomly initialized; the training optimization problem of updating the EEG decoding model in S4 is represented as:

[0088]

[0089] Wherein, is X T ​​l is a circle with center ∈ and radius ∞ ball, C θ is a brain-computer interface decoding model with parameter θ, is a cross-entropy loss function, is a generated target domain electroencephalogram adversarial sample, is a perturbed source domain electroencephalogram sample, is a perturbed source domain electroencephalogram dataset, is an expectation. The model is optimized on the privacy-protected samples of the source domain and the adversarial samples of the target domain.

[0090] As shown in Tables 1, 2 and 3, the construction method of the electroencephalogram decoding model proposed in the embodiment trains a more accurate and robust electroencephalogram decoding model in the three privacy protection transfer learning scenarios of centralized source domain transfer learning, federated source domain transfer learning and source domain dataset perturbation privacy protection. The electroencephalogram decoding model trained by the construction method of the electroencephalogram decoding model proposed in the embodiment has higher accuracy on normal samples, adversarial samples and noisy samples on the BNCI2014001, Weibo2014 and BNCI2014002 electroencephalogram datasets. The decoding accuracy of the electroencephalogram decoding model construction method on various samples even exceeds that of the transfer learning algorithm without any perturbation, as shown in Table 4. Table 1 shows the classification accuracy (%) in centralized source domain transfer learning. The “Avg.” column represents the average of “Benign”, “Adversarial” and “Noisy”. The “Average” column represents the average result on the BNCI2014001, Weibo2014 and BNCI2014002 datasets. The highest accuracy in each column is in bold.

[0091] Table 1 Classification accuracy in centralized source domain transfer learning

[0092]

[0093] Table 2 shows the classification accuracy (%) in the federated source domain transfer learning scenario. The “Avg.” column represents the average of “Benign”, “Adversarial” and “Noisy”. The “Average” column represents the average result on the BNCI2014001, Weibo2014 and BNCI2014002 datasets. The highest accuracy in each column is in bold.

[0094] Table 2 Classification accuracy in the federated source domain transfer learning scenario

[0095]

[0096] Table 3 shows the classification accuracy (%) in scenarios with source data perturbation. The "Avg." column represents the average of "Benign", "Adversarial", and "Noisy". "Average" represents the average result on the BNCI2014001, Weibo2014, and BNCI2014002 datasets. The highest accuracy in each column is highlighted in bold.

[0097] Table 3 Classification accuracy in source data perturbation scenarios

[0098]

[0099] Table 4. Classification accuracy (%) without privacy protection. The “Average” column represents the average of “Benign,” “Adversarial,” and “Noisy.” The highest accuracy in each column is highlighted in bold.

[0100] Table 4 Classification accuracy without privacy protection

[0101]

[0102] In summary, this embodiment proposes a method for constructing an EEG decoding model, utilizing data alignment, data augmentation, adversarial training, and ensemble learning to achieve more accurate and robust EEG decoding. This embodiment further applies the EEG decoding model construction method to three privacy-preserving scenarios (centralized passive domain transfer learning, federated passive domain transfer learning, and source domain dataset perturbation) to simultaneously achieve accurate decoding, adversarial robustness, and privacy protection in BCI. Experiments verify the effectiveness of the EEG decoding model construction method, even outperforming state-of-the-art transfer learning methods that completely disregard privacy protection. This embodiment is the first to simultaneously address the three major challenges of data scarcity and individual variability, adversarial vulnerability, and user privacy in EEG-based BCI, significantly improving the applicability of EEG decoding algorithms in practical BCI systems.

[0103] Example 2

[0104] This embodiment provides a device for constructing a brain-computer interface decoding model, including: an alignment module, an enhancement module, a merging module, a training module, and an integration module.

[0105] The alignment module is used for the original calibration set of the target domain. Alignment operations are performed on the EEG samples to obtain an alignment calibration set. Where, N T The number of EEG samples in the target domain. Given an EEG sample with c channels and t sampling points, y T,iis a label of a target domain electroencephalogram sample, i = 1,...,N T an enhancement module, configured to enhance each electroencephalogram sample X' in the aligned calibration set to obtain an enhanced electroencephalogram sample X" T,i T,i an enhanced calibration set a merging module, configured to merge the enhanced calibration set and the original calibration set to obtain a target data set a training module, configured to perform adversarial training on a random initial electroencephalogram decoding model by using the perturbed source domain data set and the adversarial samples generated by each electroencephalogram sample X in the target data set, or perform adversarial training on an initial electroencephalogram decoding model (a source domain model) obtained by training the source domain data set by using the adversarial samples generated by each electroencephalogram sample X in the target data set, to obtain an updated brain-computer interface decoding model corresponding to each random seed; and an integration module, configured to integrate the updated brain-computer interface decoding models corresponding to each random seed to obtain a target brain-computer interface decoding model.

[0106] Embodiment 3

[0107] The embodiment provides a brain electrical signal recognition method, including: inputting brain electrical signals of a current user of a brain-computer interface into a target brain-computer interface decoding model obtained by the brain-computer interface decoding model construction method in Embodiment 1, to obtain a recognition result corresponding to the brain electrical signals of the current user. Through the cooperation of the brain electrical decoding model construction method and the brain electrical signal recognition, the brain-computer interface can simultaneously realize accurate decoding, safe robustness and privacy protection.

[0108] Embodiment 4

[0109] The embodiment provides a brain electrical signal recognition device, including: the brain-computer interface decoding model construction device and the recognition device in Embodiment 1, configured to input brain electrical signals of a current user of a brain-computer interface into a target brain-computer interface decoding model obtained by the brain-computer interface decoding model construction method in Embodiment 1, to obtain a recognition result corresponding to the brain electrical signals of the current user.

[0110] Embodiment 5

[0111] The embodiment provides an electronic device, including a memory and a processor, the memory stores a computer program, and the processor implements the steps of the brain-computer interface decoding model construction method or the brain electrical signal recognition method in Embodiment 1 when executing the computer program.

[0112] Embodiment 6

[0113] ​The embodiment provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement steps of the construction method of the brain-computer interface decoding model or the electroencephalogram signal recognition method in the embodiment 1.

[0114] Those skilled in the art can easily understand that the above description is only the preferred embodiment of the present application, and is not used to limit the present application, and any modification, equivalent replacement and improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for constructing a brain-computer interface decoding model, characterized in that, include: S1: The original calibration set for the target domain Alignment operations are performed on the EEG samples to obtain an alignment calibration set. = ;in, The number of EEG samples in the target domain. For have One channel and EEG samples from each sampling point Labels for EEG samples in the target domain. ; S2: Align the calibration set Various EEG samples Enhancement was performed to obtain enhanced EEG samples. The corresponding enhanced calibration set = S2 includes: using the formula or The alignment calibration set Various EEG samples Enhancement was performed to obtain enhanced EEG samples. The corresponding enhanced calibration set = , It is the scaling factor for the EEG sample; S3: Transfer the enhanced calibration set = and the original calibration set Merge to obtain the target dataset ; S4: Utilize the target dataset under multiple different random seeds Adversarial examples generated from each EEG sample X are used to adversarially train the initial brain-computer interface decoding model, resulting in updated brain-computer interface decoding models corresponding to each random seed. S5: Integrate the updated brain-computer interface decoding models corresponding to each of the random seeds to obtain the target brain-computer interface decoding model; Before S4, the method also includes: in a centralized passive domain transfer learning scenario, performing intra-user alignment of the source domain datasets of source domain users, and training the initial brain-computer interface decoding model using the source domain datasets before and after alignment; or, Before S4, it also includes: in the federated passive domain transfer learning scenario, the data between source domain users cannot be merged, the source domain datasets of each user are aligned, and the initial brain-computer interface decoding model is trained using the aligned source domain datasets with the federated algorithm.

2. The method for constructing a brain-computer interface decoding model as described in claim 1, characterized in that, S1 includes: Using formula The original calibration set for the target domain Alignment operations are performed on the EEG samples to obtain the alignment calibration set. ; where, the arithmetic mean of the spatial covariance matrix of all samples. .

3. The method for constructing the brain-computer interface decoding model as described in claim 1, characterized in that, The training optimization problem for updating the brain-computer interface decoding model in S4 is expressed as: ; in, Therefore Center radius ball, The parameter is Update the brain-computer interface decoding model, Let cross-entropy be the loss function. For adversarial examples.

4. The method for constructing the brain-computer interface decoding model as described in claim 3, characterized in that, Given an EEG sample X, generate adversarial examples using the following formula: ; in, ∈[ ,..., ], for iterating over EEG sample X The adversarial examples generated after the step, From Random noise sampled uniformly within an interval, The iteration step size, ensure exist of Within the field, and in accordance with Norm constraints () is a sign function. The gradient of the (i-1)th adversarial example. For input Time classifier The output, y, is the label of the EEG sample X. [] represents expectations.

5. The method for constructing a brain-computer interface decoding model as described in claim 1, characterized in that, Prior to S4, it also included: In the source data perturbation scenario: Align the source domain dataset for each user and perturb the source domain dataset to obtain the source domain dataset; S4 includes: utilizing the perturbed source domain dataset and the target dataset. The corresponding adversarial examples are used to train the initial brain-computer interface decoding model under multiple different random seeds to obtain the updated brain-computer interface decoding model for each random seed.

6. The method for constructing a brain-computer interface decoding model as described in claim 5, characterized in that, The training optimization problem for updating the brain-computer interface decoding model in S4 is expressed as: ; in, Therefore Center radius ball, The parameter is Brain-computer interface decoding model, Let cross-entropy be the loss function. For generating target domain EEG adversarial samples, The source domain EEG samples after perturbation. For the perturbated source domain EEG dataset, [] represents expectations.

7. A method for recognizing electroencephalogram (EEG) signals, characterized in that, include: The brain-computer interface (BCI) signal of the current user is input into the target BCI decoding model obtained by the method of constructing the BCI decoding model according to any one of claims 1-6, and the recognition result corresponding to the current user's brain-computer interface signal is obtained.

Citation Information

Patent Citations

  • Robustness evaluation and enhancement method for deep electroencephalogram identity authentication model

    CN116541700A

  • Cross-individual emotion recognition method, device and equipment based on electroencephalogram signals and medium

    CN117093877A