Small sample cross-subject task state electroencephalogram decoding method, model and system and readable storage medium

By extracting the semantic, temporal and spatial characteristics of the EEG signal sample set, and combining the channel spatial attention mechanism and relationship network, the overfitting problem of deep learning models among different subjects is solved, and efficient decoding of small samples across subjects' task-state electroencephalogram decoding is achieved.

CN120492906AInactive Publication Date: 2025-08-15KUNMING UNIV OF SCI & TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510995043.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-08-15
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to prevent deep learning models from overfitting when the training data is limited, especially generalization difficulties caused by individual differences in EEG signals between different subjects.

Method used

By extracting semantic features, temporal domain features and spatial domain features of the sample set of EEG signals across subjects, and introducing a channel spatial attention mechanism, combined with the relationship network framework, the decoding process is optimized, so that the model can quickly realize knowledge transfer among different subjects.

Benefits of technology

It significantly enhances the effectiveness of feature representation, realizes efficient decoding among subjects under a small amount of data, reduces dependence on large-scale annotation data, and improves the generalization ability and robustness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492906A_ABST
    Figure CN120492906A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of task state electroencephalogram decoding, in particular to a small sample cross-subject task state electroencephalogram decoding method, model and system and a readable storage medium. Semantic features and time and space features between a support sample and a query sample are mined, a CBAM attention mechanism is combined, signal features focused on an important channel and a key brain region are focused respectively, the effectiveness of feature representation is remarkably enhanced, finally, the decoding process is optimized through a relational network framework, and the decoding efficiency is improved. The model can quickly realize knowledge migration among different subjects, and generalization of a new task can be completed only with a small amount of data. The method aims at solving the problem of how to prevent a deep learning model from overfitting when electroencephalogram signal features are extracted when training data is limited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of task-state EEG decoding, and in particular to a small-sample cross-subject task-state EEG decoding method, model, system and readable storage medium. Background Art

[0002] Brain-machine interfaces (BCIs) are a revolutionary technology that breaks the reliance of traditional human-computer interaction (HCI) systems on nerves and muscles by decoding EEG signals. Task-based EEG decoding, also known as the extraction and recognition of brain intent, is one of the most critical research areas in the BCI field. Its core goal is to translate neuronal activity into commands, enabling users to control external devices without physical movement.

[0003] A key challenge currently facing task-based EEG decoding technology is how to address inter-individual variability in EEG signals. This problem stems primarily from differences in brain structure and neural activity patterns between individuals, leading to significant differences in the frequency, amplitude, and temporal dynamics of task-related EEG signals. This significant variability makes it particularly difficult to train an efficient and generalizable decoding model. Each subject's brain activity pattern has highly personalized distribution characteristics, making it difficult to capture the patterns between these distributions, increasing the difficulty of EEG decoding.

[0004] Existing research has used deep learning models to capture these distributional features by extensively labeling EEG signals. However, EEG signal labeling is expensive to obtain, and the EEG signal sampling process requires long-term collaboration between different subjects. Furthermore, it relies on specialized knowledge and equipment, making the acquisition of large-scale, cross-individual data lengthy and challenging. Therefore, when training data is limited, using deep learning models for EEG feature extraction is prone to overfitting, making it difficult to generalize to data from new subjects. Summary of the Invention

[0005] The main purpose of this application is to provide a small-sample cross-subject task-state EEG decoding method, which aims to solve the problem of how to prevent deep learning models from overfitting when extracting EEG signal features when training data is limited.

[0006] To achieve the above objectives, the present application provides a small sample cross-subject task-state EEG decoding method, the method comprising:

[0007] S10, extracting semantic features, temporal domain features, and spatial domain features from the EEG signal sample set collected across subjects;

[0008] S20, introducing a channel spatial attention mechanism to enhance the semantic features, the temporal domain features, and the spatial domain features to obtain an enhanced query sample set;

