A cross-domain emotion recognition method based on an attention mechanism of electroencephalogram

CN119128626BActive Publication Date: 2026-10-09NANJING UNIV OF INFORMATION SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411068991.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2026-10-09
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

但是目前的研究在捕捉目标域与源域之间的有效特征方面表现不足,同时在缩小域间差异以提升平均分类精度的努力上也显得不尽人意

Benefits of technology

[0064]1. This invention proposes using a deep overparameterized convolutional module as this common feature extractor and further introduces the CBAM attention mechanism. Introducing the attention mechanism enables the model to automatically identify the most critical features in each domain, thereby improving the model's adaptability and generalization ability to domain data. Compared to simply merging all existing data into a single source domain, the method proposed in this invention employs a multi-source domain adaptation architecture. By combining a deep overparameterized convolutional network with the attention mechanism, it can more effectively process multi-source domain data, ensuring that the model achieves good performance across various domains.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128626B_ABST
    Figure CN119128626B_ABST
Patent Text Reader

Abstract

The application discloses a cross-domain emotion recognition method based on an attention mechanism of electroencephalogram (EEG), comprising the following steps: extracting domain-invariant features of EEG, and using a multilayer perceptron to extract specific domain features; combining maximum mean difference loss and correlation similarity loss to align edge distribution and conditional distribution from different domains; using a domain-specific feature classifier to perform EEG emotion classification and adopting difference loss, so as to obtain a high accuracy rate of cross-domain EEG emotion recognition result. The application automatically identifies and focuses on the most key features of the cross-domain task by introducing an attention mechanism based on a convolution block, and greatly improves the accuracy of cross-domain emotion recognition by combining MMD loss and correlation similarity loss. The accuracy rate of the application is improved by 10% to 30% in a cross-subject scenario, and is improved by 10% to 20% in a cross-time period scenario, and the application has advantages in improving the target domain recognition accuracy and reducing the distribution difference between the source domain and the target domain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of emotion recognition technology, and in particular relates to a cross-domain emotion recognition method based on the attention mechanism of electroencephalography. Background Technology

[0002] Emotion recognition enables computers to understand and respond to human emotional states, forming the foundation for more natural, efficient, and empathetic human-computer interaction. Emotion recognition has wide applications in medical diagnosis and treatment, traffic safety, and market research. Electroencephalography (EEG), as a tool that directly reflects brain activity, provides a new research perspective for emotion recognition. Traditional behavior-based emotion recognition methods may be limited when users attempt to conceal their true feelings, while biometric methods such as EEG can provide deeper levels of emotion recognition. In-depth research into the application of EEG in emotion recognition can lead to a better understanding of the neural mechanisms of emotion generation and improve the accuracy and efficiency of emotion recognition. Despite significant achievements in EEG-based emotion recognition research, many challenges remain. EEG signals, as highly complex biological signals, are characterized by high dimensionality and strong nonlinearity; different frequency bands have different meanings and are easily affected by individual differences, electrode placement, and external interference. Furthermore, obtaining high-quality EEG signals requires precise experimental setups and specialized equipment; providing sufficient labeled data for deep learning algorithms is both time-consuming and resource-intensive. Therefore, there is an urgent need to develop efficient neural network models to achieve accurate EEG signal recognition.

[0003] Real-world emotion recognition scenarios often involve multiple subjects and time periods. Even when performing the same task, the characteristics of EEG signal data generated by different subjects vary significantly. This leads to high-performance models trained on existing subjects exhibiting poor generalization ability when tested on new subjects. Different models have been proposed for domain adaptation methods, such as a domain-adaptive neural network based on deep adversarial networks that maximizes the domain discrimination loss to train the feature extractor in the direction of deceiving the domain discrimination; and a novel domain adaptation method for emotion recognition that aims to generalize the model across individuals and time periods by optimizing the neural network model to minimize classification errors while making the source and target data similar in latent representation. Through the application of these domain adaptation methods, researchers are gradually addressing the problem of individual differences in EEG data, thereby improving the model's generalization ability across different subjects. However, current research falls short in capturing effective features between the target and source domains, and its efforts to reduce inter-domain differences to improve average classification accuracy are also unsatisfactory. Summary of the Invention

