Multi-source-domain cross-subject emotion classification method based on sub-domain adaptive electroencephalogram signal recognition

By introducing inter-domain transferability evaluation and attention mechanism into the multi-source domain cross-subject emotion classification task, selecting suitable source domain combinations, and introducing the concept of sub-domain into the model, the problems of negative transfer and fine-grained information loss are solved. problem, significantly improving the accuracy and generalization performance of EEG emotion recognition.

CN118643422APending Publication Date: 2024-09-13HANGZHOU DIANZI UNIV

Patent Information

Application Number
CN202410663026.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

In the multi-source domain cross-subject emotion classification task, existing domain adaptation methods are prone to negative transfer problems, and traditional methods are not effective in processing fine-grained information between domains, resulting in insufficient recognition accuracy and generalization performance.

Method used

Introducing the evaluation index of inter-domain transferability, by calculating the distance metric between each source domain and the target domain, screening out suitable source domain combinations, and introducing the attention mechanism and sub-domain concept into the model to achieve the goal of transferring subjects from source to target. Transfer knowledge to target subjects and enhance feature representation capabilities.

Benefits of technology

By selecting the optimal source domain combination and fine-grained feature distribution alignment, the accuracy and generalization performance of the model in cross-subject emotion recognition tasks are improved, the impact of negative transfer is reduced, and the recognition of EEG emotion recognition is significantly improved. Accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643422A
    Figure CN118643422A
Patent Text Reader

Abstract

The invention discloses a multi-source-domain cross-subject emotion classification method based on sub-domain adaptive electroencephalogram signal recognition, which comprises the following steps: firstly, collecting electroencephalogram signals for down-sampling and band-pass filtering, and calculating differential entropy features of the electroencephalogram signals; secondly, selecting one subject as a target domain, taking the rest of subjects as source domains, calculating inter-domain mobility between the source domains and the target domain, and removing the source domains which do not participate in knowledge migration; then, the differential entropy features of all the source domain samples participating in training pass through a serial public feature extraction network and a double-filtering network, and domain classification features are obtained; and finally, calculating the prediction probability of the domain classification feature of each sample through a double classifier to obtain a classification result, and constructing a loss function to carry out training iteration to update parameters. According to the method, class-level fine-grained feature distribution alignment is realized, and the emotion recognition accuracy of the electroencephalogram under the cross-subject application background is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an electroencephalogram (EEG) signal recognition method, and in particular to a multi-source domain cross-subject emotion classification method based on subdomain adaptive EEG signal recognition. Background Art

[0002] Brain-computer interface (BCI) technology is a cutting-edge technology that aims to achieve communication and interaction between the human brain and computers or other devices. When users think consciously, BCI devices capture the bioelectric signals in their brains and convert them into personalized outputs or commands for the system. BCI technology has been widely used in psychology, medical rehabilitation and other fields, but it still faces challenges in recognition accuracy and real-time performance. Electroencephalogram (EEG) is a non-invasive diagnostic tool with high temporal resolution and low acquisition cost, and it has a strong correlation with the user's emotional state. Therefore, in response to the above problems, research on brain-computer interface technology based on EEG has gradually increased.

[0003] Domain adaptation (DA), as an important subset of machine learning and transfer learning, aims to solve the problem of inconsistent data distribution between domains, thereby improving the representation and generalization capabilities of the model to ensure good performance and robustness in new domains or downstream tasks. Recent research on cross-domain EEG recognition has mainly focused on cross-session and cross-subject experimental scenarios. The problem of uneven data distribution between domains caused by individual differences in EEG signals violates the assumption of independent and identical distribution in traditional machine learning. Therefore, domain adaptation methods are widely used in EEG recognition tasks in cross-domain contexts. According to the strategy of narrowing the differences between domains, domain adaptation technology can be roughly divided into two categories: adversarial domain adaptation and metric-based domain adaptation. Recently, some scholars have integrated the two domain adaptation methods through different model frameworks or stages to improve the recognition and classification performance of domain adaptation technology in brain-computer interface tasks. In the application context of multi-source domain adaptation, due to the differences in data distribution in different source domains, the model may experience negative transfer during domain adaptation, which in turn deteriorates the performance of the model in the target domain. At the same time, most existing domain adaptation methods only perform metric alignment on the global feature distribution, which often loses the fine-grained information between domains and makes the model unable to achieve good recognition accuracy and generalization performance in downstream tasks. Summary of the invention