[0009] S30, mapping the enhanced query sample set and the preset support sample set to the same feature space, calculating the similarity score between each to-be-classified sample in the enhanced query sample set and the prototype of the support sample set, and classifying the to-be-classified samples according to the similarity score.

[0010] Optionally, the semantic features are extracted by an electroencephalogram network module, and the electroencephalogram network module includes a three-layer convolutional network, wherein:

[0011] The first convolutional network layer uses one-dimensional convolution to extract the temporal features of the EEG signal sample set;

[0012] The second convolutional network uses depthwise separable convolution to extract spatial domain features from the EEG signal sample set and expand the number of channels;

[0013] The third convolutional network uses separable temporal convolution to extract the temporal features of the EEG signal sample set for a second time;

[0014] Among them, after the EEG signal sample set passes through each layer of convolutional network, the time features are nonlinearly mapped through normalization function and ELU activation function, and then compressed through average pooling operation, and the pooling layer step size of the third layer of convolutional network is adjusted to 1 / 8.

[0015] Optionally, the time domain features and the spatial domain features are extracted by a deep convolutional network module, and the deep convolutional network module includes a four-layer core convolution block, wherein:

[0016] The first layer of core convolutional blocks extracts low-level temporal feature maps from the EEG signal sample set through two-dimensional convolution, performs batch normalization on the feature maps to stabilize the training process, and then implements nonlinear transformation through the ReLU activation function. The low-level temporal feature maps are then reduced in dimension through a 2×2 max pooling layer.

[0017] The second-layer core convolution block expands the depth of the low-level temporal feature map after dimensionality reduction through convolution operation, and uses the number of channels to capture the temporal pattern of the low-level temporal feature map after dimensionality reduction to obtain time domain features;

[0018] The third layer core convolution block extracts spatial domain features between the EEG signals in the EEG signal sample set through a cross-electrode convolution kernel;

[0019] The fourth core convolution block strengthens the global feature representation in the EEG signal sample set through a convolution operation and removes at least one maximum pooling layer.

[0020] Optionally, the semantic features, the temporal domain features, and the spatial domain features are all feature maps, and the step of introducing a channel spatial attention mechanism to enhance the semantic features, the temporal domain features, and the spatial domain features to obtain an enhanced query sample set specifically includes:

[0021] Perform global maximum pooling and global average pooling on the feature map to obtain two dimensions: Sub-feature map of ;

[0022] The two sub-feature maps are respectively fed into a two-layer neural network with shared weights;

[0023] The two sub-feature maps output after neural network processing are fused by element-by-element addition, and the final channel attention feature is generated through the Sigmoid activation function;

[0024] The generated channel attention feature is multiplied element-wise with the feature map to obtain the input feature :

[0025]

[0026] Where, is the activation function, F is the input feature map, MLP is a two-layer neural network with shared weights, AvgPool is the global average pooling function, and MaxPool() is the global maximum pooling function;

[0027] Input features Perform secondary global maximum pooling and secondary global average pooling to obtain two dimensions: The second characteristic subgraph of

[0028] The two second feature subgraphs are spliced in the channel dimension, and then a 7×7 convolution operation is performed to reduce the dimension to a single channel with a dimension of Feature Map :

[0029]

[0030] in, Indicates that a 7×7 convolution kernel is used to perform a convolution operation on the input feature map, and the single channel and dimension are activated by the Sigmoid activation function. Feature map processing to generate spatial attention features ;

[0031] The spatial attention feature With the input features Perform element-by-element multiplication to obtain the final generated features :

[0032]

[0033] A data set consisting of generated features corresponding to each of the feature maps is used as the enhanced query sample set.

[0034] Optionally, before the step of extracting semantic features, time domain features, and space domain features from the electroencephalogram signal sample set, the method further includes:

[0035] S40 , subjecting the original electroencephalogram signal sample set to filtering, normalization, and downsampling in sequence to obtain the preprocessed electroencephalogram signal sample set.

[0036] Optionally, the similarity score is calculated through a relationship network, and S30 further includes:

[0037] The similarity score is optimized using a cross entropy loss function:

[0038]

[0039] Where, is the number of samples, is the true label, is the similarity score predicted by the relational network.

[0040] In addition, to achieve the above objectives, the present application also provides a small-sample cross-subject task-state EEG decoding model, which includes:

[0041] An EEG network module embedded in a deep convolutional network extracts semantic, temporal, and spatial features from EEG signal samples.

[0042] A channel spatial attention module is used to introduce a channel spatial attention mechanism to enhance the semantic features, the temporal domain features, and the spatial domain features to obtain an enhanced query sample set;

[0043] The relationship network module maps the enhanced query sample set and the preset support sample set to the same feature space, calculates the similarity score between each to-be-classified sample in the enhanced query sample set and the prototype of the support sample set, and classifies the to-be-classified samples according to the similarity score.

[0044] In addition, to achieve the above-mentioned purpose, the present application also provides a small-sample cross-subject task-state EEG decoding system, which includes: a memory, a processor, and a computer program stored on the memory and runnable on the processor. When the computer program is executed by the processor, the steps of the small-sample cross-subject task-state EEG decoding method as described in any one of the above items are implemented.

[0045] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the small-sample cross-subject task-state EEG decoding method as described in any of the above items are implemented.

[0046] This application has at least the following beneficial effects:

[0047] By mining the semantic features and temporal and spatial features between support samples and query samples, and combining the CBAM attention mechanism, we focus on the signal features of important channels and key brain regions respectively, significantly enhancing the effectiveness of feature representation. Finally, we optimize the decoding process through the relational network framework, enabling the model to quickly realize knowledge transfer between different subjects and complete the generalization of new tasks with only a small amount of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a flowchart of a small sample cross-subject task-state EEG decoding method according to an embodiment of the present application;

[0049] Figure 2 Schematic diagram of the channel space attention mechanism involved in the embodiment of the present application;

[0050] Figure 3 This is a schematic diagram of a small sample cross-subject task-state EEG decoding route involved in an embodiment of the present application;

[0051] Figure 4 This is a schematic diagram of the t-SNE visualization results involved in the embodiments of this application;

[0052] Figure 5 This is a schematic diagram of the architecture of a small sample cross-subject task-state EEG decoding model involved in an embodiment of the present application;

[0053] Figure 6 This is a schematic diagram of the architecture of the hardware operating environment of the small sample cross-subject task-state EEG decoding system involved in an embodiment of the present application.

[0054] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0055] To better understand the above technical solutions, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0056] First embodiment

[0057] Reference Figure 1 In this embodiment, the small sample cross-subject task-state EEG decoding method includes the following steps:

[0058] Step S10, extracting semantic features, temporal domain features, and spatial domain features from the EEG signal sample set collected across subjects;

[0059] In this embodiment, the semantic features, time domain features, and space domain features of each sample in the EEG signal sample set consisting of EEG signal samples collected from multiple subjects are extracted.

[0060] Specifically and optionally, in this embodiment, semantic features are extracted through an electroencephalogram network (EEGNet) module, in which a three-layer convolutional network is set to efficiently capture the semantic features of EEG signals.

[0061] The first convolutional network layer uses one-dimensional convolution to extract the temporal features of the EEG signal sample set;

[0062] The second convolutional network uses depthwise separable convolution to extract spatial features from the EEG signal sample set and expands the number of channels to further enrich the feature representation;

[0063] The third convolutional network uses separable temporal convolution to secondary extract the temporal features in the EEG signal sample set, thereby significantly reducing the model complexity.

[0064] In addition, after the EEG signal sample set passes through each layer of the convolutional network, the time feature is nonlinearly mapped through the normalization function and the ELU activation function, and the time dimension is compressed through the average pooling operation.

[0065] While reducing the amount of computation, by adjusting the pooling layer step size to 1 / 8, it has been experimentally verified that under this value, the module can retain higher-resolution feature representations while generating high-quality semantic features to support subsequent classification tasks.

