An electroencephalogram signal decoding method and system based on feature decomposition and adversarial training

The EEG signal decoding method using feature decomposition and adversarial training solves the problem of low accuracy in EEG signal decoding, achieves stable decoding and efficient feature extraction across different individuals, and improves the robustness and cross-subject adaptability of EEG signal decoding.

CN121456673BActive Publication Date: 2026-05-29NANCHANG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANCHANG UNIV
Filing Date
2026-01-05
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing EEG signal decoding methods suffer from low decoding accuracy when faced with individual variability and non-stationarity, and rely on a large amount of individual calibration data, making it difficult to achieve stable decoding across subjects.

Method used

We employ a feature decomposition and adversarial training approach, extracting general features through a convolutional neural network and decomposing them into task-related and individual-independent features. We introduce an adversarial training mechanism to ensure feature decoupling and robustness, reducing reliance on individual calibration data.

Benefits of technology

This approach improves cross-subject decoding accuracy and generalization performance, enhances feature purity, and improves model interpretability without requiring calibration data from target subjects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121456673B_ABST
    Figure CN121456673B_ABST
Patent Text Reader

Abstract

The application discloses a kind of electroencephalogram decoding method and system based on feature decomposition and adversarial training, it is related to brain-computer interface and neural engineering technical field, the general feature extraction of input electroencephalogram is carried out by convolutional neural network, then the extracted feature is decomposed into target feature vector and irrelevant feature vector by feature decomposition module. The information related to motor imagery task is reserved in target feature vector by the supervised learning of classification module, and at the same time, the task-related information is not contained in irrelevant feature vector by the adversarial training of discriminant module and feature decomposition module, so as to realize the separation of target feature and individual irrelevant feature. In the test stage, only the target feature vector is used for motor imagery task classification, effectively overcoming individual differences and improving the generalization ability of the model across subjects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of brain-computer interface and neural engineering technology, and in particular to a method and system for decoding electroencephalogram (EEG) signals based on feature decomposition and adversarial training. Background Technology

[0002] Motor imagery EEG signals are a crucial signal source in brain-computer interface systems, and their decoding accuracy directly impacts the system's control performance and application effectiveness. However, these signals exhibit significant non-stationarity and individual variability, primarily stemming from inherent differences among subjects in physiological structure (e.g., cranial anatomy, electrode impedance), cognitive habits (task execution strategies, attention allocation), and psychological states (fatigue levels, emotional fluctuations). These factors collectively lead to highly individual-specific EEG signals, resulting in significant shifts in the distribution of signal characteristics collected from different subjects, and even from the same subject at different time points, under the same task paradigm.

[0003] Currently, traditional decoding methods largely rely on subject-specific calibration data, requiring the collection of numerous training samples for each new user to build a personalized model. This approach not only increases the time cost and usage burden of system deployment but also severely restricts the practicality and widespread adoption of brain-computer interfaces in real-world scenarios. To overcome this limitation, existing research attempts to employ strategies such as transfer learning and domain adaptation, aiming to utilize source domain subject data to assist in target domain modeling. However, these methods still face the following key issues: First, the model's generalization ability is limited, and performance significantly degrades when the distribution of data between the target and source domains differs considerably. Second, most methods still rely on a certain amount of target subject calibration data, failing to completely eliminate dependence on individually labeled data. Third, existing feature decoupling mechanisms are imperfect, failing to achieve complete separation of task-related features from individual-independent features at the representation space level, resulting in individual-specific interference still mixed in discriminative features.

[0004] Therefore, there is an urgent need in this field for an innovative method that can fundamentally decouple task-related information from individual-irrelevant information in EEG signals, and achieve excellent cross-subject decoding performance by improving the purity and robustness of feature representations, while minimizing or even eliminating the need for target subject calibration data. Summary of the Invention

[0005] In view of this, the purpose of the present invention is to provide a method and system for decoding EEG signals based on feature decomposition and adversarial training, which aims to solve the problem of low accuracy in EEG signal decoding in the prior art.