[0004] Purpose of the Invention: The purpose of this invention is to provide a cross-domain emotion recognition method based on an EEG-based attention mechanism. A deep overparameterized convolutional structure is employed as a feature extractor, utilizing a lightweight network to capture rich EEG features. The introduced attention mechanism automatically identifies and focuses on the features most critical to the cross-domain task. By jointly employing MMD loss and association similarity loss, AMSJDA not only aligns the source and target domains in terms of feature level but also improves prediction consistency, enhancing the model's classification performance in the target domain. Finally, difference loss is used to calculate prediction results for multiple target domains, resulting in more accurate classification. Compared to existing multi-source domain adaptation models, this model effectively reduces inter-domain differences, improves the consistency of target predictions, and achieves high-accuracy recognition tasks across subjects and time periods.

[0005] Technical solution: The present invention provides a cross-domain emotion recognition method based on the attention mechanism of electroencephalography, comprising the following steps:

[0006] Step 1: Receive EEG datasets from N independent source domains and one target domain, and extract common features through a shared common feature extraction module that incorporates the CBAM attention mechanism.

[0007] Step 2: Input the extracted common features into their respective domain-specific feature extractors;

[0008] Step 3: Minimize the maximum mean difference distance and association similarity between common features to reduce the differences between different domains and align the source domain features with the target domain features;

[0009] Step 4: Introduce the target domain features and all source domain features into their respective classifiers to generate corresponding classification predictions;

[0010] Step 5: Use the results from the source domain to calculate the classification loss. Feed the target domain data into each source domain classifier to generate multiple target domain prediction results and calculate the difference loss.

[0011] Step 6: Use the average value of the prediction results in the target domain as the final output of the model to achieve emotion recognition in cross-time scenarios.

[0012] Furthermore, step 1 specifically involves: receiving datasets from N independent source domains. A dataset of a target domain It uses a depthwise overparameterized convolutional module as a common feature extractor and introduces the CBAM attention mechanism to receive intermediate features from the depthwise overparameterized convolutional layer. As input, channel attention is first calculated, and different weights are assigned to each dimension;

[0013] (1)

[0014] in, This represents the output after channel attention. This indicates that the channel attention weight has been assigned. Subsequent channel information, Indicates element-wise multiplication;

[0015] yes The calculation result of the channel attention weights can be expressed as:

[0016] (2)

[0017] in, This represents the activation function Sigmoid. This indicates the average pooling operation. This indicates a max pooling operation. , , It is a constant;

[0018] Then, a spatial attention mapping is generated based on the internal spatial relationships characterized by the following features;

[0019] (3)

[0020] in ,in and This indicates that spatial attention weights have been assigned and The following indicates;

[0021] yes The spatial attention weights can be calculated as follows:

[0022] (4)

[0023] in Indicates the size of the convolution kernel. This represents a cascade of average pooling and max pooling results.

[0024] Furthermore, step 2 specifically involves using a multilayer perceptron as a domain-specific feature extractor. Data from each source and target domain are processed by their respective domain-specific feature extractors, mapping the data into a unique latent space and extracting refined, domain-specific features from each branch.

[0025] Furthermore, step 3 specifically involves: firstly, using MMD to estimate the distance between the two domains. The formula for MMD is as follows:

[0026] (5)

[0027] in, N S and N T These represent the number of samples in the source domain and the target domain, respectively. It is a feature mapping function that maps the original data to a high-dimensional feature space. The MMD loss identifies and reduces the statistical differences between the two domains by comparing their average feature distributions. It uses association similarity to improve the consistency of label prediction between the source and target domains. The association similarity loss is expressed as:

[0028] (6)

[0029] in , It is a weighting factor. A detailed description follows. and ;

[0030] Let A be a set of source domain data and B be the target domain data. First, we need to calculate the values ​​from each source domain sample. To each target domain sample transition probability . The calculation formula is expressed as follows:

[0031] (7)

[0032] in, Represents source domain samples and target domain samples Similarity measures between samples in the target domain are typically achieved using the dot product, followed by calculation of the similarity from the target domain samples. Return to source domain sample transition probability ;

[0033] (8)

[0034] Calculate the transition probabilities from the source domain samples using the two transition probabilities mentioned above. To target domain samples Returning to the source domain sample The two-step cycle transition probability, that is... arrive The transition probability and Back Multiply the transition probabilities and then apply them to all target domain samples. Summation;

[0035] (9)

[0036] It can be represented as:

[0037] (10)

[0038] in, It is a small constant added for numerical stability, and is chosen as . , Let KL divergence be the KL divergence. Defined as:

[0039] (11)

[0040] according to Calculate the average probability that the target sample is accessed. ;

[0041] (12)

[0042] in, It is the total number of samples in the source domain;

[0043] Define an ideal access probability distribution V, where each target sample has an equal probability of being accessed. V is expressed as:

[0044] (13)

[0045] in, It is the total number of samples in the target domain. This represents the probability that any sample j in the target domain will be accessed under ideal conditions, i.e., each sample is considered equally.

[0046] Through calculation and Define by the differences between them The loss, which can be expressed as:

[0047] (14)

[0048] in, Let KL divergence be denoted as KL divergence.

[0049] Furthermore, step 4 specifically involves using features extracted from a domain-specific feature extractor to predict the results. In the domain-specific classifier, each source domain corresponds to N single Softmax classifiers.

[0050] Furthermore, step 5 specifically involves: for each trained classifier, selecting the cross-entropy loss function to estimate the classification loss, introducing a measure of difference loss, and ensuring that the predictions of the N classifiers converge. The classification loss can be expressed as:

[0051] (15)

[0052] in, Represents the predicted label. Represents the true label, (·) represents the cross-entropy loss function, and the difference loss can be expressed as:

[0053] (16)

[0054] in, This represents the model's predicted output for the i-th sample in the target domain, while Let represent the true label or target of the j-th sample in the target domain. The total loss function can be expressed as:

[0055] (17)

[0056] During the training process, and The coefficients are dynamically adjusted, and the expression is as follows:

[0057] (18)

[0058] (19)

[0059] in Represents the current iteration number. and These are preset parameters, which determine... With the number of iterations The rate and location of change.

[0060] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method of the present invention.

[0061] The present invention also discloses a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the method of the present invention.

[0062] The present invention also discloses a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the method of the present invention.

[0063] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:

[0064] 1. This invention proposes using a deep overparameterized convolutional module as this common feature extractor and further introduces the CBAM attention mechanism. Introducing the attention mechanism enables the model to automatically identify the most critical features in each domain, thereby improving the model's adaptability and generalization ability to domain data. Compared to simply merging all existing data into a single source domain, the method proposed in this invention employs a multi-source domain adaptation architecture. By combining a deep overparameterized convolutional network with the attention mechanism, it can more effectively process multi-source domain data, ensuring that the model achieves good performance across various domains.

[0065] 2. This invention combines MMD loss and association similarity loss. Compared to other multi-source domain adaptation models that only consider the marginal distribution of features in reducing inter-domain differences, this invention can reduce the distributional differences between the source and target domains and promote label prediction consistency. The association similarity strategy not only enables the model to learn class-discriminative and transferable feature representations between the source and target domains, but also ensures that the model has a comprehensive understanding of the overall structure of the target domain. This method is particularly suitable for domain adaptation tasks where the data distributions of the source and target domains may differ significantly. It helps the model maintain high classification accuracy for source domain samples while also better generalizing to new and unseen target domain data.