[0066] Specifically and optionally, in this embodiment, the temporal domain features and the spatial domain features are extracted by a deep convolutional network (DeepConvNet) embedding module, which consists of four core convolutional blocks:

[0067] The first layer extracts low-level temporal features of the signal through two-dimensional convolution, performs batch normalization on the feature map to stabilize the training process, then implements nonlinear transformation through the ReLU activation function, and then reduces the dimensionality of the feature map through a 2×2 maximum pooling layer;

[0068] The second layer expands the depth of temporal features through deeper convolution operations and uses more channels to capture richer temporal patterns;

[0069] The third layer introduces spatial convolution operation, using cross-electrode convolution kernel to extract spatial features between electrodes and further explore the spatial distribution information of EEG signals;

[0070] The fourth layer strengthens the global feature representation through the final convolution operation and removes at least one layer of maximum pooling layer to avoid the loss of temporal information, thereby retaining more high-resolution feature information.

[0071] Step S20, introducing a channel space attention mechanism to enhance the semantic features, the time domain features, and the spatial domain features to obtain an enhanced query sample set;

[0072] In this embodiment, after extracting the above three features, a Convolutional Block Attention Module (CBAM) is introduced to enhance the semantic features, the temporal domain features, and the spatial domain features.

[0073] It should be noted that the channel-space attention mechanism highlights key signals by weighting the features of different channels, while spatial attention focuses on important areas in the spatial dimension, thereby enhancing the representation ability of embedded features.

[0074] Specifically and optionally, the channel spatial attention mechanism consists of two independent submodules: the channel attention module and the spatial attention module, which perform attention mechanism processing in the channel and spatial dimensions respectively. It should be noted that the semantic features, time domain features and spatial domain features obtained above are all feature maps. Figure 2 The schematic diagram of the channel space attention mechanism is shown. Each different type of feature map satisfies the following enhancement rules:

[0075] Perform global maximum pooling and global average pooling on the feature map to obtain two dimensions: Sub-feature map of ;

[0076] The two sub-feature maps are respectively fed into a two-layer neural network with shared weights;

[0077] The number of neurons in the first layer of the two-layer neural network is C / r, where C represents the number of channels and r is the reduction ratio, which is a hyperparameter that adjusts the number of MLP parameters. The activation function uses the ReLU function, and the number of neurons in the second layer is C.

[0078] The two sub-feature maps output after neural network processing are fused by element-by-element addition, and the final channel attention feature is generated through the Sigmoid activation function;

[0079] The generated channel attention feature is multiplied element-wise with the feature map to obtain the input feature :

[0080]

[0081] Where, is the activation function, F is the input feature map, MLP is a two-layer neural network with shared weights, AvgPool is the global average pooling function, and MaxPool() is the global maximum pooling function;

[0082] Input features Perform secondary global maximum pooling and secondary global average pooling to obtain two dimensions: The second characteristic subgraph of

[0083] The two second feature subgraphs are spliced in the channel dimension, and then a 7×7 convolution operation is performed to reduce the dimension to a single channel with a dimension of Feature Map :

[0084]

[0085] in, Indicates that a 7×7 convolution kernel is used to perform a convolution operation on the input feature map, and the single channel and dimension are activated by the Sigmoid activation function. Feature map processing to generate spatial attention features ;

[0086] The spatial attention feature With the input features Perform element-by-element multiplication to obtain the final generated features :

[0087]

[0088] Finally, a data set consisting of the generated features corresponding to each of the feature maps is used as the enhanced query sample set.

[0089] Step S30: Map the enhanced query sample set and the preset support sample set to the same feature space, calculate the similarity score between each to-be-classified sample in the enhanced query sample set and the prototype of the support sample set, and classify the to-be-classified samples according to the similarity score.

[0090] In this embodiment, the similarity score is calculated through the interaction between the support set and query set embedding features to complete the classification task.