[0006] The embodiments of the present invention are implemented as follows:

[0007] A method for decoding electroencephalogram (EEG) signals based on feature decomposition and adversarial training, the method comprising:

[0008] A feature extraction module is used to extract general features from the input EEG signal to obtain a general feature vector;

[0009] A feature decomposition module decomposes the general feature vector into two mutually exclusive target feature vectors and irrelevant feature vectors. The target feature vectors are used to encode information related to the motor imagery task, while the irrelevant feature vectors are used to encode individual-specific information.

[0010] A classification module is applied to the target feature vector to output the motion imagination task category, and the classification loss is calculated to optimize the feature extraction module and the feature decomposition module, ensuring that task-related information is preserved in the target feature vector;

[0011] A discriminative module is applied to an irrelevant feature vector to determine whether it contains task-related information. Through adversarial training with the feature decomposition module, the discriminative module's discriminative ability is minimized, so that the irrelevant feature vector does not contain information related to the motor imagery task category.

[0012] The EEG signal to be decoded is input into the trained feature extraction module and feature decomposition module to extract its target feature vector. Then, the target feature vector is input into the trained classification module to obtain the final classification result of the motor imagery task.

[0013] Furthermore, in the above-mentioned EEG signal decoding method based on feature decomposition and adversarial training, the step of extracting general features from the input EEG signal through a feature extraction module to obtain a general feature vector includes:

[0014] The raw multi-channel EEG signals are preprocessed, including filtering, noise reduction, and segmentation.

[0015] The preprocessed EEG signal segments are input into a feature extraction module based on a convolutional neural network. The module extracts the general feature representation through convolutional and pooling layers to obtain a general feature vector.

[0016] Furthermore, in the above-mentioned EEG signal decoding method based on feature decomposition and adversarial training, the step of decomposing a general feature vector into two mutually exclusive target feature vectors and irrelevant feature vectors through a feature decomposition module, wherein the target feature vectors are used to encode information related to the motor imagery task and the irrelevant feature vectors are used to encode individual-specific information, includes:

[0017] The feature decomposition module receives the general feature vector output by the feature extraction module;

[0018] The general feature vector is decomposed by two residual modules to generate the target feature vector and irrelevant feature vector respectively.

[0019] The target feature vector and the irrelevant feature vector have the same dimension and are orthogonal to each other in the feature space.

[0020] Furthermore, in the above-mentioned EEG signal decoding method based on feature decomposition and adversarial training, the step of applying a classification module to the target feature vector, outputting the motor imagery task category, and calculating the classification loss to optimize the feature extraction module and the feature decomposition module, ensuring that task-related information is retained in the target feature vector, includes:

[0021] The classification module consists of one or more fully connected layers and a Softmax output layer;

[0022] Input the target feature vector into the classification module to obtain the probability distribution corresponding to different motion image categories;

[0023] The classification loss is calculated using the cross-entropy loss function;

[0024] The functional expression for classification loss is:

[0025]

[0026] in, For the classification module, For real labels, For the target feature vector, Indicates the sample x and categories c The expected operation.

[0027] Furthermore, in the above-mentioned EEG signal decoding method based on feature decomposition and adversarial training, the step of applying a discriminant module to an irrelevant feature vector to determine whether it contains task-related information, and minimizing the discriminant module's ability through adversarial training with the feature decomposition module, so that the irrelevant feature vector does not contain information related to the motor imagery task category, includes:

[0028] The discrimination module consists of a fully connected layer and a sigmoid output layer, and is used to perform binary classification tasks to determine whether the input feature vector contains task information.

[0029] During training, irrelevant feature vectors are input into the discrimination module;

[0030] The discrimination module correctly distinguishes irrelevant feature vectors from true task-relevant features;

[0031] The loss function for adversarial training consists of two parts:

[0032] Discriminator loss Used to optimize the discrimination module so that it can classify correctly;

[0033]

[0034] Generator loss This is used to optimize the feature decomposition module so that the irrelevant feature vectors it generates can deceive the discrimination module;