[0066] 3. The dynamic adjustment strategy of the loss coefficients employed in this invention helps the model converge better and prevents instability caused by some loss terms being too strong in the early stages of training. With this setting, the model can focus on learning basic features in the early stages and gradually shift its attention to more complex or task-specific features in the later stages. Attached Figure Description

[0067] Figure 1 This is a flowchart of the CBAM attention mechanism of the system of the present invention;

[0068] Figure 2 This is a model flow diagram of the system of the present invention;

[0069] Figure 3 Visualization of T-SNE without the AMSJDA model of this invention;

[0070] Figure 4 T-SNE visualization of the AMSJDA model using the system of this invention. Detailed Implementation

[0071] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0072] (I) Implementation process of emotion recognition model

[0073] Step 1: Receive EEG datasets from N independent source domains A target domain EEG dataset We use a depthwise overparameterized convolutional module as a common feature extractor, and further introduce the CBAM attention mechanism on this basis. Figure 1 As shown, by receiving intermediate features from depth-parameterized convolutional layers... As input, channel attention is first calculated, and different weights are assigned to each dimension.

[0074] (1)

[0075] in, This represents the output after channel attention. This indicates that the channel attention weight has been assigned. Subsequent channel information, This represents element-wise multiplication.

[0076] yes The calculation result of the channel attention weights can be expressed as:

[0077] (2)

[0078] in, This represents the activation function Sigmoid. This indicates the average pooling operation. This indicates a max pooling operation. , , As a constant, the purpose of dimensional transformation is to reduce parameter overhead.

[0079] Then, a spatial attention mapping is generated based on the internal spatial relationships characterized by the following features.

[0080] (3)

[0081] in ,in and This indicates that spatial attention weights have been assigned and The following indicates.

[0082] yes The spatial attention weights can be calculated as follows:

[0083] (4)

[0084] in Indicates the size of the convolution kernel. This represents a cascade of average pooling and max pooling results.

[0085] Step 2: Use a multilayer perceptron as a domain-specific feature extractor. Data from each source and target domain are processed by their respective domain-specific feature extractors, mapping the data into a unique latent space and extracting fine, domain-specific features from each branch.

[0086] Step 3: First, use MMD to estimate the distance between the two domains. The formula for MMD is:

[0087] (5)

[0088] Where, N S and N T These represent the number of samples in the source domain and the target domain, respectively. It is a feature mapping function that maps the original data to a high-dimensional feature space. MMD loss identifies and reduces the statistical differences between two domains by comparing their average feature distributions. This helps ensure that the model captures the common feature properties of the source and target domains as a whole.

[0089] Further, association similarity is used to analyze the source and target domain data to improve the consistency of label predictions between the source and target domains. The association similarity loss is expressed as:

[0090] (6)

[0091] in , It is a weighting factor. Ensure that the prediction of the source domain sample is probabilistically close to the prediction of the sample that passes through the target domain and returns to the source domain. This ensures that every sample in the target domain is considered with the same probability, thus preventing the model from ignoring target domain samples that are difficult to classify. Combining the advantages of both approaches allows the model to learn data helpful for classification while also better generalizing to new, unseen target domain data. This is described in detail below. and .

[0092] Let A be a set of source domain data and B be the target domain data. First, we need to calculate the values ​​from each source domain sample... To each target domain sample transition probability . The calculation formula is expressed as follows:

[0093] (7)

[0094] in, Represents source domain samples and target domain samples The similarity measure between samples is typically achieved using a dot product. The denominator ensures that the similarity measure is normalized across all target domain samples, resulting in a sum of transition probabilities of 1. Similarly, the similarity measure from target domain samples is calculated... Return to source domain sample transition probability .

[0095] (8)

[0096] Next, the two transition probabilities mentioned above are used to calculate the transition from the source domain samples. To target domain samples Returning to the source domain sample The two-step cycle transition probability. (The rest of the text appears to be incomplete and requires further context.) arrive The transition probability and Back Multiply the transition probabilities and then apply them to all possible target domain samples. Sum.

