Electroencephalogram signal emotion recognition method and system

Through the combination of robust principal component analysis and graph neural network model, the problems of insufficient robustness and low processing efficiency of the prior art when dealing with non-Gaussian and non-stationary noises are solved, and efficient emotion recognition and generalization capabilities are achieved.

CN119719901APending Publication Date: 2025-03-28GUANGDONG UNIV OF TECH
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411788178.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Existing EEG signal emotion recognition technology is not robust enough when dealing with non-Gaussian and non-stationary noise, has low processing efficiency, and has poor emotional recognition accuracy and generalization ability.

Method used

Robust principal component analysis (RPCA) was used to denoiser the EEG data, and a graph neural network model was constructed to extract features and classify the noise reduction data.

Benefits of technology

It improves the robustness of non-Gaussian and non-stationary noise, improves the efficiency of EEG signal processing, enhances the accuracy and generalization ability of emotion recognition, and meets the real-time processing needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719901A_ABST
    Figure CN119719901A_ABST
Patent Text Reader

Abstract

The invention provides an electroencephalogram signal emotion recognition method and system, and relates to the technical field of artificial intelligence, and the method comprises the steps: constructing an electroencephalogram data matrix; performing robust principal component analysis on the electroencephalogram data matrix, and decomposing to obtain noise reduction data; constructing a graph neural network model; training the graph neural network model to obtain a trained graph neural network model; and taking the noise reduction data as the input of the graph neural network model, and outputting an emotion classification recognition result by the graph neural network model. According to the electroencephalogram signal emotion recognition method and system, the robustness of non-Gaussian and non-stationary noise is guaranteed, the electroencephalogram signal processing efficiency is improved, and the emotion recognition accuracy and generalization ability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of artificial intelligence, and in particular to a method and system for recognizing emotions using electroencephalogram (EEG) signals. Background Art

[0002] Emotion recognition can be achieved through two channels: external expression and internal physiological signals. External expression is easily interfered by noise and may be disguised, while internal physiological signals, especially multi-channel recordings such as EEG and EMG, can more directly reflect emotional state. Among them, EEG signals have become a hot topic in emotion recognition research due to their non-invasiveness, simple operation and easy collection.

[0003] Existing EEG emotion recognition technology is mainly divided into two key stages: signal acquisition and signal analysis. In the signal acquisition stage, commonly used equipment includes electroencephalograph (EEG) and related electrode caps. These devices can record weak electrical signals generated by brain activity. In the signal analysis stage, filtering, artifact removal, feature extraction and classification techniques are mainly used. Filtering technology reduces noise by removing signal components outside a specific frequency range. Common filtering methods include low-pass filtering, high-pass filtering and band-pass filtering; artifact removal technology is used to eliminate interference signals caused by non-EEG activities, such as eye movement and electromyography artifacts. Common methods include independent component analysis (ICA) and blind source separation (BSS); feature extraction technology converts the original signal into numerical features that can be used for classification. Common features include power spectral density (PSD), wavelet transform coefficients and time-frequency features; emotion classification technology usually involves machine learning algorithms, such as support vector machine (SVM), random forest (RF) and deep learning network, which can learn the pattern of emotional state from EEG signal features and classify them.

[0004] Although the above-mentioned existing technologies have made certain progress in EEG signal processing, they still face challenges in processing non-stationary and non-Gaussian EEG signals. For example, independent component analysis (ICA) and filtering technology are mainly designed for Gaussian noise, and are not robust enough to non-Gaussian and non-stationary noise. The performance of these methods degrades when faced with non-Gaussian noise commonly found in actual EEG signals, especially in feature decomposition and spectral peak search, which require large amount of calculation and slow processing speed, resulting in low processing efficiency and inability to meet real-time processing requirements. For example, in feature extraction, the complex and nonlinear features in EEG signals cannot be fully captured, resulting in low accuracy in emotion recognition. Especially in emotional state recognition, emotion-related EEG signal changes may be very subtle and are related to multiple factors such as individual differences and environmental factors. In addition, existing emotion classification methods may perform well on specific data sets, but perform poorly on new and unseen data, that is, they have poor generalization ability. Summary of the invention

[0005] In order to solve the problems of insufficient robustness to non-Gaussian and non-stationary noise, low efficiency in EEG signal processing, and poor emotion recognition accuracy and generalization ability in the above-mentioned prior art, the present invention proposes an EEG signal emotion recognition method and system to ensure robustness to non-Gaussian and non-stationary noise, improve EEG signal processing efficiency, and enhance emotion recognition accuracy and generalization ability.

[0006] In order to achieve the above technical effects, the technical solution of the present invention is as follows:

[0007] A method for recognizing emotions from an electroencephalogram signal, the method comprising the following steps:

[0008] S1. Construct EEG data matrix;

[0009] S2. performing robust principal component analysis on the EEG data matrix to decompose and obtain noise-reduced data;

[0010] S3. Build a graph neural network model;

[0011] S4. Training the graph neural network model to obtain a trained graph neural network model;

[0012] S5. Use the denoised data as the input of the graph neural network model, and the graph neural network model outputs the emotion classification and recognition result.

[0013] Preferably, the constructing of the EEG data matrix comprises:

[0014] S11. using multiple electrodes to collect EEG data at different time points, and using the collected EEG data as a multi-channel time series signal;

