EEG (electroencephalogram) high-time-resolution brain activity state characterization model for motor imagery

By using the models of the two-layer state space embedding module, task-related evaluation module and low-dimensional subspace characterization module in EEG signal processing, the complexity and time series information loss of EEG signal processing in the prior art are solved, and the high time resolution and model robustness are improved.

CN119848615APending Publication Date: 2025-04-18HARBIN INST OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411573670.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

When processing complex EEG signals, the prior art is limited by manual feature definition, static modeling, the limitations of linear classifiers, and the loss and interpretability of time series information of deep learning models, resulting in poor performance in electrocerebral decoding tasks.

Method used

A high-temporal resolution brain activity state representation model for motion imagination is adopted, including a two-layer state space embedding module, a task-related evaluation module and a low-dimensional subspace representation module. The model reconstructs the state sequence represented by brain activity through convolutional calculations, captures multiple short-term and stable spatiotemporal patterns, and constructs low-dimensional representations through task-related metrics and orthogonal subspaces, and enters a fully connected layer classifier.

Benefits of technology

It realizes automated feature extraction and high-temporal resolution dynamic modeling, enhances the robustness and interpretability of the model, can flexibly adapt to complex brain signals, and improves the accuracy and efficiency of decoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848615A_ABST
    Figure CN119848615A_ABST
Patent Text Reader

Abstract

The invention discloses a motor imagery-oriented EEG (electroencephalogram) high-temporal-resolution brain activity state characterization model, which relates to the technical field of signal processing, and is characterized by comprising a double-layer state space embedding module, a task-related evaluation module and a low-dimensional subspace characterization module. According to the method, a double-layer state space embedding module is adopted for representation, time sequence information is completely reserved, high-resolution EEG dynamic modeling is achieved, and brain dynamics changes in a motor imagery task are accurately captured; according to the method, task correlation measurement and low-dimensional space representation are combined, the task correlation influence of the feature sequence is enhanced, the noise influence is weakened, and high classification precision is still kept in a data scarcity or noise environment; according to the method, the classification accuracy is superior to that of an existing model, the ability of understanding and analyzing the brain dynamics process is remarkably improved, and the potential of the EEG decoding technology in neuroscience research and brain-computer interface application is expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of signal processing, and more specifically, to an EEG high-temporal-resolution brain activity state representation model for motor imagery. Background Art

[0002] At present, the neural decoding methods used for EEG decoding of motor imagery are mainly divided into two categories. With regard to the technical background of the EEG high-temporal resolution brain activity state representation model for motor imagery, current research focuses on how to effectively decode the dynamic activity of the brain during motor imagery tasks. This research is of great significance in fields such as brain-computer interface (BCI) and neuroscience, and aims to achieve the understanding and control of brain activity by analyzing EEG data.

[0003] First, traditional methods occupy an important position in EEG decoding. These methods usually adopt an architecture that combines feature extraction with classifiers. Feature extractors extract features involving spatial and frequency domains from EEG signals through common spatial patterns (CSP) and filter bank techniques. Common spatial patterns focus on analyzing the covariance matrix of EEG signals for different motor imagery tasks to mine differential features, while filter banks focus on the inter-class signal differences reflected in different frequency bands. These methods combine classifiers such as linear discriminant analysis (LDA), support vector machines (SVM), and multi-layer perceptrons (MLP) to achieve feature-to-category mapping. However, these traditional methods rely on manually designed feature extraction schemes and cannot flexibly adapt to the complex spatiotemporal changes and nonlinear characteristics of EEG signals.

[0004] Secondly, the introduction of deep learning methods has promoted the progress of EEG decoding technology. Models based on convolutional neural networks (CNN), such as EEGNet and FBCNet, grasp more complex spatiotemporal patterns by learning features directly from raw EEG signals. In recent years, the Transformer model has applied the attention mechanism to further enhance the model's ability in spatiotemporal feature extraction. For example, EEG Conformer and Swin Transformer can capture the key features of motor imagery in high-dimensional feature space, significantly improving classification performance.

[0005] However, the defects of existing methods still exist. In traditional methods, feature extraction relies on manual definition, which makes it difficult to adapt to the complex dynamic patterns in EEG signals. In addition, these methods are usually based on static modeling and lack the ability to capture dynamic changes in time, especially when faced with changes in brain dynamics in motor imagery tasks. At the same time, the limitations of linear classifiers also limit the accurate decoding of complex associations in EEG signals, affecting the performance and robustness of the entire model.

[0006] Correspondingly, the application of deep learning methods in decoding is not flawless. Although it significantly improves the classification accuracy, such models usually lose the complete time series information of EEG signals in the process of feature dimensionality reduction, which limits the ability to model fine-grained changes in brain dynamics. In addition, deep learning models are usually regarded as black boxes and lack effective mechanisms to explain high-dimensional features and network decision-making processes. Although there is an improvement in classification performance, its low interpretability hinders its widespread application in neuroscience research and cannot provide in-depth insights into the cognitive laws and neural mechanisms in motor imagery.

[0007] Therefore, the present invention provides an EEG high temporal resolution brain activity state representation model for motor imagery. Summary of the invention

[0008] The purpose of the present invention is to provide an EEG high temporal resolution brain activity state representation model for motor imagery, so as to solve the problems that the prior art is limited by the limitations of artificial feature definition, static modeling, linear classifiers, and the time series information loss and insufficient interpretability of deep learning models when processing complex EEG signals, resulting in unsatisfactory performance in EEG decoding tasks.

[0009] The above technical objectives of the present invention are achieved through the following technical solutions: an EEG high-temporal-resolution brain activity state representation model for motor imagery, comprising a two-layer state space embedding module, a task-related evaluation module and a low-dimensional subspace representation module;

[0010] The two-layer state space embedding module reconstructs the state sequence represented by brain activity from the EEG signal, constructs a state vector by capturing a variety of short-term stable spatiotemporal patterns to represent the complex brain activity of the motor imagery task, and represents the macroscopic brain state changes through a sequence composed of state vectors;

[0011] The task-related evaluation module measures the correlation between the EEG signal and the motor imagery task to achieve dynamic scaling of the brain activity state vector and estimation of the task-irrelevant probability;

[0012] The low-dimensional subspace representation module constructs a low-dimensional representation of the task-related functional state sequence by reconstructing an orthogonal subspace of the functional state space, and inputs it into the fully connected layer classifier.

[0013] The present invention is further configured as follows: the double-layer state space embedding module is a model implementation of the double-layer state space representation method.

[0014] The present invention is further configured as follows: the double-layer state space representation method includes a functional pattern space and a functional state space.

[0015] The present invention is further configured as follows: the functional pattern space is described by a state space model for capturing short-term stable brain functional patterns in EEG signals;

[0016] The state space model is a modeling method for dynamic systems. A discrete multi-input, single-output state space model can describe the temporal dynamics of the system state and the mapping relationship between the system state and the observed signal through the following difference equation:

[0017] y t =Cu t +Dx t

[0018]

