A semi-supervised adaptive classification method for EEG signals

By employing a semi-supervised adaptive learning strategy, combined with data augmentation, feature alignment, and consistency regularization loss function, the model transfer difficulty in cross-individual EEG signal classification is solved, achieving efficient cross-individual EEG signal classification.

CN116738330BActive Publication Date: 2025-12-02UNIV OF SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310052274.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-02
Publication Date
2025-12-02
Estimated Expiration
2043-02-02

AI Technical Summary

Technical Problem

Existing EEG signal classification methods face difficulties in model transfer in cross-individual applications, especially due to inter-individual feature differences and high data costs, making it difficult to effectively utilize unlabeled data for calibration.

Method used

A semi-supervised adaptive learning strategy is adopted. By combining labeled and unlabeled data, data augmentation is performed using random erasure and Gaussian noise enhancement methods. The model is then optimized by combining feature alignment and consistency regularization loss function to achieve cross-individual EEG signal classification.

Benefits of technology

It significantly improved the accuracy of cross-individual EEG signal classification, reduced annotation costs, and enhanced the model's ability to identify target individuals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116738330B_ABST
    Figure CN116738330B_ABST
Patent Text Reader

Abstract

This invention discloses a semi-supervised adaptive EEG signal classification method, comprising: 1. acquiring labeled data from different individuals, acquiring data from the target individual and selecting a portion for labeling, followed by unified preprocessing; 2. designing a data augmentation mechanism to enhance the representation of the samples; 3. building student and teacher models; 4. recording the weights of the student model after each update, and performing a moving average with the historical weights to serve as the weights of the teacher model; 5. calculating the feature alignment loss between existing individuals and the target individual in the feature space; 6. calculating the consistency loss between the output probabilities of the student model and the teacher model; 7. combining the above loss function with cross-entropy loss to jointly optimize the model parameters and obtain the optimal classification model. This invention can fully calibrate the classification model even when only a small portion of the target individual's data is labeled, thereby achieving high-accuracy cross-individual EEG signal classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electroencephalogram (EEG) signal processing, specifically a semi-supervised adaptive EEG signal classification method. Background Technology

[0002] Electroencephalography (EEG) is a powerful tool for recording brain electrical activity, accurately distinguishing different brain states. In recent years, with the increasing demand for smart health products, automatic classification based on EEG signals has received growing attention, such as in epilepsy detection, motor imagery, and emotion recognition. Currently, EEG signal classification methods are mainly divided into two categories: traditional machine learning algorithms and deep learning algorithms.

[0003] The key to traditional machine learning algorithms lies in feature engineering, which requires manually designing highly discriminative features such as autoregressive coefficients, variance, spectral energy, dynamic similarity index, and Lyapunov index. Designing artificial features demands a high level of expertise from researchers, and due to the non-stationarity of EEG signals, designing robust features is extremely difficult. In recent years, deep learning algorithms have been widely applied to EEG signal classification with great success. Deep learning employs a data-driven approach, driving artificial neural networks to automatically learn the most discriminative features, thereby achieving classification and superior performance. Common network structures in this field include convolutional neural networks, long short-term memory networks, capsule networks, and graph neural networks.

[0004] However, due to significant differences in EEG signal characteristics between individuals, existing models often cannot effectively transfer knowledge learned from existing individuals to new target individuals. This necessitates acquiring a large amount of labeled data from the target individuals to retrain the model, a practice that is prohibitively costly and cannot be widely applied in real-world scenarios. Recently, some researchers have proposed supervised domain adaptation techniques to address cross-individual EEG classification problems. These methods calibrate the model by acquiring a small amount of labeled data from the target individuals. While they improve the accuracy of cross-individual EEG classification to some extent, they are far from ideal. EEG features not only vary between individuals but also change over time within the same individual. When the data used for calibration is insufficient, it cannot adequately represent the data distribution of the target individuals, easily leading to overfitting and intra-domain bias between the calibration samples and the remaining target individual samples. An intuitive solution is to further increase the amount of labeled target individual data used for calibration; however, this additional labeling cost is too high for practical applications and difficult to promote. In contrast, adding additional unlabeled target individual data for calibration is less costly and more flexible, but how to extract information from unlabeled EEG data has always been a major challenge in this field. Summary of the Invention

