Movatterモバイル変換


[0]ホーム

URL:


CN113177482A - Cross-individual electroencephalogram signal classification method based on minimum category confusion - Google Patents

Cross-individual electroencephalogram signal classification method based on minimum category confusion
Download PDF

Info

Publication number
CN113177482A
CN113177482ACN202110479311.0ACN202110479311ACN113177482ACN 113177482 ACN113177482 ACN 113177482ACN 202110479311 ACN202110479311 ACN 202110479311ACN 113177482 ACN113177482 ACN 113177482A
Authority
CN
China
Prior art keywords
class
sample
individual
cross
category
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110479311.0A
Other languages
Chinese (zh)
Inventor
陈勋
崔恒
刘爱萍
张勇东
吴枫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Science and Technology of China USTC
Original Assignee
University of Science and Technology of China USTC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by University of Science and Technology of China USTCfiledCriticalUniversity of Science and Technology of China USTC
Priority to CN202110479311.0ApriorityCriticalpatent/CN113177482A/en
Publication of CN113177482ApublicationCriticalpatent/CN113177482A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种基于最小类别混淆的跨个体脑电信号分类方法,其步骤包括:1、提取EEG信号每个频段上的频域特征,并进行标准化;2、建立基于最小类别混淆的GRU‑MCC网络模型,由特征提取器和分类器组成,同时,计算交叉熵损失和最小类别混淆损失优化模型参数;3、在公开数据集上采用留一交叉验证策略验证上述模型;4、利用训练好的模型实现跨个体脑电信号分类任务。本发明能够实现高准确率跨个体脑电信号分类,对智能人机交互和医疗健康等领域具有重要意义。

Figure 202110479311

The invention discloses a cross-individual EEG signal classification method based on minimal class confusion. ‑MCC network model, which consists of feature extractor and classifier, at the same time, calculates cross entropy loss and minimum class confusion loss to optimize model parameters; 3. Use leave-one-out cross-validation strategy to verify the above model on public datasets; 4. Use training Good models implement cross-individual EEG classification tasks. The present invention can realize high-accuracy cross-individual EEG signal classification, and is of great significance to the fields of intelligent human-computer interaction, medical health and the like.

Figure 202110479311

Description

Translated fromChinese
一种基于最小类别混淆的跨个体脑电信号分类方法A cross-individual EEG classification method based on minimal class confusion

技术领域technical field

本发明涉及脑电信号处理领域,具体涉及一种基于最小类别混淆的跨个体脑电信号分类方法。The invention relates to the field of EEG signal processing, in particular to a cross-individual EEG signal classification method based on minimal category confusion.

背景技术Background technique

脑电信号(Electroencephalogram,EEG)是记录大脑活动的有力工具,能够更客观、可靠地捕捉人类的脑部状态。此外,随着可穿戴设备和干电池技术的迅速发展,脑电信号的获取更加便捷。因此,近些年来基于脑电信号的分类受到越来越多的关注,如癫痫检测、运动想象、情绪识别和睡眠分期等。有效的脑电信号分类方法对智能人机交互和医疗健康等领域具有重要意义。Electroencephalogram (EEG) is a powerful tool for recording brain activity, which can capture human brain state more objectively and reliably. In addition, with the rapid development of wearable devices and dry battery technology, the acquisition of EEG signals is more convenient. Therefore, EEG-based classification has received more and more attention in recent years, such as epilepsy detection, motor imagery, emotion recognition, and sleep staging. Effective EEG classification methods are of great significance to the fields of intelligent human-computer interaction and medical health.

利用机器学习来实现脑电信号分类已经有了广泛的研究,主要步骤是先从EEG中设计和提取特征,再将提取得到的特征训练分类器进行识别任务。常用的EEG特征包含有时域特征,频域特征和时频特征等。常用的分类器包括支持向量机(support vectormachine,SVM)、k近邻(K-nearest neighbor,KNN)等传统机器学习算法,以及深度置信网络、卷积神经网络、长短时记忆网络等深度学习算法。然而,这些方法往往忽略不同EEG通道之间蕴含的空间信息。The use of machine learning to achieve EEG classification has been widely studied. The main steps are to design and extract features from the EEG, and then train the classifier to perform the recognition task with the extracted features. Commonly used EEG features include time domain features, frequency domain features and time-frequency features. Commonly used classifiers include traditional machine learning algorithms such as support vector machine (SVM) and k-nearest neighbor (KNN), as well as deep learning algorithms such as deep belief networks, convolutional neural networks, and long and short-term memory networks. However, these methods often ignore the spatial information implied between different EEG channels.

由于个体间情绪反应的显著差异,现有的模型不能很好地将从其他被试学到的知识转移到新被试身上,这就需要从新被试身上获取大量带标签的样本来重新训练模型,这种做法消耗大量时间且无法适用于许多实际场景。近年来,一些研究人员试图利用域对抗神经网络(domain adversarial neural network,DANN)、深度自适应网络(deepadaptation network,DAN)等领域自适应技术来解决跨个体的脑电分类问题。这些方法通过对训练个体(源域)和待预测个体(目标域)的特征进行对齐,在跨个体脑电信号分类任务中取得了较高的准确率。然而,为了保证特征对齐,它们会付出丢失一些类别信息的代价,从而降低特征的可辨别性。此外,当个体差异显著时,这些方法可能会导致负迁移,即在源域学习的知识会对目标域的预测产生负面作用。Due to the significant differences in emotional responses among individuals, existing models cannot transfer knowledge learned from other subjects well to new subjects, which requires a large number of labeled samples from new subjects to retrain the model , which is time-consuming and unsuitable for many practical scenarios. In recent years, some researchers have attempted to solve the problem of cross-individual EEG classification using domain adaptive techniques such as domain adversarial neural network (DANN) and deep adaptive network (DAN). These methods achieve high accuracy in cross-individual EEG classification tasks by aligning the features of the training individual (source domain) and the individual to be predicted (target domain). However, in order to guarantee feature alignment, they come at the cost of losing some class information, thereby reducing the discriminability of features. Furthermore, when individual differences are significant, these methods may lead to negative transfer, that is, knowledge learned in the source domain negatively affects predictions in the target domain.

