A method for constructing an electroencephalogram signal classification model applied to a cross-electroencephalogram device, an electroencephalogram signal classification method and system
By employing a teacher-student model architecture and a multi-stage distribution alignment strategy, the problem of inconsistent feature spaces in heterogeneous transfer learning across EEG devices was solved, achieving high-precision EEG signal classification and improving the classification accuracy of the target domain.
Patent Information
- Application Number
- CN202510121650.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-01-26
AI Technical Summary
Existing transfer learning methods face challenges in heterogeneous transfer scenarios across EEG devices. Differences in the number and distribution of EEG electrodes between the source and target domains lead to inconsistencies in the feature space, making it difficult to achieve accurate EEG signal classification.
A spatial distillation method based on a teacher-student model architecture is adopted to learn rich spatial information on the complete channel data of the source domain. Through a multi-stage distribution alignment strategy, it is distilled into the student model to ensure the consistency of features in the high-dimensional representation space. Distribution differences are reduced by minimizing confusion loss and Euclidean alignment.
It improves the accuracy of EEG signal classification across EEG devices, makes full use of the spatial information of the source domain, enhances the feature representation ability of the target domain data, solves the problem of feature space inconsistency, and achieves high-precision EEG signal classification.
Smart Images

Figure CN120067794B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of electroencephalogram classification, and more particularly relates to a method for constructing an electroencephalogram signal classification model applied to cross-electroencephalogram devices, an electroencephalogram signal classification method and system. BACKGROUND
[0002] Brain-Computer Interface (BCI) refers to a direct connection created between the brain of a human or animal and an external device. The technology realizes the interaction between a human and an external device by directly decoding the electroencephalogram (EEG) signals of the user. In recent years, the technology has made remarkable progress in the fields of brain science, human-computer interaction and clinical diagnosis. However, due to the individual differences and non-stationarity of EEG signals, it still faces great challenges to realize efficient and accurate electroencephalogram signal classification.
[0003] As an effective knowledge transfer method, transfer learning has been widely used in BCI systems to solve the electroencephalogram signal classification calibration problem across subjects and across experimental sessions by using the knowledge of the source domain data to assist the target domain task. The development of transfer learning in brain-computer interface is closely related to the progress of transfer learning technology, and has experienced evolution from traditional distribution alignment to deep learning, and has achieved certain research results. However, the existing transfer learning methods are mostly suitable for homogeneous scenarios, that is, it is assumed that the input and feature spaces of the source domain and the target domain are completely consistent, and only the alignment of the marginal distribution and the conditional distribution is concerned. However, in the heterogeneous transfer learning scenario across electroencephalogram devices, there are significant differences in the number and distribution of electroencephalogram device electrodes between the source domain and the target domain, resulting in inconsistency between the input and the feature space. This inconsistency of the feature space makes it difficult for traditional homogeneous transfer methods to be directly applicable. In order to solve this problem, some existing methods usually trim the multi-channel EEG signals of the source domain to match the fewer channels of the target domain, but this approach will discard a large amount of key information in the non-overlapping channels while narrowing the difference in the input space, limiting the effect of transfer learning and failing to achieve accurate electroencephalogram signal classification. SUMMARY
[0004] In view of the above defects or improvement needs of the prior art, the application provides a method for constructing an electroencephalogram signal classification model applied to cross-electroencephalogram devices, an electroencephalogram signal classification method and system, which aims to improve the accuracy of electroencephalogram signal classification under the condition that the electrode configurations of the source domain and the target domain are different.
[0005] To achieve the above purpose, in a first aspect, the application provides a method for constructing an electroencephalogram signal classification model applied to cross-electroencephalogram devices, comprising:
[0006] S1. Train the training model in one or more batches; wherein, in each training batch, a batch of EEG data is input into the training model, and the training model is trained based on the training objective.
[0007] Each EEG dataset includes: EEG data acquired using all channels of the source domain EEG device x s From x s EEG data extracted from the target channel and EEG data collected using the target channel of the target domain EEG device x s and All of them carry corresponding category tags 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 features from the input EEG data; the classifier is used to obtain the corresponding classification results based on the features of the EEG data.
[0008] The training objectives include: minimizing each x in the input of the current training batch. s The classification result g s With corresponding category label y s Difference loss, each Classification results With corresponding category label y s Difference loss, each Features Corresponding Features The difference loss, and each x s The classification result g s Corresponding Classification results Difference loss; g s By x s The result is obtained by inputting into the teacher model; By The result is obtained by inputting it into the student model; By The feature extraction module of the student model is used to obtain the result; By The feature extraction module of the student model is used to obtain the result;
[0009] S2. After training is completed, construct an EEG signal classification model that includes the student model.
[0010] More preferably, the above training objective further includes: minimizing the input of the current training batch. The loss of confusion.
[0011] More preferably, The confusion loss is:
[0012]
[0013] Where C represents the total classification category of EEG signals; n a Input for the current training batch Total quantity; q ij The i-th input in the current training batch The probability of being classified into the j-th category; v i The i-th input in the current training batch The obfuscation weights are determined by adjusting [q]. i1 ,q i2 ,…,q iC The mapping is performed to obtain the result.
[0014] More preferably, x s From the pre-collected source domain training set; x t The training sets are derived from the pre-acquired target domain training set; the source domain training set includes: multiple EEG data collected from different subjects by all channels of several source domain EEG devices in different sessions; the target domain training set includes: multiple EEG data collected from different subjects 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 pre-processed training sets.
[0015] Preprocessing includes:
[0016] The training set to be preprocessed is divided into multiple subsets according to the sessions.
[0017] Euclidean alignment was performed on the EEG data in each subset of data.
[0018] The Euclidean-aligned subsets are combined to form the preprocessed training set.
[0019] Further optimized, some or all of the EEG data from each training batch It also comes with corresponding category tags.
[0020] The above training objectives also include: minimizing the error of each input carrying a classification label in the current training batch. Classification results With corresponding category tags The difference loss;
[0021] in, By The result is obtained by inputting it into the student model.
[0022] In a second aspect, the present invention provides a method for classifying electroencephalogram (EEG) signals, comprising: inputting EEG data collected by the target channel of a target domain EEG device into an EEG signal classification model to obtain the corresponding classification result;
[0023] The EEG signal classification model is constructed using the EEG signal classification model construction method provided in the first aspect of this invention; the target channel is the same as the target channel in the EEG signal classification model construction method provided in the first aspect of this invention.
[0024] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the method provided in the first or second aspect of the present invention.
[0025] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when executed by a processor, controls the device in which the storage medium is located to perform the method provided in the first or second aspect of the present invention.
[0026] Fifthly, the invention also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the method provided in the first or second aspect of the invention.
[0027] In summary, the above-described technical solutions conceived in this invention can achieve the following beneficial effects:
[0028] 1. This invention provides a method for constructing an EEG signal classification model applicable to multiple EEG devices. It trains a teacher model using complete source domain channel data to learn rich spatial information, which is then distilled into a student model. This allows the student model to learn high-quality features similar to the teacher model on a subset of target domain channel data. Simultaneously, by minimizing the marginal distribution differences between the source and target domain data, the consistency of features in the high-dimensional representation space is ensured, reducing the distribution differences after feature projection. This invention fully utilizes the spatial information of the source domain, improves the feature representation capability of the target domain data, effectively solves the problem of feature space inconsistency, and improves the accuracy of EEG signal classification even when the source and target domains differ in the number and location of EEG electrodes.
[0029] 2. Furthermore, in the method for constructing the EEG signal classification model provided by this invention, the training objective further includes: minimizing the input in the current training batch. The confusion loss, introduced into the output space, reduces the uncertainty of class determination, further improves cross-domain transfer performance, and thus further improves the classification accuracy of EEG signals.
[0030] 3. Furthermore, the method for constructing the EEG signal classification model provided by the present invention reduces the distribution deviation of data between different sessions by performing session-level Euclidean alignment on the data in the source domain and the target domain, ensuring the consistency of the input space, reducing the statistical distribution difference in the input space, and further improving the classification accuracy of EEG signals.
[0031] 4. Furthermore, in the method for constructing the EEG signal classification model provided by this invention, the training objective further includes: minimizing the input of each signal carrying a classification label in the current training batch. Classification results With corresponding category tags The difference loss; by combining a small amount of labeled target domain data, the adaptability of the model can be further improved, and the target domain data can be classified more quickly and accurately. Attached Figure Description
[0032] Figure 1 A schematic diagram illustrating the construction framework of an EEG signal classification model applied across EEG devices, provided in an embodiment of the present invention;
[0033] Figure 2 A schematic diagram comparing the cross-device classification accuracy performance of the EEG signal classification model provided by this invention when transferred from the BNCI2014001 dataset to the BNCI2014004 dataset with other existing methods;
[0034] Figure 3 A schematic diagram comparing the cross-device classification accuracy performance of the EEG signal classification model provided by this invention when transferred from the BNCI2015001 dataset to the BNCI2014002 dataset with other existing methods;
[0035] Figure 4 This diagram illustrates the performance of the EEG signal classification model provided in this invention across the BNCI2014009 dataset and its transfer to the BNCI2014008 dataset, comparing it with other existing methods. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0037] This invention proposes a heterogeneous transfer learning method for EEG devices (including but not limited to EEG caps) based on spatial distillation and distribution alignment. It primarily addresses the problem of inconsistencies in feature space and significant distribution differences between the source and target domains caused by variations in EEG electrode configurations (number of electrodes, location, etc.). Specifically, source domain data comes from EEG devices with more electrodes, while target domain data comes from EEG devices with fewer electrodes. This heterogeneous cross-domain transfer task greatly limits the applicability of traditional transfer learning methods. It should be noted that the subject has multiple brain regions, and the EEG devices collect data from different brain regions using different electrodes. Each electrode corresponds to one channel, and the channel corresponding to the target brain region is used as the target channel.
[0038] To achieve the above objectives, in a first aspect, the present invention provides a method for constructing a brainwave signal classification model applicable to cross-brainwave devices, comprising:
[0039] S1. Train the training model in one or more batches; wherein, in each training batch, a batch of EEG data is input into the training model, and the training model is trained based on the training objective.
[0040] Each EEG dataset includes: EEG data acquired using all channels of the source domain EEG device x s From x s EEG data extracted from the target channel and EEG data collected using the target channel of the target domain EEG device x s and All of them carry corresponding category tags 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 features from the input EEG data; the classifier is used to obtain the corresponding classification results based on the features of the EEG data.
[0041] The training objectives include: minimizing each x in the input of the current training batch. s Classification results h s With corresponding category label y s Difference loss, each Classification results With corresponding category label y s Difference loss, each Features Corresponding Features The difference loss, and each x s The classification result g s Corresponding Classification results Difference loss; g s By x s The result is obtained by inputting into the teacher model; By The result is obtained by inputting it into the student model; By The feature extraction module of the student model is used to obtain the result; By The feature extraction module of the student model is used to obtain the result;
[0042] S2. After training is completed, construct an EEG signal classification model that includes the student model.
[0043] It should be noted that the teacher model and student model can be the same or different; this is not a limitation. Various feature extraction modules can be used, such as EEGNet, ShallowCNN, DeepCNN, Conformer, Deformer, and other convolutional neural network or convolutional + Transformer neural network structures commonly used in EEG analysis; this is not a limitation. Various classifiers can be used, such as multilayer perceptrons, softmax layers, multilayer perceptrons, SVMs, etc.; this is not a limitation.
[0044] In one alternative implementation, the training objective further includes: minimizing the input of the current training batch. The loss of confusion.
[0045] In one alternative implementation, The confusion loss is:
[0046]
[0047] Where C represents the total classification category of EEG signals; n a Input for the current training batch Total quantity; q ij The i-th input in the current training batch The probability of being classified into the j-th category; v i The i-th input in the current training batch The obfuscation weights are determined by adjusting [q].i1 ,q i2 ,…,q iC The mapping is performed to obtain the result.
[0048] In one alternative implementation, x s From the pre-collected source domain training set; x t The training sets are derived from the pre-acquired target domain training set; the source domain training set includes multiple EEG data collected from all channels of several source domain EEG devices; the target domain training set includes multiple EEG data collected from the 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] Preprocessing includes:
[0050] The training set to be preprocessed is divided into multiple subsets according to the sessions;
[0051] Euclidean alignment was performed on the EEG data in each subset of data.
[0052] The Euclidean-aligned subsets are combined to form the preprocessed training set.
[0053] In one alternative implementation, some or all of the EEG data from each training batch... It also comes with corresponding category tags.
[0054] The above training objectives also include: minimizing the error of each input carrying a classification label in the current training batch. Classification results With corresponding category tags The difference loss;
[0055] in, By The result is obtained by inputting it into the student model.
[0056] It should be noted that there are various ways to measure the difference loss, such as L2 loss, Euclidean distance, Manhattan distance, cosine similarity, etc., and no particular method is specified 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.; and the difference loss between classification results is preferably measured by KL divergence, L2 loss, etc.
[0057] In summary, this invention aims to solve the problem of heterogeneous transfer learning across EEG devices. The core objective is to achieve efficient transfer of knowledge from the source domain to the target domain, thereby improving the classification performance of EEG signals in the target domain, when the electrode configurations of the source and target domains differ. This is mainly reflected in the following aspects:
[0058] First, this invention proposes a spatial distillation method based on a 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 on the target domain channel subset data that are close to those of the teacher model. This method can fully utilize the spatial information of the source domain, improve the feature representation capability of the target domain data, and effectively solve the problem of feature space inconsistency.
[0059] Secondly, this invention proposes a multi-stage distribution alignment strategy when there are significant differences in data distribution between the source and target domains. This strategy comprises three parts: input space alignment, feature space alignment, and output space alignment. In the input space, fine-grained normalized Euclidean alignment is used to reduce data distribution deviations across different sessions. In the feature space, edge distribution alignment is implemented to reduce distribution differences after feature projection. In the output space, confusion loss is introduced to reduce uncertainty in class determination, further improving cross-domain transfer performance.
[0060] This invention can effectively solve the problem of input / feature space differences and distribution inconsistencies 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, a detailed description is provided below with reference to a specific embodiment:
[0062] like Figure 1 As shown, this embodiment designs a transfer framework (denoted as SDDA) based on spatial distillation and multi-stage distribution alignment. Through knowledge distillation, it effectively transfers the rich spatial information from the complete source domain electrode data to the finite target domain electrode data, and performs distribution alignment in the input, feature, and output spaces respectively, minimizing the distribution differences between the source and target domains. SDDA can work effectively in both unsupervised and supervised domain adaptation scenarios, exhibiting strong versatility and robustness.
[0063] Specifically, the method for constructing an EEG signal classification model includes the following steps:
[0064] 1) Data acquisition and preprocessing;
[0065] Pre-collection of source domain training set The source domain training set includes multiple EEG data collected from different subjects across all channels of several source domain EEG devices during different sessions; among them This represents complete channel EEG data from the source domain. It is the corresponding category label, n s C represents the total amount of data in the source domain training set. s For all channels of the source domain EEG device; T is the number of time sampling points.
[0066] Pre-collection of target domain training set The target domain training set includes: EEG data from different subjects collected in different sessions by target channels of several target domain EEG devices; among which... This indicates that the target domain data only includes shared channels, and the number of channels in the target domain EEG device is less than or equal to the number of channels in the source domain EEG device, i.e., the target channels. n t This represents the total amount of data in the training set for the target domain.
[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 standardize the source domain training set and the target domain training set by session, and the mean covariance matrix of each session is calculated.
[0068]
[0069] Among them, X i is the i-th EEG data point in a given session; n is the number of EEG data points in that session.
[0070] Using the mean covariance matrix of all EEG data from this session as the reference matrix, a linear mapping is performed on all EEG data from this session as shown in the following equation:
[0071]
[0072] The following derivation proves that the mean covariance matrix of the transformed EEG data is an identity matrix, thus verifying that this second-order statistic reduces redundancy among all samples. The processed standardized data ensures reduced inter-domain statistical distribution differences in the input space:
[0073]
[0074] The above operations achieve input space alignment (session fine-grained dimension EA). By performing session-level independent normalization on the standardized data of the source and target domains, the consistency of the input space is ensured, and the statistical distribution differences in the input space are reduced.
[0075] 2) Training of the teacher-student model
[0076] 2.1) Preparation for Teacher-Student Model Training
[0077] The source domain data is divided into two parts: complete channel data x s EEG data collected from all channels of the source domain EEG device is used for training the teacher model; subset channel data... For from x s EEG data extracted from the target channel is used for training the student model; target domain data The EEG data collected for the target channel of the EEG device in the target domain includes a subset of channels shared with the source domain, ensuring that the model input dimension matches.
[0078] The above x s , and This constitutes an EEG dataset. In each training batch, a batch of EEG datasets is input into the training model to train it. In this embodiment, the number of EEG datasets in a batch is n. a The i-th EEG data set is denoted as
[0079] 2.2) Space distillation
[0080] In heterogeneous transfer learning scenarios, source and target domain data come from EEG devices with different electrode configurations, and the acquisition methods may also differ significantly, such as sampling rate and temporal resolution. These differences lead to inconsistencies in the input feature space and significant distribution shifts, making it difficult to directly apply traditional theoretical results and methods to heterogeneous scenarios. To address these challenges in heterogeneous transfer learning, this invention proposes a novel spatial distillation method. This method, through a teacher-student model architecture, transfers the rich spatial information from the complete channel data of the source domain to the limited channel data of the target domain, compensating for the differences in the input feature space. The teacher model in the complete channel data x s The student model is trained on a subset of channel data to extract rich spatial features. In the above training, this embodiment minimizes x s The classification result g s Corresponding The KL divergence of the classification results is used for distillation; specifically, spatial distillation loss. in, for The classification results; for The classification results; D KL This represents the KL divergence metric formula.
[0081] This process effectively transfers spatial information from the teacher model to the student model. The teacher model's output not only guides the student model to learn high-quality feature representations of shared channels in the source domain, but also implicitly reduces the distribution bias between the source and target domains through semantic alignment of the output probability distribution. This process maximizes the preservation of spatial information in the source domain, improves space utilization, and enables the student model to generate high-quality predictions close to those of the teacher model even on limited channels of source domain data. This enhances the student model's learning ability and allows it to maintain excellent generalization capabilities on heterogeneous and highly varied target domain data.
[0082] 2.3) Distribution Alignment
[0083] In addition to the input space alignment mentioned above, feature space alignment and output space alignment are further implemented during the training process.
[0084] In this embodiment, the edge distributions of the source and target domains are aligned in a high-dimensional feature space by utilizing the maximum mean difference of multiple kernels, thereby achieving feature space alignment; specifically, the edge alignment loss... The feature extraction module obtained through the student model Features; The feature extraction module obtained through the student model Features; This represents the formula for measuring the maximum mean difference in multi-core datasets.
[0085] A confusion loss is introduced into the classification output space to further reduce the bias of the conditional distribution by optimizing the uncertainty at the class level; specifically, the confusion loss... Where C represents the total classification category of EEG signals; q ij To be The probability of being classified into the j-th category; v i for The obfuscation weights are determined by adjusting [q]. i1 ,q i2 ,…,q iC The mapping is performed to obtain the result.
[0086] 2.4) Joint Optimization and Model Prediction: By minimizing the loss functions of both the teacher and student models, cross-domain alignment of the models is achieved through simultaneous optimization. The loss function of the teacher model is: The loss function of the student model is in, for The classification results; for The classification results are given; α, β, 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 unlabeled; this training mode is referred to as the first training mode (Offline Calibration).
[0087] Preferably, in the second training mode (Online Calibration), some or all of the EEG data from each training batch are used. It also comes with corresponding category tags. Preferably, a very small portion of the EEG data from each training batch It also comes with corresponding category tags. At this point, the loss function of the student model also includes: the inputs carrying classification labels in the current training batch. With corresponding category tags The sum of the difference losses.
[0088] By combining a small amount of labeled target domain data, the adaptability of the model is further improved through supervised loss and distribution alignment strategies, enabling fast and accurate classification of target domain data.
[0089] 3) Training of the teacher-student model
[0090] After training, a brainwave signal classification model including the student model is constructed.
[0091] This invention effectively solves the problem of input / feature space differences and distribution inconsistencies in heterogeneous transfer learning across EEG devices by jointly optimizing spatial distillation and distribution alignment. It improves the transfer effect of source domain knowledge on target domain data and achieves high-precision classification of EEG signals in heterogeneous transfer scenarios.
[0092] In a second aspect, the present invention provides a method for classifying electroencephalogram (EEG) signals, comprising: inputting EEG data collected by the target channel of a target domain EEG device into an EEG signal classification model to obtain the corresponding classification result;
[0093] The EEG signal classification model is constructed using the EEG signal classification model construction method provided in the first aspect of this invention; the target channel is the same as the target channel in the EEG signal classification model construction method provided in the first aspect of this invention.
[0094] The related technical solutions are the same as the method for constructing the EEG signal classification model provided in the first aspect of this invention, and will not be described in detail here.
[0095] To further illustrate the performance of the EEG signal classification model (denoted as SDDA) provided by this invention, the performance of the EEG signal classification model trained under two training modes (Offline Calibration mode and Online Calibration mode) of this invention was compared with that of other existing methods in scenarios where the BNCI2014001 dataset was migrated to the BNCI2014004 dataset, the BNCI2015001 dataset was migrated to the BNCI2014002 dataset, and the BNCI2014009 dataset was migrated to the BNCI2014008 dataset.
[0096] like Figure 2 The figure shows a comparison of the cross-EEG device classification accuracy performance of the EEG signal classification model provided by this invention when transferred from the BNCI2014001 dataset to the BNCI2014004 dataset with other existing methods; where S0-S8 represent 9 subjects in the target domain BNCI2014004 dataset, and Avg. represents the average accuracy of each subject. As can be seen from the figure, the SDDA method provided by this invention outperforms existing transfer learning algorithms in both Offline Calibration and Online Calibration modes.
[0097] like Figure 3 The figure shows a comparison of the cross-EEG device classification accuracy performance of the EEG signal classification model provided by this invention when transferred from the BNCI2015001 dataset to the BNCI2014002 dataset with other existing methods. S0-S13 represent 14 subjects in the target domain BNCI2014002 dataset, and Avg. represents the average accuracy of each subject. As can be seen from the figure, the SDDA method provided by this invention outperforms existing transfer learning algorithms in both Offline Calibration and Online Calibration modes.
[0098] like Figure 4 The figure shows a comparison of the AUC performance of the EEG signal classification model provided by this invention when transferred from the BNCI2014009 dataset to the BNCI2014008 dataset with other existing methods. S0-S7 represent 8 subjects in the target domain BNCI2014008 dataset, and Avg. represents the average accuracy of each subject. As can be seen from the figure, the SDDA method provided by this invention outperforms existing transfer learning algorithms in both Offline Calibration and Online Calibration modes.
[0099] In summary, this invention presents a heterogeneous transfer learning framework for classifying EEG signals from different EEG devices. Based on spatial distillation and distribution alignment methods, it effectively addresses the feature space inconsistency caused by differences in the number and location of electrodes in different EEG caps. By extracting spatial domain knowledge from the multi-channel information of the source domain EEG cap and transferring it to the target domain, it enhances the utilization rate of spatial information from the limited electrodes in the target domain. Simultaneously, by integrating a multi-stage distribution alignment strategy, it reduces inter-domain differences, thereby significantly improving classification performance in unlabeled or poorly labeled scenarios, providing technical support for transfer learning across EEG devices.
[0100] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the method provided in the first or second aspect of the present invention.
[0101] The related technical solutions are the same as the method for constructing the EEG signal classification model provided in the first aspect of this invention or the method for classifying EEG signals provided in the second aspect, and will not be described in detail here.
[0102] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when executed by a processor, controls the device in which the storage medium is located to perform the method provided in the first or second aspect of the present invention.
[0103] The related technical solutions are the same as the method for constructing the EEG signal classification model provided in the first aspect of this invention or the method for classifying EEG signals provided in the second aspect, and will not be described in detail here.
[0104] Fifthly, the invention also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the method provided in the first or second aspect of the invention.
[0105] The related technical solutions are the same as the method for constructing the EEG signal classification model provided in the first aspect of this invention or the method for classifying EEG signals provided in the second aspect, and will not be described in detail here.
[0106] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for constructing a brainwave signal classification model applicable to multiple brainwave devices, characterized in that, include: S1. Train the training model in one or more batches; wherein, in each training batch, a batch of EEG data is input into the training model, and the training model is trained based on the training objective. Each EEG dataset includes: EEG data acquired using all channels of the source domain EEG device x s From x s EEG data extracted from the target channel and EEG data collected using the target channel of the target domain EEG device x s and All of them carry corresponding category tags 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 features from the input EEG data; the classifier is used to obtain the corresponding classification result based on the features of the EEG data. The training objective includes: minimizing each x input in the current training batch. s The classification result g s With corresponding category label y s Difference loss, each Classification results With corresponding category label y s Difference loss, each Features Corresponding Features The difference loss, and each x s The classification result g s Corresponding Classification results Difference loss; g s By x s The input is obtained into the teacher model; By The input is obtained by the student model; By The feature extraction module of the student model is used to obtain the feature. By The feature extraction module of the student model is used to obtain the feature. S2. After training is completed, construct an EEG signal classification model that includes the student model.
2. The method for constructing an EEG signal classification model according to claim 1, characterized in that, The training objective also includes: minimizing the input of the current training batch. The loss of confusion.
3. The method for constructing an EEG signal classification model according to claim 2, characterized in that, The confusion loss is: Where C represents the total classification category of EEG signals; n a Input for the current training batch Total quantity; q ij The i-th input in the current training batch The probability of being classified into the j-th category; v i The i-th input in the current training batch The obfuscation weights are determined by adjusting [q]. i1 ,q i2 ,…,q iC The mapping is performed to obtain the result.
4. The method for constructing an EEG signal classification model according to any one of claims 1-3, characterized in that, x s From the pre-collected source domain training set; x t The training sets are derived from the pre-acquired target domain training set; the source domain training set includes multiple EEG data collected from different subjects by all channels of several source domain EEG devices in different sessions; the target domain training set includes multiple EEG data collected from different subjects by target channels of several target domain EEG devices in different sessions; both the source domain training set and the target domain training set are pre-processed training sets. The preprocessing includes: The training set to be preprocessed is divided into multiple subsets according to the sessions. Euclidean alignment was performed on the EEG data in each subset of data. The Euclidean-aligned subsets are combined to form the preprocessed training set.
5. The method for constructing an EEG signal classification model according to any one of claims 1-3, characterized in that, Partial or complete EEG data from each training batch It also comes with corresponding category tags. The training objective also includes: minimizing the input of each classifier carrying a classification label in the current training batch. Classification results With corresponding category tags The difference loss; in, By The input is obtained into the student model.
6. A method for classifying electroencephalogram (EEG) signals, characterized in that, include: The EEG data collected by the target channel of the target domain EEG device is input into the EEG signal classification model to obtain the corresponding classification results; The EEG signal classification model is constructed using the method described in any one of claims 1-5; the target channel is the same as the target channel in the method 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 computer program to perform the method according to any one of claims 1-6.
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, it controls the device in which the storage medium is located to perform the method according to any one of claims 1-6.
9. A computer program product, characterized in that, Includes a computer program / instruction that, when executed by a processor, implements the method described in any one of claims 1-6.
Citation Information
Patent Citations
Cross-device-based forehead electroencephalogram emotion recognition method and system
CN114145744A
Cross-subject motor imagery electroencephalogram modeling method based on domain generalization
CN117390542A