Electroencephalogram classification method fusing phase amplitude coupling characteristics

By fusing phase-amplitude coupling (PAC) features in the Transformer model, the PAC-aware Attention mechanism is constructed, which solves the problem of difficult to effectively model the cross-frequency collaboration mode in EEG signals in the existing technology, and achieves higher-precision EEG signal classification.

CN120217055APending Publication Date: 2025-06-27CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510357061.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-25
Publication Date
2025-06-27

Smart Images

  • Figure CN120217055A_ABST
    Figure CN120217055A_ABST
Patent Text Reader

Abstract

The invention relates to an electroencephalogram classification method fusing phase amplitude coupling characteristics, and belongs to the field of electroencephalogram signal processing and deep learning. The method comprises the following steps: collecting electroencephalogram signal data, and carrying out channel selection and preprocessing; performing Hilbert transform on the EEG signal of each channel, and extracting instantaneous phase and amplitude information; calculating the coupling degree of phases and amplitudes between different frequency bands, and generating a phase-amplitude coupling characteristic matrix for representing the cross-frequency coupling strength; and the PAC features and the original EEG time sequence features are jointly input into an improved Transform classification network, a self-attention mechanism is utilized to effectively model a time sequence dependence and frequency coupling relationship, multi-scale time domain, frequency domain and space features are extracted, fusion calculation is performed, and a final classification result is output. According to the method, the dependence of a traditional electroencephalogram classification method on a single frequency spectrum feature is overcome, the modeling capability of an electroencephalogram activity cross-frequency cooperation mechanism is enhanced, and the accuracy and generalization performance of electroencephalogram classification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of electroencephalogram (EEG) signal processing and deep learning, and relates to an EEG classification method integrating phase-amplitude coupling features. Background Art

[0002] Electroencephalogram (EEG) signals are weak electrical signals generated by recording the activities of brain neurons and are widely used in the research of human cognitive processes and neural mechanisms. Due to its low acquisition cost and high time resolution, EEG has become an important research tool in fields such as cognitive neuroscience and brain-computer interfaces. By analyzing EEG signals, the neural representations of a series of cognitive functions such as working memory, attention allocation, and decision-making control can be explored.

[0003] In traditional EEG analysis, spectral features (such as power spectral density, band energy, etc.) are commonly used means. However, such features mainly describe the activities within a single frequency band and are difficult to reflect the cooperative effects between different frequencies of the brain. In recent years, Phase-Amplitude Coupling (PAC), as an important means to describe the interaction between different frequency bands, has gradually become a research hotspot in EEG analysis. PAC reflects how the phase of a low-frequency signal modulates the amplitude of a high-frequency signal and is considered a potential mechanism reflecting cross-frequency communication and neural cooperation, especially showing significant changes in complex cognitive tasks.

[0004] Using PAC features to model EEG data is expected to reveal deeper brain activity patterns. Especially in tasks such as working memory, attention control, and conscious awareness, PAC shows meaningful modulation effects between the prefrontal and parietal brain regions. Therefore, how to effectively integrate this frequency coupling information of PAC into an EEG classification model is an important direction to improve the accuracy of brain cognitive modeling.

[0005] Due to the self-attention mechanism introduced by the Transformer model, it can flexibly model long-range dependence structures and has shown powerful modeling capabilities in the fields of time series and biological signal processing in recent years. Therefore, exploring the organic integration of PAC features and the Transformer structure to construct an attention-guided classification model more sensitive to cross-frequency coupling mechanisms has important theoretical significance and application prospects.

[0006] Although the theoretical value of PAC has been widely recognized, there is currently a lack of deep learning architectures that can simultaneously model PAC coupling relationships and complex EEG temporal structures. How to effectively integrate PAC as a guiding mechanism into the Transformer model to achieve fine EEG classification driven by cross-frequency features is one of the key challenges in the current technological development. Summary of the Invention

[0007] In view of this, the purpose of the present invention is to provide an electroencephalogram classification method that fuses phase-amplitude coupling features. Its essence is an electroencephalogram classification method based on the combination of phase-amplitude coupling features and the Transformer model, which helps to more accurately reveal the activity patterns of the brain in cognitive tasks and provides new ideas for the development of electroencephalogram signal classification technology.

[0008] To achieve the above object, the present invention provides the following technical solutions:

[0009] An electroencephalogram classification method that fuses phase-amplitude coupling features, the method comprising the following steps:

[0010] Obtain electroencephalogram signal EEG data, and screen and preprocess the electroencephalogram signal;

[0011] Perform Hilbert transform on the EEG signal of each channel to convert the original electroencephalogram signal into instantaneous phase and amplitude information;

[0012] Calculate the modulation index MI according to the amplitude average value within each phase interval, and construct a PAC feature matrix according to the modulation index MI of all channels;