[0015] S12. Construct the multi-channel time series signals into an EEG data matrix, wherein each row of the EEG data matrix represents the EEG data collected by different electrodes at the same time point, and each column represents the EEG data collected by the same electrode at different time points.

[0016] Preferably, performing robust principal component analysis on the EEG data matrix to decompose and obtain noise-reduced data includes:

[0017] S21. Construct the target optimization function as follows:

[0018]

[0019] Among them, X represents the EEG data matrix, L represents the low-rank matrix, S represents the sparse matrix, and ||L|| * represents the nuclear norm of the low-rank matrix L, ||S||1 represents the L1 norm of the sparse matrix S, and λ represents the balance parameter;

[0020] S22. Solve the target optimization function and decompose to obtain EEG data consisting of a low-rank matrix L and a sparse matrix S.

[0021] Preferably, the construction of the graph neural network model includes: using EEG channels as nodes and the connection strengths between EEG channels as edges to construct the graph neural network model, wherein the connection strengths between EEG channels are calculated by the element A in the adjacency matrix A. ij express.

[0022] Preferably, the training of the graph neural network model includes:

[0023] S41. Performing a graph convolution operation on the graph neural network model;

[0024] S42. Preprocessing the original EEG data, and dividing the preprocessing results of the original EEG data into a training set;

[0025] S43. Use the training set to train the graph neural network model that has undergone graph convolution operation through the back propagation algorithm to obtain a trained graph neural network model.

[0026] Preferably, the graph convolution operation on the graph neural network model is as follows:

[0027]

[0028] Among them, H (l+1) represents the feature matrix after l+1 layers of graph convolution, σ represents the activation function, represents the normalized adjacency matrix, H (l) represents the feature matrix after l+1 layers of graph convolution, W (l) Represents the weight matrix after l+1 layers of graph convolution.

[0029] Preferably, during the training of the graph neural network model, the total loss function is used. The calculation expression is:

[0030]

[0031] in, represents the KL divergence loss function, represents the domain adversarial loss function and λ represents a hyperparameter.

[0032] Preferably, the KL divergence loss function The calculation expression is:

[0033]

[0034] Among them, KL(,) represents the KL divergence loss of a sample i, N represents the total number of samples, and p i represents the true label distribution, q i is the label distribution predicted by the graph neural network model;

[0035] The domain adversarial loss function The calculation expression is:

[0036]

[0037] Where D represents the discriminator, f(x i ) represents the features extracted by the feature extractor.

[0038] Preferably, the calculation expression of the emotion classification recognition result Z is:

[0039]

[0040] in, represents the standardized adjacency matrix, H represents the feature matrix after the graph convolution operation, W represents the weight matrix, and σ represents the activation function.

[0041] The present invention also proposes an EEG signal emotion recognition system, the system comprising:

[0042] Matrix building module, used to build EEG data matrix;

[0043] A denoising module, used for performing robust principal component analysis on the EEG data matrix to decompose and obtain denoised data;

[0044] Graph neural network model building module, used to build graph neural network models;

[0045] A training module, used to train the graph neural network model to obtain a trained graph neural network model;

[0046] The classification module is used to use the denoised data as the input of the graph neural network model, and the graph neural network model outputs the emotion classification recognition result.

[0047] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0048] The present invention proposes a method and system for emotion recognition of EEG signals. Firstly, the robust principal component analysis is used to perform noise reduction processing on EEG data. It shows higher robustness in the face of non-Gaussian and non-stationary noise, and realizes the effective separation of noise and artifacts in EEG data signals. The application of robust principal component analysis not only improves the signal-to-noise ratio of EEG data signals, ensures the accuracy and reliability of signal processing, but also reduces the amount of calculation in subsequent processing steps, making the entire EEG data signal processing process more efficient, which is conducive to real-time processing and meets the needs of real-time monitoring and analysis. Secondly, the graph neural network model is introduced to conduct in-depth noise reduction data of EEG data signals. The feature extraction and emotion classification of the graph neural network significantly improves the performance of the processing flow. The graph neural network model is good at capturing the temporal and spatial relationship characteristics in the EEG data signal, which is conducive to the accurate identification of emotional states. The graph structure characteristics of the graph neural network model enable the trained graph neural network model to effectively process high-dimensional and nonlinear EEG data, thereby enhancing the ability of feature extraction and significantly improving the accuracy and generalization ability of emotion recognition. In addition, the graph neural network model not only improves the accuracy of emotion classification, but also ensures that the classification results can maintain stable performance under different individuals and diverse scenarios through the generalization ability of the deep learning model, thereby enhancing the practicality and adaptability of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A flowchart showing a method for recognizing emotions using an electroencephalogram signal according to an embodiment of the present invention;

[0050] Figure 2 A block diagram showing the principle of lie detection using EEG data proposed in an embodiment of the present invention;

[0051] Figure 3 A flowchart showing the steps of RPCA processing EEG data in an embodiment of the present invention;

[0052] Figure 4 It represents a flowchart of the whole process of implementing lie detection by emotion classification based on RGNN deep learning proposed in an embodiment of the present invention;

[0053] Figure 5 A schematic diagram showing the steps of performing RGNN deep learning on the RPCA denoised EEG data proposed in an embodiment of the present invention;

[0054] Figure 6 The figure shows a structural block diagram of an EEG signal emotion recognition system proposed in an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;