[0097] (9)

[0098] Intended to make Class consistency distribution between samples from the source domain and those from the ideal case Matching can be represented as:

[0099] (10)

[0100] in, It is a small constant added for numerical stability, and is chosen as . , Let KL divergence be denoted as KL divergence. Defined as:

[0101] (11)

[0102] according to Calculate the average probability that the target sample is accessed. .

[0103] (12)

[0104] in, It represents the total number of samples in the source domain.

[0105] To ensure the model uniformly considers each sample in the target domain, an ideal access probability distribution V is defined, where each target sample has an equal probability of being accessed. V is expressed as:

[0106] (13)

[0107] in, It represents the total number of samples in the target domain. This represents the probability that any sample j in the target domain will be accessed under ideal conditions, i.e., each sample is considered equally.

[0108] Through calculation and Define by the differences between them The loss, which can be expressed as:

[0109] (14)

[0110] in, Let KL divergence be denoted as KL divergence.

[0111] Step 4: Use features extracted from the domain-specific feature extractor to predict the results. In the domain-specific classifier, each source domain corresponds to N single Softmax classifiers.

[0112] Step 5: For each trained classifier, choose the cross-entropy loss function to estimate the classification loss. A metric called the difference loss is introduced to ensure the convergence of predictions across the N classifiers. The classification loss can be expressed as:

[0113] (15)

[0114] in, Represents the predicted label. Represents the true label, (·) represents the cross-entropy loss function. The difference loss is used to further improve classification accuracy; it can be expressed as:

[0115] (16)

[0116] in, This represents the model's predicted output for the i-th sample in the target domain, while This represents the true label or target of the j-th sample in the target domain. The total loss function can be expressed as:

[0117] (17)

[0118] in, We can obtain the domain-invariant features of each pair of source and target domains. Further enhance the feature similarity between known subjects and target subjects, and minimize This allows classifiers trained on the source domain to achieve higher classification accuracy, minimizing... This can make the classification results more convergent. During training, and The coefficients are dynamically adjusted, and the expression is as follows:

[0119] (18)

[0120] (19)

[0121] in Represents the current iteration number. and These are preset parameters, which determine... With the number of iterations The rate and location of change.

[0122] (II) Experimental Verification

[0123] Cross-domain emotion recognition tasks can be divided into two main scenarios: cross-subject transfer and cross-time period transfer. In the cross-subject transfer scenario, the EEG data of a new subject in a certain time period is defined as the target domain, while the EEG data of other subjects constitute the source domain. For cross-time period transfer, data from a subject in a previous time period is used as the source domain, while data collected from that subject in subsequent time periods is considered the target domain.

[0124] The collected datasets covered three time periods and 15 subjects. For cross-time period scenarios, data from one subject in two time periods were selected as the source domain for cross-time period transfer, and data from the remaining time period was selected as the target domain. For cross-subject scenarios, data from 14 subjects in the same time period were used as the source domain for cross-subject transfer, and data from the remaining subject was selected as the target domain.

[0125] Set the batch size to 64, the number of iterations to 200, and the coefficient of the MMD loss to [value missing]. Coefficient of difference loss Set as The formula for the coefficient of association similarity loss. Set to 5, the model adopts The value is 0.05. and coefficient , Set them to 1 and 0.6 respectively.

[0126] The performance of the model on the SEED and SEED-IV datasets is shown in Table 1. This demonstrates that the model proposed in this invention can achieve good accuracy in cross-domain emotion recognition scenarios.

[0127] Table 1 Performance of AMSJDA Model

[0128]

[0129] To better illustrate the CBAM attention mechanism of this invention, the attention module used for source domain data was removed separately, and the results are shown in Table 2:

[0130] Table 2. Effects of the CBAM attention mechanism in the experiment.

[0131]