[0013] Calculate the coupling weight between each channel through the outer product, establish an attention bias matrix according to the coupling weight, and establish a PAC-guided attention matrix;

[0014] Integrate all bit-amplitude coupling matrices into the transformer model for electroencephalogram signal classification, including extracting time-domain features, frequency-domain features, and spatial features, and performing non-linear combination on the extracted features to generate the final classification output;

[0015] Combine the Adam optimizer, and adjust the network weights through the backpropagation algorithm, aiming at minimizing the classification cross-entropy loss function to train the tansformer model, and use it for real-time electroencephalogram signal classification after training.

[0016] Furthermore, collect multi-channel electroencephalogram signal EEG from experiments, and preprocess the original data, including channel screening, band-pass filtering, artifact removal, re-referencing, and normalization, to obtain the preprocessed signal:

[0017]

[0018] Among them C represents the number of channels, T represents the time series length.

[0019] Furthermore, the process of extracting phase and amplitude information based on the Hilbert transform is:

[0020] The preprocessed EEG signals are decomposed into two target frequency bands: the low-frequency theta band and the high-frequency gamma band;

[0021] x θ (t) = Bandpass(x(t), f θ ), x γ (t) = Bandpass(x(t), f γ )

[0022] where, x θ (t) is the theta-band signal, x γ (t) is the gamma-band signal, x(t) represents the original EEG signal, f θ represents the frequency range of the theta band (e.g., 4 - 8 hz), f γ represents the frequency range of the gamma band (e.g., 30 - 100 hz), Bandpass(·) represents the band-pass filtering operation for extracting signals within a specific frequency band;

[0023] Perform the Hilbert transform on the signals of each frequency band to extract the phase and amplitude:

[0024]

[0025] where, s theta (t) represents the analytic signal of the theta-band signal, A θ (t) represents the instantaneous amplitude of the theta-band signal, φ θ (t) represents the instantaneous phase of the theta-band signal; s gamma (t) represents the analytic signal of the gamma-band signal, A γ (t) represents the instantaneous amplitude of the gamma-band signal, φ γ (t) represents the instantaneous phase of the gamma-band signal; j is the imaginary unit;

[0026] The extraction method is:

[0027]

[0028] where, A(t) is the instantaneous amplitude, φ(t) is the instantaneous phase, s(t) is the analytic signal obtained by the Hilbert transform; Im(·) represents extracting the imaginary part, and Re(·) represents extracting the real part.

[0029] Furthermore, the process of establishing the PAC feature matrix includes: through the phase binning method, statistically calculating the average amplitude within each phase interval, and calculating the modulation index MI as the PAC metric:

[0030]

[0031] Among them, H(P) represents the entropy value of each phase interval, and H max represents the maximum entropy value, and P(k) represents the k-th item of the amplitude modulation histogram;

[0032] Calculate MI for all channels to form a PAC feature matrix:

[0033]

[0034] where F is the number of frequency band combinations.

[0035] Furthermore, construct a PAC-guided attention matrix. After normalizing the PAC feature vectors, calculate the coupling weights between channels through the outer product to form an attention bias matrix:

[0036]

[0037] Among them, PAC i , PAC j represent the PAC feature vector of the i-th channel and the PAC feature vector of the j-th channel respectively;

[0038] Finally, form an additive bias matrix:

[0039]

[0040] Among them, B PAC represents the PAC-guided attention bias matrix, C represents the number of EEG channels, represents a real number matrix.

[0041] Furthermore, construct a PAC-aware Transformer classification model. Among them, the PAC-aware Transformer classification model includes an input embedding layer, a PAC-aware multi-head attention mechanism layer, a residual connection and normalization layer, a feed-forward network layer, and a classification output layer. Among them,

[0042] The input embedding layer inputs the preprocessed EEG signal into the embedding layer and obtains an input vector using a linear mapping:

[0043]

[0044] where d is the embedding dimension, W in , b in are trainable model parameters, and X is the input EEG signal;

[0045] In the PAC-aware multi-head attention mechanism layer, after adding positional encoding, the input is fed into the standard Transformer Encoder structure. The multi-head attention mechanism is adopted, and the PAC guidance matrix is fused as a bias term to obtain the PAC-aware Attention calculation formula:

[0046]

[0047] Among them, Q, K, and V represent the query, key, and value matrices, which are generated from the input embeddings; B PAC represents the PAC attention guidance matrix; α represents the learnable parameter that controls the guidance strength;

[0048] In the residual connection and normalization layer, the attention output is added to the original input to form a residual structure, and layer normalization is performed:

[0049] Z attn = LayerNorm(Z input + Attention(Q, K, V))

[0050] Among them, Z input is the input vector, and LayerNorm(·) is the layer normalization process;