[0056] It is understandable to those skilled in the art that some well-known contents may be omitted in the drawings;

[0057] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0058] Example 1

[0059] like Figure 1 and Figure 2 As shown, the present invention proposes an EEG signal emotion recognition method for use in the field of lie detection, the method comprising the following steps:

[0060] S1. Construct EEG data matrix;

[0061] In S1, constructing the EEG data matrix includes:

[0062] S11. using multiple electrodes to collect EEG data at different time points, and using the collected EEG data as a multi-channel time series signal;

[0063] In S11, EEG data is a multi-channel time series signal. Usually in EEG experiments, multiple electrodes are placed on the scalp to collect electrical activity generated by the brain. The EEG data recorded by each electrode at different times constitute a time series. In an EEG acquisition system with n electrodes, each electrode will generate a series of data points over time.

[0064] S12. Construct the multi-channel time series signals into an EEG data matrix, wherein each row of the EEG data matrix represents the EEG data collected by different electrodes at the same time point, and each column represents the EEG data collected by the same electrode at different time points.

[0065] In order to apply the robust principal component analysis algorithm, these multi-channel time series data need to be constructed into an EEG data matrix X. Assuming that the time length of the collected EEG data is m time points and the number of electrodes is n, the EEG data matrix X is an m×n matrix.

[0066] S2. performing robust principal component analysis on the EEG data matrix to decompose and obtain noise-reduced data;

[0067] In S2, EEG data is often interfered by noise, which affects the accuracy of emotion classification. Robust principal component analysis (RPCA) technology is used to reduce the noise of EEG data. RPCA effectively separates the noise and outliers in the data by decomposing the data matrix into two parts: a low-rank matrix and a sparse matrix. Robust principal component analysis is based on the assumption that real data often has low-rank characteristics, while noise and outliers are sparse. In the context of EEG data, normal electrical activity (meaningful data) generated by the brain usually repeats in a certain pattern, which makes the data matrix have a low-rank structure; while noise and outliers caused by loose electrodes, human body movements, etc. appear randomly, accounting for a small proportion of the entire data set, showing sparse characteristics. The robust principal component analysis of the EEG data matrix is ​​performed to decompose the noise-reduced data, including:

[0068] S21. Construct the target optimization function as follows:

[0069]

[0070] Among them, X represents the EEG data matrix, L represents the low-rank matrix, S represents the sparse matrix, and ||L|| * represents the nuclear norm (the sum of all singular values) of the low-rank matrix L, which is used to measure the low-rank degree of the matrix; ||S||1 represents the L1 norm (the sum of the absolute values ​​of the elements) of the sparse matrix S, which is used to measure the sparsity of the matrix; λ represents the balance parameter, which is used to adjust the weights of the low-rank part and the sparse part.

[0071] The nuclear norm of the low-rank matrix L ||L|| * The calculation formula is:

[0072]

[0073] Among them, σ i (L) is the i-th singular value of the low-rank matrix L;

[0074] The calculation formula of the L1 norm ||S||1 of the sparse matrix S is:

[0075]

[0076] Among them, s ij is the element in the i-th row and j-th column of the sparse matrix S.

[0077] S22. Solve the target optimization function and decompose to obtain EEG data consisting of a low-rank matrix L and a sparse matrix S.

[0078] In S22, the target optimization function is solved by an iterative optimization algorithm to obtain a low-rank matrix L and a sparse matrix S. The alternating direction multiplier method (ADMM) is used as the iterative optimization algorithm. In each iteration, the algorithm continuously adjusts the values ​​of L and S until convergence, that is, the value of the target optimization function no longer changes significantly. The specific process is as follows:

[0079] First, we introduce auxiliary variables Z = L and W = S, and transform the original problem into the augmented Lagrangian function form:

[0080]

[0081] Among them, <·,·> represents the inner product, ||·|| F represents the Frobenius norm, Y1 and Y2 are Lagrange multipliers, and ρ is the penalty parameter.

[0082] Then perform iterative updates:

[0083] (1) Update Z:

[0084]

[0085] (2) Update S (i.e. W):

[0086]

[0087] (3) Update L:

[0088]

[0089] (4) Update the Lagrange multiplier:

[0090]

[0091] Repeat the above steps until the target optimization function converges.

[0092] It is important to note that, see Figure 3 , in the context of EEG data denoising, the decomposed low-rank matrix L represents the main structure and information of EEG data. Because the normal electrical activity patterns of the brain are relatively stable and regular, these regular activities are reflected as low-rank characteristics in the data matrix, so L contains the brain electrical activity information we are concerned about.

[0093] The low-rank matrix L is saved as denoised data, and the noise and outliers in the sparse matrix S are discarded. In subsequent applications such as emotion classification, using the low-rank matrix L as denoised data can improve the accuracy of classification. For example, in an EEG-based emotion recognition system, EEG data that has not been denoised may cause emotion classification errors due to noise interference. After robust principal component analysis denoising, the noise in the data is removed, which can more accurately reflect the electrical activity related to the emotional state of the brain, thereby improving the performance of emotion classification.

[0094] S3. Build a graph neural network model;