[0035]

[0036] in, For the discrimination module, These are irrelevant feature vectors. Indicates the sample x and categories c The expected operation, Category notes This indicates the desired operation on both the sample and the fake sample.

[0037] The feature decomposition module and the discrimination module are jointly optimized by minimizing a maximization game.

[0038] Furthermore, in the above-mentioned EEG signal decoding method based on feature decomposition and adversarial training, the step of inputting the EEG signal to be decoded into a trained feature extraction module and feature decomposition module to extract its target feature vector, and then inputting the target feature vector into a trained classification module to obtain the final classification result of the motor imagery task includes:

[0039] The parameters of the fixed feature extraction module, feature decomposition module, and classification module are fixed;

[0040] Forward propagation and classification decisions are performed using only the target feature vector.

[0041] Furthermore, in the above-mentioned EEG signal decoding method based on feature decomposition and adversarial training, the total loss function of the feature decomposition module and the classification module is:

[0042]

[0043] The overall loss function of the discrimination module is:

[0044]

[0045] in, and These are hyperparameters used to balance the weights of the two losses in the overall loss function. For generator loss, For discriminator loss, For classification loss.

[0046] Another object of the present invention is to provide an EEG signal decoding system, characterized in that it is used to implement the above-mentioned EEG signal decoding method based on feature decomposition and adversarial training, the system comprising:

[0047] A signal acquisition module is used to acquire the electroencephalogram (EEG) signals of the subject through an electrode cap;

[0048] A signal preprocessing module, including an adapter, an amplifier, and a power supply, is connected to the signal acquisition module and is used to amplify and preprocess the acquired EEG signals.

[0049] A decoding output module is used to accurately decode different motor intentions by the EEG signal decoding model composed of the feature extraction, feature decomposition and classification modules trained by the above method.

[0050] A display terminal, connected to the signal preprocessing module, is used to run the EEG signal decoding model, extract and decode the features of the preprocessed motor imagery EEG signal, and output and display the results obtained by the decoding output module.

[0051] Another object of the present invention is to provide a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.

[0052] Another object of the present invention is to provide an electronic device including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps of the method described above.

[0053] This invention extracts a general feature vector containing rich semantic information from preprocessed multi-channel EEG signals using a convolutional neural network-based feature extraction module. This general feature is then input into a feature decomposition module, which, with the aid of two parallel residual network branches, decomposes it into two feature vectors of the same dimension but mutually exclusive semantics. The target feature vector encodes discriminative information directly related to the motor imagery task, while the irrelevant feature vector carries individual-specific information, such as baseline EEG patterns and noise preferences. During training, orthogonality constraints are applied to ensure the two types of features are independent in the representation space, thus guaranteeing thorough feature decoupling. In the decoding stage, the target feature vector is input into a classification module, which outputs a task category prediction result and performs error optimization. This loss is used to jointly optimize the feature extraction, feature decomposition, and classification modules through a backpropagation mechanism to enhance the discriminative ability of task-related features. To improve feature purity, the system introduces an adversarial training mechanism. The irrelevant feature vector is input into the discriminative module of the binary classifier, while the feature decomposition module acts as a generator, aiming to generate irrelevant features without task information to confuse the discriminator. The discriminative module, on the other hand, strives to accurately identify task-related information. In this game-theoretic process, task information in irrelevant features is effectively suppressed, thereby enhancing the task discrimination ability of the target features. This solves the problem of low accuracy in EEG signal decoding in existing technologies.

[0054] In addition, the present invention has at least the following beneficial effects:

[0055] 1. Thorough Feature Decoupling: By introducing an explicit feature decomposition mechanism and strict orthogonality constraints, a structural separation of task-related features and individual-related features is achieved in the deep feature representation space. This method can effectively isolate neural response patterns directly related to motor imagery tasks from irrelevant variables such as the subject's inherent physiological baseline activity and transient psychological state fluctuations, significantly reducing redundancy and interference between feature dimensions.