[0091] It should be noted that the main challenge facing task-based EEG decoding currently lies in how to effectively deal with the significant differences in EEG signals between individuals and the complex dynamic changes in the signals, so as to achieve efficient decoding of task-related information under small sample conditions. In practical applications, the distribution of EEG signals between different subjects has strong personalized characteristics. At the same time, the scarcity of EEG data further limits the generalization ability of existing methods. In this context, how to achieve cross-subject EEG decoding is particularly important. The relational network method provides an effective way to solve this problem because it can quickly adapt to new subject data from a limited support sample, reduce dependence on large-scale annotated data, and improve the efficiency and robustness of small-sample task decoding.

[0092] Specifically and optionally, the calculation of the similarity score can be implemented through a relational network module, the structure of which consists of two convolutional units, a global pooling layer, and two fully connected layers. Among them, the convolutional unit uses a 5×5 depthwise separable convolution, combined with batch normalization and ReLU activation function to capture the interactive relationship between local features, thereby enhancing the effectiveness and robustness of feature representation. In addition, to adapt to the size of different input features, the global pooling layer uses adaptive average pooling, which can dynamically adjust the dimension of the output features while retaining global information; on the other hand, the fully connected layer further maps the extracted features, reducing the enhanced query sample set to a 16-dimensional support sample set, and then mapping it to a 1-dimensional feature space to generate a similarity score between the support sample and the query sample.

[0093] Specifically and optionally, to optimize module performance, the similarity score is optimized using the mean squared error loss function, so that the similarity score of matching samples is close to 1, while the score of non-matching samples is close to 0, thereby improving the model's ability to cope with complex category distributions in small sample classification tasks. In addition, the overall model optimization is achieved using the cross entropy loss function L. The specific optimization process is as follows:

[0094]

[0095] Where, is the number of samples, is the true label, is the similarity score of the relational network prediction.

[0096] In the technical solution provided in this embodiment, by mining the semantic features and temporal and spatial features between the support samples and the query samples, and combining the CBAM attention mechanism, focusing on the signal features of important channels and key brain areas respectively, the effectiveness of feature representation is significantly enhanced. Finally, the decoding process is optimized through the relational network framework, so that the model can quickly realize knowledge transfer between different subjects and complete the generalization of new tasks with only a small amount of data.

[0097] Second embodiment

[0098] In this embodiment, referring to Figure 3 The diagram shows a schematic diagram of a small sample cross-subject task-state EEG decoding route. Based on the module architecture given in the first embodiment, this embodiment further introduces an EEG signal extraction module, and the original EEG signal sample set collected across subjects is filtered, normalized, and down-sampled in sequence to obtain the pre-processed EEG signal sample set.

[0099] Specifically and optionally, in one embodiment, the filtering process can be preprocessed using a bandpass filter, and the filtering range is set to 0.5 Hz to 40 Hz, retaining the main task-related frequency components in the EEG signal; for each trial, the corresponding EEG data is extracted from the EEG signal and normalized to eliminate amplitude differences and ensure data consistency; finally, in order to reduce the computational burden and improve processing efficiency, after completing the filtering and normalization processing, the signal is downsampled to 100 Hz.

[0100] In addition, as a component of the classification network, the relational network classifies each sample in the EEG signal sample set according to the score after calculating the similarity score, and obtains classification results such as motor imagery decoding results and emotion recognition decoding results.

[0101] Verification Example

[0102] This example compares and analyzes the small sample cross-subject task-state EEG decoding model (Ours) proposed in the previous example with the conventional model. The results are shown in the following table:

[0103] Table 1. Comparison of classification accuracy of different models on the BCI Competition IV-2a dataset

[0104]

[0105] Table 2. Comparison of classification accuracy of different models on the BCI Competition IV-2b dataset

[0106]

[0107] It can be seen that the classification accuracy of the small sample cross-subject task-state EEG decoding model is better than that of the conventional model.