[0132] As shown in Table 2, for cross-subject experiments, significant performance improvements were observed on both the SEED and SEED-IV datasets, with increases of 1.52% and 2.87%, respectively. For cross-time period emotion recognition experiments, the addition of CBAM also resulted in some performance improvements, at 1.38% and 0.99%, respectively. These results demonstrate that for the SEED dataset, introducing the CBAM attention mechanism significantly improves performance. For the SEED-IV dataset, CBAM also improves performance, but the improvement is not as significant as in the SEED setting.

[0133] To illustrate the MMD module of this invention, experiments were conducted using different measurement methods, and the results are shown in Table 3.

[0134] Table 3. Effects of different statistical distribution measures on multi-source domain adaptation experiments.

[0135]

[0136] The results show that, for cross-subject experiments, the MMD distance achieved the highest performance metric of 91.18% in the SEED dataset experimental setting. In the SEED-IV experimental setting, the same distance metrics were tested, with the MMD and CORAL distances performing similarly, while the Wasserstein distance lagged slightly behind. For cross-time period experiments, the effect of using the three distance metrics to reduce inter-domain gaps was similar to that of cross-subject experiments; however, under the baseline condition without using any distance metrics, although there was a decrease, it was not as significant as in cross-subject experiments.

[0137] To illustrate the association similarity module of the present invention, this module was also removed separately, and the results are shown in Table 4.

[0138] Table 4. The effect of association similarity on multi-source domain adaptation experiments.

[0139]

[0140] As shown in the table, on the SEED dataset, after removing correlation similarity, the cross-subject identification accuracy slightly decreased from 91.18% to 90.65%, while the cross-time period identification accuracy also slightly decreased from 87.43% to 86.08%. On the SEED-IV dataset, the cross-subject identification accuracy decreased from 62.98% to 61.34%, and the cross-time period identification accuracy decreased from 66.89% to 66.55%.

[0141] In a cross-subject scenario, 100 EEG samples were randomly selected from each subject (i.e., different domains) for T-SNE visualization analysis. The cross-subject scenario from the SEED dataset was used for plotting, with different colors used to indicate the source domains, while the target domain was represented in black. To improve image clarity, the target samples were made transparent to reduce overlap. Figure 3 , Figure 4 The comparison shows that, in the AMSJDA method, the target domain data points marked in black exhibit a certain degree of proximity and overlap with the data points of each source domain in the feature space. Through meticulous adjustments to the distribution between the source and target domains, the target domain data points are no longer isolated, but rather form a relatively integrated state with the data points of each source domain in space, and their distribution is more widespread and uniform.

Claims