[0051] The feed-forward network layer FFN includes two MLP layers with non-linear activation:

[0052] Z ffn = ReLU(Z attn ·W1 + b1)·W2 + b2

[0053] Among them, Z attn is the output after normalization, ReLU(·) is the non-linear activation function, W1 and W2 represent the two linear transformation weight matrices of the feed-forward network, and b1 and b2 represent the corresponding bias vectors;

[0054] Then it is added to the previous layer's residual and normalized:

[0055] Z out = LayerNorm(Z attn + Z ffn )

[0056] Stacking several feed-forward network layers forms a complete Encoder module;

[0057] In the classification output layer, the embedding representation output by the Transformer is averaged pooled and input into the fully connected layer for classification:

[0058]

[0059] Input multi-layer perceptron for classification:

[0060]

[0061] Among them, W cls and b cls are the weight matrix and bias term of the classification layer respectively. Softmax(·) is the activation function, which transforms the linear output into a normalized probability distribution.

[0062] Furthermore, the training process of the PAC-aware Transformer network model adopts standard deep learning strategies, including loss function design, parameter optimization and backpropagation, which specifically include the following steps:

[0063] Definition of loss function: Use multi-class cross-entropy as the objective function for the classification task, and the definition is as follows:

[0064]

[0065] Among them, N is the sample batch size, C is the number of classes, y i,c is the true label, is the predicted probability output by the model.

[0066] Gradient calculation: Calculate the partial derivative of the loss function with respect to all model parameters to form a gradient vector:

[0067]

[0068] This process automatically backpropagates to the parameters of each layer through the chain rule;

[0069] Adam optimizer parameter update: Use the Adam optimizer to update the model parameters, and its core includes the following calculation steps:

[0070] First moment, moving average:

[0071] m t = β1m t-1 + (1 - β1)·g t

[0072] Second moment, squared gradient moving average:

[0073]

[0074] Bias correction:

[0075]

[0076] Parameter update:

[0077]

[0078] During the above process, The gradient operator representing θ, g t represents the gradient at the t-th iteration, β1 and β2 are the decay coefficients for the first and second moment estimations respectively, m t , m t-1 represents the first moment estimation of the gradient and the previous first moment estimation, v t , v t-1 represents the second moment estimation of the gradient and the previous second moment estimation, represents the bias-corrected first moment estimation and the bias-corrected second moment estimation, η is the learning rate, and ∈ represents the numerical stability constant.

[0079] The beneficial effects of the present invention are as follows:

[0080] For the first time, the present invention integrates the phase-amplitude coupling (PAC) feature into the Transformer structure in the form of a guiding bias, constructs a PAC-aware Attention mechanism, enabling the model to actively focus on the EEG regions or temporal segments with strong coupling and significant information collaboration, effectively enhancing the modeling ability for cross-frequency collaboration patterns in EEG signals. Compared with the traditional Transformer model that only conducts general correlation modeling based on self-attention, the present invention enhances the perception of the attention mechanism for neural oscillation coupling features through PAC guiding bias, improving the model's response ability to cognitive-related brain dynamic changes.

[0081] The present invention integrates the coupling feature between low-frequency phase and high-frequency amplitude, making up for the deficiencies of previous modeling based only on time-domain or frequency-domain features, and can significantly improve the EEG signal classification accuracy in complex cognitive tasks such as working memory and attention control, enhancing the generalization performance and stability of the model. The proposed PAC-aware attention mechanism is embedded in the Transformer framework in a modular manner, independent of specific data channel numbers or task types, with good scalability, and can be adapted to various EEG classification tasks and PAC features of different frequency band combinations.

[0082] Other advantages, objectives, and features of the present invention will be elaborated to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be learned from the practice of the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the following specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0083] In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be described in detail with reference to the accompanying drawings, where:

[0084] Figure 1Schematic diagram of the structure of the transformer model of an EEG classification method integrating phase-amplitude coupling features under the embodiments of the present invention;

[0085] Figure 2 Schematic diagram of the stimulus material taking the number A as an example under the embodiments of the present invention;

[0086] Figure 3 Experimental flowchart under the embodiments of the present invention;

[0087] Figure 4 Schematic diagram of the presentation process of the verification stimulus under the embodiments of the present invention. Detailed implementation manners

[0088] The following uses specific specific examples to illustrate the implementation manners of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the drawings provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0089] Among them, the drawings are only for illustrative purposes, showing only schematic diagrams, not physical diagrams, and should not be construed as limiting the present invention; in order to better illustrate the embodiments of the present invention, some components in the drawings will be omitted, enlarged or reduced, which do not represent the dimensions of the actual product; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0090] In the drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "front", "rear", etc. indicating the orientation or positional relationship, it is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the terms describing the positional relationship in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those of ordinary skill in the art, the specific meanings of the above terms can be understood according to specific circumstances.