[0095] In S3, a graph neural network model is constructed based on the topological structure of EEG channels, including: using EEG channels as nodes and the connection strengths between EEG channels as edges to construct the graph neural network model. In the initial stage of constructing the graph neural network model, we need to determine the relationship between each EEG channel, which is achieved through the adjacency matrix, where the connection strength between EEG channels is determined by the element A in the adjacency matrix A. ij It means that the calculation formula is:

[0096]

[0097] Among them, d ij represents the physical distance between the i-th and j-th EEG signal channels. The principle of this formula is that as the physical distance increases, the strength of the direct connection between brain regions usually weakens. Taking the minimum value with 1 can not only reflect the distance-related connection attenuation trend, but also ensure that the connection strength is within a reasonable range (between 0 and 1).

[0098] In order to make the adjacency matrix have appropriate sparsity, a calibration constant d = 5 is selected. From a mathematical point of view, when hour, When ij <1, A ij = 1. This setting makes about 20% of the matrix entries non-zero values, which not only ensures the reasonable connection between EEG channels, but also avoids overly complex network structures, reducing unnecessary computational overhead and overfitting risks. In this way, a network structure that reflects the relationship between EEG channels can be preliminarily constructed, providing a basis for subsequent analysis and processing.

[0099] The organization and functional connectivity of the brain involves not only connections between local regions, but also information transfer between distant regions such as the left and right hemispheres. In order to more accurately simulate the functional connectivity of the brain, we add global connections to the adjacency matrix as follows:

[0100] (AF1,AF2),(AF3,AF4),(F5,F6),(FC5,FC6),(C5,C6),(CP5,CP6),(P5,P6),(PO5,PO6) and (O1,O2). For these global channel pairs, we initialize their connection relationship as:

[0101] A ij =A ij -1

[0102] Where (i, j) is the global channel pair index. This initialization method makes the global connection have a certain negative value at the beginning, which is distinguished from the local connection, so as to better learn its weight in the subsequent graph neural network model training. By introducing these global connections, the constructed adjacency matrix can more comprehensively reflect the local anatomical connections and emotion-related global functional connections in the brain network, providing a richer information basis for subsequent emotion classification prediction.

[0103] S4. Training the graph neural network model to obtain a trained graph neural network model;

[0104] In S4, the training of the graph neural network model includes:

[0105] S41. Performing a graph convolution operation on the graph neural network model;

[0106] In S41, graph convolution operation is the core part of the graph neural network model, which learns the representation of nodes by propagating and aggregating information on the EEG network. In the graph neural network model, the normalized adjacency matrix The calculation of is crucial for the propagation of information in the network. The specific steps of graph convolution operation are as follows:

[0107] First calculate the degree matrix of the adjacency matrix Degree Matrix is a diagonal matrix whose diagonal elements D ii It represents the degree of node i, that is, the number of edges connected to the node, and the calculation formula is:

[0108]

[0109] Then, we need to calculate the normalized adjacency matrix The calculation formula is:

[0110]

[0111] in is the adjacency matrix after adding self-loops, and I is the identity matrix. Adding self-loops ensures that each node also considers its own characteristics during information propagation. is the corresponding degree matrix. The elements in the degree matrix represent the degree of the node, that is, the number of edges connected to the node. By standardizing the adjacency matrix, we can ensure that the information propagates more evenly and stably in the network. Standardized adjacency matrix It plays a key role in the graph convolution operation. It determines how a node obtains information from neighboring nodes during the information aggregation process. In each layer of graph convolution, the feature update of a node is done by combining its own features with the features of neighboring nodes according to This is achieved by weighted summing the defined weights. This operation enables the model to effectively capture the local and global relationships between nodes, gradually learn the complex patterns and structural information in the network, and thus lay the foundation for accurate sentiment classification prediction.

[0112] The core of the graph convolution operation is based on the standardized adjacency matrix Feature matrix H (l) and the weight matrix W (l) Calculate. In each layer l (l = 0, 1, ..., L-1, L is the number of convolution layers), the feature matrix H (l) Represents the feature representation of the node at this layer, whose dimension is n×d (l) (n is the number of nodes, d (l) is the feature dimension of this layer). The weight matrix W (l) The dimension is d (l) *d (l) , d (l) ×d (l+1) Used to perform linear transformations on node features.

[0113] Finally, the graph convolution operation of the graph neural network model is performed as follows:

[0114]

[0115] Among them, H (l+1) represents the feature matrix after l+1 layers of graph convolution, σ represents the activation function, represents the normalized adjacency matrix, H (l) represents the feature matrix after l+1 layers of graph convolution, W (l) Represents the weight matrix after l+1 layers of graph convolution.

[0116] During the graph convolution operation, first Operation, each node aggregates information based on the characteristics of its neighbor nodes to obtain an intermediate representation containing neighbor information. Then, this intermediate representation is combined with the weight matrix W (l) Multiply to achieve linear transformation of features, and finally perform nonlinear transformation through activation function σ to obtain the updated node feature H of this layer (l +1). Through multi-layer graph convolution operations, the graph neural network model can gradually learn higher-level abstract features, thereby better capturing the complex relationships and patterns in the EEG network. The activation function σ plays the role of introducing nonlinear factors in the graph convolution operation, enabling the graph neural network model to learn complex nonlinear relationships. The activation function used in the graph neural network model of this embodiment is ReLU (σ(x) = max(0,x)), which can effectively alleviate the gradient vanishing problem.