[0019] where x t ∈R c is the system input at time t, u t ∈R n is the hidden state vector describing the system state at time t, y t ∈R represents the system output at time t.

[0020] The present invention is further configured as follows: the input of the state-space model is a signal sequence composed of multi-channel EEG signals, the multi-channel EEG signals are represented by a linear combination of multi-source signals, and a multi-input single-output SSM model for learning task-related functional patterns is constructed. The recursive form of the SSM model is converted into a convolution calculation form, and multiple convolution kernels are used to realize multi-modal combination representation of different signal features, and finally a functional state sequence representation of brain activity is obtained.

[0021] The present invention is further configured as follows: the sources of the multi-channel EEG signals include task-related brain activity signals, task-irrelevant brain activity signals and noise signals.

[0022] The present invention is further configured as follows: the double-layer state space embedding module includes three layers of multi-core small-core convolutional layers;

[0023] The first convolutional layer uses a convolution with 64 full channels of size 1 to learn the spatial activation pattern of the brain in the EEG signal;

[0024] The second convolutional layer uses 64 temporal convolution kernels to learn the temporal intensity variation features of the 64 spatial activation patterns extracted;

[0025] The third convolutional layer uses 64 1*1 convolution kernels to further abstract and reorganize the spatial patterns and temporal intensity changes.

[0026] The present invention is further configured as follows: the task-related evaluation module obtains task-related scores and task-independent scores by inner products of a set of trainable task-related metrics and the functional state vectors at each moment, maps the scores into task-independent probabilities, normalizes and scales the task-related scores, and generates a task-related functional state sequence.

[0027] The present invention is further configured as follows: the dimensional subspace representation module includes a task-independent mask unit, an orthogonal subspace construction unit and a subspace complete representation unit;

[0028] The task-independent mask unit filters out functional states with low task relevance through a single-head attention mechanism and a task-independent mask, and learns the global temporal dependency of functional states with high task relevance;

[0029] The orthogonal subspace construction unit captures global information and generates low-dimensional representation by introducing trainable orthogonal basis vectors and interacting with key functional states through an attention mechanism;

[0030] The subspace complete representation unit reconstructs the task-related functional state sequence using the trained orthogonal basis, ensuring that the low-dimensional subspace can accurately represent all task-related states.

[0031] Another object of the present invention is to provide a method for using an EEG high temporal resolution brain activity state representation model for motor imagery, comprising the following steps:

[0032] Data input: multi-channel EEG signals are input into the model;

[0033] Two-layer state space embedding: extract short-term brain function patterns through three layers of convolution and embed them into the functional state space;

[0034] Task relevance assessment: Through the task relevance measurement module, the functional state sequence is task-relevantly scaled;

[0035] Low-dimensional representation construction: Use orthogonal subspace reconstruction to generate global low-dimensional features for classification;

[0036] Classification output: The low-dimensional state sequence is input into the fully connected classifier and the decoding result is output.

[0037] By adopting the above technical solution, the double-layer state space embedding module of the present invention converts the multi-input single-output state space model (SSM) into a convolution structure capable of processing multi-channel EEG signals through the convolution calculation form. Through the combination of multi-core convolution, the present invention automatically extracts the spatiotemporal features in the EEG signal, getting rid of the dependence on manually defined features and prior assumptions. At the same time, by designing a task-related measurement module and introducing a single-head attention mechanism, the importance of features is dynamically adjusted in the task-irrelevant mask unit, and irrelevant noise is automatically filtered out to ensure that the model focuses on brain activity signals that are highly relevant to the motor imagery task. Automated feature extraction enables the present invention to flexibly adapt to complex brain signals and improves the accuracy and efficiency of decoding.

[0038] The double-layer state space embedding module of the present invention introduces a multi-layer multi-core convolutional layer to capture a variety of short-term stable brain function patterns in EEG signals. It also removes the time domain pooling layer used in common deep neural network methods to ensure the temporal and spatial sequence integrity of brain signals. The present invention describes the temporal dynamics of brain activity through functional state sequences, so that the subtle temporal dynamics in EEG signals can be preserved, and the changes in brain dynamics during motor imagery can be accurately captured. This design provides strong support for the detailed analysis of neural dynamics and is particularly suitable for studying dynamic changes in the brain.

[0039] The present invention has strong robustness when processing complex signals, especially in multi-channel EEG signals. The present invention takes into account different sources of task-related signals, spontaneous brain activity signals and noise signals. The task-related evaluation module obtains task-related and irrelevant scores through a set of trainable measurement mechanisms and the inner product of the functional state vector at each moment, and normalizes and scales the task-related scores to ensure that the task-related functional state sequence can still maintain high task relevance while retaining high temporal resolution. The low-dimensional subspace representation module constructs an orthogonal subspace through orthogonal basis vectors and reconstructs the task-related functional states, further enhancing the model's anti-interference ability while retaining high temporal resolution. Even when data is scarce or the noise is large, the present invention still maintains a high classification accuracy.

[0040] The present invention provides a complete low-dimensional representation framework by constructing task-independent mask units, orthogonal subspace construction units and subspace complete representation units. The task-independent mask unit filters out low-correlation functional states through a single-head attention mechanism, thereby capturing the global temporal dependency between the most critical brain activity states in motor imagery tasks. The orthogonal subspace construction unit interacts with key functional states through an attention mechanism to capture spatial distribution information.

[0041] In summary, the present invention has the following beneficial effects:

[0042] 1. Automated feature extraction: Through the convolution-attention mechanism structure and end-to-end training method, the present invention automatically extracts the spatiotemporal features in the EEG signal, gets rid of the dependence on manual definition and prior assumptions, can flexibly adapt to complex brain signals, and improves the accuracy and efficiency of decoding.

[0043] 2. High temporal resolution dynamic modeling: The present invention adopts a dual-state space representation method, completely retains the time series information, removes the time domain pooling layer, and realizes high temporal resolution dynamic modeling of EEG data. It can accurately capture the changes in brain dynamics in motor imagery tasks and provide detailed support for the analysis of dynamic processes.

[0044] 3. Strong robustness: This method combines task relevance measurement and low-dimensional space representation to enhance the impact of task-related parts in feature sequences and reduce the impact of noise. Even in environments with scarce data or high noise, this method still maintains high classification accuracy, solving the problem of sensitivity of traditional methods to feature quality.

[0045] 4. Enhanced interpretability: The present invention provides a complete analytical framework to improve the model’s interpretability of brain state characteristics, support a deeper understanding of neural mechanisms, remedy the “black box” problem of deep learning models, and reveal the neural dynamics behind motor imagery. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is a network structure diagram in Embodiment 1 of the present invention;

[0047] Figure 2 is the influence of the functional state subspace dimension on the model accuracy in the embodiment of the present invention;

[0048] in, Figure 2 a is the reconstruction loss distribution of the training set; Figure 2 b is the reconstruction loss distribution of the test set; Figure 2 c is the classification accuracy distribution of the test set;

