Cross-subject pain classification method based on electroencephalogram
By screening historical subjects to form a collection of source subjects, and using resting EEG signals and pain EEG characteristics to construct pseudo-label and label prediction models, and performing adaptive transfer learning, the problem of insufficient reliability of pain assessment across subjects is solved, and more efficient pain management is achieved.
Patent Information
- Application Number
- CN202411842229.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-13
AI Technical Summary
The prior art is inadequate in the reliability of pain assessment across subjects, and the data collection pressure is high, making it difficult to adapt to inherent differences between individuals and pain perception differences.
By screening historical subjects to form a collection of source subjects, using resting EEG signals and painful EEG features, pseudo-label and label prediction models are constructed, adaptive transfer learning is performed, data acquisition dependence is reduced, and classification accuracy is improved.
It significantly improves the reliability of pain classification across tests, reduces the pressure of data acquisition, improves the efficiency of clinical applications, and provides a more reliable tool for pain management.
Smart Images

Figure CN119782880A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a cross-subject pain classification method guided by dynamic experimental factors such as pain sensitivity and cognition, and belongs to the field of electroencephalogram (EEG) data assessment. Background Technology
[0002] Existing research has confirmed the feasibility of pain detection using electroencephalography (EEG). Pain level detection is divided into two levels: intra-subject pain prediction, which involves training and testing on the same subject; and cross-subject prediction, which involves training a classifier for one user and then testing it on different subjects. While intra-subject pain assessment is reliable, it requires real pain labels from new subjects, and obtaining pain data from a large number of new users to train a single model is both time-consuming and presents challenges in EEG collection. Furthermore, this method is not suitable for individuals who cannot reliably express their pain perception. Therefore, the need for cross-subject prediction is more urgent in clinical applications. However, due to inherent differences in pain perception and neural responses among individuals, the performance of cross-subject pain prediction is significantly lower than that of intra-subject prediction. Therefore, it is imperative to address the issue of improving the reliability of cross-subject pain assessment.
[0003] Existing research on cross-subject pain assessment is relatively limited, with most methods relying on machine learning. However, machine learning presupposes that the EEG data used for training and testing share the same feature space and follow the same probability distribution. This assumption is often challenged in practice by individual differences, limiting the effectiveness of many models. Individual differences manifest in multiple aspects, including neurophysiological characteristics, pain perception, and expression; therefore, cross-subject pain assessment often faces reliability issues.
[0004] Therefore, in order to effectively improve the reliability of cross-subject pain classification and reduce the pressure of clinical data collection, it is urgent to develop a cross-subject pain classification method in the context of pain. Summary of the Invention
[0005] To address the issue of how to effectively improve the reliability of cross-subject pain classification and reduce the burden of clinical data collection, this invention provides an electroencephalogram-based method for cross-subject pain classification.
[0006] The present invention provides an electroencephalogram-based method for cross-subject pain classification, comprising:
[0007] Using cross-subjects as target subjects, historical subjects are screened based on resting EEG signals in historical datasets. The screened historical subjects are used as source subjects for the target subjects and form a source subject set.
[0008] Based on the pain EEG of the source subject set and the target subject, the pain characteristics of the source subject set and the target subject are obtained;
[0009] A No. 1 label prediction model is trained using the pain features and real labels of the source subject set. The No. 1 label prediction model is then used to predict the pseudo labels of the target subjects. The pain features and pseudo labels of the target subjects are used as the target domain.
[0010] A second-order label prediction model was trained using the pain characteristics of the target subjects and pseudo-labels. This model was then used to predict the pain labels of the source subject set. The classification accuracy was calculated based on the predicted and true labels, and the classification accuracy was ranked from highest to lowest. The top N models were selected. S The pain characteristics and true labels of the source subjects were used as the source domain, N S Set value;
[0011] Adaptive transfer learning is performed using the source domain and the target domain to obtain the prediction results of the target subjects after learning each source domain. These results are then fused to obtain the final prediction result, thus completing the classification.
[0012] As a preferred method, screening historical subjects based on resting EEG signals in historical datasets, and using the screened historical subjects as source subjects for target subjects, includes:
[0013] Obtain resting EEG signals X* mapped from the pain brain regions of the target and historical subjects;
[0014] Calculate the relative power spectral density characteristics of each channel in X*, and identify P statistically significant pain sensitivity features v. p , 1≤p≤P, and form a pain sensitivity feature vector V={v1,…,v P};
[0015] Calculate the pain sensitivity feature vector V of the target subject i And the pain sensitivity feature vector V of historical subject j j Similarity U between i,j ;
[0016] Based on all calculated similarities U i,j Clustering was performed, and the cluster with the highest average similarity after clustering was selected. Historical subjects within each cluster were included. wq The source subject set that constitutes the target subjects 1≤q≤N w N W The source subject set W i The number of historical subjects.
[0017] Preferably, methods for obtaining resting electroencephalogram (EEG) signals X* mapped from the pain brain regions in target and historical subjects include:
[0018] The resting EEG signals of the target subject and the source subject are X∈R N×T The lead field matrix G∈R is obtained by linearly configured single-layer boundary element method. N×D Then, by solving the EEG inverse problem through dynamic statistical parameter mapping, the brain source signal S∈R is obtained. D×T :
[0019] X = GS
[0020] Where D represents the number of brain-derived dipoles, T is the number of time samples, and N is the number of sensors;
[0021] Retain the brain source signals corresponding to the painful brain region from the brain source signal S, and set the remaining non-painful brain source signals to zero to obtain S*, thus obtaining the resting EEG signal X mapped from the painful brain region. * =GS * .
[0022] Preferably, methods for obtaining the pain characteristics of the source subject set and the target subject set based on the pain EEG of the source subject set and the target subject set include:
[0023] Extracting pain-induced EEG signals from pain EEG calculate Relative power spectral density in the Cz channel
[0024]
[0025] in, The subscript band can be delta, theta, alpha, beta, or gamma, indicating The power spectral density in the five frequency bands is as follows: delta is 0.5-4Hz, theta is 4-8Hz, alpha is 8-12Hz, beta is 12-30Hz, and gamma is 31-49Hz.
[0026] Absolute power spectral density
[0027] relative power spectral density Normalization is performed to obtain pain characteristics.
[0028] As a preferred approach, both the No. 1 label prediction model and the No. 2 label prediction model are implemented using the SVM model.
[0029] As a preferred approach, methods for adaptive transfer learning utilizing source and target domains include:
[0030] Minimize the source domain using a balanced distribution adaptive learning method and target domain Based on the distribution differences, the labels of the target subjects are iteratively updated, and the pseudo-labels of the target subjects are used as the initial values of the labels during the iterative update process.
[0031] The labels of the target domain obtained after learning from all source domains are fused together to serve as the predicted classification result for the target subjects.
[0032] As a preferred approach, the labels of the target domain obtained after learning from all source domains are weighted and fused, where the weight is the classification accuracy of the corresponding source domain.
[0033] The beneficial effects of this invention are that it improves the reliability of cross-subject pain classification to address the challenges currently faced in pain assessment. By remapping resting EEG signals in pain-related brain regions and considering cognitive and other dynamic experimental factors influencing pain responses, appropriate source domains are effectively selected, reducing the risk of negative transfer and alleviating the high computational burden of transferring learning across the entire historical subject database. To reduce reliance on labeling EEG signals from new subjects, this invention constructs pseudo-labels. This strategy significantly reduces the pressure of data acquisition, making the method more feasible in clinical applications. This innovation not only improves the efficiency of pain assessment for new subjects in clinical settings but also provides a more reliable tool for future pain management. Furthermore, this invention designs highly representative features driven by pain-evoked responses, which more accurately reflect the nature of pain signals and effectively reduce data bias. Attached Figure Description
[0034] Figure 1 This is a schematic diagram illustrating the principle of the method of the present invention;
[0035] Figure 2 To illustrate the accuracy of pain classification across subjects, (A) represents low pain vs. high pain, and (B) represents low pain vs. moderate pain vs. high pain. Green circles represent the average accuracy rate, and 51 bars represent 51 subjects. The black highlighted bar corresponds to subject number 1, and the bars are numbered clockwise up to 51. Concentric circles from the center outward represent 25%, 50%, 75%, and 100%. Detailed Implementation
[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0038] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0039] This implementation method, based on electroencephalography (EEG), is a cross-subject pain classification method, including:
[0040] Step 1: Identify resting EEG features highly correlated with pain sensitivity in the target subject and all historical subjects in the historical dataset, and filter out historical subjects in the historical dataset who have similar pain responses to the target subject to form the source subject set for the target subject:
[0041] To reduce the time cost of traversing the entire historical subject database in subsequent transfer learning, preliminary subject screening was first conducted based on resting EEG signals.
[0042] Given a resting EEG signal X∈R N×T The lead field matrix G∈R is obtained by linearly configured single-layer boundary element method. N×D Then, by solving the EEG inverse problem through dynamic statistical parameter mapping, the brain source signal S∈R was obtained. D×T .
[0043] X = GS (1)
[0044] Where D represents the number of brain-derived dipoles, T is the number of time samples, and N is the number of sensors.
[0045] The brain source signals corresponding to the painful brain region in S are retained, and the remaining non-painful brain source signals are set to zero, resulting in S*. Subsequently, the resting EEG signal X* mapped from the painful brain region is obtained using (2):
[0046] X * =GS * (2)
[0047] Calculate the relative power spectral density (PSD) of each channel in X*, and combine it with the participants' pain sensitivity labels (low sensitivity, high sensitivity) to identify P statistically significant features v. p , 1≤p≤P, and form the pain sensitivity feature vector V={v1,…,v P These features effectively characterize the subjects' pain sensitivity and are used to subsequently measure the similarity of resting EEG patterns among subjects.
[0048] The pain sensitivity feature vector V of the target subject is calculated according to (3). iAnd the pain sensitivity feature vector V of historical subject j j Similarity U between i,j .
[0049]
[0050] Where ||V i ||and||V j || represent V respectively i and V j The modulus.
[0051] Based on all calculated similarities U i,j Clustering is performed, and the cluster with the highest average similarity after clustering is selected. The historical subjects within the cluster form the source subject set of the target subject; specifically, all U values are calculated. i,j The value will be subjected to K-means clustering, with the number of clusters set to 3. If U in cluster h1 i,j If the average value of the historical subjects w in cluster h1 is greater than that in the other two clusters, then the historical subjects w in cluster h1... q , 1≤q≤N w These are the initial selected source subjects, forming the source subject set. Where N W It is W i The number of historical subjects in the study is expected to have similar pain presentations to the target subject i.
[0052] Step 2: Construct pseudo-labels and optimize the selection of source subjects while taking into account dynamic experimental factors such as cognition;
[0053] First, using the source subject set W i The pain EEG data of the subjects in the study were used to construct pseudo-labels for the target subject i, reducing reliance on labeling pain EEG data from new subjects. Specifically, the NZT method was used to extract pain-evoked EEG signals to enhance the pain representation ability of the original signals. The extracted signals were denoted as... calculate Relative power spectral density in the Cz channel
[0054]
[0055]
[0056] in, The subscript band can be delta, theta, alpha, beta, or gamma, indicating The power spectral density in the five frequency bands is as follows: delta is 0.5-4Hz, theta is 4-8Hz, alpha is 8-12Hz, beta is 12-30Hz, and gamma is 31-49Hz. This represents the absolute power spectral density.
[0057] Then, the target subjects and source subjects set W i All subjects Normalization is performed to obtain pain characteristics. For source subject j, its source domain can be represented as... in and This represents the corresponding pain characteristics and true labels. For target subject i, the target domain can be represented as... in This represents the corresponding pain characteristics. n and m represent the number of samples in the source and target domains, respectively.
[0058] Using the source subject set W i The pain characteristics and true labels are used to train a label prediction model for the target subject i. This label prediction model can be implemented using a machine learning model, specifically a support vector machine (SVM) classification model. Then, this model is used to predict the pseudo-label of pain for the target subject i.
[0059] After identifying the pseudo-label of pain for target subject i, this implementation method further optimizes the approach from the source subject set W, taking into account the influence of cognition and other dynamic experimental factors on pain response. i Selecting suitable source subjects. If the data of two subjects exhibit similar marginal and conditional distributions, they can accurately classify each other without relying on transfer learning. This means that using domain A as the training set and domain B as the test set (and vice versa) should produce satisfactory classification results. Based on this criterion, this implementation utilizes the pseudo-labels of the target subject i from the source subject set W. i The appropriate source domain and its corresponding weights are identified for subsequent transfer learning.
[0060] Specifically, a label 2 prediction model is trained using the pain features and pseudo-labels of the target subject i. The label 2 prediction model employs a novel SVM model, and then the source subject set W is tested. i The source subjects in the dataset, due to the source subject set W i Since the source subjects have known labels, the classification accuracy for each source subject can be calculated. The subjects are ranked from highest to lowest classification accuracy, and the top N are selected. S The subjects, this NS The samples from each source subject are the source domains used for subsequent transfer learning, and the classification accuracy is the weight of each source.
[0061] Step 3: Combine pseudo-labels, structural risk minimization (SRM), and balanced distribution adaptation to reduce the distributional differences between the source and target domains and train the learning process.
[0062] The goal of this step is to minimize the source domain. With the target domain Distribution differences between Therefore, this implementation introduces a balanced distribution adaptive learning method. The source domain is the one selected through the aforementioned two steps. It should be noted that, unlike the soft labeling method in classic papers, this implementation uses pseudo-labels instead when calculating the distribution difference in the initial iteration. These pseudo-labels are then continuously updated in subsequent iterations.
[0063] Step 4, Weighted Fusion:
[0064] For N S The target domain N obtained after learning from the source domains. S Each label represents N. S The labels are weighted and fused, where the weight is the classification accuracy of the corresponding source domain;
[0065] The greater the similarity between the two domains before transfer learning, the more reliable the prediction results obtained after transfer. Therefore, this implementation performs weighted fusion of the labels predicted after learning from each source domain to obtain the final prediction result, where the classification accuracy of each domain in step 2 is N. s Weights of each source domain e∈[1,2,3].
[0066]
[0067] in and These represent the number of predicted labels as 1 (low pain), 2 (moderate pain), and 3 (high pain), respectively.
[0068] To verify the effectiveness of the method proposed in this embodiment, the performance of the method was verified using EEG signals collected under painful stimulation, and compared with 3 methods with the same purpose and 5 mainstream transfer learning techniques, for a total of 8 methods. Figure 2 The accuracy of nine methods across subject pain classification was demonstrated.
[0069] Table 1, except Figure 2 In addition to the accuracy shown, other metrics used to evaluate performance in cross-subject pain classification include...
[0070]
[0071]
[0072] The method proposed in this embodiment achieved the highest cross-subject pain classification accuracy, reaching 90.39% accuracy in binary classification (low pain and high pain) and 75.39% accuracy in triadic classification (low pain, moderate pain, and high pain). In addition to the accuracy of pain intensity classification, Table 1 provides four other evaluation metrics (precision, recall, F1 score, and Kappa score), all of which demonstrate that the method of this embodiment achieved the highest level of cross-subject pain classification. These results clearly demonstrate the significant advantages of this invention in improving the reliability of cross-subject pain intensity classification.
[0073] While the invention has been described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the invention. Therefore, it should be understood that many modifications can be made to the exemplary embodiments, and other arrangements can be designed without departing from the spirit and scope of the invention as defined by the appended claims. It should be understood that different dependent claims and features described herein can be combined in ways different from those described in the original claims. It is also understood that features described in conjunction with individual embodiments can be used in other described embodiments.
Claims
1. A cross-subject pain classification method based on electroencephalogram, characterized in that: The method comprises: Taking the cross-subjects as the target subjects, the historical subjects are screened based on the resting EEG signals in the historical data set, and the screened historical subjects are used as the source subjects of the target subjects to form a source subject set; Obtaining pain characteristics of the source subject set and the target subject according to the pain electroencephalograms of the source subject set and the target subject; The pain features and true labels of the source subject set are used to train a label prediction model No. 1, and the label prediction model No. 1 is used to predict the pseudo labels of the target subject, and the pain features and pseudo labels of the target subject are used as the target domain; The pain characteristics and pseudo labels of the target subjects are used to train the No. 2 label prediction model, and the No. 2 label prediction model is used to predict the pain labels of the source subject set. Based on the predicted labels and true labels, the classification accuracy is calculated, and the classification accuracy is ranked from high to low, and the top N rankings are selected. S The pain features and true labels of the source subjects are used as the source domain, N S is the set value; Adaptive transfer learning is performed using the source domain and the target domain to obtain the prediction results of the target subject after learning each source domain, which are then fused to obtain the final prediction results and complete the classification.
2. The electroencephalogram-based cross-subject pain classification method according to claim 1, characterized in that: The method of screening historical subjects based on resting EEG signals in historical data sets and using the screened historical subjects as source subjects of target subjects includes: Obtain the resting EEG signal X* mapped by the pain brain area of the target subject and the historical subject; Calculate the relative power spectral density features for each channel in X* and identify P statistically significant pain sensitivity features v p , 1≤p≤P, and form the pain sensitivity feature vector V={v1,…,v P }; Calculate the pain sensitivity feature vector V of the target subject i and the pain sensitivity feature vector V of historical subject j j The similarity between i,j ; According to the calculated similarities U i,j Perform clustering and select the cluster with the largest average similarity after clustering. The historical subjects w in the cluster q The set of source subjects that make up the target subject N W is the source subject set W i The number of historical subjects in the.
3. The electroencephalogram-based cross-subject pain classification method according to claim 2, characterized in that: The method for obtaining the resting EEG signal X* mapped by the pain brain area of the target subject and the historical subject includes: The resting EEG signals of the target subject and the historical subject are X∈R N×T , the lead field matrix G∈R is obtained by linear configuration single-layer boundary element method N×D , and then solve the EEG inverse problem through dynamic statistical parameter mapping to obtain the brain source signal S∈R D×T : X=GS Where D represents the number of brain source dipoles, T is the number of time samples, and N is the number of sensors; The brain source signal S corresponding to the painful brain area is retained, and the other non-painful brain source signals are set to zero to obtain S*, and the resting EEG signal X mapped by the painful brain area is obtained. * =GS * .
4. The electroencephalogram-based cross-subject pain classification method according to claim 1, characterized in that: The method for obtaining the pain characteristics of the source subject set and the target subject according to the pain electroencephalograms of the source subject set and the target subject comprises: Extracting pain-evoked EEG signals from pain EEG calculate Relative power spectral density in Cz channel in, The subscript band is delta, theta, alpha, beta, or gamma, indicating The power spectral density in five frequency bands is: delta band 0.5-4Hz, theta band 4-8Hz, alpha band 8-12Hz, beta band 12-30Hz, and gamma band 31-49Hz; Absolute power spectral density Relative power spectral density Normalization was performed to obtain the pain features.
5. The electroencephalogram-based cross-subject pain classification method according to claim 1, characterized in that: Both the No. 1 label prediction model and the No. 2 label prediction model are implemented using the SVM model.
6. The electroencephalogram-based cross-subject pain classification method according to claim 1, characterized in that: Methods for adaptive transfer learning using source and target domains include: Minimizing the source domain using a balanced distribution adaptive learning method and target domain The distribution difference of the target subject is used to iteratively update the label of the target subject, and the pseudo label of the target subject is used as the initial value of the label in the iterative update process; The labels of the target domain obtained after learning in all source domains are fused as the predicted classification results of the target subject.
7. The electroencephalogram-based cross-subject pain classification method according to claim 6, characterized in that: The labels of the target domain obtained after learning all source domains are weighted and fused, where the weight is the classification accuracy of the corresponding source domain.
8. A computer-readable storage device storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the electroencephalogram-based cross-subject pain classification method according to any one of claims 1 to 7 are implemented.
9. An electroencephalogram-based cross-subject pain classification device, comprising a storage device, a processor, and a computer program stored in the storage device and executable on the processor, characterized in that: The processor executes the computer program to implement the steps of the electroencephalogram-based cross-subject pain classification method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the electroencephalogram-based cross-subject pain classification method as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Postoperative acute pain prediction system based on brain-computer interface and deep learning and application of the system
CN111493836A
Electroencephalogram signal classification method based on multi-target domain adaptation and application
CN116340816A
Anesthesia depth monitoring system and method
CN116746885A
Self-adaptive multi-model knowledge migration matrix machine for electroencephalogram signal classification
CN117349700A
Emotion electroencephalogram recognition method of class-level informed discriminator against resistance domain adaptation network
CN117493849A