[0091] Please refer to Figures 1 to 4 , which is an EEG classification method integrating phase-amplitude coupling features.

[0092] Embodiment 1

[0093] This embodiment provides an EEG classification method that fuses phase-amplitude coupling features, which specifically includes the following steps:

[0094] S1. Obtain EEG data and screen and preprocess the EEG signals;

[0095] S2. Perform Hilbert transform on the EEG signals of each channel to convert the original EEG signals into instantaneous phase and amplitude information;

[0096] S3. Calculate the modulation index MI according to the amplitude average value within each phase interval, and construct a PAC feature matrix based on the modulation index MI of all channels;

[0097] S4. Calculate the coupling weights between each channel through outer product, establish an attention bias matrix according to the coupling weights, and establish a PAC-guided attention matrix;

[0098] S5. Incorporate all the bit-amplitude coupling matrices into the transformer model for EEG signal classification, where it includes extracting time-domain features, frequency-domain features, and spatial features, and performing non-linear combination on the extracted features to generate the final classification output;

[0099] S6. Combine the Adam optimizer and adjust the network weights through the backpropagation algorithm to train the tansformer model with the goal of minimizing the classification cross-entropy loss function. After training, it is used for real-time EEG signal classification.

[0100] In step S1 of this embodiment, the obtained EEG signal data is collected through experiments, and AC stimulation is performed during the experiment to collect the EEG signal data before and after the stimulation; the screening and preprocessing of the EEG signals refers to first performing downsampling, then performing EEG rereferencing, filtering the EEG signals through a band-pass filter and a notch filter, then using the ICA method to filter out noise, and then performing data augmentation and dataset division on the EEG signals. Among them, data augmentation includes performing time jitter, frequency perturbation, and adding noise operations on the EEG to improve the generalization ability of the model. Dataset division means dividing the processed EEG signal dataset into a training set and a test set.

[0101] Collect multi-channel EEG signals from the experiment, and preprocess the original data, including channel screening, band-pass filtering, artifact removal, rereferencing, and standardization, to obtain the preprocessed signals:

[0102]

[0103] where C represents the number of channels, T represents the length of the time series.

[0104] In step S2 of this embodiment, the process of extracting phase and amplitude information based on the Hilbert transform is as follows: The preprocessed EEG signal is decomposed into two target frequency bands: the low-frequency theta band and the high-frequency gamma band;

[0105] x θ (t) = Bandpass(x(t), f θ ), x γ (t) = Bandpass(x(t), f γ )

[0106] where x θ (t) is the theta-band signal, x γ (t) is the gamma-band signal, x(t) represents the original EEG signal, f θ represents the frequency range of the theta band (such as 4 - 8 hz), f γ represents the frequency range of the gamma band (such as 30 - 100 hz), and Bandpass(·) represents the band-pass filtering operation for extracting signals within a specific frequency band;

[0107] Perform the Hilbert transform on the signals of each frequency band to extract the phase and amplitude:

[0108]

[0109] where s theta (t) represents the analytic signal of the theta-band signal, A θ (t) represents the instantaneous amplitude of the theta-band signal, φ θ (t) represents the instantaneous phase of the theta-band signal; s gamma (t) represents the analytic signal of the gamma-band signal, A γ (t) represents the instantaneous amplitude of the gamma-band signal, φ γ (t) represents the instantaneous phase of the gamma-band signal; j is the imaginary unit;

[0110] The extraction method is:

[0111]

[0112] where A(t) is the instantaneous amplitude, φ(t) is the instantaneous phase, s(t) is the analytic signal obtained by the Hilbert transform; Im(·) represents extracting the imaginary part, and Re(·) represents extracting the real part.

[0113] In step S3 of this embodiment, by using the phase binning method, the average amplitude in each phase interval is statistically calculated, and the modulation index (MI) is calculated as the PAC metric:

[0114]

[0115] where H(P) represents the entropy value of each phase interval, H max represents the maximum entropy value, and P(k) represents the k-th item of the amplitude modulation histogram.

[0116] MI is calculated for all channels to form the PAC feature matrix:

[0117]

[0118] where F is the number of frequency band combinations.

[0119] In step S4 of this embodiment, a PAC-guided attention matrix is constructed. After normalizing the PAC feature vectors, the coupling weights between channels are calculated through the outer product to form the attention bias matrix:

[0120]

[0121] where PAC i and PAC j represent the PAC feature vector of the i-th channel and the PAC feature vector of the j-th channel, respectively;

[0122] Finally, an additive bias matrix is formed:

[0123]

[0124] In step S5 of this embodiment, a PAC-aware Transformer classification model is constructed. The preprocessed EEG signal is input into the embedding layer, and the input vector is obtained using linear mapping:

[0125] Module 1, input embedding layer

[0126]

[0127] where d is the embedding dimension, W in , b in are trainable model parameters, and X is the input EEG signal;

[0128] Module 2, PAC-aware multi-head attention mechanism

[0129] After adding the positional encoding, the input is fed into the standard Transformer Encoder structure. The multi-head attention mechanism is adopted, and the PAC guidance matrix is incorporated as a bias term to obtain the PAC-aware Attention calculation formula:

[0130]

[0131] where Q, K, and V represent the query, key, and value matrices, which are generated from the input embeddings; B PAC represents the PAC attention guidance matrix; α represents a learnable parameter that controls the guidance strength.

[0132] Module 3, Residual Connection and Normalization: The attention output is added to the original input to form a residual structure, and layer normalization is performed:

[0133] Z attn = LayerNorm(Z input + Attention(Q, K, V))

[0134] where Z input is the input vector, and LayerNorm(·) is the layer normalization process;

[0135] Module 4, Feed-Forward Network (FFN): The feed-forward network is a two-layer MLP with non-linear activation:

[0136] Z ffn = ReLU(Z attn ·W1 + b1)·W2 + b2

[0137] where Z attn is the output after normalization, ReLU(·) is the non-linear activation function, W1 and W2 represent the two linear transformation weight matrices of the feed-forward network, and b1 and b2 represent the corresponding bias vectors;

[0138] Then it is added to the previous layer's residual and normalized:

[0139] Z out = LayerNorm(Z attn + Z ffn )

[0140] Several layers of this structure can be stacked to form a complete Encoder module.

[0141] The embedding representation output by the Transformer is subjected to average pooling and then fed into a fully connected layer for classification:

[0142]

[0143] It is fed into a multi-layer perceptron for classification:

[0144]

[0145] Among them, W cls and b cls are the weight matrix of the classification layer and the bias term of the classification layer respectively. Softmax(·) is the activation function, which transforms the linear output into a normalized probability distribution.

[0146] In step S6 of this embodiment, for classification output and training optimization, the training process of the PAC-aware Transformer network model adopts standard deep learning strategies, including loss function design, parameter optimization, and backpropagation, which specifically include the following steps:

[0147] Step 1, loss function definition: Use multi-class cross-entropy as the objective function for the classification task, and the definition is as follows:

[0148]

[0149] where N is the sample batch size, C is the number of classes, y i,c is the true label, is the predicted probability output by the model.

[0150] Step 2, gradient calculation (backpropagation): Calculate the partial derivative of the loss function with respect to all model parameters to form a gradient vector:

[0151]

[0152] This process automatically backpropagates to the parameters of each layer through the chain rule.

[0153] Step 3, Adam optimizer parameter update: Use the Adam optimizer to update the model parameters, and its core includes the following calculation steps:

[0154] First moment (moving average):

[0155] m t = β1m t-1 + (1 - β1)·g t

[0156] Second moment (square gradient moving average):

[0157]

[0158] Bias correction:

[0159]

[0160] Parameter update:

[0161]

[0162] In the above process, The gradient operator representing θ, g t represents the gradient at the t-th iteration, β1 and β2 are the decay coefficients for the first and second moment estimates respectively, m t , m t-1 represents the first moment estimate of the gradient and the previous first moment estimate, v t , v t-1 represents the second moment estimate of the gradient and the previous second moment estimate, represents the bias-corrected first moment estimate and the bias-corrected second moment estimate, η is the learning rate, and ∈ represents the numerical stability constant.

[0163] The training process of the classification model includes electroencephalogram data before and after alternating current stimulation. The classification model is trained and optimized to distinguish the differences in working memory performance before and after alternating current stimulation. The EEG signal classification results can be used to analyze the improvement effect of alternating current stimulation on working memory performance and provide a basis for relevant cognitive training or medical diagnosis. The model evaluation uses the cross-validation method to improve the reliability of the test results and evaluate the performance of the classification model, including accuracy, recall rate, and F1 value.

[0164] Example 2

[0165] In this example, the specific experimental operations will be carried out using the method in Example 1, which specifically includes the following steps:

[0166] Step 1: Select the stimulation materials and design the experimental block; specifically including:

[0167] Step 1.1: The stimulation materials include letters from A to F, which are randomly presented in the center of a black background screen, as Figure 2 shown in the schematic diagram of the stimulation material with A as an example;

[0168] Step 1.2: The method adopted is pseudo-random, and the matching and non-matching experimental trials are set;

[0169] Step 1.3: Each experiment contains 60 experimental trials, with 30 for both matching and non-matching;

[0170] Step 1.4: Matching means that the number currently appearing on the screen is the same as any one of the previous 4 letters. Similarly, non-matching means that the number currently appearing on the screen is different from any one of the previous 4 letters;