[0056] 2. Cross-subject generalization performance: By embedding an adversarial training paradigm, the system can proactively identify and suppress interference from individual-specific EEG patterns. The dynamic game process between the discriminant module and the feature decomposition module forces the model to learn feature representations that are insensitive to individual differences but highly robust to task discrimination. Therefore, in cross-subject scenarios, this method can achieve stable decoding without relying on the calibration data of the target subject, significantly improving the model's adaptability and generalization performance on new subjects.

[0057] 3. Model Architecture Interpretability: The entire system adopts a modular design with clearly defined functions for each component, and the flow path and transformation process of feature information are highly transparent. This structure not only facilitates the analysis of the contributions and interactions of each part in the model, but also provides an intuitive semantic explanation for understanding how the model extracts key task features from mixed signals and eliminates individual interference, enhancing the credibility and traceability of the algorithm's decision-making process. Attached Figure Description

[0058] Figure 1 This is a flowchart illustrating a brainwave signal decoding method based on feature decomposition and adversarial training according to an embodiment of the present invention.

[0059] Figure 2 This is a schematic diagram of the basic structure of the module architecture in the EEG signal decoding method based on feature decomposition and adversarial training provided in an embodiment of the present invention.

[0060] Figure 3 This is a schematic diagram illustrating the temporal and spatial feature extraction process of the feature extraction module in the EEG signal decoding method based on feature decomposition and adversarial training provided in an embodiment of the present invention.

[0061] Figure 4 This is a structural diagram of the residual module in the feature decomposition module of the EEG signal decoding method based on feature decomposition and adversarial training provided in an embodiment of the present invention;

[0062] Figure 5 This is a structural block diagram of the EEG signal decoding system based on feature decomposition and adversarial training in the third embodiment of the present invention.

[0063] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0064] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0065] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.

[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0067] Example 1

[0068] Please see Figures 1 to 2 The figure shows a method for decoding EEG signals based on feature decomposition and adversarial training in the first embodiment of the present invention, the method including steps S10 to S14.

[0069] Step S10: A feature extraction module is used to extract general features from the input EEG signal to obtain a general feature vector.

[0070] Among them, preliminary feature representations containing multi-dimensional information are extracted from the raw EEG signals, which provides a foundation for subsequent feature decomposition.

[0071] Specifically, the acquired raw EEG signals were bandpass filtered, and noise interference from electrooculography (EOG) and electromyography (EMG) was removed using methods such as independent component analysis (ICA) or wavelet transform. Subsequently, according to the experimental paradigm, the signals were divided into several time segments corresponding to the motor imagery task. The preprocessed EEG signal segments were then input into a feature extraction module based on a convolutional neural network. This module consists of two convolutional layers and a pooling layer, used to extract discriminative spatiotemporal features. Specifically, such as... Figure 3 As shown, the first convolutional layer uses a 23×1 kernel to capture temporal dynamics, the second convolutional layer uses a 1×22 kernel to capture spatial features, and finally, a fixed-dimensional general feature vector is obtained through global average pooling.

[0072] Step S11: The general feature vector is decomposed into two mutually exclusive target feature vectors and irrelevant feature vectors through a feature decomposition module. The target feature vectors are used to encode information related to the motor imagery task, and the irrelevant feature vectors are used to encode individual-specific information.

[0073] Specifically, the feature decomposition module decomposes the general feature vector into two mutually exclusive target feature vectors and irrelevant feature vectors. The target feature vectors are specifically used to encode information related to the motor imagery task (such as differences in EEG patterns between left-hand and right-hand motor imagery); the irrelevant feature vectors are used to encode individual-specific information (such as baseline EEG data and physiological differences among participants). The core of feature decomposition is to separate "task-related information" from "individual-specific information," laying the foundation for improving decoding generalization in subsequent steps.