[0005] This invention aims to address the shortcomings of existing technologies by proposing a semi-supervised adaptive EEG signal classification method. This method utilizes a small amount of labeled target individual data as well as additional unlabeled target individual data to improve the model's classification accuracy, thereby enhancing the performance of cross-individual EEG signal classification. This has significant implications for fields such as intelligent human-computer interaction and healthcare.

[0006] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:

[0007] The present invention provides a semi-supervised adaptive EEG signal classification method, characterized by comprising the following steps:

[0008] Step 1: Obtain labeled EEG signal datasets from different individuals and use them as labeled source domain datasets; obtain EEG signal datasets from target individuals and select a portion of EEG signals for labeling to obtain labeled target domain datasets and unlabeled target domain datasets.

[0009] All datasets undergo uniform preprocessing including slicing, short-time Fourier transform, and denoising to obtain a labeled source domain denoised time-frequency sample set D. S Annotated target domain denoising time-frequency sample set D LT and unlabeled denoised time-frequency sample set D UT Among them, the source domain denoising time-frequency sample set D S Let x be any sample from the source domain. S And source domain sample x S The label is denoted as y S y S ∈{0,...,C-1}, where C represents the number of categories;

[0010] The labeled target domain denoised time-frequency sample set D LT and unlabeled denoised time-frequency sample set D UT Merging yields the target domain merged sample set D. T =D LT ∪D UT Among them, the target domain merged sample set D T Let x be any sample in the target domain. T Let the target domain sample x T The scalar of the label is I T , when I T When = 0, it indicates that the target domain sample x T Denoising time-frequency sample set D from the unlabeled target domain UT , that is, x T ∈D UT ; when I T When = 1, it indicates that the target domain sample xT Belonging to the labeled target domain denoising time-frequency sample set D LT , that is, x T ∈D LT And the target domain sample x T The label is denoted as y T ∈{0,...,C-1};

[0011] Step 2: Use random erasure and Gaussian noise enhancement methods to process the source domain samples x. S The enhancement is represented as source domain enhancement sample target domain sample x T Augmentation is represented as augmentation samples in the target domain. This yields the enhanced source domain denoised time-frequency sample set. Merge the sample set with the enhanced target domain

[0012] Step 3: Build a student model based on an artificial neural network, consisting of a feature extractor and a classifier; build a teacher model based on an artificial neural network, consisting of a feature extractor and a classifier.

[0013] Step 4: Define the current iteration number as t; and initialize t = 1;

[0014] Step 5: Let the network parameters of the student model in the t-th iteration be θ(t), and initialize them randomly.

[0015] Let the network parameters of the teacher model in the t-th iteration be...

[0016] Define the current batch as b; and initialize b = 1;

[0017] Step 6, Define b max (t) represents the maximum batch size in the t-th iteration and is initialized;

[0018] Step 7: Denoise the enhanced source domain time-frequency sample set Merge the sample set with the enhanced target domain The data is input into the student model in the t-th iteration in batches for training, resulting in the trained student model and teacher model in the t-th iteration.

[0019] Step 8: Enhance the source domain samples The student model trained in the t-th iteration is input into the feature extractor and classifier, and after processing, the source domain sample depth features v in the t-th iteration are obtained. S (t) and the source domain sample output probability p S (t);

[0020] Enhance the target domain sample The student model trained in the t-th iteration is input into the feature extractor and classifier, and after processing, the target domain sample depth features v in the t-th iteration are obtained. T (t) and the target domain sample output probability p T (t);

[0021] Step 9, with v S (t) and v T The feature alignment loss L for the t-th iteration is constructed based on the data distribution differences in the feature space where (t) is located. FA (t);

[0022] Step 10: Transfer the source domain sample x S With the target domain sample x T Perform random data augmentation again to obtain new augmented source domain samples. With the new enhanced target domain samples The results are then fed into the teacher model trained in the t-th iteration to obtain the corresponding source domain sample ensemble output probabilities. Integrating output probabilities with target domain samples

[0023] p S (t) and The deviation between and p T (t) and The deviation between them constructs the consistency regularization loss L for the t-th iteration. CR (t);

[0024] Step 11: Combine loss functions to optimize the model together;

[0025] Step 11.1: Merge sample set D from the target domain T Find I in T =1 for all target domain samples, and the source domain denoised time-frequency sample set D S Together we construct the cross-entropy loss L for the t-th iteration. CE (t);

[0026] Step 11.2: Construct the total loss function L(t) for the t-th iteration using equation (1):