[0171] Step 1.5: The subject presses F on the keyboard for matching and J for non-matching.

[0172] Step 2: Conduct an EEG experiment according to the working memory experimental paradigm. After the alternating current stimulation experiment, the same working memory experiment is also carried out, and experimental data is collected during each experiment; as Figure 3 shown, it specifically includes:

[0173] Step 2.1: Recruit the subject group: Recruit 30 healthy adult subjects (aged 18 - 30 years old, half male and half female), without a history of neurological diseases;

[0174] Step 2.2: Prepare the EEG acquisition device: Use a 64 - lead EEG system (such as Brain Products ActiChamp), with a sampling rate of 1000 Hz, and the electrode layout follows the international 10 - 20 system;

[0175] Step 2.3: Prepare the alternating current stimulation device: Use a transcranial alternating current stimulator (tACS), with the electrodes placed at F3 (stimulating electrode) and Fz (reference electrode);

[0176] Step 2.4: Set the stimulation materials: As Figure 4 shown, the numbers A - F, with a black background and white font, are presented in the center of the screen, with a single presentation time of 500 ms and an inter - trial interval of 1500 ms (blank screen);

[0177] Step 2.5: Set the experimental procedure:

[0178] Step 2.51: Match trials: The current number is the same as the fourth number from the bottom (e.g., in the sequence: A, B, C, D, the later - appearing letter - number "A" matches the previous stimulus);

[0179] Step 2.52, non - match trials: The current letter is different from any previous letter;

[0180] Step 2.53, set the subject task: Press the "F" key to respond to match trials and the "J" key to respond to non - match trials, with a reaction time window of 1500 ms;

[0181] Step 2.3: Experimental procedure, collect data. The subject completes the delayed matching task without stimulation, and the EEG signal is synchronously collected (marked as "before tACS" data); Apply a 6 - Hz, 1 - mA sinusoidal tACS at the F3 electrode for 20 minutes; Immediately after the tACS ends, repeat the delayed matching task and collect the EEG signal (marked as "after tACS" data);

[0182] Step 3: Screen and pre - process the obtained EEG signal data;

[0183] Step 3.1: Conduct down - sampling processing, down - sample to 250 Hz, and obtain the down - sampled EEG data;

[0184] Step 3.2: Using Fz as the average reference point, perform EEG rereferencing;

[0185] Step 3.3: Apply a 0.1 - 100 hz band - pass filter and a 50 Hz notch filter to obtain the filtered EEG;

[0186] Step 3.4: Use ICA to filter out the noise.

[0187] Downsample and rereference the EEG data. Downsample the original EEG signal to 250 Hz to reduce the computational complexity; use the average potential of the Fz electrode as the reference for full - lead rereferencing; filtering and denoising. Band - pass filtering: Use a 4 - th order Butterworth filter to retain signals in the range of 0.1 - 100 Hz; notch filtering: Remove the 50 Hz power - line interference (bandwidth ±2 Hz); ICA artifact removal: Use the FastICA algorithm to separate the electrooculogram and electromyogram artifact components, and remove the noise components with a variance contribution rate > 5%.

[0188] Use data augmentation techniques (such as time jitter, noise perturbation) to increase the diversity of training data and prevent overfitting.

[0189] Randomly divide the EEG signal data into a training set and a test set to ensure the representativeness and reliability of the classification results.

[0190] Step 4: Perform Hilbert transform on the EEG signal of each channel to convert the original EEG signal into instantaneous phase and amplitude information;

[0191] Step 4.1: Use Hilbert transform for band - pass filtering in the range of 4 - 8 Hz to extract the phase signal; band - pass filtering in the range of 30 - 100 Hz to extract the amplitude signal; perform Hilbert transform on the two - band signals respectively to obtain the instantaneous phase and amplitude;

[0192] Step 4.2: Phase binning and modulation index calculation. Divide the theta phase into 18 equal - width intervals (each interval is 20°);

[0193] Step 5: Calculate the coupling degree between the phase and the amplitude to form a phase - amplitude coupling matrix, representing the coupling strength between different frequency bands; calculate the modulation index (MI).

[0194] Step 5: Construct a PAC - guided attention matrix;

[0195] Step 5.1: Normalize the PAC matrix by frequency band to obtain the PAC vector for each channel;

[0196] Step 5.2: Calculate the outer product of PAC features between channels to construct an attention - guiding bias matrix;

[0197] Step 6: Build a PAC-aware Transformer classification model;

[0198] Step 6.1: Input the EEG signal into the linear embedding layer and add positional encoding to form an input sequence;

[0199] Step 6.2: In each Transformer Encoder layer;

[0200] Step 6.3: Use residual connection and LayerNorm normalization for output;