[0117] S42. Preprocessing the original EEG data, and dividing the preprocessing results of the original EEG data into a training set;

[0118] In S42, the preprocessing of feature extraction of the raw EEG data is the key link to convert the raw EEG data into a model suitable for processing. This step uses the differential entropy (DE) feature, which is based on the concept of entropy in information theory. For a continuous random variable x, its differential entropy h(x) is defined as:

[0119] h(x)=-∫f(x)log(f(x))dx

[0120] Where f(x) is the probability density function of x. In EEG signal processing, DE features can effectively capture the complexity and uncertainty of signals, thereby reflecting the activity state of the brain. The differential entropy features are pre-calculated, covering five frequency bands (delta (1-4Hz), theta (4-8Hz), alpha (4-13Hz), beta (13-30Hz), gamma (>30Hz)). Each frequency band has one feature vector per second. This design can fully capture the characteristic information of EEG signals in different frequency ranges. For example, the delta frequency band is usually associated with deep sleep and unconsciousness, the theta frequency band is more active in relaxation and light meditation, the alpha frequency band is related to brain activity in relaxation and when the eyes are closed, the beta frequency band appears when attention is focused and thinking is active, and the gamma frequency band is related to high-level cognitive functions and perceptual processing. By extracting the features of these different frequency bands, we can have a more comprehensive understanding of the activity state of the brain and provide richer information for emotion classification.

[0121] In order to make data from different channels and different time periods comparable, data standardization is performed. A common method is to subtract the mean of each data point from the channel it belongs to and divide it by the standard deviation of the channel to make the data obey the distribution of zero mean and unit variance.

[0122] S43. Using the training set, the graph neural network model that has undergone the graph convolution operation is trained through a back propagation algorithm to obtain a trained graph neural network model;

[0123] S5. Use the denoised data as the input of the graph neural network model, and the graph neural network model outputs the emotion classification and recognition result.

[0124] In S5, a graph neural network model is used to classify EEG data for emotions. The graph neural network model considers the biological topological structure between different brain regions to capture the local and global relationships between different EEG channels. The calculation expression of the emotion classification recognition result Z is:

[0125]

[0126] in, represents the standardized adjacency matrix, H represents the feature matrix after the graph convolution operation, W represents the weight matrix, and σ represents the activation function.

[0127] The output Z contains the features of the EEG data after model learning and processing, which can be used to predict emotional states. First, perform L-layer graph convolution on the graph neural network model, and then use the back propagation algorithm to train the graph neural network model after L-layer graph convolution to obtain the trained graph neural network model. After L-layer graph convolution, the dimension of the feature matrix H is n×d (d is the feature dimension of the output of the last layer of graph convolution), and the dimension of the weight matrix W is d×C. First calculate The resulting dimension is n×d, which represents the information aggregation of node features after being adjusted by the adjacency matrix. Multiplying with W, we get a matrix of dimension n×C, where each row represents the score of each node in each emotion category without activation function processing. Finally, these scores are transformed nonlinearly by activation function σ to get the final output representation Z. Using ReLU activation function,

[0128] See also Figure 4, this embodiment also proposes a comprehensive technical solution combining robust principal component analysis and graph neural network model to output emotion classification and recognition results for lie detection. Traditional lie detection methods such as multi-channel physiological instrument have certain limitations and disputes, and the accuracy and reliability need to be improved. These methods may be affected by the subjective judgment of the operator, and there are disputes about the interpretation of the physiological reactions of the subjects, resulting in insufficient accuracy and reliability. The existence of these problems has prompted researchers to seek new EEG signal processing methods to improve the robustness to noise, reduce computational complexity, enhance the ability of feature extraction, improve the generalization and real-time performance of the model, and better adapt to individual differences. Therefore, this embodiment comprehensively utilizes robust principal component analysis and graph neural network model, firstly performs noise reduction processing on EEG data through robust principal component analysis, and then uses graph neural network model to perform emotion classification on the noise-reduced data. This combined method not only improves the quality of EEG data, but also enhances the accuracy and robustness of emotion classification. The emotion classification results are output in the form of reports and provided to relevant law enforcement officers, security personnel or medical professionals. These reports may include detailed results of emotion classification, conclusions of lie detection, and confidence information. Based on the feedback of the output results, the system may be adjusted and optimized. For example, if it is found that the accuracy of certain emotion classifications is not high, it may be necessary to retrain the graph neural network model, or improve the data preprocessing and feature extraction methods. The design of the system allows continuous learning and improvement to improve the accuracy and reliability of polygraph technology. The present invention revolutionizes the traditional polygraph method by integrating two major technologies: robust principal component analysis (RPCA) and regularized graph neural network (RGNN). The application of RPCA technology significantly improves the signal-to-noise ratio of EEG signals, and lays a solid data foundation for emotion classification by effectively separating signals and noise. Subsequently, RGNN technology deeply mines the EEG signals after noise reduction, accurately identifies emotional fluctuations and brain activities related to lying, and greatly improves the accuracy of polygraph. This technical solution not only shows excellent performance in the laboratory, but also maintains high accuracy in practical applications, enhancing the credibility and practical value of polygraph technology in fields such as law and security. In general, the present invention provides a novel and efficient technical path for the field of polygraph detection, which has important practical application prospects.