[0049] Figure 3 is the accuracy distribution of different subjects of S4RNet in the embodiment of the present invention;

[0050] Figure 4 is the sample distribution under different feature representations in the embodiments of the present invention;

[0051] Figure 5 It is the accuracy distribution of different subjects of S4RNet under the strategy of randomly dividing the training set and the test set in the embodiment of the present invention;

[0052] Figure 6 is the sample distribution of the functional state sequence and the task-enhanced functional state sequence in the embodiment of the present invention;

[0053] in, Figure 6 a is the sample distribution characterized by the functional state sequence; Figure 6 b is the sample distribution of functional state sequence representation using task-related enhancement;

[0054] Figure 7 is the SSE and task relevance score under different numbers of groups in the embodiment of the present invention;

[0055] in, Figure 7 a is a line graph of the cost function of the original value and the task-related score; Figure 7 b is the line chart after the original value is normalized;

[0056] Figure 8 is a topological energy distribution diagram of task-related meta-states in an embodiment of the present invention;

[0057] Fig. 9 is a schematic diagram of visualization of task-related meta-states of four motor imagery tasks in an embodiment of the present invention;

[0058] in, Fig. 9 a. Fig. 9 d is the sample distribution of the four types of motor imagery for the first type of task-related meta-states; Fig. 9 b. Fig. 9 e is the sample distribution of the four types of motor imagery of the second type of task-related meta-states; Fig. 9 c. Fig. 9 f is the sample distribution of the four types of motor imagery for the third type of task-related meta-states;

[0059] Fig.10 is a graph of the frequency of occurrence of different meta-states in different motor imagery tasks in an embodiment of the present invention;

[0060] Fig.11 is a task-related meta-state transition probability diagram under different motor imagery tasks in an embodiment of the present invention;

[0061] in, Fig.11 a is the state transition characteristics of the left-hand motor imagery task; Fig.11 b is the state transition characteristics of the right-hand motor imagery task; Fig.11 c is the state transition feature of the two-foot movement imagery task; Fig.11 d is the state transition feature of the tongue movement imagery task. DETAILED DESCRIPTION

[0062] Example 1: An EEG high temporal resolution brain activity state representation model for motor imagery, the network structure is as follows Figure 1 As shown, it includes a two-layer state space embedding module, a task-related evaluation module and a low-dimensional subspace representation module;

[0063] Two-layer state-space embedding module:

[0064] The dual-layer state space embedding module of the present invention is mainly used to reconstruct the brain activity state sequence of the motor imagery task from the EEG signal, by capturing short-term stable spatiotemporal patterns to represent macroscopic brain state changes. The module is constructed based on the dual-layer state space representation method, which consists of two layers of state space:

[0065] The first layer of state space (functional pattern space): This layer is mainly responsible for capturing relatively stable brain functional patterns in a short time. These patterns appear as stable spatial activation patterns on a short time scale, showing only changes in intensity, and are used to describe the spatiotemporal characteristics of the brain on a short time scale.

[0066] The second layer state space (functional state space): This layer constructs a high-dimensional and complex neural dynamic representation by combining representations under multiple functional modes. It reflects the changes between different functional modes on a longer time scale, thereby depicting the macroscopic state trajectory of the brain.

[0067] The first level state space is described by the state space model. A discrete multi-input, single-output state space model can be described by the following difference equation:

[0068] y t =Cu t +Dx t

[0069]

[0070] where x t ∈R c is the system input at time t, u t ∈R n is the hidden state vector describing the system state at time t, y t ∈R represents the system output at time t. It describes the time dynamics of the system state and the mapping relationship between the system state and the observed signal. Let the initial state By unlooping the formula, we can get

[0071]

[0072] That is, for an input sequence X=(x0,…,x L ), after passing through the state space model SSM model, the output sequence Y = (y0,…,y L ) can be calculated by a convolution with skip connection, that is, SSM can be implemented by a convolution with a field of view of the entire input sequence.

[0073] The model input of the state-space model is the multi-channel EEG signal x t ∈R c The signal sequence X = {x t |t∈[0,τ]}, τ represents the duration of the functional pattern, and c is the number of channels of the EEG signal. Assume that the observed EEG signal has three sources: task-related brain activity signal Task-irrelevant brain activity signatures and noise signal The observed multi-channel EEG signal can be represented by a linear model as:

[0074] x t =αx t tr +βx t un +x t n

[0075] Among them, α∈R c ,β∈R c Then, the multi-input single-output SSM model for learning task-related functional patterns can be expressed as:

[0076] y t =Cu t

[0077]

[0078] Then the de-loop can be expressed in the form of convolution calculation as

[0079]

[0080]

[0081] in, That is, by using multiple convolution kernels to achieve multi-modal combined representation of the functional state, the functional state sequence H can be obtained.

[0082] The present invention uses three layers of multi-core small-core convolutional layers to construct a two-layer state space embedding module. The first convolutional layer network contains 64 full-channel convolutions of size c*1 to learn the spatial activation pattern of the brain in the EEG signal. The data set used in this embodiment contains 22 channels, so the size of the first convolutional kernel is set to 22*1;

[0083] The second convolutional layer network uses 64 time-domain convolution kernels to learn and extract the time-domain intensity variation characteristics of 64 spatial activation patterns. The field of view of the time-domain convolution kernel here is set according to the duration of the functional mode; the duration of the functional mode in the resting state is 80 to 100 ms, and the duration of the functional mode in the task state is shorter than that in the resting state. Taking the sampling rate of 128 Hz as an example, the size of the time-domain convolution kernel set in this embodiment is 16*1, so that its field of view can cover the EEG signal with a duration of 125 ms, and a complete functional mode representation can be constructed;

[0084] The third convolutional layer network uses 64 1*1 convolution kernels to further abstract and reorganize the spatial patterns and temporal intensity changes to increase the model's ability to express complex patterns in EEG; through the above three layers of small-kernel convolution layers, a combined representation of the functional state of 64 functional modes learned by 64 SSMs is approximately realized, and the embedding of EEG signals into the functional state space is realized, and the functional state sequence H is obtained.

[0085] Right now,

[0086]

[0087] Among them, H∈R 64*T , T is the number of sampling points in a trial, and the number of signal sampling points in a single trial in the data set used in the present invention is 438. i (·) represents the mapping function consisting of three layers of convolution to obtain the i-th functional mode, is a zero-padded EEG signal sequence to make the convolution operation equivalent to the convolution calculation in SSM.

[0088] Task-related assessment modules:

[0089] In order to avoid functional state switching and subjective noise state generated by subjects during the cognitive process, this paper proposes a trainable task relevance measurement method, and realizes two functions based on the task relevance score of each state:

[0090] 1) Scaling the functional state vector at each moment;

[0091] 2) Obtain the task-independent probability of the state vector at each moment.

[0092] Specifically, through a set of trainable and adjustable task-related metrics: R∈R 2*n and the functional state vector h at each moment t The inner product of is taken as the task-related score and the task-irrelevant score, that is

[0093]