[0074] The feature decomposition module comprises two structurally identical but parameter-independent residual modules, used to generate the target feature vector and irrelevant feature vector, respectively. Each residual module consists of two fully connected layers and skip connections, and uses the ReLU activation function (e.g., ...). Figure 4 (As shown). Through these two branches, the general feature is decomposed into two feature vectors of the same dimension, and the decomposition process is as follows: Figure 2 As shown, where, Represents a general feature vector. Represents the target feature vector. Represents irrelevant feature vectors. This indicates that the target feature vector and irrelevant feature vectors are mutually orthogonal or approximately orthogonal in the feature space.

[0075] To enhance the mutual exclusivity of the two feature vectors, an orthogonal constraint loss is introduced during training. This loss minimizes the inner product between the target feature vector and irrelevant feature vectors, making them approximately orthogonal in the feature space. This ensures that task-related information and individual-specific information are effectively separated.

[0076] Step S12: Apply a classification module to the target feature vector to output the motion imagination task category, and calculate the classification loss to optimize the feature extraction module and the feature decomposition module, ensuring that task-related information is retained in the target feature vector.

[0077] The classification module is applied to the target feature vector, outputting the category of the motion imagery task and calculating the classification loss. The parameters of the feature extraction and feature decomposition modules are optimized using the classification loss to ensure that information related to the motion imagery task is accurately preserved in the target feature vector, allowing the classification module to accurately identify the task category. Specifically, the classification module consists of two fully connected layers and a softmax output layer, outputting the probability distribution corresponding to different motion imagery categories. The target feature vector is input into the classification module to obtain the predicted probabilities of each category, and the classification loss is calculated using the cross-entropy loss function, the expression of which is:

[0078]

[0079] in, For the classification module, For real labels, For the target feature vector, Indicates the sample x and categories c The expected operation is determined by this loss. This loss is used to optimize the feature extraction and feature decomposition modules, ensuring that task-related information is effectively preserved in the target features.

[0080] Step S13: Apply a discrimination module to the irrelevant feature vector to determine whether it contains task-related information. Through adversarial training with the feature decomposition module, minimize the discrimination ability of the discrimination module so that the irrelevant feature vector does not contain information related to the motion imagination task category.

[0081] Specifically, the discrimination module is applied to irrelevant feature vectors to determine whether they contain task-related information. Through adversarial training with the feature decomposition module, the discrimination module's discriminative ability is minimized. The goal of this "adversarial process" is to ensure that irrelevant feature vectors do not contain information related to the motor imagery task category, further strengthening the separation between "task information" and "individual information."

[0082] Step S14: Input the EEG signal to be decoded into the trained feature extraction module and feature decomposition module to extract its target feature vector, and then input its target feature vector into the trained classification module to obtain the final motor imagery task classification result.

[0083] The process involves inputting the EEG signal to be decoded into a trained feature extraction module and a feature decomposition module to extract its target feature vector, and then inputting the target feature vector into a trained classification module to obtain the final classification result of the motor imagery task, thus completing the entire decoding process.

[0084] In summary, the EEG signal decoding method based on feature decomposition and adversarial training in the above embodiments of the present invention extracts a general feature vector containing rich semantic information from the preprocessed multi-channel EEG signal through a feature extraction module based on a convolutional neural network. Subsequently, this general feature is input into a feature decomposition module, which, with the help of two parallel residual network branches, decomposes it into two feature vectors with the same dimension but mutually exclusive semantics. The target feature vector is used to encode discriminative information directly related to the motor imagery task, while the irrelevant feature vector is used to carry individual-specific information, such as baseline EEG patterns and noise preferences. During training, orthogonality constraints are applied to ensure that the two types of features are independent in the representation space, thereby ensuring thorough feature decoupling. In the decoding stage, the target feature vector is input into a classification module, which outputs the task category prediction result and performs error optimization. This loss is used to jointly optimize the feature extraction, feature decomposition, and classification modules through a backpropagation mechanism to enhance the discriminative ability of task-related features. To improve feature purity, the system introduces an adversarial training mechanism. Irrelevant feature vectors are input as the discriminator module of the binary classifier, while the feature decomposition module acts as the generator, aiming to generate irrelevant features devoid of task information to confuse the discriminator. Meanwhile, the discriminator module strives to accurately identify task-related information. In this game-like process, task information in irrelevant features is effectively suppressed, thereby enhancing the task discrimination ability of the target features. This solves the problem of low accuracy in EEG signal decoding in existing technologies.