[0004] In order to solve the negative transfer problem that may be caused by domain adaptation methods in multi-source domain cross-subject application scenarios, the present invention introduces an evaluation index of inter-domain transferability in the data preprocessing stage, seeks the optimal source domain combination suitable for target domain adaptation in the data set, and proposes a multi-source domain cross-subject emotion classification method based on sub-domain adaptive EEG signal recognition. The attention mechanism module is introduced to enhance the feature representation ability of the model, and then the concept of sub-domain is introduced to realize the knowledge transfer from source subjects to target subjects at the fine-grained level of the class, thereby realizing the emotion recognition and classification of the target subject's EEG.

[0005] The specific steps include:

[0006] Step 1: Use EEG acquisition equipment to collect EEG signals.

[0007] Step 2: Downsample and bandpass filter the collected EEG signals, and calculate the differential entropy (DE) features of all EEG signals.

[0008] Step 3: Select one subject as the target domain and the remaining subjects as source domains, calculate the inter-domain transferability between them and the target domain one by one, and eliminate the source domains that do not participate in knowledge transfer.

[0009] Step 4: The differential entropy features of all source domain samples participating in the training are passed through a serial common feature extraction network and a double filtering network to obtain domain classification features. The common feature extraction network is built based on a multi-layer perceptron, and the double filtering network is built based on an attention mechanism.

[0010] Step 5: Calculate the prediction probability of each sample's domain classification features through the dual classifier, obtain the classification result, and construct the loss function for training and iterative parameter update.

[0011] Step 6: After training is completed, calculate the classification results of the target domain samples for testing.

[0012] The present invention takes into consideration the calculation accuracy and adopts the method of selecting the corresponding source domain transferability threshold and model structure parameters for the data set.

[0013] As a preferred method, when eliminating source domains that are not suitable for knowledge transfer, a distance metric in a specific feature space is used as an evaluation index for inter-domain transferability. The specific steps are as follows:

[0014] Step 3-1: Sort each domain, that is, the samples of each subject, according to the time series when the data was collected.

[0015] Step 3-2: For all samples in the target domain, calculate the distance metric between them and all samples in each source domain respectively, as the inter-domain transferability evaluation index between the target domain and this source domain, and define d(·) as the average distance metric value of all samples between the target domain and the source domain:

[0016]

[0017] In the formula, x i and x j Source domain and target domain The sample value of and are the number of samples in the source domain and the target domain respectively, φ(·) is the kernel function, which maps the sample values ​​to the linear space For emotional EEG signals, sample features of all domains are mapped into the linear feature space for calculation. The lower the average distance metric value, the higher the inter-domain transferability of the source domain, and the more suitable it is for realizing knowledge transfer to the target domain.

[0018] Step 3-3: According to the distribution of the source domain transferability index corresponding to each target domain, set the source domain selection threshold and eliminate all source domain samples whose average distance metric value is less than the threshold.

[0019] Preferably, step 4 comprises:

[0020] Step 4-1: Convert the differential entropy features into one-dimensional features and input them into the common feature extraction network based on multi-layer perceptron to calculate the domain invariant features.

[0021] Step 4-2: For the domain-invariant features from the source domain and the target domain, set up a double-filter network based on the attention mechanism applied to the source domain and the target domain respectively, and calculate the weight corresponding to each feature value according to the domain-invariant features, indicating that the feature value contains the weight of information related to emotional EEG:

[0022] w i =Sigmoid[g(f i )] (2)

[0023] Where g(·) is a fully connected layer to calculate feature weights, f i It is a domain invariant feature.

[0024] Step 4-3: According to the weights calculated in step 4-2, calculate the weighted domain-invariant feature embedding to obtain the domain classification feature z output by the double filtering network i :

[0025] z i =w i ·g(f i ) (3)

[0026] Preferably, the step 5 comprises:

[0027] Step 5-1: The dual classifier calculates the predicted probability of the sample through the domain classification features and outputs the predicted label through decision making. In the training stage, the predicted probability is calculated as:

[0028]

[0029] In the formula, represents the predicted probability of the i-th sample in the model training phase, C k (·) is the k-th classifier, and WeigtNorm[·] is the weight normalization operation.

[0030] Step 5-2: Calculate the classification loss of the model and similarity penalty

[0031]

[0032]

[0033] In the formula For the kth th The classifier model predicts the source domain samples The predicted probability on the cth category, 1(·) is the indicator function, θ k (k=1,2) is the kth th The model parameters of the classifier.

[0034] Step 5-3: Calculate the label vectors of the source domain samples and the target domain samples respectively. The label vector of the source domain sample is determined by converting the true label into a one-dimensional vector, and the label vector of the target domain sample is represented by the predicted probability of the sample.

[0035] Step 5-4: Calculate the subdomain weights of the source and target domains:

[0036]

[0037] Where y ic is the value of the label vector at the cth item.

[0038] Step 5-5: Map source and target domain sample features to linear feature space Then, the average subdomain distance metric between the two is calculated:

[0039]

[0040] In the formula and The samples are and The weight value on the cth category, C is the number of categories;

[0041] Step 5-6: Construct a total loss function for iterative parameter updates during training:

[0042]

[0043] where λ and α represent hyperparameters.

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

[0045] Based on most metric-based domain adaptation algorithms, considering the individual differences of EEG, using all source domain EEG data may increase the overall source domain data distribution differences, and relying solely on global feature distribution alignment may also lead to negative transfer. A multi-source domain cross-subject emotion classification method based on subdomain adaptive EEG signal recognition is proposed. In order to select the optimal source subject combination, the inter-domain transferability of all source domains and target domains is evaluated and screened to alleviate the impact of negative transfer on the model from a coarse-grained level. Through a specific network framework, the feature representation of the source domain and target domain samples in the linear space is obtained, and by calculating the subdomain weights, the fine-grained feature distribution alignment at the class level is achieved, which improves the model's emotion recognition accuracy for EEG in the context of cross-subject applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is a flow chart of the present invention;

[0047] Figure 2 It is a neural network framework diagram of the present invention;

[0048] Figure 3(a) is a distribution diagram of inter-domain transferable values;

[0049] Figure 3(b) is a box plot of inter-domain transferable values ​​after multi-source domain selection is implemented;

[0050] Figure 4(a) shows the distribution of domain-invariant features for a specific subject;

[0051] Figure 4(b) shows the distribution of domain classification features for a specific subject. DETAILED DESCRIPTION

[0052] The present invention is further described below in conjunction with specific embodiments. The following description is only for demonstration and explanation and does not limit the present invention in any form.

[0053] like Figure 1 As shown, the implementation steps of the embodiment of the present invention are as follows:

[0054] Step 1: Use EEG acquisition equipment to collect EEG signals with a sampling frequency of 1000 Hz.

[0055] Step 2: Preprocess the collected EEG signals, including downsampling the EEG signals to 200 Hz and applying a 0-75 Hz bandpass filter for denoising. Apply a 1 s non-overlapping sliding window to divide the samples and calculate the differential entropy feature of each sample:

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

[0057] Where x is the EEG signal sampling value, and f(x) is the probability density function of the EEG signal.