[0027] L(t)=L CE (t)+λL FA (t)+ω(t)L CR (t) (1)

[0028] In equation (1), λ represents the weighting constant, and ω(t) represents the weighting function for the t-th iteration;

[0029] Step 11.3: Based on the total loss function L(t), use the SGD optimizer to update the network parameters θ(b) of the student model trained in the t-th iteration, and obtain the student model in the (t+1)-th iteration;

[0030] Step 12: After assigning t+1 to t, determine if t > t. max If the condition is met, the training is complete, and the optimal student model and the optimal teacher model are obtained. The optimal teacher model is then used to classify any EEG signal sample. Otherwise, return to step 6 and execute sequentially.

[0031] The semi-supervised adaptive EEG signal classification method of the present invention is characterized in that step 7 includes the following steps:

[0032] Step 7.1: Input the b-th batch of samples into the student model in the t-th iteration for training, and obtain the network parameters θ(t,b) of the student model in the t-th iteration on the b-th batch of samples. Perform a moving average of the network parameters θ(t,b) with the historical network parameters of the previous b batches of samples to obtain the network parameters of the teacher model in the t-th iteration on the b-th batch of samples.

[0033] Step 7.2: Determine if b ≥ b max If (t) is true, it means that the network parameter update of the student model and teacher model in the t-th iteration is completed, and the trained student model and teacher model in the t-th iteration are obtained, and step 8 is executed; otherwise, after assigning b+1 to b, return to step 7.1 to execute sequentially.

[0034] The present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the classification method of claim 1, and the processor is configured to execute the program stored in the memory.

[0035] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the classification method of claim 1.

[0036] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0037] 1. This invention proposes a semi-supervised domain adaptive learning strategy, which can significantly improve the accuracy of cross-individual EEG signal classification by making full use of unlabeled target individual data when only a small portion of the target individual data is labeled.

[0038] 2. This invention designs an unsupervised feature alignment module to globally align the feature space data distribution of existing individuals with that of the target individual, thereby roughly transferring the knowledge learned on existing individuals to the current individual. At this point, the model's recognition ability on the target individual is still insufficient. To address this, this invention designs an unsupervised consistency regularization module, which can fully utilize unlabeled target individual data to optimize the decision boundary, thereby improving the model's recognition ability on the target individual and ultimately enhancing the performance of cross-individual EEG signal classification. Attached Figure Description

[0039] Figure 1 This is a flowchart of the method of the present invention;

[0040] Figure 2 This is a schematic diagram of the residual module constructed according to the present invention;

[0041] Figure 3 The structure diagram of the artificial neural network constructed for this invention;

[0042] Figure 4 This is a schematic diagram of the semi-supervised domain adaptive training strategy of the method of the present invention.

[0043] Figure 5 This is a schematic diagram illustrating the semi-supervised domain adaptive principle designed for this invention.

[0044] Figure 6 A schematic diagram illustrating the consistency regularization principle designed for this invention. Detailed Implementation

[0045] In this embodiment, a semi-supervised domain adaptive EEG signal classification method is described, such as... Figure 1 As shown, it includes the following steps:

[0046] Step 1: Obtain labeled EEG signal datasets from different individuals and use them as labeled source domain datasets; obtain EEG signal datasets from target individuals and select a portion of EEG signals for labeling to obtain labeled target domain datasets and unlabeled target domain datasets.

[0047] In practice, if there are N long-term EEG records in the target individual, one record is randomly selected using the random function for manual annotation, and the rest are not annotated.

[0048] All datasets undergo uniform preprocessing including slicing, short-time Fourier transform, and denoising to obtain a labeled source domain denoised time-frequency sample set D. S Annotated target domain denoising time-frequency sample set D LT and unlabeled denoised time-frequency sample set D UTIn specific implementation, the sliding window method is used, with a window length of l = 30, that is, uniformly dividing the segment into 30-second segments; after short-time Fourier transform, the frequency components of 57-63Hz and 117-123Hz are removed in the frequency domain to eliminate 60Hz power frequency noise, and the 0Hz DC component is removed; among which, the source domain denoising time-frequency sample set D S Let x be any sample from the source domain. S And source domain sample x S The label is denoted as y S y S ∈{0,...,C-1}, where C represents the number of categories;