[0085] Example 2

[0086] This embodiment also proposes a method for decoding EEG signals based on feature decomposition and adversarial training. The difference between the EEG signal decoding method based on feature decomposition and adversarial training in this embodiment and the EEG signal decoding method based on feature decomposition and adversarial training in Embodiment 1 is as follows:

[0087] The steps of applying a discriminative module to an irrelevant feature vector to determine whether it contains task-related information, and minimizing the discriminative ability of the discriminative module through adversarial training with the feature decomposition module, so that the irrelevant feature vector does not contain information related to the motion imagery task category, include:

[0088] The discrimination module consists of a fully connected layer and a sigmoid output layer, and is used to perform binary classification tasks to determine whether the input feature vector contains task information.

[0089] During training, irrelevant feature vectors are input into the discrimination module;

[0090] The discrimination module correctly distinguishes irrelevant feature vectors from true task-relevant features;

[0091] The loss function for adversarial training consists of two parts:

[0092] Discriminator loss Used to optimize the discrimination module so that it can classify correctly;

[0093]

[0094] Generator loss This is used to optimize the feature decomposition module so that the irrelevant feature vectors it generates can deceive the discrimination module;

[0095]

[0096] in, For the discrimination module, These are irrelevant feature vectors. Indicates the sample x and categories c The expected operation, Category notes This indicates the desired operation on both the sample and the fake sample.

[0097] The feature decomposition module and the discrimination module are jointly optimized by minimizing a maximization game.

[0098] The discriminant module consists of a fully connected layer and a sigmoid output layer, performing a binary classification task to determine whether the input features contain task information. During training, irrelevant feature vectors are input into the discriminant module, aiming to "deceive" the discriminator into misclassifying irrelevant features as features containing task information; the discriminant module, on the other hand, strives to correctly identify them as "irrelevant features." The loss function for adversarial training includes two parts: the discriminator loss... Used to optimize the discrimination module and combat loss. This is used to optimize the feature decomposition module. During training, the optimizer is Adam, and the parameters are set to... , The learning rate was 0.0001, and the batch size was 32. During the testing phase, only the trained feature extraction module, feature decomposition module, and classification module were used for forward propagation and classification decisions. Forward propagation: The EEG signal to be decoded was input into the model and passed through the feature extraction and feature decomposition modules sequentially to obtain the target feature vector. Classification output: The target feature vector was input into the classification module, which output the final classification result for the motor imagery task.

[0099] Furthermore, in some preferred embodiments of the present invention, the total loss function of the feature decomposition module and the classification module is:

[0100]

[0101] The overall loss function of the discrimination module is:

[0102]

[0103] in, and These are hyperparameters used to balance the weights of the two losses in the overall loss function. For generator loss, For discriminator loss, For classification loss.

[0104] In this embodiment, the following settings are provided: , .

[0105] In summary, the EEG signal decoding method based on feature decomposition and adversarial training in the above embodiments of the present invention extracts a general feature vector containing rich semantic information from the preprocessed multi-channel EEG signal through a feature extraction module based on a convolutional neural network. Subsequently, this general feature is input into a feature decomposition module, which, with the help of two parallel residual network branches, decomposes it into two feature vectors with the same dimension but mutually exclusive semantics. The target feature vector is used to encode discriminative information directly related to the motor imagery task, while the irrelevant feature vector is used to carry individual-specific information, such as baseline EEG patterns and noise preferences. During training, orthogonality constraints are applied to ensure that the two types of features are independent in the representation space, thereby ensuring thorough feature decoupling. In the decoding stage, the target feature vector is input into a classification module, which outputs the task category prediction result and performs error optimization. This loss is used to jointly optimize the feature extraction, feature decomposition, and classification modules through a backpropagation mechanism to enhance the discriminative ability of task-related features. To improve feature purity, the system introduces an adversarial training mechanism. Irrelevant feature vectors are input as the discriminator module of the binary classifier, while the feature decomposition module acts as the generator, aiming to generate irrelevant features devoid of task information to confuse the discriminator. Meanwhile, the discriminator module strives to accurately identify task-related information. In this game-like process, task information in irrelevant features is effectively suppressed, thereby enhancing the task discrimination ability of the target features. This solves the problem of low accuracy in EEG signal decoding in existing technologies.