[0094] Among them, Scoret ∈R 2 is a two-dimensional vector of the evaluation score of the functional state vector at time t, whose two dimensions represent the task-related score and the task-irrelevant score respectively. Then, the score is mapped to the probability space through the softmax function to obtain the task-irrelevant probability P un , and normalize the task-related scores and scale the functional state vector through the sigmoid function to obtain the task-related functional state sequence H':

[0095]

[0096] Low-dimensional subspace representation module:

[0097] The present invention constructs a low-dimensional representation of the task-related functional state space by reconstructing an orthogonal subspace of the functional state space and inputs it into the fully connected layer classifier. The low-dimensional subspace representation module includes three main components: a task-independent masked functional state aggregation unit, an orthogonal subspace construction unit, and a subspace complete representation unit. In each unit, there are two sub-layers: an improved single-head attention layer and a feed-forward fully connected layer.

[0098] 1) The single-head attention layer in the task-irrelevant masked functional state aggregation unit filters out functional states with a high probability of being task-irrelevant by introducing a task-irrelevant mask, and focuses on key task-related functional states. The task-irrelevant mask can be obtained according to the following formula:

[0099]

[0100] mask un =DD T ,D=[d i ]∈R T

[0101] in, is a pre-set hyperparameter, which serves as the lower bound of the task-independent probability when the function state is aggregated. The task-related function state sequence is input as a single-head attention layer X and mapped to QKV. The task-independent mask acts on the matrix product QK T Finally, we obtain the task-related key function state vector sequence H in the sequence. K .

[0102] 2) The single-head attention layer in the orthogonal subspace construction unit borrows the method of introducing summary token in vision transformer to convert a set of trainable m unit orthogonal vectors into an orthogonal basis S∈R n×m Add it to the input sequence and input it into the model together with the sequence vector, that is, input X = [S,H K ]∈R(m+T)×b After a single-head attention layer, this set of low-dimensional orthogonal basis vectors can interact with all task-related key functional state vectors in the sequence and obtain a low-dimensional representation S'∈R containing global information. m×n This low-dimensional representation sequence is then input into the classifier for the motor imagery classification task, thereby achieving a holistic understanding and classification of the input EEG signal. Ignoring the calculation for the norm constraint, the process can be expressed as:

[0103]

[0104] First, the first softmax (SS T )S, since S is an orthogonal basis, its product only leaves the orthogonal basis S. Secondly, through the second term Combined with the input sequence H K The orthogonal basis S is designed to dynamically adapt to and integrate the key functional state information in the sequence, thus enhancing the model’s ability to capture global features.

[0105] 3) The subspace complete representation unit uses the trained orthogonal basis S to reconstruct the task-related functional state sequence, so as to constrain the constructed low-dimensional orthogonal subspace to represent any task-related functional state. Since the modulus of each vector in the orthogonal basis S vector group is 1, in the conventional single-head attention layer, the softmax function is used to constrain the row norm of the attention matrix to 1, which will lead to the reconstruction of The modulus of each state vector is constrained to be 1, thereby introducing additional reconstruction loss.

[0106] Therefore, the subspace complete representation unit removes the softmax function in the conventional single-head attention layer, maps the orthogonal basis S to Q and V, and reconstructs the target H′ tr Mapped to K as the input of this layer. In order to reduce the impact of low-task-related functional states on the construction of subspaces, the reconstructed target H′ tr It is to filter out the task-related functional state sequence whose task-related probability is greater than the preset hyperparameter The functional state vector of . Then the calculation of the attention layer can be expressed as,

[0107]

[0108] That is, reconstructed It is H′ tr The mapping on the orthogonal basis S is obtained by weighted summing the orthogonal basis S as the weights.

[0109] Example 2: The workflow of the EEG high temporal resolution brain activity state representation model S4RNet for motor imagery mainly includes:

[0110] Data input: Multi-channel EEG signals are input into the model.

[0111] State space embedding: Short-term brain function patterns are extracted through three layers of convolution and embedded into the functional state space.

[0112] Task relevance evaluation: Through the task relevance measurement module, the functional state sequence is task-relevantly scaled.

[0113] Low-dimensional representation construction: Use orthogonal subspace reconstruction to generate global low-dimensional features for classification.

[0114] Classification output: The low-dimensional state sequence is input into the fully connected classifier and the decoding result is output.

[0115] Verification example:

[0116] Experimental data:

[0117] This verification example uses the BCI Competition IV 2a motor imagery EEG public dataset, which aims to study the changing patterns of brain activity in motor imagery brain-computer interface (BCI). The data comes from 9 healthy subjects, who performed four different motor imagery tasks under visual cues: left hand, right hand, feet, and tongue movements. Each subject performed two sessions of experimental recordings. Each session contains 6 runs, each run includes 48 trials, so each session contains 288 trials.

[0118] Tips and tasks:

[0119] 1) At t = 0 seconds, a fixed cross is displayed on the screen and a sound prompt is played.

[0120] 2) At t = 2 seconds, an indicator arrow appeared, prompting the subject to perform a specific motor imagery task. The arrow was displayed for 1.25 seconds.

[0121] 3) Before t = 6 seconds, the subjects were required to continue motor imagery until the fixation cross disappeared.

[0122] There was a short interval between trials and the screen was black.

[0123] EEG recording: Data were recorded using 22 Ag / AgCl electrodes placed according to the international 10-20 system. Data were sampled at 250 Hz, band-pass filtered from 0.5 Hz to 100 Hz, and notched at 50 Hz to eliminate power supply noise.

[0124] Data preprocessing:

[0125] 1. Downsampling: Downsample the sampling rate from 250Hz to 128Hz.

[0126] 2. Bandpass filtering: Apply 4-38 Hz bandpass filtering to retain the frequency band related to motor imagery.

[0127] 3. Data segmentation: Extract EEG data from 0.5 seconds to 4 seconds after the cue onset from each trial, approximately 438 time points.

[0128] Training strategy:

[0129] In this verification example, two subject-dependent training strategies are used to evaluate and train the model: the Cross-Session strategy and the random partitioning training and testing set strategy.

[0130] First, the Cross-Session strategy is used to simulate the actual application scenarios of the MI-BCI system. Specifically, the first session data of each subject is used as the training set (simulating pre-collected user data), and the second session data is used as the test set (simulating real-time data collected during the actual operation of the system). This strategy effectively evaluates the model's ability to learn data from one time point and apply it at different time points, forming a total of 9 data sets, thereby training 9 network models that the subjects depend on.

[0131] Secondly, the random partitioning training and testing set strategy is used in general brain activity analysis research. In this strategy, all the data of each subject is shuffled, and 80% is randomly selected as the training set and 20% as the test set. This approach can evaluate the adaptability and universality of the model to the shuffled data, form the same 9 sets of data sets, and then train 9 independent models.

[0132] The combination of these two strategies allows us to comprehensively evaluate the performance of the model under different experimental purposes, which not only supports the generalization ability between different time points, but also optimizes the adaptability of the model in a stable data environment.

[0133] Experimental setup:

[0134] In this verification example, since the collection of EEG data takes a long time, resulting in a small data set, overfitting problems are prone to occur. In order to deal with this situation, although data enhancement techniques are often used in state-of-the-art research, such as adding Gaussian noise, cropping samples, or using time domain segmentation and reconstruction in EEG Conformer to generate new samples, these methods may introduce noise and destroy the signal-to-noise ratio or the integrity of the brain dynamic trajectory. Therefore, data enhancement methods are not used in the model training of the present invention.

[0135] The network model was implemented using Python 3.10 and PyTorch library. The specific model settings include a two-layer state space embedding module, and the number of functional modes is set to 64. When training the model, the weights of the classification loss, reconstruction loss, and orthogonal constraint loss in the loss function are all set to 1 to ensure the balance of each loss. The training adopts the batch method with a batch size of 4, the optimizer is Adam, the learning rate is set to 0.0002, and the optimizer parameters β1 and β2 are set to 0.5 and 0.999 respectively. The learning rate remains constant throughout the training process, and a total of 3000 rounds of iterative training are performed.

[0136] Example 3: Model performance of S4RNet, an EEG high temporal resolution brain activity state representation model for motor imagery

[0137] 1) Model training: The reconstruction loss and classification accuracy of the representation dimensions ranging from 1 to 23 were tested on each group of test data. A total of 23 parameters * 9 subjects = 207 groups of experiments were conducted.

[0138] Model training experimental results:

[0139] In the S4RNet experiments, parameter search experiments were conducted on the dimensionality of the low-dimensional representation module of the functional state space to evaluate its impact on the network performance and select the best parameters for baseline comparison. Figure 2 The results of S4RNet's reconstruction loss on the training set and test set and the classification accuracy of the test set are shown when the dimension is set to 1 to 23.

[0140] Figure 2 a and Figure 2 b shows the distribution of reconstruction loss on the training set and test set respectively. The results show that as the dimension of the low-dimensional subspace increases, the reconstruction loss gradually decreases and tends to be stable. Especially in low dimensions (such as 2-5), the reconstruction loss is high, indicating that the reconstruction effect of the model is poor at this time; when the dimension increases to 10 to 23 dimensions, the reconstruction loss decreases significantly and tends to be stable, indicating that the model can better reconstruct the original functional state sequence in higher dimensions. Figure 2 c shows the distribution of the classification accuracy of the test set. It can be seen that as the dimension of the low-dimensional representation subspace increases, the classification accuracy also changes. At certain specific dimensions (such as 11 and 14), the distribution range of the classification accuracy is large, which means that the classification performance of the model on different subjects varies greatly.

[0141] 2) Baseline comparison experiment: In the baseline comparison experiment, in order to verify the performance of the network model proposed in this invention, several representative network models with outstanding performance on the BCI Competition IV 2a dataset were selected as comparison baselines. These baseline models include:

[0142] 1.EEGNet: A representative of convolutional neural networks, focusing on efficient EEG signal processing.

[0143] 2.EEG Conformer: A model that combines convolution and attention mechanisms to better capture complex dependencies in time series.

[0144] 3.Matt network: A model based on manifold learning that represents the temporal changes of brain activity by constructing multiple manifold centers.

[0145] These baseline models use the Cross-Session training strategy. To ensure fair comparison, the baseline methods are implemented using publicly released code and experiments are performed based on the optimal parameters stated in each paper. The performance of the model is evaluated by classification accuracy and the temporal resolution of the feature sequence. Temporal resolution is a key indicator for describing the dynamic changes of brain states, which reflects the model's ability to capture details in EEG signals:

[0146] Low time domain resolution: causes the feature sequence to be too smooth, resulting in loss of key information, which in turn reduces the accuracy of the model.

[0147] Higher temporal resolution: helps capture more subtle changes in brain states, but may also introduce more noise, posing a challenge to classification accuracy.

[0148] Temporal resolution is measured by the number of sample points within a fixed time range. The time range of this experiment is 3.5 seconds, and the number of EEG signal sampling points is 438. The temporal resolution of feature sequences in different network models corresponds to the following parts:

[0149] EEGNet: Feature sequence before fully connected layers.

[0150] EEG Conformer: Feature sequence before attention module.

[0151] Matt network: the number of feature points at the center of the manifold.

[0152] Model of the present invention: feature sequence before low-dimensional characterization module.

[0153] Baseline comparison experimental results: The S4RNet proposed in this invention is evaluated using two indicators, temporal resolution and classification accuracy, and is compared with a representative network model that has achieved outstanding results on the BCI Competition IV 2a dataset. Table 1 below lists the temporal resolution of the baseline model and the model of this invention, as well as the classification accuracy of each subject and the average subject accuracy. According to the experimental results, S4RNet outperforms other baseline models in terms of classification accuracy and temporal resolution:

[0154] 1. Classification accuracy:

[0155] S4RNet has higher classification accuracy per subject and average on the BCI Competition IV 2a dataset than other baseline methods. The S4RNet results without asterisks correspond to the case where the dimension of the low-dimensional subspace is set to 23, while the S4RNet with asterisks is the highest classification accuracy achieved in different dimensions. Compared with the methods without data augmentation, S4RNet shows superior performance, indicating its strong feature extraction and classification capabilities.

[0156] 2. Temporal resolution:

[0157] Mainstream models such as EEGNet, Matt, and EEG Conformer only retain 11, 3, and 23 feature vectors, respectively, in the brain activity of motor imagery within 3.5 seconds. S4RNet completely retains 438 time points, which enables it to capture the dynamic changes of the brain in detail and fully retain the time information in the EEG signal. After removing the pooling layer of time domain dimensionality reduction and improving the time resolution, the classification accuracy of EEG Conformer dropped significantly, indicating that the network performance will be challenged while maintaining high time resolution. Even if S4RNet maintains complete time domain information, it also achieves improved classification performance.

[0158] The above experimental results show that S4RNet has higher capabilities in feature extraction and brain state representation. Its convolution-attention structure can efficiently perform classification without sacrificing temporal information, fully demonstrating its advantage in modeling brain dynamic changes in EEG signal processing.

[0159] Table 1 Model performance

[0160]

[0161] 3) Functional sequence separability verification experiment: t-distributed random neighbor embedding (t-SNE) was used for statistical dimensionality reduction and visualization to verify the separability of features; the intermediate results of the three modules output after each sample was input into the network model were extracted, corresponding to the functional state sequence H∈R 438×64 , the task-related enhanced functional state sequence H'∈R 438×64 And the low-dimensional representation sequence Z∈R 23×64 The state vectors of each sample at all time points in the three sequences are averaged as the representative of the sample, and the t-SNE method is used to map it into a two-dimensional space to observe the spatial distribution of the features to verify the separability.

[0162] Functional sequence separability verification experimental results: In order to verify the separability of the intermediate results extracted by the S4RNet model and evaluate its applicability in the analysis of motor imagery brain dynamics, the experiment visualized the features of the intermediate results of each main module of S4RNet and compared them with the baseline network EEG Conformer. Figure 3 As shown in Table 1:

[0163] 1. Feature visualization results, such as Figure 4 As shown:

[0164] S4RNet: Row (a) shows the functional state sequence distribution output by the two-layer state space embedding module. Since the complete time information is retained, the feature distribution shows aliasing between categories; Row (b) represents the functional state sequence distribution after being enhanced by the task-related measurement module. This module extracts more discriminative features, making the category boundaries on the training set clearer, and even surpassing the performance of EEG Conformer on the test set; Row (c) is the feature sequence represented by the low-dimensional subspace. After the attention mechanism, the category boundaries of the feature distribution become clearer.

[0165] EEG Conformer: Row (a) shows the feature distribution of the convolutional layer output, after preliminary feature extraction; row (c) shows the feature distribution after processing by the self-attention mechanism, with increased feature boundary clarity but some loss of sequence characteristics.

[0166] 2. Module contribution evaluation:

[0167] Since S4RNet retains complete temporal information, although it is greatly affected by local noise during the initial convolution processing, the task-related enhancement module significantly improves the separability of features. While retaining temporal information, S4RNet is able to achieve a better feature distribution, which lays the foundation for further brain dynamic analysis. The attention module improves the distinguishability of features in both networks, but its ability to be used for dynamic analysis is limited due to the aggregation of temporal information.

[0168] In summary, S4RNet provides the necessary feature separability and timing information for brain dynamic analysis through task-related enhanced functional state sequences, showing stronger applicability for dynamic analysis. In contrast, EEG Conformer performs well in feature extraction, but due to the loss of timing information, its potential for further dynamic analysis is limited.

[0169] Example 4: Dynamic analysis experiment of S4RNet model

[0170] 1) Model training: We used a model training strategy that randomly divided the training set and validation set, and conducted the same parameter search experiment as in Experiment 1. We selected the network model with the best training effect by combining accuracy and reconstruction loss.

[0171] Model training results:

[0172] 1. Classification accuracy and reconstruction loss:

[0173] S4RNet performed particularly well on subject 7, with the highest classification accuracy and good stability, so subject 7 was selected as the subject for subsequent brain dynamic analysis; in the selection of the dimension of the low-dimensional subspace, when the dimension was 21, the reconstruction loss of S4RNet on the training set and test set was 0.0558 and 0.0938, respectively.

[0174] The reconstruction loss of the training set is the second lowest, indicating that the model can effectively approximate the structure of the original data; the reconstruction loss of the test set is the lowest, showing good generalization ability.

[0175] 2. Visualization of functional state sequence:

[0176] The extracted functional state sequences and task-related enhanced functional state sequences were reduced in dimension using t-SNE and visualized, as shown in the figure below. Figure 5 and Figure 6 As shown; among them,

[0177] Figure 6 a: Sample distribution of functional state sequence representation, showing preliminary distinction between categories;

[0178] Figure 6 b: Task-related enhanced functional state sequence, the sample distribution shows clearer category boundaries and good separability.

[0179] The model training results show that the dimension of the low-dimensional subspace has a significant impact on the performance of S4RNet. Choosing an appropriate dimension (such as 21 dimensions) can reduce the reconstruction loss while maintaining high classification accuracy. The t-SNE visualization results further verify that the functional state sequence after task-related enhancement has better separability, supporting its application value in brain dynamic analysis. Without sacrificing temporal information, S4RNet significantly enhances the ability to distinguish features through task-related measurement modules, especially test performance, which shows that it has strong practicality and stability in processing EEG signals.

[0180] 2) Construct a feature sequence for analysis: Use the selected optimal model to reconstruct the samples correctly classified by the model in the EEG signals of all trials of the corresponding subject into a task-related enhanced functional state sequence H′ to form a set {H′}, and extract the task-related scores of the state at each moment evaluated by the task-related measurement module.

