Construction method of electroencephalogram signal classification model applied to cross-electroencephalogram equipment and electroencephalogram signal classification method and system
In the heterogeneous transfer learning scenario of cross-EEG devices, the spatial distillation method and multi-stage distribution alignment strategy of the teacher-student model architecture are adopted to solve the problem of feature spatial inconsistency caused by the different electrode configurations of the source domain and the target domain, and efficient EEG signal classification is achieved.
Patent Information
- Application Number
- CN202510121650.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-01-26
AI Technical Summary
In the heterogeneous transfer learning scenarios across EEG devices, there is a significant difference in the number and distribution of EEG devices in the source domain and the target domain, resulting in inconsistent feature space. The existing isomorphic transfer methods are difficult to directly apply, and the traditional cutting method will discard key information, limiting the transfer learning effect.
Using a spatial distillation method based on the teacher-student model architecture, the teacher model learns rich spatial information on the source domain complete channel data and distiles it into the student model, so that the student model can learn high-quality features on the target domain channel subset data. At the same time, through a multi-stage distribution alignment strategy, including input space alignment, feature space alignment and output space alignment, the edge distribution difference between source domain and target domain data is reduced.
It effectively solves the problem of feature space inconsistency, improves the feature expression ability of target domain data, improves the accuracy of EEG signal classification, and further improves the cross-domain migration performance by minimizing confusion loss.
Smart Images