发明内容SUMMARY OF THE INVENTION

本发明为克服现有技术的不足之处,提出一种基于最小类别混淆的跨个体脑电信号分类方法,以期能保证特征的可辨别性并避免负迁移,从而提高跨个体脑电信号分类的准确率。In order to overcome the shortcomings of the prior art, the present invention proposes a cross-individual EEG signal classification method based on minimal category confusion, in order to ensure the distinguishability of features and avoid negative migration, thereby improving the accuracy of cross-individual EEG signal classification. Accuracy.

本发明为达到上述发明目的,采用如下技术方案:The present invention adopts the following technical scheme in order to achieve the above-mentioned purpose of the invention:

本发明一种基于最小类别混淆的跨个体脑电信号分类方法的特点在于,包括以下步骤:The feature of the cross-individual EEG signal classification method based on minimal category confusion of the present invention is that it includes the following steps:

步骤1、获取一批训练个体的脑电信号及其对应的类别标签,获取一批待预测个体的脑电信号,提取训练个体和待预测个体的脑电信号中每个频段的频域特征并进行标准化处理,得到输入样本序列,其中,任意一个样本记为x,且

Figure BDA0003048556380000021
其中,n表示通道数目,d表示每个通道的特征数目,
Figure BDA0003048556380000022
表示实数;Step 1. Obtain the EEG signals of a batch of training individuals and their corresponding category labels, obtain a batch of EEG signals of the individuals to be predicted, extract the frequency domain features of each frequency band in the EEG signals of the training individuals and the individuals to be predicted Perform normalization processing to obtain the input sample sequence, where any sample is denoted as x, and
Figure BDA0003048556380000021
Among them, n represents the number of channels, d represents the number of features of each channel,
Figure BDA0003048556380000022
represents a real number;

步骤2、构建基于最小类别混淆的GRU-MCC网络模型;Step 2. Build a GRU-MCC network model based on minimal class confusion;

步骤2.1、建立特征提取器,并将样本x输入到所述特征提取器中,得到深度特征hfStep 2.1, establish a feature extractor, and input the sample x into the feature extractor to obtain a depth feature hf ;

步骤2.2、建立分类器,将所述深度特征hf输入到所述分类器中,得到输出结果z;Step 2.2, establish a classifier, input the depth feature hf into the classifier, and obtain the output result z;

步骤2.3、将所述输出结果z输入到SoftMax函数层,得到所述样本x对于每种类别标签的概率值;Step 2.3, input the output result z to the SoftMax function layer, and obtain the probability value of the sample x for each category label;

步骤2.4、计算所述输入样本序列中带情绪标签的训练个体的脑电信号所对应的源域样本的交叉熵损失;Step 2.4, calculating the cross-entropy loss of the source domain samples corresponding to the EEG signals of the training individuals with emotional labels in the input sample sequence;

步骤2.5、计算所述输入样本序列中待预测个体样本的脑电信号所对应的目标域样本Xt的最小类别混淆损失;Step 2.5, calculating the minimum class confusion loss of the target domain sample Xt corresponding to the EEG signal of the individual sample to be predicted in the input sample sequence;

步骤2.6、联合所述交叉熵损失和最小类别混淆损失来优化GRU-MCC模型的参数,得到训练好的GRU-MCC网络模型;Step 2.6, combine the cross entropy loss and the minimum category confusion loss to optimize the parameters of the GRU-MCC model to obtain a trained GRU-MCC network model;

步骤3、以所述训练好的GRU-MCC模型对一批待预测个体样本的脑电信号进行分类。Step 3. Classify the EEG signals of a batch of individual samples to be predicted with the trained GRU-MCC model.

本发明所述的跨个体脑电信号分类方法的特点也在于,所述步骤2.1中的特征提取器是由门控循环单元和全连接层组成,并按如下过程对样本x进行处理:The cross-individual EEG signal classification method of the present invention is also characterized in that the feature extractor in the step 2.1 is composed of a gated recurrent unit and a fully connected layer, and processes the sample x according to the following process:

所述样本x经过所述门控循环单元后得到空间表征序列h=[h1,h2,...,hi,...,hn],其中,hi是第i个通道的空间表征;After the sample x passes through the gated cyclic unit, a spatial representation sequence h=[h1 , h2 ,..., hi ,..., hn ] is obtained, where hi is the ith channel spatial representation;

将所述空间表征序列h展开为长向量h',并经过所述全连接层进行降维处理,从而得到深度特征hfExpand the spatial representation sequence h into a long vector h', and perform dimension reduction processing through the fully connected layer to obtain a depth feature hf .

所述步骤2.5中的最小类别混淆损失是按如下过程计算:The minimum class confusion loss in step 2.5 is calculated as follows:

步骤2.5.1、概率调节:Step 2.5.1. Probability adjustment:

将所述输入样本序列中待预测个体样本的脑电信号所对应的目标域样本Xt输入所述特征提取器和分类器中,并输出结果ZtInput the target domain sample Xt corresponding to the EEG signal of the individual sample to be predicted in the input sample sequence into the feature extractor and the classifier, and output the result Zt ;

采用温度调节策略计算目标域样本Xt的类别概率

Figure BDA0003048556380000023
其中,所述类别概率
Figure BDA0003048556380000024
中的任一元素
Figure BDA0003048556380000025
表示第i个目标域样本属于第j类的概率;Calculate the class probability of the target domain sample Xt using the temperature adjustment strategy
Figure BDA0003048556380000023
where the class probability
Figure BDA0003048556380000024
any element of
Figure BDA0003048556380000025
Represents the probability that the i-th target domain sample belongs to the j-th class;