[0049] The labeled target domain denoised time-frequency sample set D LT and unlabeled denoised time-frequency sample set D UT Merging yields the target domain merged sample set D. T =D LT ∪D UT Among them, the target domain merged sample set D T Let x be any sample in the target domain. T Let the target domain sample x T The scalar of the label is I T , when I T When = 0, it indicates that the target domain sample x T Denoising time-frequency sample set D from the unlabeled target domain UT , that is, x T ∈D UT ; when I T When = 1, it indicates that the target domain sample x T Belonging to the labeled target domain denoising time-frequency sample set D LT , that is, x T ∈D LT And the target domain sample x T The label is denoted as y T ∈{0,...,C-1};

[0050] Step 2: Use random erasure and Gaussian noise enhancement methods to process the source domain samples x. S The enhancement is represented as source domain enhancement sample target domain sample x T Augmentation is represented as augmentation samples in the target domain. This yields the enhanced source domain denoised time-frequency sample set. Merge the sample set with the enhanced target domain

[0051] In practice, random erasure and Gaussian noise enhancement are used as random data augmentation mechanisms. Random erasure refers to randomly selecting a region on the input and erasing its values ​​to 0. The size of the region is set to 5×5. Then, random Gaussian noise is added to the input after random erasure. The standard deviation of the Gaussian noise distribution is set to σ = 0.15. This random enhancement is equivalent to generating certain enhanced samples in the vicinity of the original samples in the input space.

[0052] Step 3: Build a student model based on an artificial neural network, consisting of a feature extractor and a classifier; build a teacher model based on an artificial neural network, consisting of a feature extractor and a classifier.

[0053] In practice, the student model and the teacher model have the same structure, both constructing convolutional neural networks based on residual connections; for example... Figure 2 As shown, this invention employs two types of residual modules: a basic residual module and a downsampling residual module. In the figure, (C, H, W) represent the number of channels, height, and width of the input representation, respectively. Both modules contain two 3×3 2D convolutional layers, two batch normalization layers, and two ReLU activation functions. The basic residual module maintains the same output representation size as the input representation, using skip connections to directly map the input representation to the output and add it to the output representation. Conversely, the downsampling residual module compresses the height and width of the output representation compared to the input representation, while increasing the number of channels. It uses a 1×1 2D convolutional layer to downsample the input representation, map it to the output, and add it to the output representation. The overall network result is shown below. Figure 3 As shown, this invention first uses a 7×7 2D convolutional layer to initially compress the input. After integration by a max pooling layer, the input is fed into a series of basic residual modules and downsampling residual modules to fully extract features. Then, a global average pooling layer integrates the information and compresses it to one dimension. After dropout, the features are input into two fully connected layers with activation functions. This invention treats the initial 7×7 2D convolutional layer to the first fully connected layer as a feature extractor, where the activation function of the first fully connected layer is the sigmoid function. The depth features are obtained through the output of the first fully connected layer. The second fully connected layer acts as a classifier to obtain the final output probability, and its activation function is the softmax function.

[0054] Step 4: Define the current iteration number as t; and initialize t = 1;

[0055] Step 5: Let the network parameters of the student model in the t-th iteration be θ(t), and initialize them randomly.

[0056] Let the network parameters of the teacher model in the t-th iteration be...

[0057] Define the current batch as b; and initialize b = 1;

[0058] Step 6, Define b max (t) represents the maximum batch size in the t-th iteration and is initialized; in specific implementation, the number of samples input in each batch is 32, and the total number of training data samples is M, then b max (t) = t * [M / 32], where [M / 32] represents the largest integer not greater than M / 32;

[0059] Step 7: Denoise the enhanced source domain time-frequency sample set Merge the sample set with the enhanced target domain The data is input in batches and sequentially into the student model in the t-th iteration for training.

[0060] Step 7.1: Input the b-th batch of samples into the student model in the t-th iteration for training, and obtain the network parameters θ(t,b) of the student model in the t-th iteration on the b-th batch of samples. Perform a moving average of the network parameters θ(t,b) with the historical network parameters of the previous b batches of samples to obtain the network parameters of the teacher model in the t-th iteration on the b-th batch of samples. In practical implementation, the moving average of network parameters can be expressed as:

[0061]

[0062] In equation (1), α represents a weighting constant, which controls the proportion of the network parameters in the current batch in the integration. Its value will be introduced in step 11 below.