[0201] Step 6.4: Further extract deep features through a feed-forward network and repeat stacking multiple Encoder modules;

[0202] Step 6.5: Perform average pooling on the output, send it to the MLP classification head, and output the binary classification result before / after tACS.

[0203] Step 7: Training and optimization:

[0204] Step 7.1: Adopt a cross-entropy loss function to optimize the model prediction result and the true label;

[0205] Step 7.2: Use the Adam optimizer with a learning rate set to 0.001 and decay by 50% every 10 epochs;

[0206] Step 7.3: Use the validation set to monitor the early stopping strategy and stop training if the validation loss does not decrease for 5 consecutive epochs.

[0207] In this embodiment, through the delayed matching task experiment, the EEG data before and after tACS stimulation is collected, and a neural classification system that can quantify the stimulation effect is constructed in combination with the PAC-aware Transformer model. Compared with the prior art that only focuses on EEG classification in the natural state, the present invention can provide a direct basis for the personalized parameter optimization of neuromodulation techniques (such as transcranial electrical stimulation).

[0208] The method of the present invention has the advantages of strong robustness and excellent generalization ability. Through data augmentation techniques (such as time jitter, noise perturbation) and the validation stopping strategy, the adaptability of the model to individual differences and noise interference is enhanced, and the overfitting problem is avoided. The design of cross-validation and random division of the training / test set further ensures the reliability and generalization ability of the classification results, and is applicable to the EEG data analysis of different subject groups.