步骤2.5.2、类别相关:Step 2.5.2, category related:

计算第j类和第j′类的类别相关系数

Figure BDA0003048556380000031
从而得到类别相关矩阵C,其中,
Figure BDA0003048556380000032
表示所述类别概率
Figure BDA0003048556380000033
中第j列,
Figure BDA0003048556380000034
表示所述类别概率
Figure BDA0003048556380000035
中第j′列;Calculate the category correlation coefficients of the jth class and the j'th class
Figure BDA0003048556380000031
Thus, the category correlation matrix C is obtained, where,
Figure BDA0003048556380000032
represents the class probability
Figure BDA0003048556380000033
in column j,
Figure BDA0003048556380000034
represents the class probability
Figure BDA0003048556380000035
in the j'th column;

步骤2.5.3、不确定性加权:Step 2.5.3. Uncertainty weighting:

计算第i个目标域样本对应的熵

Figure BDA0003048556380000036
其中,
Figure BDA0003048556380000037
表示所述类别概率
Figure BDA0003048556380000038
的第i行;Calculate the entropy corresponding to the ith target domain sample
Figure BDA0003048556380000036
in,
Figure BDA0003048556380000037
represents the class probability
Figure BDA0003048556380000038
the ith row of ;

利用SoftMax函数计算第i个目标域样本的权重Wii,并将所述权重Wii对应的对角矩阵W作为权重矩阵;Use the SoftMax function to calculate the weight Wii of the ith target domain sample, and use the diagonal matrixW corresponding to the weightWii as the weight matrix;

计算

Figure BDA0003048556380000039
从而得到带权重的类别相关矩阵C′;calculate
Figure BDA0003048556380000039
Thereby, the weighted category correlation matrix C' is obtained;

步骤2.5.4、类别归一化:Step 2.5.4, category normalization:

利用归一化策略对所述带权重的类别相关矩阵C′的每一列进行归一化处理,得到归一化后的类别相关矩阵

Figure BDA00030485563800000310
Use a normalization strategy to normalize each column of the weighted category correlation matrix C' to obtain a normalized category correlation matrix
Figure BDA00030485563800000310

步骤2.5.5、最小类别混淆:Step 2.5.5, minimal category confusion:

计算所述归一化后的类别相关矩阵

Figure BDA00030485563800000311
的所有非对角线元素的和,从而得到最小类别混淆损失LMCC(Xt|θ),其中,θ表示GRU-MCC模型的参数。compute the normalized category correlation matrix
Figure BDA00030485563800000311
The sum of all off-diagonal elements of , resulting in the minimum class confusion loss LMCC (Xt |θ), where θ represents the parameters of the GRU-MCC model.

与已有技术相比,本发明的有益效果体现在:Compared with the prior art, the beneficial effects of the present invention are embodied in:

1、本发明提出利用最小类别混淆损失来优化模型参数,该损失定义了源域上训练的模型在分类目标域样本时对于不同类别样本的混淆程度,并通过减小这种类别混淆来增加转移收益,实现了高精度的跨个体脑电信号分类。1. The present invention proposes to optimize the model parameters by using the minimum class confusion loss, which defines the degree of confusion of the model trained on the source domain for different classes of samples when classifying the target domain samples, and increases the transfer by reducing this class confusion. Gains, enabling high-precision cross-individual EEG signal classification.

2、本发明构建基于门控循环单元的特征提取器来捕捉EEG通道之间的空间信息。具体来说,首先利用门控循环单元学习通道间的空间信息,门控循环单元可以捕捉长距离的空间依赖关系,同时具有参数少、易训练的特点;其次,为了不损失有效信息,将输出结果展开成高维向量,并通过全连接层进行降维,得到更具判别力的深度特征,最终提高了脑电信号分类精度。2. The present invention constructs a feature extractor based on a gated recurrent unit to capture the spatial information between EEG channels. Specifically, first, the gated recurrent unit is used to learn the spatial information between channels. The gated recurrent unit can capture long-distance spatial dependencies, and at the same time has the characteristics of few parameters and easy training; secondly, in order not to lose effective information, the output The result is expanded into a high-dimensional vector, and the fully connected layer is used for dimensionality reduction to obtain more discriminative depth features, which ultimately improves the classification accuracy of EEG signals.

附图说明Description of drawings

图1为本发明GRU-MCC的网络结构图;Fig. 1 is the network structure diagram of GRU-MCC of the present invention;

图2为本发明GRU-MCC中特征提取器的结构图;Fig. 2 is the structure diagram of the feature extractor in GRU-MCC of the present invention;

图3为本发明最小类别混淆损失的计算流程图。FIG. 3 is a flow chart of the calculation of the minimum class confusion loss in the present invention.

具体实施方式Detailed ways

本实施例中,一种基于小类别混淆的跨个体脑电信号分类方法,包括如下步骤:In this embodiment, a cross-individual EEG signal classification method based on small category confusion includes the following steps:

步骤1、获取一批训练个体的脑电信号及其对应的类别标签,获取一批待预测个体的脑电信号,提取训练个体和待预测个体的脑电信号中每个频段的频域特征并进行标准化处理,得到输入样本序列,其中,任意一个样本记为x,且

Figure BDA0003048556380000041
其中,n表示通道数目,d表示每个通道的特征数目,
Figure BDA0003048556380000042
表示实数。Step 1. Obtain the EEG signals of a batch of training individuals and their corresponding category labels, obtain a batch of EEG signals of the individuals to be predicted, extract the frequency domain features of each frequency band in the EEG signals of the training individuals and the individuals to be predicted Perform normalization processing to obtain the input sample sequence, where any sample is denoted as x, and
Figure BDA0003048556380000041
Among them, n represents the number of channels, d represents the number of features of each channel,
Figure BDA0003048556380000042
represents a real number.