[0129] In summary, this embodiment provides a new EEG signal processing framework by combining robust principal component analysis (RPCA) and recursive graph neural network (RGNN). Specifically, the present invention uses RPCA to separate low-rank components and sparse noise in the signal to improve the robustness and noise resistance of the signal; and uses RGNN to capture the temporal dependency and spatial structure of the signal to improve the accuracy of feature extraction and classification performance. This method has significant advantages in dealing with individual differences and real-time performance, and provides a new solution for achieving more accurate and robust emotion classification, thereby significantly improving the accuracy of lie detection.

[0130] It should be noted that this paper proposes a method of using RPCA denoising and RGNN deep learning-based emotion classification to achieve lie detection. The key points are as follows:

[0131] 1. The innovative core of the present invention lies in the application of two technologies: Robust Principal Component Analysis (RPCA) and Regularized Graph Neural Network (RGNN). The application of RPCA technology is innovative in the field of EEG data noise reduction, and can effectively separate noise and outliers from EEG data, especially in the processing of non-stationary noise. The application of RGNN technology in emotion classification significantly improves the accuracy of emotion classification by mining the nonlinear relationships and timing information in EEG signals through deep learning. These two technical points not only constitute the technical core of the present invention, but are also the key innovative points that the present invention intends to protect.

[0132] 2. Compared with the prior art, the present invention has achieved significant technological breakthroughs in EEG data denoising and emotion classification. Traditional EEG data denoising methods, such as filter design and wavelet transform, have limited processing capabilities for non-stationary noise. The RPCA algorithm adopted by the present invention effectively separates the noise and signal in the EEG signal through data matrix decomposition technology, thereby improving the quality of signal processing. In terms of emotion classification, traditional methods such as support vector machines (SVM) fail to fully utilize the topological structure information of EEG signals, resulting in limited classification accuracy. The RGNN technology of the present invention constructs a graph neural network to deeply explore the local and global relationships of EEG signals, which not only improves the classification accuracy, but also enhances the robustness of the model.

[0133] 3. The technical solution of the present invention provides a more efficient and accurate solution in EEG data processing and emotion classification. The application of the RPCA algorithm makes the present invention more effective in processing non-stationary noise and artifacts, and can more accurately restore the original EEG signal. The application of RGNN technology improves the accuracy and robustness of emotion classification by considering the biological topological structure between brain regions. In addition, the advantages of the RGNN model in computational efficiency and real-time performance enable the present invention to meet the needs of fast and accurate lie detection in practical applications. In general, the technical solution of the present invention has significant technical advantages and broad application prospects in the field of EEG data denoising and emotion classification.

[0134] In addition, the EEG signal emotion recognition method proposed in this embodiment also has the following advantages:

[0135] First, robust principal component analysis (RPCA) is used to denoise the EEG data. Compared with traditional filter design and wavelet transform methods, RPCA can more effectively separate noise and outliers in the data. RPCA decomposes the data matrix into a low-rank matrix and a sparse matrix, where the low-rank matrix represents the main structure of the data, and the sparse matrix contains noise and outliers. This decomposition method makes the denoising process more accurate and robust, especially when dealing with non-stationary noise and artifacts, RPCA shows significant advantages. In addition, the RPCA algorithm can adapt to different types of noise and provide more accurate EEG signal recovery.

[0136] Secondly, in terms of emotion classification, regularized graph neural network (RGNN) is used for emotion recognition. Compared with traditional machine learning methods (such as support vector machine SVM), RGNN can more accurately identify emotional states by constructing graph neural network. The RGNN model takes into account the biotopological structure between different brain regions and captures the local and global relationships between different EEG channels, thereby more deeply mining the nonlinear relationships and timing information in EEG signals and improving the accuracy and robustness of emotion classification. In addition, the RGNN model also has advantages in terms of computational complexity and real-time performance, which can meet the needs of practical applications.

[0137] Finally, the RPCA and RGNN technologies are combined to improve the accuracy and reliability of lie detection. The application of the RPCA algorithm in noise reduction provides a more accurate and robust solution, while the application of the RGNN model in emotion classification improves the accuracy and real-time performance of classification. These innovations are the main differences between the present invention and the prior art, and are also the key value of the present invention. Through this combination of technologies, the present invention not only improves the quality of EEG signal processing, but also enhances the depth and accuracy of emotion recognition, thereby achieving a technological breakthrough in the field of lie detection.

[0138] Example 2

[0139] In the process of training the graph neural network model, see Figure 5 The loss function is used to measure the difference between the prediction results of the graph neural network model and the actual label, which is a key part of the graph neural network model training. In this embodiment, the total loss function is used The calculation expression is:

[0140]

[0141] in, represents the KL divergence loss function, Represents the domain adversarial loss function, and λ represents a hyperparameter. It is used to control the impact of domain adversarial loss. The value of the hyperparameter λ is crucial, as it can balance the trade-off between the accuracy (measured by KL divergence loss) and generalization ability (measured by domain adversarial loss) of the graph neural network model. By adjusting the value, a suitable balance point can be found according to specific application requirements and data characteristics, so that the graph neural network model can achieve the best performance in terms of accuracy and generalization ability.

[0142] Total loss function A combination of two loss functions is used: KL divergence loss function and domain adversarial loss function.

