A method for emotion recognition based on EEG-based ripple high-order graph
Through the EEG-based spectral high-order graph emotion recognition method, multi-band signals and graph neural networks are used to solve the problem of insufficient single domain feature representation, achieve more accurate emotion recognition, and enhance the understanding of the time-frequency characteristics of brain activity and the relationship between electrodes.
Patent Information
- Application Number
- CN202510393207.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-03-31
AI Technical Summary
In the existing technology of emotion recognition based on EEG signals, the feature information representation capability of a single domain is weak, and the integration of brain structure and functional connections is ignored, resulting in insufficient accuracy in emotion recognition.
An EEG-based spectral high-order graph emotion recognition method is adopted. Multiple frequency band signals are extracted through a bandpass filter group. Combined with the dynamic time-varying representation module, the MST high-order graph construction module, the GIN encoding module and the node clustering graph pooling module, the complex relationship between electrode nodes is learned, an effective graph representation is constructed and emotion classification is performed.
It improves the accuracy and robustness of emotion recognition, enhances the ability to characterize the time-frequency characteristics of brain activity, highlights the potential correlations and nonlinear interactions between electrodes, and improves the discriminability of emotional states.
Smart Images

Figure CN120234673B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of EEG signal emotion recognition, and specifically relates to an EEG-based ripple high-order graph emotion recognition method. Background Art
[0002] Emotion recognition is a crucial component in fields such as human-computer interaction, mental illness diagnosis and rehabilitation, and transportation. The study of emotion represents an advanced stage in artificial intelligence, significantly promoting the development of emotional robots and anthropomorphic control theory. Emotion recognition methods based on EEG (electroencephalogram) (EEG) offer the advantages of being less susceptible to spoofing and having higher temporal resolution than other physiological signals. In recent years, an increasing number of researchers have used EEG for emotion recognition research. The accuracy and reliability of emotion recognition are closely linked to the selection of EEG features and the construction of deep learning models.
[0003] EEG data is a non-stationary time-varying signal that is difficult to analyze directly. It is necessary to extract multivariate features from the EEG data. In terms of EEG feature selection, the more common traditional EEG features include time domain and frequency domain features, but in current research, there are some limitations in using only one feature. Time domain features reflect the temporal characteristics of the EEG, but there are some empirical components in the extraction process; frequency domain features analyze the energy value distribution contained in the EEG, which can better express the physiological significance of the EEG, but the recognition of frequency domain features will be low. The feature information representation ability of a single domain is not strong, and how to accurately extract effective and non-redundant time-frequency-space multivariate EEG emotion representation has not yet been solved.
[0004] Existing research shows that traditional neural networks cannot directly process non-Euclidean data. EEG is discrete and discontinuous in the spatial domain. Building EEG emotion graph structures based on graph theory knowledge and using graph neural networks to process information in the graph domain are more advantageous and can better describe the intrinsic relationships between channels. Extracting features from EEG signals and constructing brain networks, combined with deep learning model recognition methods, can reflect the interactions between different brain regions under different emotional states, revealing the specific state of the brain, and thus helping to understand the internal workings of the brain and thus understand the brain's emotional cognitive mechanisms. However, most existing studies focus on brain structural characteristics and combine functional connectivity indicators to model EEG as a graph structure, ignoring the integration of graph structure representations with physiological significance. Furthermore, there is no universal EEG emotion recognition model for understanding the brain's emotional cognitive mechanisms. Summary of the Invention
[0005] In response to the technical problems existing in the above-mentioned traditional neural networks, the present invention provides an EEG-based ripple high-order graph emotion recognition method to achieve more accurate classification detection for emotion recognition.
[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0007] An EEG-based ripple high-order graph emotion recognition method includes the following steps:
[0008] S1. EEG signal acquisition and preprocessing: using a bandpass filter bank to extract the α, β, γ, δ, and θ bands of the original EEG signal, and performing a sliding window on each frequency band to extract DE features;
[0009] S2, dynamic time-varying representation extraction module, is used to decompose complex time changes into multiple intra-cycle and inter-cycle changes, so that it can more effectively capture the complexity and periodicity of time series in 2D space;
[0010] S3, a high-order graph construction module based on MST, which consists of an initial graph construction layer and a high-order graph construction layer based on MST;
[0011] S4, GIN encoding module, is used to learn the complex relationship between each electrode node and aggregate its spatial features to obtain an effective graph representation;
[0012] S5, node clustering graph pooling module, selectively downsamples nodes from the graph structure to reduce the number of nodes in the graph and retain the most representative structural information
[0013] S6, emotion classification module, in each stage, each subject's sample is used as the test set, and the remaining
[0014] The data standards used in S1 include: having complete scale information.
[0015] The dynamic time-varying representation extraction module in S2 integrates a data conversion layer, a dynamic multi-scale feature extraction layer, and an adaptive feature aggregation layer;
[0016] The data conversion layer uses fast Fourier transform to transform the input signal X 1D Perform a frequency domain transformation and find the period and the variation between periods, revealing the strength of its frequency components; perform a 1D FFT on each time step:
[0017] X f =FFT(X 1D )
[0018]
[0019] Where: X 1D represents the input one-dimensional time domain signal, FFT represents the fast Fourier transform, which converts the time domain signal into the frequency domain signal; X f is the input signal X 1D Frequency domain representation of Padding(X 1D ) indicates padding the input signal; Reshape the padded signal into a two-dimensional tensor with dimension p i ×f i , p i is the number of time steps, f i is the number of frequency points, each branch i∈{1,...,k} corresponds to a different p i and f i , achieving multi-scale analysis; Represents the two-dimensional tensor generated by the i-th branch;
[0020] The dynamic multi-scale feature extraction layer uses a multi-scale one-dimensional convolution operation to obtain a 2D tensor Perform feature extraction and learn its rich temporal information;
[0021]
[0022] in: Represents a one-dimensional convolution operation with a convolution kernel size of t; LeakyReLU represents a leaky rectified linear unit activation function; AvgPool represents an average pooling operation; Represents the multi-scale features extracted by the i-th branch;
[0023] Finally, the learned 2D tensor is converted back to 1D space Perform dimensionality reduction and reshaping, which is defined as:
[0024]
[0025] in: Indicates flattening the two-dimensional feature into one dimension, with a dimension of 1×p i ×f i ;Trunc represents the truncation operation, which adjusts the signal length to be consistent with the original input; Represents the one-dimensional feature representation of the output of the i-th branch;
[0026] The adaptive feature aggregation layer fuses the output of the feature extraction layer with k one-dimensional representations and provided to the next module; it is defined as:
[0027]
[0028] Among them: A f Represents a learnable attention weight parameter, which is used to measure the importance of features at different scales; Softmax(A f ) indicates that A f Normalize and generate weight coefficients to satisfy the sum of 1; Represents the final output after aggregation.
[0029] The MST-based high-order graph construction module in S3 consists of an initial graph adjacency matrix construction layer, an initial graph edge embedding construction layer, and an MST-based high-order graph construction layer;
[0030] Each electrode of the input signal in the initial graph adjacency matrix construction layer is regarded as a single node in the constructed brain network, and the learned dynamic time-frequency representation of a single electrode is regarded as a node attribute; according to the characteristic that the relationship between two electrode nodes is mutual; the adjacency matrix of the undirected initial graph assuming global connection is defined as A initial ∈R C×C , C is the number of electrodes, i.e., the total number of nodes in the graph; the embedding of the initial graph edge embedding construction layer edge is calculated by concatenating the embeddings of the source and target nodes;
[0031]
[0032] in: Represents the concatenation result of the source node and target node features; W3, b3, W4, b4 are respectively the learnable weight matrix and bias parameters for linear transformation; σ ReLU represents the ReLU activation function; σ Sigmoid Represents the Sigmoid activation function, which compresses the output to the range of [0,1][0,1], indicating the weight or importance of the edge; e st represents the embedding representation of edge (s, t);
[0033] In the MST-based high-order graph construction layer, let represents a graph built based on EEG data, V represents a node set, represents the one-dimensional feature representation of the output of the i-th branch, E represents the set of edges, and the minimum spanning tree is calculated for the graph G. Its goal is to find a subgraph containing all nodes so that the subgraph is connected and the sum of the edge weights is minimized, that is, to find a subgraph To ensure connectivity, all nodes in graph T are connected; acyclicity, graph T does not contain any cycles; minimum weight, the sum of the weights of the edges in graph T is the smallest.
[0034] The GIN encoding module in S4 is for high-order graphs GIN is used to learn the complex relationships between various electrode nodes and aggregate their spatial features to obtain an effective graph representation. GIN uses a message passing process to update the node representation in combination with the information of neighboring nodes. The message passing process can be referred to the following formula: For the kth layer in GIN, the formula for node update in the GIN model is expressed as:
[0035]
[0036] in: represents the set of adjacent nodes of a specific node v∈V, f (k) is a function that converts adjacent node features and edge weights into an aggregation vector, g (k) is a trainable function that maps the current node representation and the aggregate vector to a new representation;
[0037] For the feature corresponding to the k-th layer node v in the graph According to its neighbor nodes and its own information to update, and finally obtain a node representation with more global information.
[0038] The node clustering graph pooling module in S5 uses HGP-SL, combined with a graph neural network. Through the graph pooling function of the HGP-SL operator, it retains node information to the greatest extent, removes redundant noise, and aggregates information from less important nodes to more important nodes to learn a more refined graph structure.
[0039] The output corresponding to each frequency band is aggregated and fed into the fully connected layer to obtain the final classification result:
[0040]
[0041] Among them: GeLU(·) is an activation function that helps the gradient descent optimization algorithm converge more easily; Dropout(·) randomly sets the output of some neurons to zero during training, thereby reducing the neural network's over-reliance on certain specific neurons and improving the model's generalization ability; Linear(·) is a fully connected layer that obtains the final prediction result.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] 1. This method uses a bandpass filter bank to extract signals from five frequency bands: α, β, γ, δ, and θ. It then calculates the dynamic entropy characteristics of each frequency band, fully capturing the specific contributions of each frequency band to emotion recognition. Compared to single-band analysis, multi-band joint modeling can more comprehensively reflect the time-frequency characteristics of brain activity and enhance the ability to characterize emotional states.
[0044] 2. This method converts time-domain signals into the frequency domain through the Fast Fourier Transform (FFT), revealing the signal's periodicity and the strength of its frequency components, overcoming the limitations of traditional time-domain methods in modeling complex temporal patterns. A multi-scale reshape operation decomposes the signal into two-dimensional tensors of varying time-frequency resolution, capturing the synergy between short-term local fluctuations and long-term cyclical variations.
[0045] 3. The multi-scale one-dimensional convolution (Conv1D) in this paper is combined with the LeakyReLU activation function to extract local features at different time spans, enhancing the model's adaptability to temporal dynamics. The adaptive feature aggregation layer dynamically fuses multi-scale features through the Softmax attention mechanism, suppressing redundant information and highlighting key ripple patterns, improving the robustness of feature representation.
[0046] 4. This method uses electrodes as nodes and dynamic time-frequency features as node attributes to construct an initial global connectivity graph, preserving the potential correlations between electrodes. Edge embedding calculations use a ReLU-Sigmoid dual activation structure to learn edge weights, combined with node feature concatenation, to quantify the strength of functional connections between electrodes and enhance the interpretability of edge weights.
[0047] 5. This invention uses multi-layer MLPs to aggregate node features and neighbor node information, enabling layer-by-layer updates of node features and effectively modeling nonlinear interactions between electrodes. Combined with weighted aggregation of edge weights, this method highlights the contribution of important connections to emotion recognition and improves the discriminability of spatial feature learning. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are merely exemplary, and those skilled in the art can, without inventive effort, derive other implementation drawings based on the provided drawings.
[0049] The structures, proportions, sizes, etc. illustrated in this specification are intended solely to complement the contents disclosed herein and to facilitate understanding and reading by persons skilled in the art. They are not intended to limit the conditions under which the present invention may be implemented and therefore have no substantive technical significance. Any structural modifications, changes in proportions, or adjustments in sizes, without affecting the efficacy and objectives of the present invention, shall remain within the scope of the technical contents disclosed herein.
[0050] Figure 1 Schematic diagram of the flow of an EEG-based high-order graph emotion recognition method according to an embodiment of the present invention;
[0051] Figure 2 Schematic diagram of the dynamic time-frequency feature extraction process in an embodiment of the present invention;
[0052] Figure 3 This is a schematic diagram of the principle of constructing an initial graph in an embodiment of the present invention;
[0053] Figure 4 Schematic diagram of the GIN encoding and node clustering graph pooling process in an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only part of the embodiments of this application, not all the embodiments. These descriptions are only to further illustrate the features and advantages of the present invention, rather than to limit the claims of the present invention. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0055] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following embodiments are used to illustrate the present invention but are not intended to limit the scope of the present invention.
[0056] The embodiment of the present invention relates to an EEG-based ripple high-order graph emotion recognition method, the flow chart is as follows: Figure 1 As shown, the following steps are included:
[0057] The method for emotion recognition based on EEG ripple high-order graph is characterized by comprising:
[0058] Step S1: EEG signal acquisition and preprocessing. A bandpass filter bank is used to extract the α, β, γ, δ, and θ bands of the original EEG signal, and a sliding window is performed on each frequency band to extract DE features.
[0059] Step S2: Dynamic time-varying representation extraction module. It is used to decompose complex time changes into multiple intra-cycle and inter-cycle changes, so that it can more effectively capture the complexity and periodicity of the time series in 2D space.
[0060] Step S3: Construct a module based on the MST high-order graph. The module consists of the initial graph and the MST-based high-order graph.
[0061] Step S4: GIN encoding module. It is used to learn the complex relationship between various electrode nodes and aggregate their spatial features to obtain an effective graph representation.
[0062] Step S5: Node clustering graph pooling module. Selectively downsample nodes from the graph structure to reduce the number of nodes in the graph and retain the most representative structural information.
[0063] Step S6: Emotion Classification Module. In each stage, the samples of each subject are taken as the test set in turn, and the samples of the remaining subjects are combined into the training set.
[0064] The specific steps are as follows:
[0065] In step S2, as Figure 2 As shown in the figure, the dynamic time-varying representation extraction module integrates the data conversion layer, the dynamic multi-scale feature extraction layer and the adaptive feature aggregation layer.
[0066] The data conversion layer uses Fast Fourier Transform (FFT) to transform the input signal X 1D Perform a frequency domain transformation and find the changes between cycles to reveal the strength of its frequency components. Specifically, perform a 1D FFT on each time step:
[0067] X f =FFT(X 1D )
[0068] Among them, FFT(·) represents the FFT transformation of the signal along the time dimension of the EEG feature, and the result is the complex frequency domain signal X f , in this layer we focus on its amplitude.
[0069] Next, calculate the mean of the signal amplitude at each frequency in the frequency domain channel by channel:
[0070] A f =Avg(Amp(X f ))
[0071] In the formula, Amp(·) is used to calculate the amplitude value of each frequency, and Avg(·) is used to take the average to obtain the amplitude mean A of each frequency component. f , in particular, the DC component is set to zero.
[0072] Based on the calculated frequency mean, the frequency index of the first k largest magnitudes is selected. For ease of representation, the selected frequency index is defined as f i , and select the most significant k frequency components {f1,f2...,f k}.
[0073] f i =arg T opk(A f )
[0074] where f i It is the frequency index set corresponding to the first k maximum amplitude values selected. According to the frequency index f i , the period of each selected frequency can be calculated, assuming that each selected frequency is {f1,f2...,f k}(i∈{1,...,k}), then the period of each frequency p i (i∈{1,...,k}) can be calculated using the following formula:
[0075]
[0076] where p i is the frequency f i The corresponding period represents the repetitive pattern of the signal in the time domain, and L is the length of the time series.
[0077] According to the conjugate property of the frequency domain, only The frequency within, so X 1D The time series can be restructured into multiple X 2D Tensor, as shown in the formula:
[0078]
[0079] For each period corresponding to the most significant frequency component (main frequency component), zero padding is performed along the time dimension through the Padding(·) operation so that its length is a multiple of the period, which is convenient for conversion in 2D space. The padded data is reshaped into a 2D form using the Reshape(·) operation to obtain where p i ,f i is the period of each frequency component, a two-dimensional tensor Represents two-dimensional changes at k different times from different periods.
[0080] The dynamic multi-scale feature extraction layer uses a multi-scale one-dimensional convolution operation to obtain a 2D tensor Perform feature extraction and learn its rich temporal information.
[0081]
[0082] As shown above, dynamic features are obtained by applying 1D convolution kernels of different sizes to samples one by one. Where (1, t) is the size of the convolution kernel, Conv1D() performs a one-dimensional convolution operation on the input sample with a kernel of (1, t) and a stride of (1, 1). The LeakyReLU(·) activation function is used in the convolution operation, and the feature map is downsampled using the average pooling function AvgPool(·) to reduce the impact of noise and feature dimension on signal quality.
[0083] Finally, the learned 2D tensor is converted back to 1D space Perform dimensionality reduction and reshaping, which is defined as:
[0084]
[0085] Since the Padding(·) operation is performed from 1D space to 2D space, Trunc(·) is used to truncate the length to the original length. During the data conversion process, the resulting 2D tensor has different shapes due to different periods. Therefore, when using Conv1D(·) for feature extraction, the same convolution kernel size can be used in the 2D tensors corresponding to different periods to achieve weight sharing and improve efficiency.
[0086] The adaptive feature aggregation layer fuses the output of the feature extraction layer with k one-dimensional representations And provide it to the next module. The amplitude A calculated in the data conversion layer f It can reflect the relative importance of the selected significant frequency and the corresponding period. Therefore, the Softmax(·) function is applied to each frequency, and then it is compared with the corresponding Multiply and sum them. It is defined as:
[0087]
[0088] Where a cycle weight is applied to the output of each cycle, and then the outputs of all k cycles are adaptively aggregated. f It is used as the weight coefficient after the Softmax(·) operation for aggregation. The aggregated tensor after residual connection is used as input again to perform multi-layer extraction and obtain deeper information, or it can be directly transmitted to the next layer.
[0089] In step S3, Figure 3 As shown in Figure 2, it consists of an initial graph adjacency matrix construction layer, an initial graph edge embedding construction layer, and an MST-based high-order graph construction layer.
[0090] Each electrode of the input signal in the initial graph adjacency matrix construction layer is regarded as a single node in the constructed brain network, and the learned dynamic time-frequency representation of the single electrode is regarded as a node attribute. The size of the initial graph depends on how many electrode channels the input EEG signal contains (depending on the EEG device used during acquisition). This embodiment reflects the relationship between electrode nodes by calculating the dot product between the electrode node attributes (features) within each frequency band. It is worth noting that the similarity adjacency matrix is dynamic and instance-specific.
[0091] According to the property that the relationship between two electrode nodes is mutual, the adjacency matrix A of the undirected initial graph assuming global connectivity is defined as initial ∈R C×C for:
[0092]
[0093] The above formula constructs the adjacency matrix of the graph by calculating the similarity between nodes, where is the dot product, h i ,i∈{1,2,...C} is the feature vector generated by each electrode node after passing through the dynamic time-varying representation extraction module.
[0094] Initial Graph Edge Embedding The edge embeddings of the constructed layers are calculated by concatenating the embeddings of the source and target nodes. First, a graph convolutional network is used to update the node embeddings, where the message passing process of the Graph Isomorphism Network (GIN) is adopted. Each node feature h in the graph i According to its neighbor nodes and its own information to update. Assume that the embeddings of the source node and the target node are h s and h t , then the edge embedding e st The concatenation of the source and target node embeddings yields:
[0095] e st =g(Concat(h s ,h t ))
[0096] That is, the learned node features are connected to create embedded edge features The aggregation function g(·) here uses a multi-layer perceptron MLP, which consists of a network with trainable weights A ReLU activation function σ ReLU , and a weight of The result is converted to the range (0, 1) using the Sigmoid function:
[0097]
[0098] In the MST-based high-order graph construction layer, let represents a graph constructed based on EEG data, where V = {v i :v=1,2,...,C} represents a node set. A initial =[a st :s,t∈V]∈{0,1} C×C is the adjacency matrix describing its connection information, a st =1 indicates that there is an edge between the nodes, otherwise there is no connection. Is a set of node attributes, indicating that each node v i The corresponding attribute, E={e st :s,t∈V}∈R C×Cis a set of edge weights, which indicates the connectivity strength between nodes, and C represents the number of EEG electrode channels.
[0099] The goal of calculating the minimum spanning tree (MST) for graph G is to find a subgraph containing all nodes so that the subgraph (minimum spanning tree) is connected and the sum of the edge weights is minimal, that is, to find a subgraph To ensure connectivity, all nodes in graph T are connected; acyclicity, graph T does not contain any cycles; minimum weight, the sum of the weights of the edges in graph T is the smallest.
[0100] In step S4, Figure 4 As shown, for high-order graphs GIN is used to learn the complex relationships between various electrode nodes and aggregate their spatial features to obtain an effective graph representation. GIN uses a message passing process to update the node representation by combining information from neighboring nodes. The message passing process can be referred to the following formula:
[0101]
[0102] in, represents the set of adjacent nodes of a specific node v∈V, f (k) is a function that converts adjacent node features and edge weights into an aggregation vector, g (k) Is a trainable function that maps the current node representation and the aggregate vector to a new representation. Here, f (k) is the weighted sum of node features and edge weights, g (k) It is an MLP layer that updates the representation of the node through a nonlinear mapping. Therefore, for the kth layer in GIN, the formula for node update (message passing) in the GIN model can be expressed as:
[0103]
[0104] That is, for the feature corresponding to the k-th layer node v in the graph According to its neighbor nodes and its own information to update, and finally obtain a node representation with more global information.
[0105] The above process can be written in matrix form:
[0106]
[0107] Among them H (k) It's behavior The matrix, represents the Hadamard product (element-wise multiplication), 1 is an M-dimensional vector consisting of all 1s, and is a trainable weight matrix, where d (0) =3 and d (1) =d, BN(·) represents the batch normalization operation.
[0108] In step 5, in order to selectively downsample nodes from the graph structure to reduce the number of nodes in the graph and retain the most representative structural information, this module uses HGP-SL, combined with a graph neural network. Through the graph pooling function of the HGP-SL operator, node information is retained to the greatest extent, redundant noise is removed, and information is aggregated from less important nodes to more important nodes to learn a more refined graph structure.
[0109] Specifically, the importance score of each node is calculated, and scores from multiple sources are used here: the degree centrality of the node, the dot product of the feature and the weight, and the PageRank score. i , importance score s i It can be expressed by the following formula:
[0110]
[0111]
[0112] The above formula calculates the node degree centrality score, node feature importance score, and node PageRank score.
[0113] Among them, σ Sigmoid (·) is the sigmoid activation function, deg(v i ) represents node v i , α is the degree centrality weighting coefficient, which controls the influence of degree centrality on node score, β is the offset, which adjusts the sensitivity of node selection, ε is a small positive constant (eg, 10-6) in logarithm, H (k) is the node representation matrix of the k-th layer.
[0114] Combine these scores into a vector s to get the scores of all nodes, w 1 、w 2 、w 3 For trainable weights:
[0115]
[0116] Based on the score s, the pooling operator selects the nodes that should be retained. This is achieved using the top-rank (·) operation. Retaining nodes with relatively high node information scores better preserves the core information of the graph and obtains a refined graph structure. Specifically, the nodes in the graph are first reordered according to the node information score, and then a subset of nodes with the highest ranking is selected. The node ratio selected by pooling is r, that is, r×C nodes are retained:
[0117]
[0118] top-rank(·) means return The index function of and Indicates row or (and) column extraction to form the node representation matrix and adjacency matrix of the subgraph. Finally, we get and Represents the node features and graph structure information of the next layer.
[0119] In step S4, it includes:
[0120] Aggregate the output corresponding to each frequency band and feed it into the fully connected layer to obtain the final classification result:
[0121]
[0122] Where GeLU(·) is the activation function, which helps the gradient descent optimization algorithm to converge more easily.
[0123] Dropout (·) randomly sets the output of some neurons to zero during training, thereby reducing the neural network's over-reliance on certain neurons and improving the model's generalization ability. Linear (·) is a fully connected layer that obtains the final prediction results.
[0124] The emotion classification model of the present invention is evaluated using the average accuracy of the leave-one-out cross-validation at the subject level.
[0125] This paper provides an EEG-based spectral high-order graph emotion recognition method. Experimental results show that the model achieves a classification accuracy of 94.67% on the SEED dataset, demonstrating the effectiveness and innovation of this method in emotion recognition. Evaluation on the SEED dataset demonstrates that the EEG-based spectral high-order graph emotion recognition method outperforms current state-of-the-art methods and demonstrates stronger results in emotion recognition. The model, which incorporates key modules such as dynamic time-frequency feature extraction and high-order graph construction, can adapt to the data heterogeneity of different subjects and has strong generalization capabilities, demonstrating potential for application in EEG signal analysis and emotion recognition.
[0126] The above only describes in detail the preferred embodiments of the present invention, but the present invention is not limited to the above embodiments. Various changes can be made within the knowledge of ordinary technicians in this field without departing from the purpose of the present invention, and various changes should be included in the scope of protection of the present invention.
Claims
1. A method for emotion recognition based on EEG ripple high-order graph, characterized in that: The following steps are involved: S1. EEG signal acquisition and preprocessing: using a bandpass filter bank to extract the α, β, γ, δ, and θ bands of the original EEG signal, and performing a sliding window on each frequency band to extract DE features; S2, dynamic time-varying representation extraction module, is used to decompose complex time changes into multiple intra-cycle and inter-cycle changes, so that it can more effectively capture the complexity and periodicity of time series in 2D space; S3, a high-order graph construction module based on MST, which consists of an initial graph construction layer and a high-order graph construction layer based on MST; S4, GIN encoding module, is used to learn the complex relationship between each electrode node and aggregate its spatial features to obtain an effective graph representation; S5, node clustering graph pooling module, selectively downsamples nodes from the graph structure to reduce the number of nodes in the graph and retain the most representative structural information S6, emotion classification module, in each stage, the samples of each subject are taken as the test set in turn, and the samples of the remaining subjects are merged into the training set.
2. The method for emotion recognition based on EEG ripple high-order graph according to claim 1, characterized in that: The data standards used in S1 include: having complete scale information.
3. The method for emotion recognition based on EEG ripple high-order graph according to claim 1, characterized in that: The dynamic time-varying representation extraction module in S2 integrates a data conversion layer, a dynamic multi-scale feature extraction layer, and an adaptive feature aggregation layer; The data conversion layer uses fast Fourier transform to transform the input signal X 1D Perform a frequency domain transformation and find the period and the changes between periods, revealing the strength of its frequency components; perform a 1D FFT on each time step: X f =FFT(X1D) Where: X 1D represents the input one-dimensional time domain signal, FFT represents the fast Fourier transform, which converts the time domain signal into the frequency domain signal; X f is the input signal X 1D Frequency domain representation of Padding(X 1D ) indicates padding the input signal; Reshape the padded signal into a two-dimensional tensor with dimension p i ×f i , p i is the number of time steps, f i is the number of frequency points, each branch i∈{1,...,k} corresponds to a different p i and f i , achieving multi-scale analysis; Represents the two-dimensional tensor generated by the i-th branch; The dynamic multi-scale feature extraction layer uses a multi-scale one-dimensional convolution operation to obtain a 2D tensor Perform feature extraction and learn its rich temporal information; in: Represents a one-dimensional convolution operation with a convolution kernel size of t; LeakyReLU represents a leaky rectified linear unit activation function; AvgPool represents an average pooling operation; Represents the multi-scale features extracted by the i-th branch; Finally, the learned 2D tensor is converted back to 1D space Perform dimensionality reduction and reshaping, which is defined as: in: Indicates flattening the two-dimensional feature into one dimension, with a dimension of 1×p i ×f i ;Trunc represents the truncation operation, which adjusts the signal length to be consistent with the original input; Represents the one-dimensional feature representation of the output of the i-th branch; The adaptive feature aggregation layer fuses the output of the feature extraction layer with k one-dimensional representations and provided to the next module; it is defined as: Among them: A f Represents a learnable attention weight parameter, which is used to measure the importance of features at different scales; Softmax(A f ) indicates that A f Normalize and generate weight coefficients to satisfy the sum of 1; Represents the final output after aggregation.
4. The method for emotion recognition based on EEG ripple high-order graph according to claim 1, characterized in that: The MST-based high-order graph construction module in S3 consists of an initial graph adjacency matrix construction layer, an initial graph edge embedding construction layer, and an MST-based high-order graph construction layer; Each electrode of the input signal in the initial graph adjacency matrix construction layer is regarded as a single node in the constructed brain network, and the learned dynamic time-frequency representation of a single electrode is regarded as a node attribute; according to the characteristic that the relationship between two electrode nodes is mutual; the adjacency matrix of the undirected initial graph assuming global connection is defined as A initial ∈R C×C , C is the number of electrodes, i.e., the total number of nodes in the graph; the embedding of the initial graph edge embedding construction layer edge is calculated by concatenating the embeddings of the source and target nodes; in: Represents the concatenation result of the source node and target node features; W3, b3, W4, b4 are respectively the learnable weight matrix and bias parameters for linear transformation; σ ReLU represents the ReLU activation function; σ Sigmoid Represents the Sigmoid activation function, which compresses the output to the range of [0,1][0,1], indicating the weight or importance of the edge; e st represents the embedding representation of edge (s, t); In the MST-based high-order graph construction layer, let represents a graph built based on EEG data, V represents a node set, represents the one-dimensional feature representation of the output of the i-th branch, E represents the set of edges, and the minimum spanning tree is calculated for the graph G. Its goal is to find a subgraph containing all nodes so that the subgraph is connected and the sum of the edge weights is minimized, that is, to find a subgraph To ensure connectivity, all nodes in graph T are connected; acyclicity, graph T does not contain any cycles; minimum weight, the sum of the weights of the edges in graph T is the smallest.
5. The method for emotion recognition based on EEG ripple high-order graph according to claim 1, characterized in that: The GIN encoding module in S4 is for high-order graphs GIN is used to learn the complex relationship between various electrode nodes and aggregate their spatial features. Thus, an effective graph representation is obtained; GIN uses a message passing process to update the representation of a node in combination with the information of neighboring nodes; the message passing process can be referred to the following formula: For the kth layer in GIN, the formula for node update in the GIN model is expressed as: in: represents the set of adjacent nodes of a specific node v∈V, f (k) is a function that converts adjacent node features and edge weights into an aggregation vector, g (k) is a trainable function that maps the current node representation and the aggregate vector to a new representation; For the feature corresponding to the k-th layer node v in the graph According to its neighbor nodes and its own information to update, and finally obtain a node representation with more global information.
6. The method for emotion recognition based on EEG ripple high-order graph according to claim 1, characterized in that: The node clustering graph pooling module in S5 uses HGP-SL, combined with a graph neural network. Through the graph pooling function of the HGP-SL operator, it retains node information to the greatest extent, removes redundant noise, and aggregates information from less important nodes to more important nodes to learn a more refined graph structure.
7. The method for emotion recognition based on EEG ripple high-order graph according to claim 1, characterized in that: The output corresponding to each frequency band is aggregated and fed into the fully connected layer to obtain the final classification result: Among them: GeLU(·) is an activation function that helps the gradient descent optimization algorithm converge more easily; Dropout(·) randomly sets the output of some neurons to zero during training, thereby reducing the neural network's over-reliance on certain specific neurons and improving the model's generalization ability; Linear(·) is a fully connected layer that obtains the final prediction result.
Citation Information
Patent Citations
Variable-scale symbolized compensation transfer entropy-based emotion-induced electroencephalogram signal analysis method
CN112244880A
System and method for neuroenhancement to enhance emotional response
WO2019133997A1