步骤1.1、从公开数据集SEED获取实验所需的数据,SEED数据集记录了了15名被试在观看情感电影片段时的脑电信号。每名被试做三次实验,每次实验观看15个约4分钟的电影片段(其中积极、中性、消极片段各5个)。根据国际10-20标准系统,62个通道的EEG信号被采集,并将采集到的信号降采样到200Hz,为了滤除噪声和去除伪影,用0-75Hz的带通滤波器对EEG数据进行处理。Step 1.1. Obtain the data required for the experiment from the public dataset SEED. The SEED dataset records the EEG signals of 15 subjects watching emotional movie clips. Each participant did three experiments, and each experiment watched 15 movie clips of about 4 minutes (including 5 positive, neutral, and negative clips). According to the international 10-20 standard system, 62 channels of EEG signals were collected, and the collected signals were down-sampled to 200Hz. In order to filter out noise and remove artifacts, the EEG data were processed with a 0-75Hz band-pass filter. deal with.

采用留一(leave-one-subject-out,LOSO)交叉验证策略来训练GRU-MCC模型。LOSO策略每次以一个被试作为待预测个体,其他14个被试作为训练个体。重复这个过程,使得每个被试都被用作待预测个体一次。获取训练个体的脑电信号及其对应的类别标签,获取一批待预测个体的脑电信号。A leave-one-subject-out (LOSO) cross-validation strategy is adopted to train the GRU-MCC model. In the LOSO strategy, one subject is used as the individual to be predicted, and the other 14 subjects are used as the training individuals. This process is repeated so that each subject is used as the individual to be predicted once. Obtain the EEG signals of training individuals and their corresponding category labels, and obtain a batch of EEG signals of individuals to be predicted.

步骤1.2、提取训练个体和待预测个体的脑电信号中5个子频段的微分熵特征,包括delta(1-3Hz),theta(4-7Hz),alpha(8-13Hz),beta(14-30Hz)和gamma(31-50Hz)。将微分熵特征按照个体进行Z-score标准化,得到输入样本序列。对于任一微分熵特征DE,可获得对应的输入样本x,公式如下:Step 1.2. Extract the differential entropy features of 5 sub-bands in the EEG signals of the training individual and the individual to be predicted, including delta (1-3 Hz), theta (4-7 Hz), alpha (8-13 Hz), beta (14-30 Hz) ) and gamma (31-50Hz). The differential entropy feature is normalized according to the individual Z-score to obtain the input sample sequence. For any differential entropy feature DE, the corresponding input sample x can be obtained, and the formula is as follows:

Figure BDA0003048556380000043
Figure BDA0003048556380000043

式(1)中,μ和σ分别表示所在个体所有微分熵特征的均值和标准差,62指的是通道数目,5指的是每个通道的特征数目。In formula (1), μ and σ represent the mean and standard deviation of all differential entropy features of the individual, 62 refers to the number of channels, and 5 refers to the number of features of each channel.

步骤2、构建基于最小类别混淆(Minimum Class Fusion,MCC)的GRU-MCC网络模型,如图1所示,模型由特征提取器和分类器组成,同时,计算交叉熵损失和最小类别混淆损失优化模型参数。Step 2. Build a GRU-MCC network model based on Minimum Class Fusion (MCC). As shown in Figure 1, the model consists of a feature extractor and a classifier. At the same time, calculate the cross entropy loss and the minimum class confusion loss optimization model parameters.

步骤2.1、构建如图2所示的特征提取器,特征提取器由门控循环单元(GatedRecurrent Unit,GRU)和全连接层组成。首先,将上述样本x输入到GRU层:Step 2.1. Build a feature extractor as shown in Figure 2. The feature extractor is composed of a Gated Recurrent Unit (GRU) and a fully connected layer. First, input the above sample x to the GRU layer:

Figure BDA0003048556380000051
Figure BDA0003048556380000051

式(2)中,

Figure BDA0003048556380000052
是第i个通道对应的空间表征,维度是16。为了充分利用所有通道的信息,将空间表征序列h展开为长向量h',并经过全连接层进行降维处理,从而得到深度特征hf:In formula (2),
Figure BDA0003048556380000052
is the spatial representation corresponding to the ith channel, and the dimension is 16. In order to make full use of the information of all channels, the spatial representation sequence h is expanded into a long vector h', and the fully connected layer is used for dimensionality reduction to obtain the deep feature hf :

Figure BDA0003048556380000053
Figure BDA0003048556380000053

式(3)中,Wf和bf分别代表权重和偏置,RELU表示修正线性单元激活函数,表达式为:In formula (3), Wf and bf represent the weight and bias, respectively, RELU represents the modified linear unit activation function, and the expression is:

Figure BDA0003048556380000054
Figure BDA0003048556380000054

步骤2.2、使用线性变化作为分类器,与特征提取器相连,用于脑电信号类别预测。将深度特征hf输入到分类器,得到输出向量z:Step 2.2. Use linear variation as a classifier, which is connected with a feature extractor for EEG category prediction. Input the deep feature hf to the classifier and get the output vector z:

Figure BDA0003048556380000055
Figure BDA0003048556380000055

式(5)中,R表示类别数目,在本实施例中,R=3。步骤2.3、将输出结果z输入到SoftMax函数层,得到样本x对于每种类别标签的概率值,计算方式如下:In formula (5), R represents the number of categories, and in this embodiment, R=3. Step 2.3. Input the output result z to the SoftMax function layer to obtain the probability value of the sample x for each category label. The calculation method is as follows:

Figure BDA0003048556380000056
Figure BDA0003048556380000056

式(6)中,P(j|x)表示样本x属于第j类的预测概率。In formula (6), P(j|x) represents the predicted probability that the sample x belongs to the jth class.