[0209] The present invention has a wide range of application scenarios and supports cognitive research and clinical practice. The present invention can not only classify the differences in EEG signals in working memory tasks, but also provide a new tool for the early diagnosis of cognitive impairment diseases (such as Alzheimer's disease) and the evaluation of the effect of neuromodulation treatment by analyzing the influence of alternating current stimulation on brain electrical activities.

[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the present technical solution, and they should all be covered by the scope of the claims of the present invention.

Claims

1. A method for EEG classification integrating phase-amplitude coupling features, characterized in that: The method comprises the following steps: Obtain EEG data, and filter and preprocess the EEG signals; Perform Hilbert transform on the EEG signal of each channel to convert the original EEG signal into instantaneous phase and amplitude information; The modulation index MI is calculated according to the amplitude average value in each phase interval, and the PAC feature matrix is ​​constructed according to the modulation index MI of all channels; The coupling weights between each channel are calculated by outer product, the attention bias matrix is ​​established according to the coupling weights, and the PAC guided attention matrix is ​​established; All bit-amplitude coupling matrices are integrated into the transformer model for EEG signal classification, which includes extracting time domain features, frequency domain features, and spatial features, and performing nonlinear combination of the extracted features to generate the final classification output; Combined with the Adam optimizer, the network weights are adjusted through the back-propagation algorithm, and the tansformer model is trained with the goal of minimizing the classification cross entropy loss function. After training, it is used for real-time EEG signal classification.

2. The EEG classification method integrating phase-amplitude coupling features according to claim 1 is characterized in that: Collect multi-channel EEG signals from the experiment, and preprocess the raw data, including channel screening, bandpass filtering, artifact removal, re-reference and standardization, to obtain the preprocessed signal: in C Indicates the number of channels, T Indicates the length of the time series.

3. The EEG classification method integrating phase-amplitude coupling features according to claim 1 is characterized in that: The process of extracting phase and amplitude information based on Hilbert transform is: Decompose the preprocessed EEG signal into two target frequency bands: low-frequency theta band and high-frequency gamma band; x θ (t)=Bandpass(x(t),f θ ),x γ (t)=Bandpass(x(t),f γ ) In the formula, x θ (t) is theta frequency band signal, x γ (t) is the gamma frequency band signal, x(t) represents the original EEG signal, and f θ represents the frequency range of theta band, f γ represents the frequency range of the gamma band, and Bandpass(·) represents the bandpass filtering operation, which is used to extract the signal within a specific frequency band; Perform Hilbert transform on the signal in each frequency band and extract the phase and amplitude: Among them, s the (t) represents the analytical signal of theta frequency band signal, A θ (t) represents the instantaneous amplitude of the theta frequency band signal, φ θ (t) represents the instantaneous phase of the theta frequency band signal; s gamma (t) represents the analytical signal of the gamma band signal, A γ (t) represents the instantaneous amplitude of the gamma frequency band signal, φ γ (t) represents the instantaneous phase of the gamma band signal; j is an imaginary unit; The extraction method is: Where A(t) is the instantaneous amplitude, φ(t) is the instantaneous phase, s(t) is the analytical signal obtained by Hilbert transform, Im(·) means extracting the imaginary part, and Re(·) means extracting the real part.

4. The EEG classification method integrating phase-amplitude coupling features according to claim 1 is characterized in that: The process of establishing the PAC feature matrix includes: using the phase binning method to count the average amplitude in each phase interval and calculating the modulation index MI as the PAC metric: Among them, H(P) represents the entropy value of each phase interval, H max represents the maximum entropy value, P(k) represents the kth item of the amplitude modulation histogram; All channels calculate MI to form the PAC feature matrix: Where F is the number of frequency band combinations.

5. The EEG classification method integrating phase-amplitude coupling features according to claim 4 is characterized in that: Construct the PAC guided attention matrix, normalize the PAC feature vector, and calculate the coupling weights between channels through the outer product to form the attention bias matrix: Among them, PAC i , PAC j Respectively represent the PAC feature vector of the i-th channel and the PAC feature vector of the j-th channel; Finally, the additive bias matrix is ​​formed: Among them, B PAC represents the PAC-guided attention bias matrix, C represents the number of EEG channels, represents a real matrix.

6. The EEG classification method integrating phase-amplitude coupling features according to claim 1 is characterized in that: Construct a PAC-aware Transformer classification model, where the PAC-aware Transformer classification model includes an input embedding layer, a PAC-aware multi-head attention mechanism layer, a residual connection and normalization layer, a feedforward network layer, and a classification output layer. The input embedding layer inputs the preprocessed EEG signal into the embedding layer and uses linear mapping to obtain the input vector: Where d is the embedding dimension, W in 、b in Trainable model parameters, X is the input EEG signal; In the PAC-aware multi-head attention mechanism layer, after adding position encoding, the standard Transformer Encoder structure is input, the multi-head attention mechanism is adopted, and the PAC guidance matrix is ​​integrated as the bias term to obtain the PAC-aware Attention calculation formula: Where Q, K, V represent query, key, and value matrices, generated by input embedding; B PAC represents the PAC attention guidance matrix; α represents a learnable parameter that controls the guidance strength; In the residual connection and normalization layer, the attention output is added to the original input to form a residual structure, and the layer is normalized: Z attn =LayerNorm(Z input +Attention(Q,K,V)) Among them, Z input is the input vector, LayerNorm(·) is the layer normalization process; The feedforward network layer FFN includes two MLP layers with nonlinear activation: WITH ffn =ReLU(Z attn W1+b1) W2+b2 Among them, Z attn is the normalized output, ReLU(·) is the nonlinear activation function, W1, W2 represent the two linear transformation weight matrices of the feedforward network, b1, b2 represent the corresponding bias vectors; Then add it to the residual of the previous layer and normalize it: WITH out =LayerNorm(Z attn +Z ffn ) Stack several layers of feedforward network layers to form a complete Encoder module; In the classification output layer, the embedding representation of the Transformer output is average pooled and input into the fully connected layer for classification: Input multi-layer perceptron for classification: Among them, W cls and b cla are the weight matrix and bias term of the classification layer respectively. Softmax(·) is the activation function, which transforms the linear output into a normalized probability distribution.

7. The EEG classification method integrating phase-amplitude coupling features according to claim 1 is characterized in that: The training process of the PAC-aware Transformer network model adopts a standard deep learning strategy, including loss function design, parameter optimization and back propagation, and specifically includes the following steps: Loss function definition: Multi-category cross entropy is used as the objective function of the classification task, which is defined as follows: Where N is the sample batch size, C is the number of categories, and y i,c is the true label, is the predicted probability output by the model; The gradient calculation calculates the partial derivatives of the loss function with respect to all model parameters to form a gradient vector: This process automatically back-propagates to each layer parameter through the chain rule; Adam optimizer parameter update, using Adam optimizer to update model parameters, its core includes the following calculation steps: First moment, moving average: m t =β1m t-1 +(1-β1)·g t Second-order moment, squared gradient moving average: Bias correction: Parameter update: In the above process, represents the gradient operator of θ, g t represents the gradient at the t-th iteration, β1 and β2 are the attenuation coefficients of the first-order and second-order moment estimates, respectively, and m t ,m t-1 represents the first-order moment estimate of the gradient and the first-order moment estimate of the previous step, υ t ,υ t-1 represents the second-order moment estimate of the gradient and the second-order moment estimate of the previous step, represents the bias-corrected first-order moment estimate and the bias-corrected second-order moment estimate, η is the learning rate, and ∈ represents the numerical stability constant.

Citation Information

Cited By

  • Emergency patient consciousness state monitoring system based on bio-electricity signals

    CN120419978A

  • Emergency patient consciousness monitoring system based on bioelectric signals

    CN120419978B

  • Epileptic seizure prediction method fusing multi-frequency coupling and multiple attention mechanisms

    CN120678390A

  • Electroencephalogram signal abnormal state recognition method based on theta-gamma cross frequency coupling characteristics

    CN121943352A