[0181] 3) Cluster analysis: Perform k-means clustering on the set {H′}, and obtain the cluster center set {i∈[0,k]|Cluster i}. Since the set {H'} has been task-related enhanced, the task-independent functional states will be concentrated around the origin and form an independent cluster. Therefore, by calculating the task-related score TRscore of each cluster center i To divide the meta-state set MS = {URMeta, TRMeta1,…,TR Meta k}, where the cluster with the lowest task-relevance score is classified as the task-irrelevant meta-state URMeta. Task-relevance score TRscore i The calculation formula is as follows.

[0182]

[0183] Among them, score(h j ′) represents the state h obtained by the model task-related measurement module j ′’s task-related score, n i Represents the number of states belonging to the i-th cluster in the set {H′}.

[0184] Functional state clustering analysis results: In this experiment, an in-depth clustering analysis was conducted on the set of task-enhanced functional state sequences. The k-means method was used to construct the meta-state set, and the optimal number of clusters was determined by the elbow rule:

[0185] 1. Cluster analysis: The functional state vectors of all trials and moments were clustered using the k-means algorithm, with the goal of identifying meta-states with different task relevance.

[0186] 2. Elbow rule: The optimal number of clusters is identified by the “elbow” of the cost function (sum of squared errors, SSE) curve. Combining the task-relevance scores of the calculated task-relevant meta-states and task-irrelevant meta-states, four meta-states were finally selected.

[0187] Data Representation Figure 7 The task-related score (red curve) and the sum of squared errors (green curve) are plotted. Figure 7 a is the original value, Figure 7 b is the change trend after Min-Max normalization processing.

[0188] 1. Optimal number of clusters: The elbow rule shows that when the number of clusters increases to 4, the rate of decrease of the cost function slows down, which is considered to be the optimal number of clusters; the result of executing 4 meta-states is 3 task-related meta-states (TR Meta) and 1 task-irrelevant meta-state (UR Meta).

[0189] 2. Task-related score analysis: The task-related scores show that the scores of UR Meta are significantly lower than those of various TR Metas, proving its distinguishing role in task classification. Further analysis of the task categories (left fist, right fist, feet, tongue) revealed that although the meta-states showed quantitative differences between different imagined actions, the task-related scores of UR Meta were still much lower than those of TR Meta.

[0190] 3. Dynamic analysis potential: By identifying and analyzing these meta-states, the dynamic changes in the brain during different motor imagery tasks can be captured more clearly; in the classification of specific movements, the three task-related meta-states can assist in identifying different categories of movement patterns, while the task-irrelevant meta-states can enhance the filtering of noise and non-task-related activities.

[0191] Conclusion: The selection of four meta-states (three task-related and one task-irrelevant) effectively balances the extraction of task-relevant information and the reduction of irrelevant interference, and this approach provides a new perspective for the analysis of brain dynamics of motor imagery. With various meta-states and their task-relevant scores, we can better understand and classify different motor imagery tasks.

[0192] Furthermore, we re-divided the data according to the imagined action categories - left hand clenched fist, right hand clenched fist, feet, and tongue, and counted the number of meta-states that appeared in different imagined action categories and the task-related scores of each meta-state. As shown in Table 2 below, the task-related scores of UR Meta are much lower than those of various TR Metas, and there are certain differences in quantity.

[0193] Table 2 Meta-state distribution and task relevance scores of different motor imagery categories

[0194]

[0195]

[0196] Visualization of task-related meta-states: In the visualization experiment of task-related meta-states, a series of steps were used to transform the abstract clustering results into visual brain activity patterns. The following is the specific process of the experiment:

[0197] S1: Cluster center vector representation: Each task-related meta-state is represented as a 64-dimensional cluster center vector through the k-means algorithm. These vectors represent the core features of the functional state under different task conditions.

[0198] S2: Mapping back to the scalp electrical signal space: Use the convolution kernel weights to perform matrix multiplication and map the cluster center vector back to the scalp electrical signal space. This step converts the abstract dimensional data into a specific physiological signal pattern, which is helpful for further analysis.

[0199] S3: Signal energy calculation: Calculate the energy of the mapped electrical signal within a 125 millisecond time window to provide information about the intensity of the brain electrical activity within the corresponding time period. This method helps to highlight instantaneous changes in electrical activity.

[0200] S4: Brain topography visualization: Brain topography maps are used to map meta-states to specific scalp electrical signal distributions and generate visualization images. This visualization can intuitively show which brain regions are more active in specific task-related meta-states.

[0201] Visualization results of task-related meta-states: In S4RNet, the proposed two-layer state space embedding module realizes the mapping of EEG signals to functional state space through convolutional layers. The following are the details of the specific implementation of the module and the inverse transformation method:

[0202] 1. Two-layer state-space embedding module: This module aims to extract stable spatiotemporal patterns related to motor imagery from EEG signals. It consists of three convolutional layers:

[0203] The first convolution layer: The convolution kernel size is 22*1, focusing on feature extraction from spatial channels.

[0204] The second convolution layer: The convolution kernel size is 64*1*16, which further captures the steady-state features in the signal.

[0205] The third convolution layer: The convolution kernel size is 64*1*1, which helps to integrate and form a complete short-term spatial pattern.

[0206] The number of convolution kernels in each convolution layer is 64, which supports the extraction of a rich feature set.

[0207] 2. State vector and functional state space: In the functional state space, each dimension of the state vector reflects the degree of mapping of the EEG signal onto a certain stable pattern. These dimensions comprehensively describe the feature combination of the EEG signal related to the task within a given time period.

[0208] Inverse transform method:

[0209] 1. From state space to EEG signal space: An inverse transformation method is proposed to transform the information in the functional state space back into the EEG signal space to reconstruct a signal that only contains task-related parts. This method ensures that the reconstructed signal accurately reflects the activities in the original EEG signal related to the motor imagery task and filters out noise that is irrelevant to the task.

[0210] 2. Refactoring steps: Use SPattern separately i ∈R 22×1 ,TPattern i ∈R 64×1×16 and CPattern i ∈R 64 ×1×1 Represents the weight of the i-th convolution kernel corresponding to the three convolution layers, that is, the corresponding mode learned. Complete the signal segment Sig corresponding to the 64 spatiotemporal modes from top to bottom i ∈R 22×16 Reconstruction, as shown in the following formula:

[0211]

[0212] Among them, CPattern i (j)∈R represents the jth weight of the i-th convolution kernel in the third convolutional layer, and the reconstructed TSig i ∈R 64×1×16 represents the i-th time domain mode, TSig i (j)∈R 64*1 TSig represents the mapping coordinates of 64 SPatterns at the jth moment in the i-th time domain mode. i (j,k) corresponds to the k-th dimension coordinate. From this, the signal segment Sig corresponding to the i-th stable spatiotemporal mode can be reconstructed i ∈R 22×16 Then, by superimposing the corresponding signal segments according to the coordinates of the cluster centers in the functional state space, the multi-channel signals corresponding to the cluster centers can be obtained.

[0213] The present invention maps the cluster centers of task-related meta-states back to the multi-channel EEG signal space through inverse transformation and calculates the signal energy to draw the brain topography, such as Figure 8 As shown, the energy distribution of the three types of task-related meta-states is mainly concentrated in the central area, the transition area between the parietal lobe and the central area of ​​the frontal lobe, and partly involves the prefrontal cortex and the right parietal cortex. These areas cover the primary motor cortex, primary sensory cortex, and premotor area, which are brain areas related to body movement control, sensory information processing, and motor planning, showing that the central sulcus and its surrounding areas play an important role in distinguishing the "left hand", "right hand", "tongue", and "feet" motor imagery tasks.

[0214] During motor imagery, three types of task-related meta-states reflect the typical activation patterns of the brain, and the state of the brain at each moment can be regarded as a variation of these meta-states. In order to reveal the differences between these meta-states in different motor imagery tasks, the present invention constructs a single state vector representation by extracting the variation states of the meta-states at different moments from each trial. Then, the t-SNE method is used to reduce these high-dimensional vectors to a two-dimensional space, intuitively displaying the sample distribution composed of a single meta-state. This visual analysis helps to explore whether the separability of task-related meta-states is due to state variation or state accumulation, and provides an in-depth understanding of brain activation patterns during motor imagery.

[0215] like Fig. 9 As shown in the figure, red, green, blue and purple represent the four categories of motor imagery tasks, namely "left hand", "right hand", "feet" and "tongue". The results show that the sample distribution obtained by superposition and summation has higher separability, while the sample distribution obtained by averaging has a certain degree of separability, but the boundary between categories is relatively fuzzy. In the first type of task-related meta-state (TRMeta 1), there is a clear boundary between hand movements (left hand, right hand) and non-hand movements (feet, tongue), indicating that it represents the difference in brain activation patterns between hand and non-hand movements. In the second type of task-related meta-state (TRMeta2), there is a clear boundary between left-hand and right-hand imagination tasks in some figures, but there is also aliasing. The third type of task-related meta-state (TRMeta 3) shows that the four types of tasks are clearly separable, especially in the representation of feet and tongue movements, which reveals the direction of state variation of the brain when imagining specific movements.

[0216] In order to explore the performance of different task-related meta-states in motor imagery tasks, the present invention further counted the occurrence frequency of various meta-states. The results are as follows: Fig.10 The results show that the frequency of occurrence of meta-states is consistent with the differences in the previous sample distribution and reveals more details. Specifically, the frequency of TRMeta 1 in hand movement imagination is significantly lower than that in non-hand movement, and the frequency of TRMeta 2 in right-hand movement imagination is significantly higher than that in other tasks, while the frequency of TRMeta 3 is stepped, with the left hand movement imagination being the highest, followed by the right hand, and the foot and tongue movements being similar and the lowest. This shows that the meta-state variation difference at a single moment is small, but a higher classification accuracy is achieved through the accumulation of frequency differences.

[0217] 5) Statistical analysis: The functional state sequence H′ is converted into the meta-state sequence M through clustering, and the set {H′} can be converted into the set {M}. Classification statistics are performed according to the motor imagery action category to which each sequence belongs, and the differences in brain dynamics under different imagery action tasks are analyzed.