步骤2.4、计算输入样本序列中带类别标签的训练个体的脑电信号所对应的源域样本的交叉熵损失。输入一批带标签的源域样本Xs,可以计算其交叉熵损失:Step 2.4: Calculate the cross-entropy loss of the source domain samples corresponding to the EEG signals of the training individuals with class labels in the input sample sequence. Inputting a batch of labeled source domain samples Xs , its cross-entropy loss can be calculated:

Figure BDA0003048556380000057
Figure BDA0003048556380000057

Figure BDA0003048556380000058
Figure BDA0003048556380000058

式(7)中,Bs表示源域的批处理大小,li是样本

Figure BDA0003048556380000059
的真实标签,θ是GRU-MCC模型的参数。在本实施例中,Bs=200。In formula (7), Bs represents the batch size of the source domain, andli is the sample
Figure BDA0003048556380000059
, and θ is the parameter of the GRU-MCC model. In this embodiment, Bs =200.

步骤2.5、计算输入样本序列中待预测个体样本的脑电信号所对应的目标域样本Xt的最小类别混淆损失。最小类别混淆损失的计算步骤如图3所示,按如下过程计算:Step 2.5: Calculate the minimum class confusion loss of the target domain sample Xt corresponding to the EEG signal of the individual sample to be predicted in the input sample sequence. The calculation steps of the minimum category confusion loss are shown in Figure 3, and are calculated as follows:

步骤2.5.1、概率调节:将输入样本序列中待预测个体样本的脑电信号所对应的目标域样本Xt输入特征提取器和分类器中,并输出结果

Figure BDA0003048556380000061
其中Bt表示目标域的批处理大小。在本实例中,Bt=200。Step 2.5.1, probability adjustment: input the target domain sample Xt corresponding to the EEG signal of the individual sample to be predicted in the input sample sequence into the feature extractor and classifier, and output the result
Figure BDA0003048556380000061
where Bt denotes the batch size of the target domain. In this example, Bt =200.

深度学习趋向于做出过于自信的预测,为了减弱这种趋势,采用温度调节策略计算目标域样本Xt的类别概率:Deep learning tends to make overconfident predictions. In order to weaken this tendency, a temperature adjustment strategy is used to calculate the class probability of the target domain sample Xt :

Figure BDA0003048556380000062
Figure BDA0003048556380000062

式(9)中,

Figure BDA0003048556380000063
表示第i个目标域样本属于第j类的概率,T是温度超参数。In formula (9),
Figure BDA0003048556380000063
represents the probability that the ith target domain sample belongs to the jth class, and T is the temperature hyperparameter.

步骤2.5.2、类别相关:第j类和第j′类的类别相关系数被定义如下:Step 2.5.2, Category Correlation: The category correlation coefficients of the jth and j'th categories are defined as follows:

Figure BDA0003048556380000064
Figure BDA0003048556380000064

式(10)中,

Figure BDA0003048556380000065
表示类别概率
Figure BDA0003048556380000066
中第j列,
Figure BDA0003048556380000067
表示类别概率
Figure BDA0003048556380000068
中第j′列。
Figure BDA0003048556380000069
表示类别相关矩阵,其元素Cjj′是第j类和第j′类之间的类别混淆的粗略估计,计算了这些样本同时被归入这两类的概率。In formula (10),
Figure BDA0003048556380000065
represents the class probability
Figure BDA0003048556380000066
in column j,
Figure BDA0003048556380000067
represents the class probability
Figure BDA0003048556380000068
in the j'th column.
Figure BDA0003048556380000069
represents the class correlation matrix, whose element Cjj′ is a rough estimate of the class confusion between the jth class and the jth class, and calculates the probability that these samples are classified into both classes at the same time.

步骤2.5.3、不确定性加权:不同的样本对类别混淆的贡献不同。例如,那些被预测接近均匀分布(没有明显峰值)的样本贡献较小,而被预测有几个明显的峰值的样本,表明分类器在模糊类之间犹豫不决,对于体现类别混淆更为重要。因此,一个基于熵的加权机制被引入,赋予更确定性样本更高的权重:Step 2.5.3. Uncertainty weighting: Different samples contribute differently to category confusion. For example, those samples predicted to be close to a uniform distribution (with no distinct peaks) contributed less, while samples predicted to have several distinct peaks, indicating that the classifier is indecisive between ambiguous classes, are more important to reflect class confusion . Therefore, an entropy-based weighting mechanism is introduced, giving more deterministic samples higher weights:

Figure BDA00030485563800000610
Figure BDA00030485563800000610

Figure BDA00030485563800000611
Figure BDA00030485563800000611

Figure BDA00030485563800000612
Figure BDA00030485563800000612

式(11)-(13)中,

Figure BDA00030485563800000613
表示类别概率
Figure BDA00030485563800000614
中第i行,
Figure BDA00030485563800000615
表示类别概率
Figure BDA00030485563800000616
中第i′行,Wii是第i个目标域样本的权重,并将权重Wii对应的对角矩阵W作为权重矩阵,C′是带权重的类别相关矩阵。In formulas (11)-(13),
Figure BDA00030485563800000613
represents the class probability
Figure BDA00030485563800000614
In line i,
Figure BDA00030485563800000615
represents the class probability
Figure BDA00030485563800000616
In the i'th row, Wii is the weight of thei -th target domain sample, and the diagonal matrix W corresponding to the weightWii is used as the weight matrix, and C' is the weighted category correlation matrix.

步骤2.5.4、类别归一化:利用归一化策略对带权重的类别相关矩阵C′的每一列进行归一化处理,得到归一化后的类别相关矩阵

Figure BDA0003048556380000071
Step 2.5.4, category normalization: use the normalization strategy to normalize each column of the weighted category correlation matrix C' to obtain the normalized category correlation matrix
Figure BDA0003048556380000071