[0058] Step 3: Select one subject as the target domain and the remaining subjects as source domains, calculate the inter-domain transferability between them and the target domain one by one, and eliminate the source domains that do not participate in knowledge transfer. The specific steps are as follows:

[0059] Step 3-1: Sort each domain, that is, the samples of each subject, according to the time series when the data was collected.

[0060] Step 3-2: For all samples in the target domain, calculate the distance metric between them and all samples in each source domain respectively, as the inter-domain transferability evaluation index between the target domain and this source domain, and define d(·) as the average distance metric value of all samples between the target domain and a specific source domain:

[0061]

[0062] In the formula, x i and x j Source domain and target domain The sample value of and are the number of samples in the source domain and the target domain respectively, φ(·) is the kernel function, which maps the sample values ​​to the linear space For emotional EEG signals, sample features of all domains are mapped into the linear feature space for calculation. The lower the average distance metric value, the higher the inter-domain transferability of the source domain, and the more suitable it is for realizing knowledge transfer to the target domain.

[0063] Step 3-3: According to the distribution of the source domain transferability index corresponding to each target domain, set the source domain selection threshold, and remove all source domain samples that are not suitable for participating in this domain adaptation task according to the threshold:

[0064]

[0065] Where n s is the number of source domains, The threshold set for multi-source domain selection, It is the set of source domains that finally participate in model training.

[0066] Step 4: The differential entropy features of all source domain samples participating in the training are passed through a serial common feature extraction network and a double filtering network to obtain domain classification features. The common feature extraction network is built based on a multi-layer perceptron, and the double filtering network is built based on an attention mechanism. The specific framework of the overall model is as follows: Figure 2 As shown, the specific steps are as follows:

[0067] Step 4-1: Convert the differential entropy features into one-dimensional features and input them into the common feature extraction network based on multi-layer perceptron to calculate the domain invariant features.

[0068] Step 4-2: For the domain-invariant features from the source domain and the target domain, set up a double-filter network based on the attention mechanism applied to the source domain and the target domain respectively, and calculate the weight corresponding to each feature value according to the domain-invariant features, indicating that the feature value contains the weight of information related to emotional EEG:

[0069] w i =Sigmoid[g(f i )] (4)

[0070] Where g(·) is a fully connected layer to calculate feature weights, f i It is a domain invariant feature.

[0071] Step 4-3: According to the weights calculated in step 4-2, calculate the weighted domain-invariant feature embedding to obtain the domain classification feature z output by the double filtering network i :

[0072] z i =w i ·g(f i ) (5)

[0073] Step 5: Classify the input sample features through a dual classifier-based model. The framework of the model is as follows: Figure 2 As shown, the specific steps are as follows:

[0074] Step 5-1: The dual classifier calculates the predicted probability of the sample through the domain classification features and outputs the predicted label through decision making. In the training stage, the predicted probability is calculated as:

[0075]

[0076] In the formula, represents the predicted probability of the i-th sample in the model training phase, C k(·) is the k-th classifier, and WeigtNorm[·] is the weight normalization operation.

[0077] Step 5-2: Calculate the classification loss of the model and similarity penalty Iterative update of model parameters:

[0078]

[0079] In the formula For the kth th The classifier model predicts the source domain samples The predicted probability on the cth category, 1(·) is the indicator function, θ k (k=1,2) is the kth th The model parameters of the classifier.

[0080] Step 5-3: Calculate the label vectors of the source domain samples and the target domain samples respectively. The label vector of the source domain sample is determined by converting the true label into a one-dimensional vector, and the label vector of the target domain sample is represented by the predicted probability of the sample.

[0081] Step 5-4: Calculate the subdomain weights of the source and target domains:

[0082]

[0083] Where y ic is the value of the label vector at the cth item.

[0084] Step 5-5: Map source and target domain sample features to linear feature space Then, the average subdomain distance metric between the two is calculated for model parameter update to achieve domain adaptation:

[0085]

[0086] In the formula and The samples are and The weight value on the cth category, C is the number of categories.