[0218] State transition analysis results of task-related meta-states: The present invention statistically analyzes the state transition matrices of four motor imagery tasks, and the results show the state transition characteristics of different tasks, such as Fig.11 As shown:

[0219] 1. Left hand movement imagination: Fig.11 As shown in a, the probability of transition from TRMeta 1 to TRMeta 3 is the highest (0.4475), followed by TRMeta 2 to TRMeta 3 (0.4359). This indicates that in left-hand motor imagery, the brain state is more likely to shift to TRMeta 3, reflecting the obvious trend of changes in brain activation patterns during left-hand motor imagery.

[0220] 2. Right hand movement imagination: Fig.11 As shown in (b), the transition probability from TRMeta 2 to TRMeta 3 is the highest (0.4391), showing a trend similar to left-hand motor imagination, that is, the brain state tends to transfer to TRMeta3, reflecting the commonality of hand movements (left hand, right hand) in state transfer.

[0221] 3. Imagine the movement of your feet: Fig.11 As shown in Figure c, compared with hand movement, the state transition of foot movement imagination is relatively balanced, and the transition probability between states is not much different. Although the transition probability from TR Meta 1 to TR Meta 3 (0.3064) is relatively high, it does not have a significant tendency like hand movement, indicating that the brain state changes more evenly during foot movement imagination.

[0222] 4. Tongue movement imagination: Fig.11 As shown in Figure d, the state transfer matrix of tongue movement is similar to that of foot movement, the transfer probability distribution is relatively uniform, and there is no significant state transfer trend, indicating that the state changes of the brain in tongue movement imagination are relatively stable.

[0223] In summary, the state transition of hand movements (left and right hands) showed a stronger tendency, especially the probability of transition to TRMeta 3 was significantly higher. The state transition of the movement imagery of the feet and tongue was more balanced and stable, reflecting the dynamic changes in brain activation patterns in different motor imagery tasks. These findings provide important insights into understanding the state transition patterns of the brain in different motor imagery tasks and help further explore the activation mechanism of brain networks.

[0224] This specific embodiment is merely an explanation of the present invention and is not a limitation of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed. However, as long as they are within the scope of the claims of the present invention, they are protected by the patent law.

Claims

1. An EEG high temporal resolution brain activity state representation model for motor imagery, characterized by: It includes a two-layer state space embedding module, a task-related evaluation module, and a low-dimensional subspace representation module; The two-layer state space embedding module reconstructs the state sequence represented by brain activity from the EEG signal, constructs a state vector by capturing a variety of short-term stable spatiotemporal patterns to represent the complex brain activity of the motor imagery task, and represents the macroscopic brain state changes through a sequence composed of state vectors; The task-related evaluation module measures the correlation between the EEG signal and the motor imagery task to achieve dynamic scaling of the brain activity state vector and estimation of the task-irrelevant probability; The low-dimensional subspace representation module constructs a low-dimensional representation of the task-related functional state sequence by reconstructing an orthogonal subspace of the functional state space, and inputs it into the fully connected layer classifier.

2. The EEG high temporal resolution brain activity state representation model for motor imagery according to claim 1, characterized in that: The dual-layer state space embedding module is a model implementation of the dual-layer state space representation method.

3. The EEG high temporal resolution brain activity state representation model for motor imagery according to claim 2, characterized in that: The dual-layer state space representation method includes a functional pattern space and a functional state space.

4. The EEG high temporal resolution brain activity state representation model for motor imagery according to claim 3, characterized in that: The functional pattern space is described by a state space model, which is used to capture short-term stable brain functional patterns in EEG signals; The state space model is a modeling method for dynamic systems. A discrete multi-input, single-output state space model can describe the temporal dynamics of the system state and the mapping relationship between the system state and the observed signal through the following difference equation: yt=Cut+Dxt where x t ∈R c is the system input at time t, u t ∈R n is the hidden state vector describing the system state at time t, y t ∈R represents the system output at time t.

5. The EEG high temporal resolution brain activity state representation model for motor imagery according to claim 4, characterized in that: The input of the state-space model is a signal sequence composed of multi-channel EEG signals, and the multi-channel EEG signals are represented by a linear combination of multi-source signals. A multi-input single-output SSM model for learning task-related functional patterns is constructed. The recursive form of the SSM model is converted into a convolution calculation form, and multiple convolution kernels are used to realize multi-modal combination representation of different signal features, and finally a functional state sequence representation of brain activity is obtained.

6. The EEG high temporal resolution brain activity state representation model for motor imagery according to claim 5, characterized in that: The sources of the multi-channel EEG signals include task-related brain activity signals, task-irrelevant brain activity signals and noise signals.

7. The EEG high temporal resolution brain activity state representation model for motor imagery according to claim 1, characterized in that: The two-layer state space embedding module includes three layers of multi-core small-core convolutional layers; The first convolutional layer uses a convolution layer with 64 full channels of size c*1 to learn the spatial activation pattern of the brain in the EEG signal; The second convolutional layer uses 64 temporal convolution kernels to learn the temporal intensity variation features of the 64 spatial activation patterns extracted; The third convolutional layer uses 64 1*1 convolution kernels to further abstract and reorganize the spatial patterns and temporal intensity changes.

8. The EEG high temporal resolution brain activity state representation model for motor imagery according to claim 1, characterized in that: The task-related evaluation module obtains task-related scores and task-independent scores by inner products of a set of trainable task-related metrics and the functional state vector at each moment, maps the scores to task-independent probabilities, normalizes and scales the task-related scores, and generates a task-related functional state sequence.

9. The EEG high temporal resolution brain activity state representation model for motor imagery according to claim 1, characterized in that: The dimensional subspace representation module includes a task-independent mask unit, an orthogonal subspace construction unit and a subspace complete representation unit; The task-independent mask unit filters out functional states with low task relevance through a single-head attention mechanism and a task-independent mask, and learns the global temporal dependency of functional states with high task relevance; The orthogonal subspace construction unit introduces trainable orthogonal basis vectors and interacts with key functional states through an attention mechanism to capture global information and generate low-dimensional representations. The subspace complete representation unit reconstructs the task-related functional state sequence using the trained orthogonal basis, ensuring that the low-dimensional subspace can accurately represent all task-related states.

10. The method for using the EEG high temporal resolution brain activity state representation model for motor imagery as described in claims 1-9, characterized in that: The following steps are involved: Data input: multi-channel EEG signals are input into the model; Two-layer state space embedding: extract short-term brain function patterns through three layers of convolution and embed them into the functional state space; Task relevance assessment: Through the task relevance measurement module, the functional state sequence is task-relevantly scaled; Low-dimensional representation construction: Use orthogonal subspace reconstruction to generate global low-dimensional features for classification; Classification output: The low-dimensional state sequence is input into the fully connected classifier and the decoding result is output.

Citation Information

Cited By

  • Electroencephalogram signal processing method and device and terminal equipment

    CN122020613A