Figure BDA0003048556380000072
Figure BDA0003048556380000072

步骤2.5.5、最小类别混淆:矩阵

Figure BDA0003048556380000073
的非对角线元素代表跨类别混淆,对于目标域样本的预测,理想情况是没有样本同时被分为两类,即
Figure BDA0003048556380000074
接近于对角阵。因此最小类别混淆被定义为:Step 2.5.5. Minimal Class Confusion: Matrix
Figure BDA0003048556380000073
The off-diagonal elements represent cross-category confusion. For the prediction of target domain samples, the ideal situation is that no samples are divided into two categories at the same time, i.e.
Figure BDA0003048556380000074
close to a diagonal matrix. Therefore minimal class confusion is defined as:

Figure BDA0003048556380000075
Figure BDA0003048556380000075

步骤2.6、联合交叉熵损失和最小类别混淆损失来优化GRU-MCC模型的参数,得到训练好的GRU-MCC网络模型。在训练过程中,同时向模型中输入一批带标签的源域样本Xs和一批无标签的目标域样本Xt,分别计算交叉熵损失和最小类别混淆损失,并根据如下公式优化模型参数:Step 2.6: Combine the cross-entropy loss and the minimum class confusion loss to optimize the parameters of the GRU-MCC model to obtain a trained GRU-MCC network model. During the training process, input a batch of labeled source domain samples Xs and a batch of unlabeled target domain samples Xt into the model at the same time, calculate the cross entropy loss and the minimum class confusion loss respectively, and optimize the model parameters according to the following formulas :

Figure BDA0003048556380000076
Figure BDA0003048556380000076

式(16)中,α表示学习率,λ表示两种损失之间的平衡。在本实施例中,α=0.001,λ=1。In Equation (16), α represents the learning rate, and λ represents the balance between the two losses. In this embodiment, α=0.001 and λ=1.

步骤3、以训练好的GRU-MCC模型对一批待预测个体样本的脑电信号进行分类。模型最终的性能由所有待预测个体的平均准确率和标准差来评估。Step 3: Classify the EEG signals of a batch of individual samples to be predicted with the trained GRU-MCC model. The final performance of the model is evaluated by the average accuracy and standard deviation of all individuals to be predicted.

具体实施中,GRU-MCC模型与SVM,DANN,DAN,GRU(移除最小类别混淆损失)以及MCC(用全连接层代替特征提取器)进行对比。15名待预测个体的平均准确率和标准差如表1:In the specific implementation, the GRU-MCC model is compared with SVM, DANN, DAN, GRU (removing the minimum class confusion loss) and MCC (replacing the feature extractor with a fully connected layer). The average accuracy and standard deviation of the 15 individuals to be predicted are shown in Table 1:

Figure BDA0003048556380000077
Figure BDA0003048556380000077

表1.不同方法的分类性能Table 1. Classification performance of different methods

结果表明,本发明优于传统机器学习方法SVM,以及基于特征对齐的领域自适应方法DANN和DAN,提高了跨个体脑电信号分类的准确率。与GRU相比,本发明通过引入最小类别混淆损失在跨个体脑电信号分类任务上帮助提高了14.45%的准确率。与MCC相比,本发明设计的特征提取器在跨个体脑电信号分类任务上帮助提高了2.69%的准确率。此外,本发明的标准差最小,为5.27,这表明了GRU-MCC的稳定性更好,对不同个体有更强的泛化能力。The results show that the present invention is superior to the traditional machine learning method SVM, and the domain adaptation methods DANN and DAN based on feature alignment, and improves the accuracy of cross-individual EEG signal classification. Compared with GRU, the present invention helps to improve the accuracy by 14.45% on the cross-individual EEG classification task by introducing a minimum class confusion loss. Compared with MCC, the feature extractor designed in the present invention helps to improve the accuracy by 2.69% on the cross-individual EEG signal classification task. In addition, the standard deviation of the present invention is the smallest, which is 5.27, which indicates that GRU-MCC has better stability and stronger generalization ability to different individuals.

Claims (3)