[0108] in addition, Figure 4 This visualization shows the feature distributions of three representative subjects in a two-category motor imagery task from the BCI-2b dataset using t-SNE. This visualization compares data from different stages: raw EEG data, data processed using a baseline method, and data processed using the proposed method. Subject 9 represents the average case (closest to average performance), subject 3 represents the worst case (lowest performance), and subject 4 represents the best case (highest performance). The orange and green dots represent left- and right-hand support signals, respectively, while the black dots represent query signals. Left- and right-hand support signals tend to be distributed in different regions of space, indicating that the extracted features can distinguish left- and right-hand signals to a certain extent. The query signals are distributed near their corresponding support signals, indicating that they are close to the most similar support signals in the entire feature space, which to some extent demonstrates the model's ability to discriminate query signals.

[0109] In addition, as an implementation solution, refer to Figure 5 This embodiment also proposes a small-sample cross-subject task-state EEG decoding model, which includes:

[0110] An EEG network module 100 embedded in a deep convolutional network extracts semantic features, temporal domain features, and spatial domain features from a set of EEG signal samples;

[0111] A channel spatial attention module 200 is configured to introduce a channel spatial attention mechanism to enhance the semantic features, the temporal domain features, and the spatial domain features to obtain an enhanced query sample set;

[0112] The relationship network module 300 maps the enhanced query sample set and the preset support sample set to the same feature space, calculates the similarity score between each to-be-classified sample in the enhanced query sample set and the prototype of the support sample set, and classifies the to-be-classified samples according to the similarity score.

[0113] In addition, as an implementation solution, Figure 6 This is a schematic diagram of the architecture of the hardware operating environment of the small sample cross-subject task-state EEG decoding system involved in the embodiment of the present application.

[0114] like Figure 6 As shown, the small-sample cross-subject task-state EEG decoding system may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. The communication bus 1002 is used to implement communication between these components. The user interface 1003 may include a display and an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as a disk storage device. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0115] Those skilled in the art will understand that Figure 6 The small-sample cross-subject task-state EEG decoding system architecture shown in does not constitute a limitation of the small-sample cross-subject task-state EEG decoding system, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0116] like Figure 6 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a computer program. The operating system is a program that manages and controls the hardware and software resources of the small sample cross-subject task-state EEG decoding system, and the operation of the computer program and other software or programs.

[0117] exist Figure 6 In the small sample cross-subject task-state EEG decoding system shown, the user interface 1003 is mainly used to connect to the terminal and communicate data with the terminal; the network interface 1004 is mainly used for the background server and communicates data with the background server; the processor 1001 can be used to call the computer program stored in the memory 1005.

[0118] In this embodiment, the small sample cross-subject task-state EEG decoding system includes: a memory 1005, a processor 1001, and a computer program stored in the memory and executable on the processor, wherein:

[0119] When the processor 1001 calls the computer program stored in the memory 1005, it performs the following operations:

[0120] S10, extracting semantic features, temporal domain features, and spatial domain features from the EEG signal sample set collected across subjects;

[0121] S20, introducing a channel spatial attention mechanism to enhance the semantic features, the temporal domain features, and the spatial domain features to obtain an enhanced query sample set;

[0122] S30, mapping the enhanced query sample set and the preset support sample set to the same feature space, calculating the similarity score between each to-be-classified sample in the enhanced query sample set and the prototype of the support sample set, and classifying the to-be-classified samples according to the similarity score.

[0123] When the processor 1001 calls the computer program stored in the memory 1005, it performs the following operations:

[0124] Perform global maximum pooling and global average pooling on the feature map to obtain two dimensions: Sub-feature map of ;

[0125] The two sub-feature maps are respectively fed into a two-layer neural network with shared weights;

[0126] The two sub-feature maps output after neural network processing are fused by element-by-element addition, and the final channel attention feature is generated through the Sigmoid activation function;

[0127] The generated channel attention feature is multiplied element-wise with the feature map to obtain the input feature :

[0128]