[0087] Step 5-6: Construct a total loss function for iterative parameter updates during training:

[0088]

[0089] where λ and α represent hyperparameters.

[0090] Step 6: Enter the test phase to obtain the final model and calculate the classification results of the target domain samples. The decision-making method of the model in the test phase is

[0091]

[0092] In the formula, represents the predicted probability of the i-th sample in the model testing phase.

[0093] The present invention uses 15 subjects as experimental subjects, including 7 males and 8 females, with a total of 3 types of emotions (positive, neutral, negative), i.e., 3 categories. Each subject is guided to watch 15 different emotional movie clips to generate 3 emotions, and each emotional category corresponds to 5 emotional movie clips. The leave-one-out cross-validation method is adopted, that is, 14 of the 15 subjects are used as training data for model training, and the remaining 1 subject is used as test data for verification, and the cycle is repeated until each subject is used as test data once. Table 1 shows the classification performance comparison results of the inventive method and different methods, and Table 2 shows the recognition results of the inventive method, using accuracy, F1-score and Kappa coefficient as evaluation indicators.

[0094] Table 1 Comparison of classification performance between the proposed method and different methods

[0095]

[0096] Table 2 Recognition results for each subject

[0097]

[0098] Comparing the six methods, the present invention achieves the best recognition accuracy in the cross-subject emotional EEG recognition task, and at the same time achieves the smallest standard deviation, which shows that the present invention can achieve more consistent performance for different subject conditions. The present invention also achieved the highest score in the F1-score and Kappa coefficient evaluation indicators, showing the high recognition accuracy and reliability of the present invention in the cross-subject emotional EEG recognition task. Figures 3(a) and 3(b) show the basis for multi-subject selection to eliminate abnormal source subjects, thereby reducing the impact of negative transfer on the model. Figures 4(a) and 4(b) show that the attention mechanism can help the model better achieve data distribution alignment between the source domain and the target domain.

[0099] Based on most metric-based domain adaptation algorithms, this embodiment takes into account the individual differences of EEG and uses all source domain EEG data, which may increase the overall source domain data distribution differences, and relying solely on global feature distribution alignment may also lead to negative transfer. A multi-source domain cross-subject emotion classification method based on subdomain adaptive EEG signal recognition is proposed. In order to select the optimal source subject combination, the inter-domain transferability of all source domains and target domains is evaluated and screened to alleviate the impact of negative transfer on the model at a coarse granularity. Through a specific network framework, the feature representation of the source domain and target domain samples in the linear feature space is obtained, and by calculating the subdomain weights, the fine-grained feature distribution alignment at the class level is achieved, which improves the model's emotion recognition accuracy for EEG in the context of cross-subject applications.

Claims

1. A multi-source domain cross-subject emotion classification method based on subdomain adaptive EEG signal recognition, characterized in that: The following steps are involved: Step 1: Collect EEG signals using EEG acquisition equipment; Step 2: down-sample and band-pass filter the collected EEG signals, and calculate the differential entropy characteristics of all EEG signals; Step 3: Select one subject as the target domain and the remaining subjects as the source domains, calculate the inter-domain transferability between them and the target domain one by one, and eliminate the source domains that do not participate in knowledge transfer; Step 4: The differential entropy features of all source domain samples participating in the training are passed through a serial common feature extraction network and a double filtering network to obtain domain classification features; Step 5: Calculate the prediction probability of each sample's domain classification features through the dual classifier, obtain the classification result, and construct the loss function to perform training iteration and update the parameters; Step 6: After training is completed, calculate the classification results of the target domain samples for testing.