Figure CN120067794A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electroencephalogram classification, and more specifically, relates to a method for constructing an electroencephalogram signal classification model applied to cross-electroencephalogram devices, an electroencephalogram signal classification method, and a system. Background Art
[0002] A brain-computer interface (BCI) refers to a direct connection created between the brain of a human or animal and an external device. The technology enables interaction between humans and external devices by directly decoding the electroencephalogram (EEG) signals of users, and has made remarkable progress in recent years in the fields of brain science, human-computer interaction, and clinical diagnosis. However, due to the individual differences and non-stationarity of EEG signals, achieving efficient and accurate electroencephalogram signal classification still faces huge challenges.
[0003] As an effective means of knowledge transfer, transfer learning has been widely applied in BCI systems to solve the electroencephalogram signal classification calibration problems across subjects and experimental sessions by leveraging the knowledge of source domain data. The development of transfer learning in brain-computer interfaces is closely related to the progress of transfer learning techniques, and has experienced an evolution from traditional distribution alignment to deep learning, and certain research results have been achieved. However, existing transfer learning methods are mostly applicable to homogeneous scenarios, that is, it is assumed that the input and feature spaces of the source domain and the target domain are exactly the same, and only the alignment of marginal distributions and conditional distributions is concerned. However, in the heterogeneous transfer learning scenario of cross-electroencephalogram devices, there are significant differences in the number and distribution of electrodes of the electroencephalogram devices in the source domain and the target domain, resulting in inconsistent input and feature spaces. This inconsistency in feature spaces makes it difficult to directly apply traditional homogeneous transfer methods. To solve this problem, some existing methods usually crop the multi-channel EEG signals in the source domain to match the fewer number of channels in the target domain, but this approach will discard a large amount of key information in non-overlapping channels while reducing the difference in the input space, limiting the effect of transfer learning and unable to achieve accurate electroencephalogram signal classification. Summary of the Invention
[0004] Aiming at the above defects or improvement requirements of the prior art, the present invention provides a method for constructing an electroencephalogram signal classification model applied to cross-electroencephalogram devices, an electroencephalogram signal classification method, and a system, the purpose of which is to improve the accuracy of electroencephalogram signal classification when the electrode configurations of the source domain and the target domain are different.
[0005] To achieve the above object, in a first aspect, the present invention provides a method for constructing an electroencephalogram signal classification model applied to cross-electroencephalogram devices, including:
[0006] S1. Conduct one or more batches of training on the training model; wherein, in each training batch, input a batch of EEG data groups into the training model and train the training model based on the training objective;
[0007] Each EEG data group includes: the EEG data x collected by all channels of the source domain EEG device s and s the EEG data of the target channels extracted from x and the EEG data collected by the target channels of the target domain EEG device x s and both carry the corresponding classification label y s ; The training model includes: a teacher model and a student model; both the teacher model and the student model include: a cascaded feature extraction module and a classifier; the feature extraction module is used to extract the features of the input EEG data; the classifier is used to obtain the corresponding classification result based on the features of the EEG data;
[0008] The training objective includes: minimizing the difference loss between the classification result g s of each x s input in the current training batch and the corresponding classification label y s , the difference loss between the classification result of each and the corresponding classification label y s , the difference loss between the features of each and the corresponding features , and the difference loss between the classification result g s of each x s and the corresponding classification result ; g s is obtained by inputting x s into the teacher model; is obtained by inputting into the student model; is obtained by inputting into the feature extraction module of the student model; is obtained by inputting into the feature extraction module of the student model;
[0009] S2. After the training is completed, construct an EEG signal classification model including the student model.
[0010] Further preferably, the above training objective further includes: minimizing the confusion loss of input in the current training batch.
[0011] Further preferably, the confusion loss is:
[0012]
[0013] where C is the total number of classification categories of EEG signals; n a is the total number of input in the current training batch; q ij is the probability that the i-th input in the current training batch is classified into the j-th category; v i is the confusion weight of the i-th input in the current training batch, which is obtained by mapping [q i1 , q i2 , …, q iC .
[0014] Further preferably, x s comes from a pre-collected source domain training set; x t comes from a pre-collected target domain training set; the source domain training set includes: EEG data of multiple different subjects collected by all channels of several source domain EEG devices in different sessions; the target domain training set includes: EEG data of multiple different subjects collected by the target channels of several target domain EEG devices in different sessions; both the source domain training set and the target domain training set are preprocessed training sets;
[0015] where the preprocessing includes:
[0016] Dividing the training set to be preprocessed into multiple sub-datasets according to sessions;
[0017] Performing Euclidean alignment on the EEG data in each sub-dataset respectively;
[0018] Combining the sub-datasets after Euclidean alignment to form the preprocessed training set.
[0019] Further preferably, some or all of the EEG data in each training batch also carry corresponding classification labels
[0020] The above training objective also includes: minimizing the difference loss between the classification result of each input with a classification label in the current training batch and the corresponding classification label;
[0021] where is obtained by inputting into the student model.
[0022] In a second aspect, the present invention provides a method for classifying electroencephalogram (EEG) signals, including: inputting the EEG data collected by a target channel of a target-domain EEG device into an EEG signal classification model to obtain a corresponding classification result;
[0023] wherein, the EEG signal classification model is constructed by using the method for constructing an EEG signal classification model provided in the first aspect of the present invention; the target channel is the same as the target channel in the method for constructing an EEG signal classification model provided in the first aspect of the present invention.
[0024] In a third aspect, the present invention provides an electronic device, including: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it executes the method provided in the first aspect or the second aspect of the present invention.
[0025] In a fourth aspect, the present invention further provides a computer-readable storage medium, the computer-readable storage medium includes a stored computer program, wherein when the computer program is run by a processor, it controls the device where the storage medium is located to execute the method provided in the first aspect or the second aspect of the present invention.
[0026] In a fifth aspect, the present invention also provides a computer program product, including computer programs / instructions, and when the computer programs / instructions are executed by a processor, they implement the method provided in the first aspect or the second aspect of the present invention.
[0027] Generally speaking, through the above technical solutions conceived by the present invention, the following beneficial effects can be achieved:
[0028] 1. The present invention provides a method for constructing an EEG signal classification model applied to cross-EEG devices. By training a teacher model with source-domain complete-channel data to learn rich spatial information and distilling it into a student model, the student model can learn high-quality features similar to those of the teacher model on the target-domain channel subset data. At the same time, by minimizing the marginal distribution difference between the source-domain and target-domain data, the consistency of the features in the high-dimensional representation space is ensured, and the distribution difference after feature projection is reduced. The present invention can make full use of the spatial information of the source domain, improve the feature expression ability of the target-domain data, effectively solve the problem of inconsistent feature spaces, and can improve the accuracy of EEG signal classification when the electrode numbers, positions, etc. of the EEG devices in the source domain and the target domain are different.
[0029] 2. Further, in the method for constructing an EEG signal classification model provided by the present invention, the training objective further includes: minimizing the input in the current training batch The confusion loss, by introducing the confusion loss in the output space, reduces the uncertainty of class determination, further improves the cross-domain migration performance, and thus further improves the classification accuracy of EEG signals.
[0030] 3. Further, in the method for constructing the EEG signal classification model provided by the present invention, by performing session-level Euclidean alignment on the data of the source domain and the target domain respectively, the distribution deviation of the data between different sessions is reduced, the consistency of the input space is ensured, the statistical distribution difference in the input space is reduced, and the classification accuracy of EEG signals is further improved.
[0031] 4. Further, in the method for constructing the EEG signal classification model provided by the present invention, the training objective further includes: minimizing the difference loss between the classification result of each input carrying a classification label in the current training batch and the corresponding classification label ; by combining a small amount of labeled target domain data, the adaptability of the model can be further improved, and more rapid and accurate classification of the target domain data can be achieved. ; by combining a small amount of labeled target domain data, the adaptability of the model can be further improved, and more rapid and accurate classification of the target domain data can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a schematic diagram of the construction framework of the EEG signal classification model applied to cross-EEG devices provided by an embodiment of the present invention;
[0033] Figure 2 is a schematic diagram of the comparison of the cross-EEG device classification accuracy performance of the EEG signal classification model provided by the present invention when migrating from the BNCI2014001 dataset to the BNCI2014004 dataset with other existing methods;
[0034] Figure 3 is a schematic diagram of the comparison of the cross-EEG device classification accuracy performance of the EEG signal classification model provided by the present invention when migrating from the BNCI2015001 dataset to the BNCI2014002 dataset with other existing methods;
[0035] Figure 4 is a schematic diagram of the comparison of the cross-EEG device classification AUC index performance of the EEG signal classification model provided by the present invention when migrating from the BNCI2014009 dataset to the BNCI2014008 dataset with other existing methods. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0036] To make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0037] The present invention proposes a heterogeneous transfer learning method for distribution alignment based on spatial distillation for cross-electroencephalogram (EEG) devices (including but not limited to EEG devices such as EEG caps), mainly solving the problems of inconsistent feature spaces and significant distribution differences caused by different electrode configurations (number of electrodes, positions, etc.) of EEG devices between the source domain and the target domain. Specifically, the source domain data comes from an EEG device with more electrodes, while the target domain data comes from an EEG device with fewer electrodes. This heterogeneous cross-domain transfer task greatly limits the applicability of traditional transfer learning methods. It should be noted that the test subject has multiple brain regions, and the EEG device collects different brain regions through different electrodes respectively. One electrode corresponds to one channel, and the channel corresponding to the target brain region of interest is used as the target channel.
[0038] To achieve the above objective, in a first aspect, the present invention provides a method for constructing an EEG signal classification model applied to cross-EEG devices, including:
[0039] S1. Train the training model for one or more batches; wherein, in each training batch, a batch of EEG data groups are input into the training model, and the training model is trained based on the training objective;
[0040] Each EEG data group includes: EEG data x collected by all channels of the source domain EEG device s , the EEG data under the target channel extracted from x s , and the EEG data collected by the target channel of the target domain EEG device ; both x and s and carry the corresponding classification label y s ; the training model includes: a teacher model and a student model; both the teacher model and the student model include: a cascaded feature extraction module and a classifier; the feature extraction module is used to extract the features of the input EEG data; the classifier is used to obtain the corresponding classification result based on the features of the EEG data;
[0041] The training objective includes: minimizing the difference loss between the classification result h s of each input x s in the current training batch and the corresponding classification label y s , and the classification result of each The difference loss with the corresponding classification label y s , each one of the features and the corresponding of the features The difference loss, and each x s of the classification result g s and the corresponding of the classification result The difference loss; g s is obtained by inputting x s into the teacher model; is obtained by inputting into the student model; is obtained by inputting into the feature extraction module of the student model; is obtained by inputting into the feature extraction module of the student model;
[0042] S2. After the training is completed, construct an electroencephalogram signal classification model including the student model.
[0043] It should be noted that the teacher model and the student model can be the same or different, which is not limited here. There are various types of feature extraction modules that can be used, such as convolutional neural networks or convolutional + Transformer neural network structures commonly used in the field of EEG analysis, such as EEGNet, ShallowCNN, DeepCNN, Conformer, Deformer, etc., which are not limited here. There are various types of classifiers that can be used, such as multi-layer perceptrons, softmax layers, multi-layer perceptrons, SVMs, etc., which are not limited here.
[0044] In an alternative implementation, the above training objective further includes: minimizing the confusion loss of the input in the current training batch .
[0045] In an alternative implementation the confusion loss is:
[0046]
[0047] where C is the total number of classification categories of electroencephalogram signals; n a is the total number of the input in the current training batch ; q ij is the probability that the i-th in the current training batch is classified into the j-th category; v i is the confusion weight of the i-th in the current training batch, by [qi1 , q i2 , …, q iC is obtained through mapping.
[0048] In an alternative embodiment, x s comes from a pre - collected source - domain training set; x t comes from a pre - collected target - domain training set; the source - domain training set includes a plurality of electroencephalogram (EEG) data collected by all channels of several source - domain EEG devices; the target - domain training set includes: a plurality of EEG data collected by target channels of several target - domain EEG devices; both the source - domain training set and the target - domain training set are pre - processed training sets;
[0049] Among them, the pre - processing includes:
[0050] Dividing the training set to be pre - processed into multiple sub - data sets according to sessions;
[0051] Performing Euclidean alignment on the EEG data in each sub - data set respectively;
[0052] Combining the sub - data sets after Euclidean alignment to form the pre - processed training set.
[0053] In an alternative embodiment, some or all of the EEG data in each training batch also carries corresponding classification labels
[0054] The above - mentioned training objective also includes: minimizing the difference loss between the classification result of each input carrying a classification label in the current training batch and the corresponding classification label ;
[0055] Among them, is obtained by inputting into the student model.
[0056] It should be noted that there are various measurement methods for the difference loss. For example, it can be measured by L2 loss, Euclidean distance, Manhattan distance, cosine similarity, etc., which are not limited here. Among them, the difference loss between the classification result and the corresponding classification label is preferably measured by cross - entropy loss, L2 loss, etc.; the difference loss between features is preferably measured by multi - kernel maximum mean, cosine similarity, CDAN, JAN, etc.; the difference loss between classification results is preferably measured by KL divergence, L2 loss, etc.
[0057] In summary, the present invention aims to solve the problem of heterogeneous transfer learning across EEG devices. The core objective is to achieve efficient transfer of source domain knowledge to the target domain through effective spatial distillation and distribution alignment strategies when the electrode configurations of EEG devices in the source domain and the target domain are different, thereby improving the classification performance of EEG signals in the target domain. This is mainly reflected in the following aspects:
[0058] First, the present invention proposes a spatial distillation method based on the teacher-student model architecture. The teacher model learns rich spatial information from the complete channel data in the source domain and distills it into the student model, enabling the student model to learn high-quality features similar to those of the teacher model from the subset of channel data in the target domain. This method can make full use of the spatial information in the source domain, improve the feature expression ability of the target domain data, and effectively solve the problem of inconsistent feature spaces.
[0059] Secondly, when the data distributions in the source domain and the target domain are significantly different, the present invention proposes a multi-stage distribution alignment strategy, which includes three parts: input space alignment, feature space alignment, and output space alignment. In the input space, through fine-grained normalized Euclidean alignment processing, the distribution deviation of data between different sessions is reduced; in the feature space, by achieving marginal distribution alignment, the distribution difference after feature projection is reduced; in the output space, by introducing a confusion loss, the uncertainty of class determination is reduced, further improving the cross-domain transfer performance.
[0060] The present invention can effectively solve the problems of input / feature space differences and inconsistent distributions in heterogeneous transfer learning across EEG devices, improve the transfer effect of source domain knowledge on target domain data, and ultimately achieve high-precision EEG signal classification performance.
[0061] To further illustrate the method for constructing the EEG signal classification model provided in the first aspect of the present invention, the following will be described in detail with a specific embodiment:
[0062] As Figure 1 shown, this embodiment designs a transfer framework based on spatial distillation and multi-stage distribution alignment (denoted as SDDA). Through knowledge distillation technology, the rich spatial information in the complete electrode data of the source domain is effectively transferred to the limited electrode data of the target domain, and distribution alignment is performed in the input, feature, and output spaces respectively to minimize the distribution difference between the source domain and the target domain to the greatest extent. SDDA can work effectively in both unsupervised and supervised domain adaptation scenarios and has strong generality and robustness.
[0063] Specifically, the method for constructing the EEG signal classification model includes the following steps:
[0064] 1) Data acquisition and preprocessing;
[0065] Pre-collect the source domain training set The source domain training set includes EEG data of multiple different subjects collected by all channels of several source domain EEG devices in different sessions; among them represents the complete channel EEG data of the source domain, is the corresponding class label, n s is the total amount of data in the source domain training set; C s are all channels of the source domain EEG device; T is the number of time sampling points.
[0066] Pre-collect the target domain training set The target domain training set includes: EEG data of multiple different subjects collected by the target channels of several target domain EEG devices in different sessions; among them represents the target domain data containing only shared channels, and the number of channels of the target domain EEG device is less than or equal to the number of channels of the source domain EEG device, that is, the target channels n t is the total amount of data in the target domain training set.
[0067] Both the source domain training set and the target domain training set are preprocessed training sets. Specifically, a fine-grained Euclidean alignment strategy is used to perform fine-grained data standardization on the source domain training set and the target domain training set in units of sessions, and the mean covariance matrix of each session is calculated respectively:
[0068]
[0069] Among them, X i is the i-th EEG data in a certain session; n is the number of EEG data in this session.
[0070] Taking the average covariance matrix of all EEG data in this session as the reference matrix, perform the following linear mapping on all EEG data in this session:
[0071]
[0072] The following derivation shows that the average covariance matrix of the transformed EEG data is the identity matrix, that is, it is verified that this second-order statistic can reduce the redundancy between all samples, and the processed standardized data ensures that the statistical distribution difference between domains is reduced in the input space:
[0073]
[0074] Through the above operations, the alignment of the input space (session fine-grained dimension EA) is achieved. By performing session-level independent normalization on the standardized data of the source domain and the target domain respectively, the consistency of the input space is ensured, and the statistical distribution difference in the input space is reduced.
[0075] 2) Training of the teacher-student model
[0076] 2.1) Preparation for training of the teacher-student model
[0077] The source domain data is divided into two parts: the complete-channel data x s which is the EEG data collected by all channels of the source domain EEG device and is used for training the teacher model, and the subset-channel data which is the EEG data under the target channels extracted from x s and is used for training the student model; the target domain data is the EEG data collected by the target channels of the target domain EEG device, including a subset of channels shared with the source domain to ensure that the input dimension of the model matches.
[0078] The above x s , and constitute an EEG data group. In each training batch, a batch of EEG data groups is input into the training model to train the training model. In this embodiment, the number of a batch of EEG data groups is n a , and the i-th EEG data group is denoted as
[0079] 2.2) Spatial distillation
[0080] In the heterogeneous transfer scenario, the source domain and target domain data come from EEG devices with different electrode configurations, and there may also be significant differences in the acquisition methods, such as sampling rate, time resolution, etc. These differences lead to the inconsistency of the input feature space and significant distribution shifts, making it difficult for traditional theoretical results and methods to be directly applicable to heterogeneous scenarios. To address these challenges in heterogeneous transfer learning, the present invention proposes a brand-new spatial distillation method. This method transfers the rich spatial information in the source domain complete-channel data to the target domain limited-channel data through the teacher-student model architecture, making up for the differences in the input feature space. The teacher model is trained on the complete-channel data x s to extract rich spatial features. The student model is trained on the subset-channel data . In this embodiment, the distillation is achieved by minimizing the KL divergence between the classification result g s of x s and the classification result of the corresponding ; specifically, the spatial distillation loss where is the classification result of ; is the classification result of ; D KL represents the KL divergence metric formula.
[0081] This process effectively transfers the spatial information of the teacher model to the student model. The output of the teacher model not only guides the student model to learn the high-quality feature representations of the source domain shared channels, but also implicitly reduces the distribution bias between the source domain and the target domain through the semantic alignment of the output probability distribution. This process can maximize the retention of the source domain spatial information, improve the spatial utilization rate, train the student model to still generate high-quality prediction results close to the teacher model on the limited channels of the source domain data, improve the learning ability of the student model, and enable the student model to still have excellent generalization ability on the heterogeneous and significantly different target domain data.
[0082] 2.3) Distribution Alignment
[0083] In addition to the above input space alignment, feature space alignment and output space alignment are further achieved during the training process.
[0084] In this embodiment, the marginal distributions of the source domain and the target domain are aligned in the high-dimensional feature space by using the multi-kernel maximum mean discrepancy, thereby achieving feature space alignment; specifically, the marginal alignment loss is the feature obtained by the feature extraction module in the student model ; is the feature obtained by the feature extraction module in the student model ; represents the multi-kernel maximum mean discrepancy metric formula.
[0085] Confusion loss is introduced in the classification output space, and the deviation of the conditional distribution is further reduced by optimizing the category-level uncertainty; specifically, the confusion loss where C is the total classification categories of the EEG signals; q ij is the probability of classifying into the j-th category; v i is 's confusion weight, which is obtained by mapping [q i1 , q i2 , …, q iC .
[0086] 2.4) Joint Optimization and Model Prediction: By minimizing the loss functions of the teacher model and the student model, both the teacher model and the student model are optimized simultaneously to achieve cross-domain alignment of the models. The loss function of the teacher model is: The loss function of the student model is where, is 's classification result; is The classification result; α, β, and γ are all weights; in this embodiment, J represents the cross-entropy loss function. In this training mode, all target domain samples are visible but without labels, and this training mode is denoted as the first training mode (Offline Calibration).
[0087] Preferably, in the second training mode (Online Calibration), some or all of the EEG data in each training batch also carries the corresponding classification label Preferably, a very small part of the EEG data in each training batch also carries the corresponding classification label At this time, the loss function of the student model also includes: the sum of the difference losses between each piece of input EEG data with a classification label in the current training batch and the corresponding classification label
[0088] Combined with a small amount of labeled target domain data, the adaptability of the model is further improved through the supervised loss and distribution alignment strategy, realizing fast and accurate classification of target domain data.
[0089] 3) Training of the teacher-student model
[0090] After training is completed, an EEG signal classification model including a student model is constructed.
[0091] Through the joint optimization of spatial distillation and distribution alignment, the present invention can effectively solve the problems of input / feature space differences and distribution inconsistencies in cross-EEG device heterogeneous transfer learning, improve the transfer effect of source domain knowledge on target domain data, and achieve high-precision classification of EEG signals in heterogeneous transfer scenarios.
[0092] In a second aspect, the present invention provides an EEG signal classification method, including: inputting the EEG data collected by the target channels of the target domain EEG device into the EEG signal classification model to obtain the corresponding classification result;
[0093] wherein, the EEG signal classification model is constructed by using the construction method of the EEG signal classification model provided in the first aspect of the present invention; the target channels are the same as the target channels in the construction method of the EEG signal classification model provided in the first aspect of the present invention.
[0094] The related technical solutions are the same as those of the construction method of the EEG signal classification model provided in the first aspect of the present invention, and will not be elaborated here.
[0095] To further illustrate the performance of the electroencephalogram (EEG) signal classification model (denoted as SDDA) provided by the present invention, the classification performance of the EEG signal classification models trained under two training modes (Offline Calibration mode and Online Calibration mode) of the present invention and those of other existing methods is compared in scenarios where the BNCI2014001 dataset is migrated to the BNCI2014004 dataset, the BNCI2015001 dataset is migrated to the BNCI2014002 dataset, and the BNCI2014009 dataset is migrated to the BNCI2014008 dataset.
[0096] As Figure 2 shown is a comparison schematic diagram of the cross-electroencephalogram device classification accuracy performance of the EEG signal classification model provided by the present invention when the BNCI2014001 dataset is migrated to the BNCI2014004 dataset and that of other existing methods; wherein, S0 - S8 represent 9 subjects of the target domain BNCI2014004 dataset, and Avg. represents the average accuracy of each subject. It can be seen from the figure that the SDDA method provided by the present invention is superior to the existing transfer learning algorithms in both the Offline Calibration and Online Calibration modes.
[0097] As Figure 3 shown is a comparison schematic diagram of the cross-electroencephalogram device classification accuracy performance of the EEG signal classification model provided by the present invention when the BNCI2015001 dataset is migrated to the BNCI2014002 dataset and that of other existing methods; wherein, S0 - S13 represent 14 subjects of the target domain BNCI2014002 dataset, and Avg. represents the average accuracy of each subject. It can be seen from the figure that the SDDA method provided by the present invention is superior to the existing transfer learning algorithms in both the Offline Calibration and Online Calibration modes.
[0098] As Figure 4 shown is a comparison schematic diagram of the cross-electroencephalogram device classification AUC index performance of the EEG signal classification model provided by the present invention when the BNCI2014009 dataset is migrated to the BNCI2014008 dataset and that of other existing methods; wherein, S0 - S7 represent 8 subjects of the target domain BNCI2014008 dataset, and Avg. represents the average accuracy of each subject. It can be seen from the figure that the SDDA method provided by the present invention is superior to the existing transfer learning algorithms in both the Offline Calibration and Online Calibration modes.
[0099] In summary, the present invention designs a heterogeneous transfer learning framework for electroencephalogram (EEG) signal classification of heterogeneous cross-EEG devices. Based on the method of spatial distillation and distribution alignment, it effectively solves the problem of inconsistent feature spaces caused by differences in the number and position of electrodes of different EEG caps; by extracting spatial domain knowledge from multi-channel information of the source domain EEG cap and transferring it to the target domain, it enhances the utilization rate of spatial information of limited electrodes in the target domain; at the same time, it integrates a multi-stage distribution alignment strategy to reduce the differences between domains, thereby significantly improving the classification performance in scenarios with no annotation or few annotations, providing technical support for transfer learning of cross-EEG devices.
[0100] In a third aspect, the present invention provides an electronic device, including: a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, it executes the method provided in the first aspect or the second aspect of the present invention.
[0101] The related technical solutions are the same as the method for constructing an EEG signal classification model provided in the first aspect of the present invention or the EEG signal classification method provided in the second aspect of the present invention, and will not be elaborated here.
[0102] In a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program is run by a processor, it controls the device where the storage medium is located to execute the method provided in the first aspect or the second aspect of the present invention.
[0103] The related technical solutions are the same as the method for constructing an EEG signal classification model provided in the first aspect of the present invention or the EEG signal classification method provided in the second aspect of the present invention, and will not be elaborated here.
[0104] In a fifth aspect, the invention further provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, they implement the method provided in the first aspect or the second aspect of the present invention.
[0105] The related technical solutions are the same as the method for constructing an EEG signal classification model provided in the first aspect of the present invention or the EEG signal classification method provided in the second aspect of the present invention, and will not be elaborated here.
[0106] Those skilled in the art can easily understand that the above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for constructing an EEG signal classification model for cross-EEG devices, characterized in that: include: S1, training the training model in one or more batches; wherein, in each training batch, a batch of EEG data groups are input into the training model, and the training model is trained based on the training objectives; Each EEG data set includes: EEG data x collected by all channels of the source domain EEG device s , from x s EEG data of the target channel extracted from and the EEG data collected using the target channel of the target domain EEG device x s and All carry corresponding classification labels y s ; The training model includes: a teacher model and a student model; the teacher model and the student model both include: a cascaded feature extraction module and a classifier; the feature extraction module is used to extract the features of the input EEG data; the classifier is used to obtain the corresponding classification results based on the features of the EEG data; The training objectives include: minimizing the input of each x in the current training batch s The classification result g s and the corresponding classification label y s The difference loss of each Classification results and the corresponding classification label y s The difference loss, each Features Corresponding Features The difference loss, and each x s The classification result g s Corresponding Classification results The difference loss of g s By adding x s Input into the teacher model to obtain; By Input into the student model to obtain; By Input into the feature extraction module of the student model to obtain; By Input into the feature extraction module of the student model to obtain; S2. After the training is completed, an EEG signal classification model including the student model is constructed.
2. The method for constructing an EEG signal classification model according to claim 1, characterized in that: The training objectives also include: minimizing the input The confusion loss.
3. The method for constructing an EEG signal classification model according to claim 2, characterized in that: The confusion loss is: Among them, C is the total classification category of EEG signals; n a is the input of the current training batch The total number of ij is the i-th input in the current training batch The probability of being classified as the jth category; v i is the i-th input in the current training batch The confusion weight of [q i1 ,q i2 ,…,q iC ] is mapped.
4. The method for constructing an EEG signal classification model according to any one of claims 1 to 3, characterized in that: x s From the pre-collected source domain training set; x t A target domain training set from a pre-collection; the source domain training set includes EEG data of different subjects collected by all channels of a plurality of source domain EEG devices in different sessions; the target domain training set includes: EEG data of different subjects collected by target channels of a plurality of target domain EEG devices in different sessions; both the source domain training set and the target domain training set are pre-processed training sets; Wherein, the preprocessing includes: Divide the training set to be preprocessed into multiple sub-datasets according to the session; Perform Euclidean alignment on the EEG data in each sub-dataset; The sub-datasets after Euclidean alignment together constitute the preprocessed training set.
5. The method for constructing an EEG signal classification model according to any one of claims 1 to 3, characterized in that: Part or all of the EEG data for each training batch It also carries the corresponding classification label The training objective also includes: minimizing the number of each input with a classification label in the current training batch. Classification results And the corresponding classification label The difference loss; in, By Input into the student model.
6. A method for classifying electroencephalogram signals, characterized in that: include: Input the EEG data collected by the target channel of the target domain EEG device into the EEG signal classification model to obtain the corresponding classification result; Among them, the EEG signal classification model is constructed using the method for constructing the EEG signal classification model described in any one of claims 1-5; the target channel is the same as the target channel in the method for constructing the EEG signal classification model described in any one of claims 1-5.
7. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and the processor executes the method according to any one of claims 1 to 6 when executing the computer program.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed by a processor, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 6.
9. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Cross-device-based forehead electroencephalogram emotion recognition method and system
CN114145744A
Semi-supervised domain adaptive electroencephalogram signal classification method
CN116738330A
Cross-subject motor imagery electroencephalogram modeling method based on domain generalization
CN117390542A
Cross-device motor imagery electroencephalogram modeling method based on graph neural network
CN118466752A
Method, system, and program (mobile ai) for selecting machine learning model
JP2022056412A