[0063] Step 7.2: Determine if b ≥ b max If (t) is true, it means that the network parameter update of the student model and teacher model in the t-th iteration is completed, and the trained student model and teacher model in the t-th iteration are obtained, and step 8 is executed; otherwise, after assigning b+1 to b, return to step 7.1 to execute sequentially.

[0064] Step 8: Enhance the source domain samples The student model trained in the t-th iteration is input into the feature extractor and classifier, and after processing, the source domain sample depth features v in the t-th iteration are obtained. S (t) and the source domain sample output probability p S (t);

[0065] Enhance the target domain sample The student model trained in the t-th iteration is input into the feature extractor and classifier, and after processing, the target domain sample depth features v in the t-th iteration are obtained. T (t) and the target domain sample output probability pT (t); the detailed flowchart is as follows: Figure 4 As shown, for intuitive understanding, when I T =1, v in the diagram T (t) is represented as v LT , will p T (t) is represented as p LT ; when I T =0, v in the diagram T (t) is represented as v UT , will p T (t) is represented as p UT ;

[0066] Step 9, with v S (t) and v T The feature alignment loss L for the t-th iteration is constructed based on the data distribution differences in the feature space where (t) is located. FA (t);

[0067] In practice, the Maximum Mean Discrepancy (MMD) is used to measure the data distribution discrepancy; MMD can be expressed as:

[0068]

[0069] In equation (2), n S With n T Let H and φ(·) represent the number of samples in the source and target domains respectively in a training batch, H represent a reproducing kernel Hilbert space, and φ(·) be the corresponding kernel distance mapping. In practical applications, the squared value of MMD is often used as the final measure.

[0070]

[0071] In equation (3), k(·) represents the radial basis function; as shown in equation (3), k(·) represents the radial basis function. Figure 5 As shown, L FA (t) can achieve preliminary global alignment between source domain features and target domain features, thereby roughly transferring knowledge from the source domain to the target domain;

[0072] Step 10: Transfer the source domain sample x S With the target domain sample x T Perform random data augmentation again to obtain new augmented source domain samples. With the new enhanced target domain samples The results are then fed into the teacher model trained in the t-th iteration to obtain the corresponding source domain sample ensemble output probabilities. Integrating output probabilities with target domain samples

[0073] p S (t) and The deviation between and p T (t) and The deviation between them constructs the consistency regularization loss L for the t-th iteration. CR (t);

[0074] In practice, the consistency regularization loss L CR The formula for (t) is as follows:

[0075]

[0076] In equation (4), C represents the number of categories, and in this implementation, C = 2;

[0077] like Figure 5 As shown, feature alignment alone limits the model's ability to distinguish objects in the target domain. Consistency regularization aims to further optimize the decision boundary of the target domain, thereby enhancing the model's ability to distinguish objects in the target domain. Random augmentation, as described in step 3, causes fluctuations in the input space, but this is insufficient to change the sample's class attribute. The original sample and nearby augmented samples are highly similar, and most importantly, they still belong to the same class. By constructing a regularization term to force the neural network to maintain consistency in its judgment of individual samples, it can suggest to the artificial neural network that similar samples should belong to similar classes. Figure 6 As shown, this will cause the decision boundary to fall in the low-density area, thereby improving classification accuracy;

[0078] Step 11: Combine loss functions to optimize the model together;

[0079] Step 11.1: Merge sample set D from the target domain T Find I in T =1 for all target domain samples, and the source domain denoised time-frequency sample set D S Together we construct the cross-entropy loss L for the t-th iteration. CE (t);

[0080] In specific implementation, L CE The formula for (t) is as follows:

[0081]

[0082] exist Figure 4 In the middle, when I T =1, y T For y in the figure LT ;

[0083] Step 11.2: Construct the total loss function L(t) for the t-th iteration using equation (6):

[0084] L(t)=L CE (t)+λL FA (t)+ω(t)L CR (t) (6)

[0085] In equation (6), λ represents the weighting constant, and ω(t) represents the weighting function for the t-th iteration; in this implementation, λ = 0.5; the expression for ω(t) is as follows:

[0086]

[0087] In equation (7), τ represents the cutoff time for the weight increase, and ω max This represents the maximum weight of the unsupervised term; in this implementation, the maximum number of iterations is 100, τ = 30, and ω max =3; In addition, for the weighting constant α in equation (1), when t≤τ, the student model parameters are adjusted rapidly, and the teacher model should forget the previous parameters, so α is set to 0.99; in the remaining stage, the student model parameters are adjusted slowly, and the teacher model should benefit more from historical information, thus becoming more stable, so α is set to 0.999;