1. A cross-domain emotion recognition method based on EEG attention mechanisms, characterized in that, Includes the following steps: Step 1: Receive EEG datasets from N independent source domains and one target domain, and extract common features using a shared common feature extraction module incorporating the CBAM attention mechanism; Step 1 specifically involves: receiving datasets from N independent source domains. A dataset of a target domain It uses a depthwise overparameterized convolutional module as a common feature extractor and introduces the CBAM attention mechanism to receive intermediate features from the depthwise overparameterized convolutional layer. As input, channel attention is first calculated, and different weights are assigned to each dimension; (1) in, This represents the output after channel attention. This indicates that the channel attention weight has been assigned. Subsequent channel information, Indicates element-wise multiplication; yes The calculation result of the channel attention weights can be expressed as: (2) in, This represents the activation function Sigmoid. This indicates the average pooling operation. This indicates a max pooling operation. , , It is a constant; Then, a spatial attention mapping is generated based on the internal spatial relationships characterized by the following features; (3) in ,in and This indicates that spatial attention weights have been assigned and The following indicates; yes The spatial attention weights can be calculated as follows: (4) in Indicates the size of the convolution kernel. This represents the concatenation of average pooling and max pooling results; Step 2: Input the extracted common features into their respective domain-specific feature extractors; Step 3: Minimize the maximum mean difference distance and association similarity between common features to reduce the differences between different domains and align the source domain features with the target domain features; Step 4: Introduce the target domain features and all source domain features into their respective classifiers to generate corresponding classification predictions; Step 3 specifically involves: First, using MMD to estimate the distance between the two domains. The formula for MMD is: (5) Where, N S and N T These represent the number of samples in the source domain and the target domain, respectively. It is a feature mapping function that maps the original data to a high-dimensional feature space. The MMD loss identifies and reduces the statistical differences between the two domains by comparing their average feature distributions. It uses association similarity to improve the consistency of label prediction between the source and target domains. The association similarity loss is expressed as: (6) in , It is a weighting factor; Let A be a set of source domain data and B be the target domain data. First, we need to calculate the values ​​from each source domain sample. To each target domain sample transition probability , The calculation formula is expressed as follows: (7) in, Represents source domain samples and target domain samples Similarity measures between samples typically use the dot product, and then calculate the similarity from the target domain samples. Return to source domain sample transition probability ; (8) Calculate the transition probabilities from the source domain samples using the two transition probabilities mentioned above. To target domain samples Returning to the source domain sample The two-step cycle transition probability, that is... arrive The transition probability and Back Multiply the transition probabilities and then apply them to all target domain samples. Summation; (9) It can be represented as: (10) in, It is a small constant added for numerical stability, and is chosen as . , Let KL divergence be the KL divergence. Defined as: (11) according to Calculate the average probability that the target sample is accessed. ; (12) in, It is the total number of samples in the source domain; Define an ideal access probability distribution V, where each target sample has an equal probability of being accessed. V is expressed as: (13) in, It is the total number of samples in the target domain. This represents the probability that any sample j in the target domain will be accessed under ideal conditions, i.e., each sample is considered equally. Through calculation and Define by the differences between them The loss, which can be expressed as: (14) in, Let KL divergence be a metric. Step 5: Use the results from the source domain to calculate the classification loss. Feed the target domain data into each source domain classifier to generate multiple target domain prediction results and calculate the difference loss. Step 6: Use the average value of the prediction results in the target domain as the final output of the model to achieve emotion recognition in cross-time scenarios.

2. The cross-domain emotion recognition method based on EEG attention mechanism according to claim 1, characterized in that, Step 2 specifically involves using a multilayer perceptron as a domain-specific feature extractor. Data from each source and target domain are processed by their respective domain-specific feature extractors, mapping the data into a unique latent space and extracting refined, domain-specific features from each branch.

3. The cross-domain emotion recognition method based on EEG attention mechanism according to claim 1, characterized in that, Step 4 specifically involves using features extracted from a domain-specific feature extractor to predict the results. In the domain-specific classifier, each source domain corresponds to N single Softmax classifiers.

4. The cross-domain emotion recognition method based on EEG attention mechanism according to claim 1, characterized in that, Step 5 specifically involves: For each trained classifier, selecting the cross-entropy loss function to estimate the classification loss, introducing a measure of difference loss, and ensuring that the predictions of the N classifiers converge. The classification loss can be expressed as: (15) in, Represents the predicted label. Represents the true label, (·) represents the cross-entropy loss function, and the difference loss can be expressed as: (16) in, This represents the model's predicted output for the i-th sample in the target domain, while Let represent the true label or target of the j-th sample in the target domain. The total loss function can be expressed as: (17) During the training process, and The coefficients are dynamically adjusted, and the expression is as follows: (18) (19) in Represents the current iteration number. and These are preset parameters, which determine... With the number of iterations The rate and location of change.

5. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method of claim 1.

6. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method of claim 1.

7. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method of claim 1.

Citation Information

Patent Citations

  • Domain self-adaptive intelligent emotion recognition method and device based on electroencephalogram signals

    CN115444419A

  • Method for realizing a multi-channel convolutional recurrent neural network EEG emotion recognition model using transfer learning

    US20230039900A1