1. A cross-individual electroencephalogram signal classification method based on minimum category confusion is characterized by comprising the following steps:
step 1, acquiring electroencephalograms of a batch of training individuals and class labels corresponding to the electroencephalograms, acquiring electroencephalograms of a batch of individuals to be predicted, and extracting training individualsThe method comprises the steps of carrying out standardization processing on frequency domain characteristics of each frequency band in electroencephalogram signals of a body and an individual to be predicted to obtain an input sample sequence, wherein any one sample is marked as x, and
Figure FDA0003048556370000011
where n represents the number of channels, d represents the number of features per channel,
Figure FDA0003048556370000012
represents a real number;
step 2, constructing a GRU-MCC network model based on minimum category confusion;
step 2.1, establishing a feature extractor, and inputting the sample x into the feature extractor to obtain a depth feature hf
Step 2.2, establishing a classifier, and enabling the depth feature hfInputting the result into the classifier to obtain an output result z;
2.3, inputting the output result z into a SoftMax function layer to obtain the probability value of the sample x for each type of label;
step 2.4, calculating the cross entropy loss of the source domain sample corresponding to the electroencephalogram signal of the training individual with the emotion label in the input sample sequence;
step 2.5, calculating a target domain sample X corresponding to the EEG signal of the individual sample to be predicted in the input sample sequencetMinimum class confusion loss of (1);
step 2.6, optimizing parameters of the GRU-MCC model by combining the cross entropy loss and the minimum category confusion loss to obtain a trained GRU-MCC network model;
and 3, classifying the electroencephalogram signals of a batch of individual samples to be predicted by using the trained GRU-MCC model.
2. The cross-individual electroencephalogram signal classification method according to claim 1, wherein the feature extractor in the step 2.1 is composed of a gating cycle unit and a full connection layer, and processes the sample x according to the following process:
and the sample x passes through the gate control cycle unit to obtain a spatial characterization sequence h ═ h1,h2,...,hi,...,hn]Wherein h isiIs a spatial characterization of the ith channel;
the space characterization sequence h is expanded into a long vector h', and dimension reduction processing is carried out on the space characterization sequence h through the full-connection layer, so that a depth feature h is obtainedf
3. The cross-individual brain electrical signal classification method according to claim 1, characterized in that the minimum class confusion loss in step 2.5 is calculated as follows:
step 2.5.1, probability adjustment:
target domain sample X corresponding to the EEG signal of the individual sample to be predicted in the input sample sequencetInputting the data into the feature extractor and classifier, and outputting a result Zt
Calculating target domain sample X by adopting temperature regulation strategytClass probability of
Figure FDA0003048556370000021
Wherein the class probability
Figure FDA0003048556370000022
Any one element of
Figure FDA0003048556370000023
Representing the probability that the ith target domain sample belongs to the jth class;
step 2.5.2, category correlation:
calculating class correlation coefficients of class j and class j
Figure FDA0003048556370000024
Thereby obtaining a class correlation matrix C in which,
Figure FDA0003048556370000025
to representThe class probability
Figure FDA0003048556370000026
In the j-th column (c),
Figure FDA0003048556370000027
representing the class probability
Figure FDA0003048556370000028
Column j' of (5);
step 2.5.3, uncertainty weighting:
calculating the corresponding entropy of the ith target domain sample
Figure FDA0003048556370000029
Wherein,
Figure FDA00030485563700000210
representing the class probability
Figure FDA00030485563700000211
Row i of (1);
calculating the weight W of the ith target domain sample by using a SoftMax functioniiAnd applying the weight WiiThe corresponding diagonal matrix W is used as a weight matrix;
computing
Figure FDA00030485563700000212
Thereby obtaining a category correlation matrix C' with weight;
step 2.5.4, category normalization:
normalizing each column of the weighted category correlation matrix C' by using a normalization strategy to obtain a normalized category correlation matrix
Figure FDA00030485563700000213
Step 2.5.5, minimum category confusion:
calculating the normalizationNormalized class correlation matrix
Figure FDA00030485563700000214
Is summed to obtain a minimum class confusion loss LMCC(Xt| θ), where θ represents a parameter of the GRU-MCC model.
CN202110479311.0A2021-04-302021-04-30Cross-individual electroencephalogram signal classification method based on minimum category confusionPendingCN113177482A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110479311.0ACN113177482A (en)2021-04-302021-04-30Cross-individual electroencephalogram signal classification method based on minimum category confusion

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110479311.0ACN113177482A (en)2021-04-302021-04-30Cross-individual electroencephalogram signal classification method based on minimum category confusion

Publications (1)

Publication NumberPublication Date
CN113177482Atrue CN113177482A (en)2021-07-27

Family

ID=76925833

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110479311.0APendingCN113177482A (en)2021-04-302021-04-30Cross-individual electroencephalogram signal classification method based on minimum category confusion

Country Status (1)

CountryLink
CN (1)CN113177482A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114912492A (en)*2022-05-202022-08-16中国科学院自动化研究所 Cross-temporal individual identification method and system based on EEG deep learning
CN115251845A (en)*2022-07-282022-11-01纽锐思(苏州)医疗科技有限公司Sleep monitoring method for processing brain wave signals based on TB-TF-BiGRU model
CN116150643A (en)*2021-11-152023-05-23中芯未来(北京)科技有限公司Electroencephalogram signal classification method based on gating circulation unit network
CN117636337A (en)*2023-11-142024-03-01华南理工大学 A classification method for bacterial and fungal keratitis
CN119474865A (en)*2024-10-282025-02-18国网冀北电力有限公司电力科学研究院 Mechanical fault diagnosis model transfer training method and mechanical fault diagnosis method, device, equipment and medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105559777A (en)*2016-03-172016-05-11北京工业大学Electroencephalographic identification method based on wavelet packet and LSTM-type RNN neural network
CN108985378A (en)*2018-07-202018-12-11天津师范大学A kind of domain adaptive approach based on mixing interleaving depth network
CN109583346A (en)*2018-11-212019-04-05齐鲁工业大学EEG feature extraction and classifying identification method based on LSTM-FC
CN110135244A (en)*2019-04-022019-08-16杭州电子科技大学 A facial expression recognition method based on brain-computer collaborative intelligence
CN110517666A (en)*2019-01-292019-11-29腾讯科技(深圳)有限公司 Audio recognition method, system, machine device and computer readable medium
CN110575163A (en)*2019-08-012019-12-17深圳大学 A method and apparatus for detecting driver distraction
CN110890155A (en)*2019-11-252020-03-17中国科学技术大学Multi-class arrhythmia detection method based on lead attention mechanism
CN111950455A (en)*2020-08-122020-11-17重庆邮电大学 A Feature Recognition Method of Motor Imagery EEG Signals Based on LFFCNN-GRU Algorithm Model
CN112022619A (en)*2020-09-072020-12-04西北工业大学Multi-mode information fusion sensing system of upper limb rehabilitation robot
CN112100387A (en)*2020-11-132020-12-18支付宝(杭州)信息技术有限公司Training method and device of neural network system for text classification
CN112274162A (en)*2020-09-182021-01-29杭州电子科技大学Cross-tested EEG fatigue state classification method based on generation of anti-domain self-adaption
CN112336354A (en)*2020-11-062021-02-09山西三友和智慧信息技术股份有限公司Epilepsy monitoring method based on EEG signal
CN112465069A (en)*2020-12-152021-03-09杭州电子科技大学Electroencephalogram emotion classification method based on multi-scale convolution kernel CNN

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN105559777A (en)*2016-03-172016-05-11北京工业大学Electroencephalographic identification method based on wavelet packet and LSTM-type RNN neural network
CN108985378A (en)*2018-07-202018-12-11天津师范大学A kind of domain adaptive approach based on mixing interleaving depth network
CN109583346A (en)*2018-11-212019-04-05齐鲁工业大学EEG feature extraction and classifying identification method based on LSTM-FC
CN110517666A (en)*2019-01-292019-11-29腾讯科技(深圳)有限公司 Audio recognition method, system, machine device and computer readable medium
CN110135244A (en)*2019-04-022019-08-16杭州电子科技大学 A facial expression recognition method based on brain-computer collaborative intelligence
CN110575163A (en)*2019-08-012019-12-17深圳大学 A method and apparatus for detecting driver distraction
CN110890155A (en)*2019-11-252020-03-17中国科学技术大学Multi-class arrhythmia detection method based on lead attention mechanism
CN111950455A (en)*2020-08-122020-11-17重庆邮电大学 A Feature Recognition Method of Motor Imagery EEG Signals Based on LFFCNN-GRU Algorithm Model
CN112022619A (en)*2020-09-072020-12-04西北工业大学Multi-mode information fusion sensing system of upper limb rehabilitation robot
CN112274162A (en)*2020-09-182021-01-29杭州电子科技大学Cross-tested EEG fatigue state classification method based on generation of anti-domain self-adaption
CN112336354A (en)*2020-11-062021-02-09山西三友和智慧信息技术股份有限公司Epilepsy monitoring method based on EEG signal
CN112100387A (en)*2020-11-132020-12-18支付宝(杭州)信息技术有限公司Training method and device of neural network system for text classification
CN112465069A (en)*2020-12-152021-03-09杭州电子科技大学Electroencephalogram emotion classification method based on multi-scale convolution kernel CNN

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
YING JIN ET AL: "Minimum Class Confusion for Versatile Domain", 《ARXIV:1912.03699V3》*
张向荣等: "《人工智能前沿技术丛书 模式识别》", 30 September 2019*
胡章芳等: "基于3DC-BGRU的脑电情感识别", 《计算机工程与应用》*
闫美阳等: "多源域混淆的双流深度迁移学习", 《中国图象图形学报》*