[0088] Step 11.3: Based on the total loss function L(t), use the SGD optimizer to update the network parameters θ(t,b) of the student model trained in the t-th iteration to obtain the student model in the (t+1)-th iteration; in specific implementation, the learning rate of the SGD optimizer is set to 0.001;

[0089] Step 12: After assigning t+1 to t, determine if t > t. max If the condition is met, training is complete, yielding the optimal student model and optimal teacher model. The optimal teacher model is then used to classify any EEG signal sample. Otherwise, return to step 6 for sequential execution. In specific implementation, t max The value was set to 50; because the teacher model integrates current and historical information and is more stable, the teacher model was used for subsequent testing.

[0090] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the classification method described above, and the processor is configured to execute the program stored in the memory.

[0091] In this embodiment, a computer-readable storage medium stores a computer program, which, when run by a processor, executes the steps of the above-described classification method.

[0092] The performance of the model is evaluated by the average sensitivity, average false alarm rate and area under the ROC curve for all individuals to be predicted. Sensitivity is the ratio of correctly predicted positive classes to all positive classes. False alarm rate is the average number of times a negative class is predicted as a positive class per hour. The area under the ROC curve is a general indicator for binary classification problems, with a value of 0 to 1. A result of 1 indicates that the model classifies perfectly.

[0093] In specific implementation, to fully verify the effectiveness of the semi-supervised domain adaptation mode proposed in this invention, the performance of this scheme is compared with the performance obtained by the same method in several other cross-individual modes; to verify the superiority of the method designed in this invention, the performance of this scheme is further compared with the performance obtained by other domain adaptation methods under the same semi-supervised domain adaptation mode. As shown in Table 1, Regular (source-only) means: using traditional cross-entropy loss, only using labeled data of known individuals to train the network; Regular (S+LT) means: using traditional cross-entropy loss, only using labeled data of known individuals and the small amount of labeled target domain data mentioned above to train the network; SDA means using the method proposed in this paper, when only using the small amount of labeled target domain data to calibrate the model; MK-MMD and DANN are two state-of-the-art domain adaptation methods that can be used under the same semi-supervised domain adaptation mode.

[0094] Table 1. Prediction performance of different methods on the CHB-MIT dataset

[0095] method Average sensitivity (%) Average false alarm rate ( / hour) Area under the ROC curve Regular (source-only) 54.8 0.758 0.617 Regular (S+LT) 62.6 0.382 0.750 SDA 79.0 0.265 0.812 MK-MMD 74.7 0.338 0.786 DAAN 76.5 0.330 0.790 The method of the present invention 88.8 0.182 0.849

[0096] The results show that due to significant individual variability, the performance of direct cross-individual Regular (source-only) is very poor, and Regular (S+LT) can slightly improve performance but only to a very limited extent. When domain adaptation technology is introduced and calibration is performed using a small amount of labeled target domain data, SDA can significantly improve performance, but it fails to meet expectations. Compared with SDA, the performance of semi-supervised domain adaptation is further significantly improved, with a sensitivity of 88.8%, a false alarm rate of 0.182 / hour, and an AUC of 0.849. This verifies the effectiveness of semi-supervised domain adaptation in utilizing additional unlabeled target domain data for calibration. The baseline performance based on fully supervised learning is significantly reduced, which confirms the high dependence of fully supervised deep learning methods on labeled data. At the same time, under the same semi-supervised domain adaptation mode, the performance of the method proposed in this invention is also significantly better than MK-MMD and DAAN, which verifies the superiority of the strategy of combining feature alignment and consistency regularization. In summary, the effectiveness of the semi-supervised domain adaptation method proposed in this invention has been fully verified, providing a new approach for improving cross-individual generalization ability in EEG signal classification applications.

Claims