2. The multi-source domain cross-subject emotion classification method based on subdomain adaptive EEG signal recognition according to claim 1 is characterized in that: The specific steps of removing the source domain that does not participate in knowledge transfer are as follows: Step 3-1: Sort each domain, i.e., each subject’s sample, according to the time series when the data was collected; Step 3-2: For all samples in the target domain, calculate the distance metric between them and all samples in each source domain respectively, as the inter-domain transferability evaluation index between the target domain and this source domain, and define d(·) as the average distance metric value of all samples between the target domain and the source domain: In the formula, x i and x j The source domain D S and the target domain D T The sample value, N S and N T are the number of samples in the source domain and the target domain respectively, φ(·) is the kernel function, which maps the sample values ​​into the linear space L; Step 3-3: According to the distribution of the source domain transferability index corresponding to each target domain, set the source domain selection threshold and eliminate all source domain samples whose average distance metric value is less than the threshold.

3. The multi-source domain cross-subject emotion classification method based on subdomain adaptive EEG signal recognition according to claim 2 is characterized in that: The common feature extraction network is constructed based on a multi-layer perceptron, and the dual filtering network is constructed based on an attention mechanism.

4. According to the multi-source domain cross-subject emotion classification method based on sub-domain adaptive EEG signal recognition according to claim 3, the specific process of step 4 is as follows: Step 4-1: Convert the differential entropy feature into a one-dimensional feature and input it into the common feature extraction network to calculate the domain invariant feature; Step 4-2: For the domain-invariant features from the source domain and the target domain, set up a double filtering network applied to the source domain and the target domain respectively, and calculate the weight corresponding to each feature value according to the domain-invariant features, indicating that the feature value contains the weight of information related to emotional EEG: w i =Sigmoid[g(f i )](2) Where g(·) is a fully connected layer to calculate feature weights, f i It is a domain invariant feature; Step 4-3: According to the weights, calculate the weighted domain-invariant feature embedding to obtain the domain classification feature z output by the double filter network i : z i =w i ·g(f i )(3)。 5. According to the multi-source domain cross-subject emotion classification method based on sub-domain adaptive EEG signal recognition according to claim 4, the specific process of step 5 is as follows: Step 5-1: The dual classifier calculates the predicted probability of the sample through the domain classification features and outputs the predicted label through decision making. In the training stage, the predicted probability is calculated as: In the formula, represents the predicted probability of the i-th sample in the training phase, C k (·) is the k-th classifier, WeigtNorm[·] is the weight normalization operation; Step 5-2: Calculate the classification loss L cls and similarity penalty L sp ; Step 5-3: Calculate the label vectors of the source domain samples and the target domain samples respectively; the label vector of the source domain sample is determined by converting the true label into a one-dimensional vector, and the label vector of the target domain sample is represented by the predicted probability of the sample; Step 5-4: Calculate the subdomain weights of the source and target domains: Where y ic is the value of the label vector at the cth item; Step 5-5: Map the source domain and target domain sample features into the linear feature space L, and then calculate the average subdomain distance metric between the two: In the formula and The samples are and The weight value on the cth category, C is the number of categories; Step 5-6: Construct a total loss function for iterative parameter updates during training: where λ and α represent hyperparameters.

Citation Information

Patent Citations

  • Clustering-based confrontation partial domain adaptive cross-subject EEG emotion recognition method

    CN114239652A

  • Plug-and-play domain adaptation method based on electroencephalogram signals

    CN114662524A

  • Multi-source-domain adaptive electroencephalogram emotion recognition method based on association enhancement

    CN116796125A

  • Multi-source domain adaptive EEG emotional state classification method based on knowledge distillation

    CN116821764A

  • Cross-subject electroencephalogram emotion recognition method and system based on multi-branch sample selection

    CN117150397A

Cited By

  • Cross-subject electroencephalogram emotion recognition method and system based on adaptive fuzzy domain confrontation

    CN121587726A

  • Cross-domain electroencephalogram emotion recognition method based on two-stage domain alignment and dual-classifier collaborative confrontation

    CN121817895A

  • Layered progressive domain self-adaptive cross-subject electroencephalogram decoding method

    CN122569754A

  • A layered progressive domain adaptation cross-subject electroencephalogram decoding method

    CN122569754B