[0129] Where, is the activation function, F is the input feature map, MLP is a two-layer neural network with shared weights, AvgPool is the global average pooling function, and MaxPool() is the global maximum pooling function;

[0130] Input features Perform secondary global maximum pooling and secondary global average pooling to obtain two dimensions: The second characteristic subgraph of

[0131] The two second feature subgraphs are spliced in the channel dimension, and then a 7×7 convolution operation is performed to reduce the dimension to a single channel with a dimension of Feature Map :

[0132]

[0133] in, Indicates that a 7×7 convolution kernel is used to perform a convolution operation on the input feature map, and the single channel and dimension are activated by the Sigmoid activation function. Feature map processing to generate spatial attention features ;

[0134] The spatial attention feature With the input features Perform element-by-element multiplication to obtain the final generated features :

[0135]

[0136] A data set consisting of generated features corresponding to each of the feature maps is used as the enhanced query sample set.

[0137] When the processor 1001 calls the computer program stored in the memory 1005, it performs the following operations:

[0138] S40 , subjecting the original electroencephalogram signal sample set to filtering, normalization, and downsampling in sequence to obtain the preprocessed electroencephalogram signal sample set.

[0139] When the processor 1001 calls the computer program stored in the memory 1005, it performs the following operations:

[0140] The similarity score is optimized using a cross entropy loss function:

[0141]

[0142] Where, is the number of samples, is the true label, is the similarity score of the relational network prediction.

[0143] Furthermore, those skilled in the art will appreciate that all or part of the processes in the methods of the above-described embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program includes program instructions, which can be stored in a storage medium that is a computer-readable storage medium. The program instructions are executed by at least one processor in the small-sample cross-subject task-state EEG decoding system to implement the process steps of the above-described method embodiments.

[0144] Therefore, the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the various steps of the small-sample cross-subject task-state EEG decoding method as described in the above embodiment.

[0145] The computer-readable storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.

[0146] It should be noted that since the storage medium provided in the embodiments of this application is the storage medium used to implement the method of the embodiments of this application, based on the method described in the embodiments of this application, those skilled in the art will be able to understand the specific structure and deformation of the storage medium, and therefore will not be described in detail here. All storage media used in the method of the embodiments of this application fall within the scope of protection to be provided by this application.

[0147] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0148] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0149] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0151] It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claim. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The present application may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0152] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0153] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A small sample cross-subject task-state EEG decoding method, characterized by: The method comprises the following steps: S10, extracting semantic features, temporal domain features, and spatial domain features from the EEG signal sample set collected across subjects; S20, introducing a channel spatial attention mechanism to enhance the semantic features, the temporal domain features, and the spatial domain features to obtain an enhanced query sample set; S30, mapping the enhanced query sample set and the preset support sample set to the same feature space, calculating the similarity score between each to-be-classified sample in the enhanced query sample set and the prototype of the support sample set, and classifying the to-be-classified samples according to the similarity score.

2. The method according to claim 1, wherein The semantic features are extracted by an electroencephalogram (EEG) network module, which includes a three-layer convolutional network, wherein: The first convolutional network layer uses one-dimensional convolution to extract the temporal features of the EEG signal sample set; The second convolutional network uses depthwise separable convolution to extract spatial domain features from the EEG signal sample set and expand the number of channels; The third convolutional network uses separable temporal convolution to extract the temporal features of the EEG signal sample set for a second time; Among them, after the EEG signal sample set passes through each layer of convolutional network, the time features are nonlinearly mapped through normalization function and ELU activation function, and then compressed through average pooling operation, and the pooling layer step size of the third layer of convolutional network is adjusted to 1 / 8.