[0106] Example 3

[0107] Please see Figure 5 The figure shows the EEG signal decoding system based on feature decomposition and adversarial training proposed in Embodiment 3 of the present invention. The system includes:

[0108] A signal acquisition module is used to acquire the electroencephalogram (EEG) signals of the subject through an electrode cap;

[0109] A signal preprocessing module, including an adapter, an amplifier, and a power supply, is connected to the signal acquisition module and is used to amplify and preprocess the acquired EEG signals.

[0110] A decoding output module is used to accurately decode different motor intentions through a brainwave signal decoding model composed of trained feature extraction, feature decomposition, and classification modules.

[0111] A display terminal, connected to the signal preprocessing module, is used to run the EEG signal decoding model, extract and decode the features of the preprocessed motor imagery EEG signal, and output and display the results obtained by the decoding output module.

[0112] For example, the signal acquisition module uses a BRAINCAP modular electrode cap with 65 electrodes to acquire EEG signals from subjects. The signal preprocessing module includes an adapter, amplifier, and power supply. In this example, a BrainAmp MR amplifier and its accessories are used for preprocessing the raw EEG signals in the data acquisition module. The collected signals are recorded and preprocessed using Brain Vision Recorder software. The decoding output module implements the aforementioned deep learning algorithm using the PyTorch framework. The model is trained through this module to decode the EEG signals. The display terminal runs on a computer equipped with an NVIDIA GeForce RTX 3090 graphics card and outputs and displays the decoding results in real time.

[0113] The functions or operation steps implemented by the above modules are largely the same as those in the above method embodiments, and will not be repeated here.

[0114] Example 4

[0115] In another aspect, the present invention provides a readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of the method described in any one of Embodiments 1 to 2 above.

[0116] Example 5

[0117] In another aspect, the present invention provides an electronic device, the electronic device including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the program to implement the steps of any one of the methods described in Embodiments 1 to 2 above.

[0118] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0119] Those skilled in the art will understand that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequential list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage 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). For the purposes of this specification, "computer-readable storage medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0120] More specific examples (a non-exhaustive list) of computer-readable storage media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable storage media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0121] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0122] In the description of this specification, 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 the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0123] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A method for decoding electroencephalogram (EEG) signals based on feature decomposition and adversarial training, characterized in that, The method includes: A feature extraction module is used to extract general features from the input EEG signal to obtain a general feature vector; A feature decomposition module decomposes the general feature vector into two mutually exclusive target feature vectors and irrelevant feature vectors. The target feature vectors are used to encode information related to the motor imagery task, while the irrelevant feature vectors are used to encode individual-specific information. A classification module is applied to the target feature vector to output the motion imagination task category, and the classification loss is calculated to optimize the feature extraction module and the feature decomposition module, ensuring that task-related information is preserved in the target feature vector; A discriminative module is applied to an irrelevant feature vector to determine whether it contains task-related information. Through adversarial training with the feature decomposition module, the discriminative module's discriminative ability is minimized, so that the irrelevant feature vector does not contain information related to the motor imagery task category. The EEG signal to be decoded is input into the trained feature extraction module and feature decomposition module to extract its target feature vector. Then, the target feature vector is input into the trained classification module to obtain the final classification result of the motor imagery task. The step of decomposing a general feature vector into two mutually exclusive target feature vectors and irrelevant feature vectors using a feature decomposition module, wherein the target feature vectors are used to encode information related to the motor imagery task and the irrelevant feature vectors are used to encode individual-specific information, includes: The feature decomposition module receives the general feature vector output by the feature extraction module; The general feature vector is decomposed by two residual modules to generate the target feature vector and irrelevant feature vector respectively. The target feature vector and the irrelevant feature vector have the same dimension and are orthogonal to each other in the feature space; The overall loss function for the feature decomposition module and the classification module is: The overall loss function of the discrimination module is: in, and These are hyperparameters used to balance the weights of the two losses in the overall loss function. For generator loss, For discriminator loss, For classification loss.