[0143] In the training of graph neural network models, the loss function is used to measure the difference between the predicted results of the graph neural network model and the true label, and guide the graph neural network model to optimize parameters. First, the KL divergence loss function is used to measure the difference between the true label distribution and the model predicted label distribution. For a sample i, the KL divergence loss calculation formula is:

[0144]

[0145] Overall KL divergence loss It is the sum of the KL divergence of all training samples:

[0146] The KL divergence loss function The calculation expression is:

[0147]

[0148] Among them, KL(,) represents the KL divergence loss of a sample i, N represents the total number of samples, and p i represents the true label distribution, q i is the label distribution predicted by the graph neural network model; C is the number of categories.

[0149] KL divergence loss can make the predicted distribution of the graph neural network model as close to the true distribution as possible, thereby improving the accuracy of the graph neural network model's prediction. From the perspective of information theory, KL divergence measures the degree of difference between two probability distributions. By minimizing KL divergence, the graph neural network model can learn more accurate label prediction probabilities, making the prediction results more consistent with the actual situation.

[0150] Domain adversarial loss is used to reduce the distribution difference between the source domain (labeled data) and the target domain (unlabeled data) and improve the generalization ability of the graph neural network model. The calculation expression is:

[0151]

[0152] Where D represents the discriminator, f(x i ) represents the features extracted by the feature extractor. The goal of the discriminator is to distinguish whether the feature comes from the source domain or the target domain, while the goal of the graph neural network model is to make the discriminator unable to distinguish the source of the feature, thereby reducing the difference between the domains. During the training process, the feature extractor and the discriminator are trained adversarially. The feature extractor tries to generate features that are difficult for the discriminator to distinguish, while the discriminator strives to improve its ability to distinguish. This adversarial training mechanism enables the model to learn domain-invariant feature representations, enhance its adaptability to different data domains (such as EEG data of different subjects), and improve the generalization performance of the graph neural network model on unseen data.

[0153] The goal of graph neural network model training is to minimize the total loss function During the training process, the back propagation algorithm is used to continuously adjust the parameters of the graph neural network model (such as the weight matrix W, the adjacency matrix A, etc.) according to the gradient of the loss function to the parameters of the graph neural network model. The update formula of the gradient descent algorithm is:

[0154]

[0155] Where θ represents the graph neural network model parameters and η is the learning rate. By continuously iteratively updating the parameters, the graph neural network model gradually learns the parameter values ​​that can accurately predict emotions, minimizing the difference between the prediction results and the true labels, while improving the adaptability to different data domains, thereby achieving high-performance graph neural network model training for EEG data emotion classification prediction.

[0156] Example 3

[0157] This example further describes the graph neural network model training algorithm. The training algorithm is a key step in implementing graph neural network model learning and optimization. Figure 5 , the following is a detailed description of the training algorithm:

[0158] Input: training samples X and labels Unlabeled test sample X T , learning rate X, number of training rounds T, batch size B, and other regularization hyperparameters.

[0159] Output: learned graph neural network model parameters.

[0160] Randomly initialize model parameters, including weight matrix W, discriminator weight matrix W D wait.

[0161] Initialize the adjacency matrix A and calculate the elements of the adjacency matrix according to the physical distance between EEG channels.

[0162] Training loop.

[0163] The specific training algorithm is implemented as follows:

[0164] Sample extraction and data preparation, from training data X (containing M samples) and labels Extract training samples X with batch size B from B and Y B :For i=1 to B, randomly select j((1≤j≤M)) from S and take the jth sample in X as X B The i-th sample in the same way; extract the test sample X TB .

[0165] After extracting samples, calculate the degree matrix D: D ii =∑ j A ij .

[0166] Then calculate the standardized adjacency matrix S:

[0167] Forward propagation and loss calculation, input X B , calculate the output Z through multi-layer graph convolution: for l = 0 to L-1, in Finally Z = S L X B W. Calculate KL divergence loss For sample i, in overall (According to Y B Determine p i ). Compute domain adversarial loss in

[0168] Back propagation and parameter update, calculate the gradient of weight matrix W: have to Combined with the partial derivative of the loss function with respect to Z and the chain rule, we get Calculate the gradient of the adjacency matrix A: have to Combining the relevant influence and partial derivatives, we get Parameter update: According to (θ is the model parameter, η is the learning rate) to update parameters such as W and A, which can be combined with regularization (α||A||1,||A||1=∑ i,j |A ij |) and regularization

[0169] Example 4

[0170] See also Figure 6 This embodiment proposes an EEG signal emotion recognition system, the system comprising:

[0171] Matrix building module, used to build EEG data matrix;

[0172] A denoising module, used for performing robust principal component analysis on the EEG data matrix to decompose and obtain denoised data;

[0173] Graph neural network model building module, used to build graph neural network models;

[0174] A training module, used to train the graph neural network model to obtain a trained graph neural network model;

[0175] The classification module is used to use the denoised data as the input of the graph neural network model, and the graph neural network model outputs the emotion classification recognition result.