3. The method according to claim 1, wherein The temporal domain features and the spatial domain features are extracted by a deep convolutional network module, which includes four layers of core convolution blocks, wherein: The first layer of core convolutional blocks extracts low-level temporal feature maps from the EEG signal sample set through two-dimensional convolution, performs batch normalization on the feature maps to stabilize the training process, and then implements nonlinear transformation through the ReLU activation function. The low-level temporal feature maps are then reduced in dimension through a 2×2 max pooling layer. The second-layer core convolution block expands the depth of the low-level temporal feature map after dimensionality reduction through convolution operation, and uses the number of channels to capture the temporal pattern of the low-level temporal feature map after dimensionality reduction to obtain time domain features; The third layer core convolution block extracts spatial domain features between the EEG signals in the EEG signal sample set through a cross-electrode convolution kernel; The fourth core convolution block strengthens the global feature representation in the EEG signal sample set through a convolution operation and removes at least one maximum pooling layer.

4. The method according to claim 1, wherein The semantic features, the time domain features, and the spatial domain features are all feature maps, and the step of introducing a channel spatial attention mechanism to enhance the semantic features, the time domain features, and the spatial domain features to obtain an enhanced query sample set specifically includes: Perform global maximum pooling and global average pooling on the feature map to obtain two dimensions: Sub-feature map of ; The two sub-feature maps are respectively fed into a two-layer neural network with shared weights; The two sub-feature maps output after neural network processing are fused by element-by-element addition, and the final channel attention feature is generated through the Sigmoid activation function; The generated channel attention feature is multiplied element-wise with the feature map to obtain the input feature : ; Where, is the activation function, F is the input feature map, MLP is a two-layer neural network with shared weights, AvgPool is the global average pooling function, and MaxPool() is the global maximum pooling function; Input features Perform secondary global maximum pooling and secondary global average pooling to obtain two dimensions: The second characteristic subgraph of The two second feature subgraphs are spliced in the channel dimension, and then a 7×7 convolution operation is performed to reduce the dimension to a single channel with a dimension of Feature Map : ; in, Indicates that a 7×7 convolution kernel is used to perform a convolution operation on the input feature map, and the single channel and dimension are activated by the Sigmoid activation function. Feature map processing to generate spatial attention features ; The spatial attention feature With the input features Perform element-by-element multiplication to obtain the final generated features : ; A data set consisting of generated features corresponding to each of the feature maps is used as the enhanced query sample set.

5. The method according to claim 1, wherein Before the step of extracting semantic features, time domain features and spatial domain features from the electroencephalogram signal sample set, the method further includes: S40 , subjecting the original electroencephalogram signal sample set to filtering, normalization, and downsampling in sequence to obtain the preprocessed electroencephalogram signal sample set.

6. The method according to claim 1, wherein The similarity score is calculated through a relationship network, and S30 further includes: The similarity score is optimized using a cross entropy loss function: ; Where, is the number of samples, is the true label, is the similarity score predicted by the relational network.

7. A small sample cross-subject task-state EEG decoding model, characterized by: The small sample cross-subject task-state EEG decoding model includes: An EEG network module embedded in a deep convolutional network extracts semantic, temporal, and spatial features from EEG signal samples. A channel spatial attention module is used to introduce a channel spatial attention mechanism to enhance the semantic features, the temporal domain features, and the spatial domain features to obtain an enhanced query sample set; The relationship network module maps the enhanced query sample set and the preset support sample set to the same feature space, calculates the similarity score between each to-be-classified sample in the enhanced query sample set and the prototype of the support sample set, and classifies the to-be-classified samples according to the similarity score.

8. A small sample cross-subject task-state EEG decoding system, characterized by: The small-sample cross-subject task-state EEG decoding system includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, the steps of the small-sample cross-subject task-state EEG decoding method as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the small-sample cross-subject task-state EEG decoding method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Small sample image recognition optimization method and device, equipment and storage medium

    CN116994043A

  • Power transmission line semantic segmentation method based on attention mechanism

    CN117911684A

  • Small sample electroencephalogram space-time-frequency global decoding method and system for fine-grained target recognition task and storage medium

    CN118673398A

  • Cognitive classification method and system based on electroencephalogram space-time semantic features and medium

    CN119416037A