2. The EEG signal decoding method based on feature decomposition and adversarial training according to claim 1, characterized in that, The step of extracting general features from the input EEG signal using a feature extraction module to obtain a general feature vector includes: The raw multi-channel EEG signals are preprocessed, including filtering, noise reduction, and segmentation. The preprocessed EEG signal segments are input into a feature extraction module based on a convolutional neural network. The module extracts the general feature representation through convolutional and pooling layers to obtain a general feature vector.

3. The EEG signal decoding method based on feature decomposition and adversarial training according to claim 1, characterized in that, The steps of applying a classification module to the target feature vector, outputting the motion imagery task category, and calculating the classification loss to optimize the feature extraction and feature decomposition modules, ensuring that task-related information is retained in the target feature vector, include: The classification module consists of one or more fully connected layers and a Softmax output layer; Input the target feature vector into the classification module to obtain the probability distribution corresponding to different motion image categories; The classification loss is calculated using the cross-entropy loss function; The functional expression for classification loss is: ; in, For the classification module, For real labels, For the target feature vector, Indicates the sample x and categories c The expected operation.

4. The EEG signal decoding method based on feature decomposition and adversarial training according to claim 1, characterized in that, The steps of applying a discriminative module to an irrelevant feature vector to determine whether it contains task-related information, and minimizing the discriminative ability of the discriminative module through adversarial training with the feature decomposition module, so that the irrelevant feature vector does not contain information related to the motion imagery task category, include: The discrimination module consists of a fully connected layer and a sigmoid output layer, and is used to perform binary classification tasks to determine whether the input feature vector contains task information. During training, irrelevant feature vectors are input into the discrimination module; The discrimination module correctly distinguishes irrelevant feature vectors from true task-relevant features; The loss function for adversarial training consists of two parts: Discriminator loss Used to optimize the discrimination module so that it can classify correctly; Generator loss This is used to optimize the feature decomposition module so that the irrelevant feature vectors it generates can deceive the discrimination module; in, For the discrimination module, These are irrelevant feature vectors. Indicates the sample x and categories c The expected operation, Category notes This indicates the desired operation on both the sample and the fake sample. The feature decomposition module and the discrimination module are jointly optimized by minimizing a maximization game.

5. The EEG signal decoding method based on feature decomposition and adversarial training according to claim 1, characterized in that, The process involves inputting the EEG signal to be decoded into a pre-trained feature extraction module and feature decomposition module to extract its target feature vector. The steps to input the target feature vector into the trained classification module to obtain the final classification result for the motion visualization task include: The parameters of the fixed feature extraction module, feature decomposition module, and classification module are fixed; Forward propagation and classification decisions are performed using only the target feature vector.

6. A brainwave signal decoding system, characterized in that, The system is used to implement the EEG signal decoding method based on feature decomposition and adversarial training as described in any one of claims 1-5, the system comprising: A signal acquisition module is used to acquire the electroencephalogram (EEG) signals of the subject through an electrode cap; A signal preprocessing module, including an adapter, an amplifier, and a power supply, is connected to the signal acquisition module and is used to amplify and preprocess the acquired EEG signals. A decoding output module is used to accurately decode different motor intentions through a brainwave signal decoding model composed of trained feature extraction, feature decomposition, and classification modules. A display terminal, connected to the signal preprocessing module, is used to run the EEG signal decoding model, extract and decode the features of the preprocessed motor imagery EEG signal, and output and display the results obtained by the decoding output module.

7. A readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 5.

8. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor, when executing the program, implements the steps of the method as described in any one of claims 1 to 5.