[0176] In this embodiment, firstly, the EEG data is denoised by using robust principal component analysis, which shows higher robustness in the face of non-Gaussian and non-stationary noise, and realizes the effective separation of noise and artifacts in the EEG data signal. The application of robust principal component analysis not only improves the signal-to-noise ratio of the EEG data signal, ensures the accuracy and reliability of signal processing, but also reduces the amount of calculation in subsequent processing steps, making the entire EEG data signal processing process more efficient, which is conducive to real-time processing and meets the needs of real-time monitoring and analysis; secondly, the graph neural network model is introduced to perform in-depth feature extraction and emotion classification on the denoised data of the EEG data signal The graph neural network model is good at capturing the temporal and spatial relationship characteristics in EEG data signals, which is conducive to the accurate identification of emotional states. The graph structure characteristics of the graph neural network model enable the trained graph neural network model to effectively process high-dimensional and nonlinear EEG data, thereby enhancing the ability of feature extraction and significantly improving the accuracy and generalization of emotion recognition. In addition, the graph neural network model not only improves the accuracy of emotion classification, but also ensures the stability of the classification results in different individuals and diverse scenarios through the generalization ability of the deep learning model, thereby enhancing the practicality and adaptability of the algorithm.

[0177] Obviously, the above embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the implementation methods of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all implementation methods here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A method for recognizing emotions using electroencephalogram signals, characterized in that: The method comprises the following steps: S1. Construct EEG data matrix; S2. performing robust principal component analysis on the EEG data matrix to decompose and obtain noise-reduced data; S3. Build a graph neural network model; S4. Training the graph neural network model to obtain a trained graph neural network model; S5. Use the denoised data as the input of the graph neural network model, and the graph neural network model outputs the emotion classification and recognition result.

2. The method for recognizing emotions using electroencephalogram signals according to claim 1, characterized in that: The constructing of the EEG data matrix comprises: S11. using multiple electrodes to collect EEG data at different time points, and using the collected EEG data as a multi-channel time series signal; S12. Construct the multi-channel time series signals into an EEG data matrix, wherein each row of the EEG data matrix represents the EEG data collected by different electrodes at the same time point, and each column represents the EEG data collected by the same electrode at different time points.

3. The method for recognizing emotions using electroencephalogram signals according to claim 2, characterized in that: The performing robust principal component analysis on the EEG data matrix to decompose and obtain noise reduction data includes: S21. Construct the target optimization function as follows: Among them, X represents the EEG data matrix, L represents the low-rank matrix, S represents the sparse matrix, ∥L∥ * represents the nuclear norm of the low-rank matrix L, ∥S∥1 represents the L1 norm of the sparse matrix S, and λ represents the balance parameter; S22. Solve the target optimization function and decompose to obtain EEG data consisting of a low-rank matrix L and a sparse matrix S.

4. The method for recognizing emotions from EEG signals according to claim 3, characterized in that: The construction of the graph neural network model includes: using EEG channels as nodes and the connection strengths between EEG channels as edges to construct the graph neural network model, wherein the connection strengths between EEG channels are calculated by the element A in the adjacency matrix A. ij express.

5. The method for recognizing emotions from EEG signals according to claim 4, characterized in that: The training of the graph neural network model includes: S41. Performing a graph convolution operation on the graph neural network model; S42. Preprocessing the original EEG data, and dividing the preprocessing results of the original EEG data into a training set; S43. Use the training set to train the graph neural network model that has undergone graph convolution operation through the back propagation algorithm to obtain a trained graph neural network model.

6. The method for recognizing emotions from EEG signals according to claim 5, characterized in that: The graph convolution operation of the graph neural network model is as follows: Among them, H (l+1) represents the feature matrix after l+1 layers of graph convolution, σ represents the activation function, represents the normalized adjacency matrix, H (1) represents the feature matrix after l+1 layers of graph convolution, W (l) Represents the weight matrix after l+1 layers of graph convolution.

7. The method for recognizing emotions from EEG signals according to claim 5, characterized in that: In the process of training the graph neural network model, the total loss function is used The calculation expression is: in, represents the KL divergence loss function, represents the domain adversarial loss function and λ represents a hyperparameter.

8. The method for recognizing emotions from EEG signals according to claim 7, characterized in that: The KL divergence loss function The calculation expression is: Among them, KL(,) represents the KL divergence loss of a sample i, N represents the total number of samples, and p i represents the true label distribution, q i is the label distribution predicted by the graph neural network model; The domain adversarial loss function The calculation expression is: Where D represents the discriminator, f(x i ) represents the features extracted by the feature extractor.

9. The method for recognizing emotions from EEG signals according to any one of claims 1 to 9, characterized in that: The calculation expression of the emotion classification recognition result Z is: in, represents the standardized adjacency matrix, H represents the feature matrix after the graph convolution operation, W represents the weight matrix, and σ represents the activation function.

10. An EEG signal emotion recognition system, characterized in that: The system comprises: Matrix building module, used to build EEG data matrix; A denoising module, used for performing robust principal component analysis on the EEG data matrix to decompose and obtain denoised data; Graph neural network model building module, used to build graph neural network models; A training module, used to train the graph neural network model to obtain a trained graph neural network model; The classification module is used to use the denoised data as the input of the graph neural network model, and the graph neural network model outputs the emotion classification recognition result.

Citation Information

Cited By

  • Electroencephalogram signal processing method, system and device based on gradient memory bank and medium

    CN120345873A

  • Sentiment classification optimization method and system based on prediction distribution geometric constraint

    CN122132565A

  • Electroencephalogram emotion recognition method based on multi-domain decoupling, electronic equipment and medium

    CN122182044A

  • EEG emotion recognition methods, electronic devices and media based on multi-domain decoupling

    CN122182044B