Cited By (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116150643A (en)*2021-11-152023-05-23中芯未来(北京)科技有限公司Electroencephalogram signal classification method based on gating circulation unit network
CN114912492A (en)*2022-05-202022-08-16中国科学院自动化研究所 Cross-temporal individual identification method and system based on EEG deep learning
CN115251845A (en)*2022-07-282022-11-01纽锐思(苏州)医疗科技有限公司Sleep monitoring method for processing brain wave signals based on TB-TF-BiGRU model
CN115251845B (en)*2022-07-282024-05-03纽锐思(苏州)医疗科技有限公司Sleep monitoring method for processing brain wave signals based on TB-TF-BiGRU model
CN117636337A (en)*2023-11-142024-03-01华南理工大学 A classification method for bacterial and fungal keratitis
CN117636337B (en)*2023-11-142025-09-26华南理工大学 A classification method for bacterial and fungal keratitis
CN119474865A (en)*2024-10-282025-02-18国网冀北电力有限公司电力科学研究院 Mechanical fault diagnosis model transfer training method and mechanical fault diagnosis method, device, equipment and medium

Similar Documents

PublicationPublication DateTitle
CN114052735B (en)Deep field self-adaption-based electroencephalogram emotion recognition method and system
CN113177482A (en)Cross-individual electroencephalogram signal classification method based on minimum category confusion
CN112766355B (en) A method for EEG emotion recognition under label noise
CN114176607B (en)Electroencephalogram signal classification method based on vision transducer
CN111709267A (en) EEG Emotion Recognition Method Based on Deep Convolutional Neural Networks
CN113011330B (en)Electroencephalogram signal classification method based on multi-scale neural network and cavity convolution
CN113951883B (en)Gender difference detection method based on electroencephalogram signal emotion recognition
Ning et al.Cross-subject EEG emotion recognition using domain adaptive few-shot learning networks
CN114564990A (en)Electroencephalogram signal classification method based on multi-channel feedback capsule network
CN110443276A (en)Time series classification method based on depth convolutional network Yu the map analysis of gray scale recurrence
CN114595725B (en) An EEG signal classification method based on additive network and supervised contrastive learning
CN116236209B (en) A method for recognizing EEG features of motor imagery based on force changes during unilateral upper limb movement
CN116821764A (en)Knowledge distillation-based multi-source domain adaptive EEG emotion state classification method
CN113157094A (en)Electroencephalogram emotion recognition method combining feature migration and graph semi-supervised label propagation
An et al.Cross-subject EEG emotion recognition based on interconnected dynamic domain adaptation
CN115221969A (en)Motor imagery electroencephalogram signal identification method based on EMD data enhancement and parallel SCN
Jinliang et al.EEG emotion recognition based on granger causality and capsnet neural network
CN112465069A (en)Electroencephalogram emotion classification method based on multi-scale convolution kernel CNN
CN113842151A (en) A cross-subject EEG cognitive state detection method based on efficient multi-source capsule network
Jiang et al.Analytical comparison of two emotion classification models based on convolutional neural networks
CN117763425A (en)Emotion decoding method based on non-deep migration learning
CN116746947A (en) Cross-subject EEG signal classification method based on online test time domain adaptation
CN116738330A (en)Semi-supervision domain self-adaptive electroencephalogram signal classification method
CN114495265B (en)Human behavior recognition method based on activity graph weighting under multi-cross-domain scene
CN118797410B (en) A dual-stream adaptive convolutional recurrent hybrid EEG emotion recognition method combined with attention mechanism

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20210727


[8]ページ先頭

©2009-2025 Movatter.jp