1. A semi-supervised adaptive EEG signal classification method, characterized in that, Includes the following steps: Step 1: Obtain labeled EEG signal datasets from different individuals and use them as labeled source domain datasets; obtain EEG signal datasets from target individuals and select a portion of EEG signals for labeling to obtain labeled target domain datasets and unlabeled target domain datasets. All datasets undergo uniform preprocessing including slicing, short-time Fourier transform, and denoising to obtain labeled source domain denoised time-frequency sample sets. Annotated target domain denoising time-frequency sample set and unlabeled denoised time-frequency sample set Among them, the source domain denoising time-frequency sample set Any source domain sample on is denoted as And source domain samples The label is denoted as , , Represents the number of categories; Annotated target domain denoised time-frequency sample set and unlabeled denoised time-frequency sample set Merging yields the target domain merged sample set. Among them, the target domain merges the sample set. Let any target domain sample be denoted as Let the target domain samples The scalar of the label is ,when When, it indicates the target domain sample Denoising time-frequency sample set from unlabeled target domain ,Right now ;when When, it indicates the target domain sample Belongs to the labeled target domain denoising time-frequency sample set ,Right now And the target domain samples The label is denoted as ; Step 2: Use random erasure and Gaussian noise enhancement methods to process the source domain samples respectively. The enhancement is represented as source domain enhancement sample , target domain samples Augmentation is represented as augmentation samples in the target domain. Thus, the enhanced source domain denoised time-frequency sample set is obtained. Merge the sample set with the enhanced target domain ; Step 3: Build a student model based on an artificial neural network, consisting of a feature extractor and a classifier; build a teacher model based on an artificial neural network, consisting of a feature extractor and a classifier. Step 4: Define the current iteration number as... and initialize ; Step 5, let the first The network parameters of the student model in the next iteration are: and randomly initialize ; Order No. Network parameters of the teacher model in the next iteration ; Define the current batch as and initialize ; Step 6, Definition Indicates the first Maximum batch size in the next iteration and initialization; Step 7: Denoise the enhanced source domain time-frequency sample set Merge the sample set with the enhanced target domain Input in batches sequentially to the first The student model is trained in the iteration to obtain the... The student and teacher models trained in the next iteration; Step 7.1, place the first Batch sample input as described in the first The student model is trained in the second iteration and the result is obtained. The student model in the second iteration is at the... Network parameters on batch samples network parameters Compared to the past The historical network parameters of the batch samples are averaged to obtain the first... The teacher model in the second iteration is in the... Network parameters on batch samples ; Step 7.2, Judgment Is it true? If it is true, then the first step is complete. The network parameters of the student and teacher models are updated in the iteration, and the _th_ iteration is obtained. After the student and teacher models are trained in the next iteration, proceed to step 8; otherwise, Assign to Then, return to step 7.1 and execute sequentially; Step 8: Enhance the source domain samples Enter the first In the student model trained in the iteration, after being processed by the feature extractor and classifier, the _th_ and _th_ are obtained respectively. Source domain sample depth features in the next iteration Source domain sample output probability ; Enhance the target domain sample Enter the first In the student model trained in the iteration, after being processed by the feature extractor and classifier, the _th_ and _th_ are obtained respectively. The target domain sample depth features of the next iteration and target domain sample output probability ; Step 9, with and The difference in data distribution in the feature space constructs the first Feature alignment loss in the second iteration ; Step 10: Sample the source domain With target domain samples Perform random data augmentation again to obtain new augmented source domain samples. With the new enhanced target domain samples And input them into the first one respectively. In the next iteration, the trained teacher model yields the corresponding source domain sample ensemble output probability. Integrating output probabilities with target domain samples ; by and Deviation between and and The deviation between them constructs the first Consistency regularization loss in the next iteration ; Step 11: Combine loss functions to optimize the model together; Step 11.1: Merge sample sets from the target domain Find in All target domain samples, and the source domain denoised time-frequency sample set. Together build the first Cross-entropy loss in the next iteration ; Step 11.2: Construct the first... using equation (1) The total loss function of the next iteration : (1) In equation (1), Represents the weighting constant. Indicates the first The weighting function for each iteration; Step 11.3: Based on the total loss function Use the SGD optimizer to update the first The network parameters of the student model trained in the next iteration , obtained the Student model in the next iteration; Step 12, Assign to Then, make a judgment If the condition is met, the training is complete, and the optimal student model and the optimal teacher model are obtained. The optimal teacher model is then used to classify any EEG signal sample. Otherwise, return to step 6 and execute sequentially.

2. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the classification method of claim 1, the processor being configured to execute the program stored in the memory.

3. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to perform the steps of the classification method of claim 1.

Citation Information

Patent Citations

  • Semi-supervised electroencephalogram signal classification method based on consistency regularization

    CN113378673A

  • Domain generalization electroencephalogram signal classification method based on double supervision

    CN115470863A