An efficient electroencephalogram recognition method based on convolutional global filtering network
By using a convolutional global filtering network, the problem of high computational complexity of Transformer in EEG decoding is solved, achieving efficient EEG signal recognition and improving computational efficiency and recognition accuracy.
Patent Information
- Application Number
- CN202610483408.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-13
- Publication Date
- 2026-06-23
Smart Images

Figure CN122261401A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to an efficient EEG recognition method based on a convolutional global filtering network, belonging to the field of EEG signal recognition technology. Background Technology
[0002] With its advantages of high temporal resolution and non-invasiveness, electroencephalogram (EEG) signals are widely used in brain-computer interfaces (BCIs). This technology, which enables direct communication between the brain and external devices without the need for muscle control, is increasingly demonstrating its value in fields such as neurorehabilitation engineering.
[0003] While deep learning methods based on convolutional neural networks and Transformers have made significant progress in EEG decoding, they still face several limitations. First, the self-attention mechanism used for global context modeling requires calculating pairwise interactions between all time points, leading to a quadratic increase in computational complexity with sequence length. Second, due to the often scarce nature of EEG data, introducing numerous attention layers can cause a surge in model parameters, making overfitting highly likely. These factors collectively constrain the efficiency and scalability of Transformer-based EEG decoding frameworks.
[0004] To address the aforementioned problems, this invention proposes an efficient EEG recognition method based on a convolutional global filtering network. The convolutional global filtering network not only reduces the computational cost of Transformer-based EEG recognition methods but also retains the ability to model long-term temporal dependencies in EEG signals. The convolutional module in the proposed global filtering network consists of temporal and spatial convolution operations and temporal position encoding, introducing temporal position information of the EEG signal while learning local spatiotemporal features. The global filtering module in the proposed global filtering network cascades multiple frequency domain feature learning blocks, enabling the modeling of diverse global temporal dependencies in the EEG signal on frequency domain features, and possessing logarithmic computational complexity relative to the time series length. The proposed global filtering network improves computational efficiency while learning local and global features of the EEG signal, effectively balancing the recognition accuracy and computational complexity of the EEG signal. Summary of the Invention
[0005] This invention provides an efficient EEG recognition method based on a convolutional global filtering network, consisting of a convolutional module, a global filtering module, and a classifier module. It can learn the local spatiotemporal features and long-range dependencies of EEG signals while improving computational efficiency. The convolutional module learns local spatiotemporal features and incorporates temporal location information of the EEG signal. The global filtering module cascades multiple frequency domain feature learning blocks, recursively executing: 1) mapping the time-series features output by the convolutional module to the frequency domain, 2) modeling global dependency information using a dynamic frequency domain filter, and 3) inverse transforming to the time domain. The global filtering module replaces the quadratic complexity of traditional self-attention mechanisms with logarithmic linear complexity, effectively balancing the recognition accuracy and computational complexity of EEG signals.
[0006] To solve the above problems, the present invention adopts the following technical solution:
[0007] An efficient EEG recognition method based on a convolutional global filtering network includes the following steps:
[0008] Step 1: Divide the collected EEG dataset into training sets. and test set in y i ∈{1, 2, ..., C} represent the i-th EEG data and its corresponding label, respectively. Furthermore, t and ch represent the number of time points and channels in the EEG data, respectively.
[0009] Step 2: Preprocess the EEG data, including extracting specific time periods and bandpass filtering, to obtain preprocessed training and testing EEG data.
[0010] Step 3: For the training EEG data obtained in Step 2, construct a convolutional module consisting of a series of temporal and spatial convolutional operations to learn local EEG features.
[0011] Step 4: For the local EEG features obtained in Step 3, a learnable temporal position coding module is introduced. By adding the position embedding matrix to the rearranged feature sequence element by element, the temporal position information of the EEG signal is explicitly introduced.
[0012] Step 5: For the EEG features with fused location information from Step 4, the feature sequence is transformed from the time domain to the frequency domain using Discrete Fourier Transform. Based on the conjugate symmetry of the frequency domain spectrum of real signals, only the first half of the spectral components are retained.
[0013] Step 6: For the EEG features converted to the frequency domain, a dynamic filter bank consisting of multiple learnable spectral filters is constructed. At the same time, an adaptive weight generation network is introduced to perform weighted aggregation of the filter bank. The aggregated global filter is then multiplied element-wise with the frequency domain features to capture the diverse global dependency information of the EEG signal.
[0014] Step 7: Based on the modulated frequency domain features from Step 6, convert them to the time domain using the inverse discrete Fourier transform to generate time domain features.
[0015] Step 8: Repeat steps 5, 6, and 7 multiple times to extract global dependency information of EEG signals.
[0016] Step 9: Based on the deep temporal features obtained in Step 8, construct a lightweight classifier consisting of average pooling and fully connected layers, and define a cross-entropy loss function to optimize the parameters of the convolutional global filter network, thereby enabling prediction of the test EEG data.
[0017] Preferably, the convolution module consists of temporal and spatial convolution operations, used to learn local EEG features. For the preprocessed training data x, it is specifically represented as follows:
[0018] E t =Conv(X,K t (1)
[0019] E s =Conv(E t ,K s (2)
[0020]
[0021] In the formula, K t This indicates a size of (1, k) t The temporal convolution kernel, E t These are the features after temporal convolution. K s E represents a spatial convolution kernel of size (ch, 1). s These are the features after spatial convolution. The expression represents local EEG features, and BN(·), ELU(·), and AP(·) represent batch normalization, exponential linear unit activation function, and average pooling, respectively.
[0022] Preferably, the learnable temporal position coding is used to incorporate temporal position information of the EEG signal. Given a local EEG feature representation... The EEG feature sequence, combined with temporal location embedding, is represented as follows:
[0023]
[0024] In the formula, R(·) represents the rearrangement operation, which is used to rearrange the features into a time token sequence suitable for subsequent processing; This represents the learnable positional encoding matrix, used to introduce temporal positional information, where N and D represent the number of time points and the convolutional channel dimension, respectively. This represents a time feature sequence that incorporates location information.
[0025] Preferably, the frequency domain transformation and preservation are specifically represented as follows:
[0026] First, the EEG feature sequence with fused location information is subjected to layer normalization to obtain normalized features:
[0027]
[0028] In the formula, Let LN(·) represent the input feature sequence of the l-th frequency feature learning module. LN(·) represents the layer normalization operation, which standardizes the features along the channel dimension.
[0029] Subsequently, the normalized features were obtained using the Discrete Fourier Transform. Mapping from the time domain to the frequency domain:
[0030]
[0031] In the formula, j represents the imaginary unit. Representing EEG time series The spectrum at frequency 2πk / N, where N is the number of time points. Given the conjugate symmetry of the spectrum representation (i.e.... Only the first half of the values from the first N consecutive frequencies are retained, i.e.
[0032] Preferably, the dynamic frequency domain filtering strategy captures diverse global dependency information by adaptively aggregating multiple learnable filters. Specifically, it is expressed as follows:
[0033] First, calculate the adaptive weights for different filters:
[0034]
[0035] Among them, Z l Let represent the input features of the l-th module; MLP(·) represents a multilayer perceptron containing global average pooling, two fully connected layers, and an activation function; the Softmax function is used to normalize the weights, making ... And 0≤β i ≤1.
[0036] For k learnable frequency domain filters Weighted aggregation generates a global filter K:
[0037]
[0038] The global filter K can be viewed as a set of learnable frequency domain filters spanning different dimensions, capable of encoding diverse long-range dependencies.
[0039] Finally, in order to model the global time dynamics, frequency domain features are learned by performing element-wise multiplication with filter K:
[0040]
[0041] In the formula, ⊙ represents element-wise multiplication. For the frequency domain features obtained in step 5, F l This represents the frequency domain features that contain global context information.
[0042] Preferably, the step of converting the frequency domain features to the time domain through the inverse discrete Fourier transform to generate time domain features is specifically expressed as follows:
[0043] The time series of the d-th channel after inverse discrete Fourier transform The channel splicing operation is used to reassemble it into a complete temporal feature representation.
[0044]
[0045] In the formula, Cat(·) represents the concatenation operation along the channel dimension. The temporal features are then combined with the original input z of this module. l Adding them together, we get:
[0046]
[0047] Finally, the features are input into the feedforward neural network and subjected to a nonlinear transformation. The features G of the l-th frequency domain feature learning block are then output through the residual structure. l Specifically, it can be expressed as:
[0048]
[0049] In the formula, FFN(·) is a feedforward neural network module, which consists of layer normalization, two fully connected layers, and activation functions.
[0050] Preferably, the EEG features output by the global filter module are input into a lightweight classifier to generate the final decision prediction. The lightweight classifier consists of an average pooling layer and a fully connected layer. The prediction probability P of the i-th EEG data is... i It can be represented as:
[0051] P i =Softmax(FC(AP(G(i)))) (14)
[0052] In the formula, G(i) represents the feature representation of the i-th EEG data, AP(·) represents the average pooling operation, and FC(·) represents the fully connected layer. Based on this, cross-entropy loss is used as the objective function to optimize the network parameters. The overall loss L can be specifically expressed as:
[0053]
[0054] In the formula, Let M represent the true label of the i-th EEG data point, and M represent the total number of EEG data points.
[0055] Beneficial effects
[0056] 1. A convolution module was designed, consisting of temporal and spatial convolutions and learnable temporal position encoding, which is used to learn local EEG features and introduce temporal position information.
[0057] 2. A global filtering module was designed, consisting of multiple stacked frequency domain feature learning blocks, to efficiently model long-range time dependencies of EEG in the frequency domain. Each frequency domain feature learning block uses Fast Fourier Transform to transform the time-series features to the frequency domain. After performing filtering in the frequency domain, Inverse Fourier Transform is used to transform the frequency domain features back to the time domain, achieving global dependency modeling with logarithmic-linear complexity.
[0058] 3. A dynamic frequency domain filtering strategy was designed, consisting of two parts: adaptive weight generation and filter aggregation. A lightweight network was introduced to generate adaptive weights, and multiple learnable frequency domain filters were dynamically aggregated, enabling the model to capture diverse global dependencies.
[0059] 4. A convolutional global filtering network architecture was constructed, which can learn the local spatiotemporal characteristics and long-range dependencies of EEG signals, while improving computational efficiency. Attached Figure Description
[0060] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:
[0061] Figure 1 This is a framework diagram of an EEG recognition method based on a convolutional global filtering network; Detailed Implementation
[0062] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0063] The invention will be further explained below with reference to examples.
[0064] The main implementation process of this invention is as follows, and the relevant flowchart is shown below. Figure 1 .
[0065] Step 1: Split the EEG dataset into training and testing datasets, with N and N respectively. Each EEG data point constitutes a unit of data, represented as follows: and in y i ∈{1, 2, ..., C} represent the i-th EEG data and its corresponding label, respectively. Furthermore, t and ch represent the number of time points and channels in the EEG data, respectively.
[0066] Step 2: Preprocess the EEG data, including extracting specific time periods and bandpass filtering, to obtain preprocessed training and testing EEG data.
[0067] Step 3: For the training EEG data obtained in Step 2, construct a convolutional module consisting of a series of temporal and spatial convolutional operations to learn local EEG features. The specific process is as follows:
[0068] For training EEG data x, first use temporal convolution to learn local temporal features E t The details are as follows:
[0069] E t =Conv(X, K) t (1)
[0070] Here K t This indicates a size of (1, k) t The temporal convolution kernel is then used. Then, spatial convolution is used to extract the spatial feature representation E. s The details are as follows:
[0071] E s =Conv(E t ,K s (2)
[0072] Here K s This represents a spatial convolution kernel of size (ch, 1). Local EEG features. It can be represented as:
[0073]
[0074] In the formula, BN(·), ELU(·), and AP(·) represent batch normalization, exponential linear unit activation function, and average pooling, respectively.
[0075] Step 4: Based on the local EEG features obtained in Step 3, a learnable temporal position coding module is introduced. This is achieved by element-wise addition of the position embedding matrix to the rearranged feature sequence, explicitly incorporating the temporal position information of the EEG signal. Given the local EEG feature representation... The EEG feature sequence, combined with temporal location embedding, is represented as follows:
[0076]
[0077] In the formula, R(·) represents the rearrangement operation, which is used to rearrange the features into a time token sequence suitable for subsequent processing; This represents the learnable positional encoding matrix, used to introduce temporal positional information, where N and D represent the number of time points and the convolutional channel dimension, respectively. This represents a time feature sequence that incorporates location information.
[0078] Step 5: First, perform layer normalization on the EEG feature sequence with fused location information to obtain normalized features:
[0079]
[0080] In the formula, Let LN(·) represent the input feature sequence of the l-th frequency feature learning module. LN(·) represents the layer normalization operation, which standardizes the features along the channel dimension.
[0081] Subsequently, the normalized features were obtained using the Discrete Fourier Transform. Mapping from the time domain to the frequency domain:
[0082]
[0083] In the formula, j represents the imaginary unit. Representing the EEEG time series The spectrum at frequency 2πk / N, where N is the number of time points. Given the conjugate symmetry of the spectrum representation (i.e.... Only the first half of the values from the first N consecutive frequencies are retained, i.e.
[0084] Step 6: For the EEG features converted to the frequency domain, a dynamic filter bank consisting of multiple learnable spectral filters is constructed. An adaptive weight generation network is introduced to weight and aggregate the filter bank. The aggregated global filter is then multiplied element-wise with the frequency domain features to capture the diverse global dependencies of the EEG signal. First, the adaptive weights of different filters are calculated:
[0085]
[0086] Among them, Z l Let represent the input features of the l-th module; MLP(.) denotes a multilayer perceptron containing global average pooling, two fully connected layers, and an activation function; the Softmax function is used to normalize the weights, making ... And 0≤β i ≤1.
[0087] Secondly, for k learnable frequency domain filters Weighted aggregation generates a global filter K:
[0088]
[0089] The global filter K can be viewed as a set of learnable frequency domain filters spanning different dimensions, capable of encoding diverse long-range dependencies.
[0090] Finally, in order to model the global time dynamics, frequency domain features are learned by performing element-wise multiplication with filter K:
[0091]
[0092] In the formula, ⊙ represents element-wise multiplication. For the frequency domain features obtained in step 5, F l This represents the frequency domain features that contain global context information.
[0093] Step 7: Transform the frequency domain features to the time domain using the inverse discrete Fourier transform to generate time domain features, as shown below:
[0094]
[0095] The time series of the d-th channel after inverse discrete Fourier transform The channel splicing operation is used to reassemble it into a complete temporal feature representation.
[0096]
[0097] In the formula, Cat(·) represents the splicing operation along the channel dimension. This represents the reconstructed temporal feature representation.
[0098] In the formula, Cat(·) represents the concatenation operation along the channel dimension. The temporal features are then combined with the original input z of this module. l Adding them together, we get:
[0099] Finally, the features are input into the feedforward neural network and subjected to a nonlinear transformation. The features G of the i-th frequency domain feature learning block are then output through the residual structure. l Specifically, it can be expressed as:
[0100]
[0101] In the formula, FFN(·) is a feedforward neural network module, which consists of layer normalization, two fully connected layers, and activation functions.
[0102] Step 8: Repeat steps 5, 6, and 7 multiple times to extract global dependency information of EEG signals.
[0103] Step 9: Input the EEG features output from the global filter module into the lightweight classifier to generate the final decision prediction. The lightweight classifier consists of an average pooling layer and a fully connected layer. The predicted probability P of the i-th EEG data is... i It can be represented as:
[0104] P i =Softmax(FC(AP(G(i)))) (14)
[0105] In the formula, G(i) represents the feature representation of the i-th EEG data, AP(·) represents the average pooling operation, and FC(·) represents the fully connected layer. Based on this, cross-entropy loss is used as the objective function to optimize the network parameters. The overall loss L can be specifically expressed as:
[0106]
[0107] In the formula, Let M represent the true label of the i-th EEG data point, and M represent the total number of EEG data points.
[0108] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A highly efficient EEG recognition method based on a convolutional global filtering network, characterized in that: Step 1: Divide the collected EEG dataset into training sets. and test set in y i ∈{1, 2, ..., C} represent the i-th EEG data and its corresponding label, respectively. Furthermore, t and ch represent the number of time points and channels in the EEG data, respectively. Step 2: Preprocess the EEG data, including extracting specific time periods and bandpass filtering, to obtain preprocessed training and testing EEG data. Step 3: For the training EEG data obtained in Step 2, construct a convolutional module consisting of temporal and spatial convolution operations to learn local EEG features. Step 4: For the local EEG features obtained in Step 3, a learnable temporal position coding module is introduced. By adding the position embedding matrix to the rearranged feature sequence element by element, the temporal position information of the EEG signal is explicitly introduced. Step 5: For the EEG features with fused location information in Step 4, use Discrete Fourier Transform to transform the feature sequence from the time domain to the frequency domain. Based on the conjugate symmetry of the frequency domain spectrum of real signals, only the first half of the spectral components are retained. Step 6: For the EEG features converted to the frequency domain, a dynamic filter bank consisting of multiple learnable spectral filters is constructed. At the same time, an adaptive weight generation network is introduced to perform weighted aggregation of the filter bank. The aggregated global filter is then multiplied element-wise with the frequency domain features to capture the diverse global dependency information of the EEG signal. Step 7: Based on the modulated frequency domain features from Step 6, convert them to the time domain using the inverse discrete Fourier transform to generate time domain features. Step 8: Repeat steps 5, 6, and 7 multiple times to extract global dependency information of EEG signals. Step 9: Based on the deep temporal features obtained in Step 8, construct a lightweight classifier consisting of average pooling and fully connected layers, and define a cross-entropy loss function to optimize the parameters of the convolutional global filter network, thereby enabling prediction of the test EEG data.
2. The efficient EEG recognition method based on a convolutional global filtering network according to claim 1, characterized in that, In step 3, the convolution module, consisting of temporal and spatial convolution operations, is used to learn local EEG features. The preprocessed training data X is specifically represented as follows: E t =Conv(X,K t ) (1) AND s =Conv(E t K s ) (2) In the formula, K t This indicates a size of (1, k) t The temporal convolution kernel, E t These are the features after temporal convolution. K s E represents a spatial convolution kernel of size (ch, 1). s These are the features after spatial convolution. The expression represents local EEG features, and BN(·), ELU(·), and AP(·) represent batch normalization, exponential linear unit activation function, and average pooling, respectively.
3. The efficient EEG recognition method based on a convolutional global filtering network according to claim 1, characterized in that, In step 4, the learnable temporal position coding is used to introduce temporal position information of the EEG signal. Given a local EEG feature representation... The EEG feature sequence, combined with temporal location embedding, is represented as follows: In the formula, R(·) represents the rearrangement operation, which is used to rearrange the features into a time token sequence suitable for subsequent processing; This represents a learnable temporal location encoding matrix, used to introduce temporal location information, where N and D represent the number of time points and the convolutional channel dimension, respectively. This represents a time feature sequence that incorporates location information.
4. The efficient EEG recognition method based on a convolutional global filtering network according to claim 1, characterized in that, In step 5, the frequency domain transformation and preservation are specifically represented as follows: First, the EEG feature sequence with fused location information is subjected to layer normalization to obtain normalized features: In the formula, Let LN(·) represent the input feature sequence of the l-th frequency feature learning module. LN(·) represents the layer normalization operation, which standardizes the features along the channel dimension. Subsequently, the normalized features were obtained using the Discrete Fourier Transform. Mapping from the time domain to the frequency domain: In the formula, j represents the imaginary unit. Representing EEG time series The spectrum at frequency 2πk / N, where N is the number of time points. Given the conjugate symmetry of the spectrum representation (i.e.... Only the first half of the values from the first N consecutive frequencies are retained, i.e.
5. The efficient EEG recognition method based on a convolutional global filtering network according to claim 1, characterized in that, In step 6, the dynamic frequency domain filtering strategy captures diverse global dependency information by adaptively aggregating multiple learnable filters. Specifically, it is expressed as follows: First, calculate the adaptive weights for different filters: Among them, z l Let represent the input features of the l-th module; MLP(·) represents a multilayer perceptron containing global average pooling, two fully connected layers, and an activation function; the Softmax function is used to normalize the weights, making ... And 0≤β t ≤1. For k learnable frequency domain filters Weighted aggregation generates a global filter K: The global filter K can be viewed as a set of learnable frequency domain filters spanning different dimensions, capable of encoding diverse long-range dependencies. Finally, in order to model the global time dynamics, frequency domain features are learned by performing element-wise multiplication with filter K: In the formula, ⊙ denotes element-wise multiplication. For the frequency domain features obtained in step 5, F l This represents the frequency domain features that contain global context information.
6. The efficient EEG recognition method based on a convolutional global filtering network according to claim 1, characterized in that, In step 7, the process of converting the frequency domain features to the time domain using the inverse discrete Fourier transform to generate time domain features is specifically represented as follows: The time series of the d-th channel after inverse discrete Fourier transform The channel splicing operation reassembles it into a complete temporal feature representation. In the formula, Cat(·) represents the concatenation operation along the channel dimension. The temporal features are then combined with the original input Z of this module. l Adding them together, we get: Finally, the features are input into the feedforward neural network and subjected to a nonlinear transformation. The features G of the l-th frequency domain feature learning block are then output through the residual structure. l Specifically, it can be expressed as: In the formula, FFN(·) is a feedforward neural network module, which consists of layer normalization, two fully connected layers, and activation functions.
7. The efficient EEG recognition method based on a convolutional global filtering network according to claim 1, characterized in that, In step 9, the EEG features output from the global filter module are input into a lightweight classifier to generate the final decision prediction. The lightweight classifier consists of an average pooling layer and a fully connected layer. The predicted probability P of the i-th EEG data is... i It can be represented as: P i =Softmax(FC(AP(G(i)))) (14) In the formula, G(i) represents the feature representation of the i-th EEG data, AP(·) represents the average pooling operation, and FC(·) represents the fully connected layer. Based on this, cross-entropy loss is used as the objective function to optimize the network parameters. The overall loss L can be specifically expressed as: In the formula, Let M represent the true label of the i-th EEG data point, and M represent the total number of EEG data points.
