Privacy-preserving transfer learning method for motor imagery brain-computer interface system
By encapsulating multiple source models in the brain-computer interface system as an API, and using the congruence transformation and tangent space feature extraction technology on the Riemannian manifold, a virtual intermediate domain is constructed, which solves the privacy leakage in transfer learning in the brain-computer interface system. and insufficient recognition accuracy, achieving efficient privacy protection and improved motor imagination recognition accuracy.
Patent Information
- Application Number
- CN202210152391.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-18
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-02-18
AI Technical Summary
Existing brain-computer interface systems have problems of privacy leakage and insufficient recognition accuracy in transfer learning, especially when there is no calibration or little calibration. How to improve the accuracy of motor imagery recognition without leaking the privacy of the source user is an urgent need. solved.
By encapsulating multiple source models into APIs, using the congruence transformation on the Riemannian manifold to align the centers of the covariance matrices of different users' EEG data, extract tangent space features, build a virtual intermediate domain, and train a classifier on this domain. Achieve target user movement imagination category prediction, reduce communication costs, and improve recognition accuracy.
It effectively protects source user privacy, reduces marginal distribution differences, improves motor imagery recognition accuracy, reduces communication costs, simplifies the implementation process, and improves the quality and diversity of source domain models.
Smart Images

Figure CN114564743B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of brain-computer interface and machine learning, and more specifically, relates to a privacy-preserving transfer learning method applied to a motor imagery brain-computer interface system. Background Art
[0002] With the rapid development of cloud computing, big data, machine learning and other technologies, artificial intelligence technology, known as the fourth industrial revolution, is comprehensively and profoundly promoting changes in all aspects of the world's economy and society. Brain-computer interface is a new way of human-computer interaction. It detects and analyzes brain neural activities usually recorded by electroencephalograms through sensors, realizes direct communication between the user's brain and external devices, and can realize auxiliary interaction and rehabilitation training. It is also one of the important supporting technologies for the future metaverse.
[0003] Motor imagery (MI) is a popular paradigm in brain-computer interface, which is to imagine the movement of hands, feet, direction, etc. to control external wheelchairs, drones, etc. The collection of motor imagery data often involves visual prompts for users to imagine their hands, feet, tongue, etc., while the EEG acquisition device records the user's EEG signals to identify the user's movement intention. The common process of processing motor imagery is preprocessing, feature extraction, and classification using machine learning models such as support vector machine (SVM), linear discriminant analysis (LDA), and logistic regression (LR). Feature extraction includes energy features after common spatial pattern (CSP) filtering, tangent space features extracted by tangent space projection technology in Riemannian geometry, etc. The main challenges of brain-computer interface systems are the non-stationarity of EEG signals and the high variability of subjects, which requires regular calibration of users. Transfer learning technology alleviates these problems without or with little calibration. It uses data / models from one or more auxiliary users (called source domains) to promote learning for new users (called target domains). In recent years, transfer learning methods have been developing rapidly in the field of brain-computer interfaces, and many methods have been proposed, such as data alignment, distribution adaptation, deep transfer learning, etc. However, as users and policies pay more attention to privacy issues, how to perform transfer learning without leaking the privacy of the source user is an urgent problem to be solved.
[0004] Passive transfer learning is a technique that can balance cross-user recognition accuracy and privacy protection. For example, Liang et al. realized source domain knowledge transfer by reusing the source network classification layer parameters. However, this method requires a large amount of unlabeled data in the target domain and needs to transfer the model parameters of the auxiliary user, which poses a risk of privacy leakage. Summary of the invention
[0005] In response to the above defects or improvement needs of the prior art, the present invention provides a privacy-preserving transfer learning method applied to a motor imagery brain-computer interface system, which aims to protect the privacy of the source user while improving the motor imagery recognition accuracy.
[0006] To achieve the above objectives, the present invention provides a privacy-preserving transfer learning method applied to a motor imagery brain-computer interface system, comprising:
[0007] S1. Encapsulate multiple source models into APIs;
[0008] S2. Send the target domain data to the API to obtain the category prediction probability of each target domain sample on each source domain model. Based on the category prediction probabilities of different source domain models, quantify the differences in the prediction results of multiple source domain models on each target sample. Select samples and their labels with differences less than a set threshold to construct a virtual intermediate domain.
[0009] S3. Train a classifier on the virtual intermediate domain to predict the target user’s motor imagery category.
[0010] Furthermore, the multiple source models include models trained on the same source domain data set using multiple classifiers; or models trained on different data sets generated by random sampling of source domain data using the same classifier.
[0011] Furthermore, the process of constructing the source domain dataset for training the model is as follows:
[0012] The centers of the EEG data covariance matrices of different users are aligned to the same position through congruence transformation on the Riemann manifold;
[0013] The aligned covariance matrix is projected into tangent space to extract motor imagery related features;
[0014] The features and labels of all source domain users are merged separately to construct the source domain dataset.
[0015] Furthermore, the source inconsistency index is used to quantify the differences in the prediction results of multiple source domain models on each target sample; the calculation expression of the source inconsistency index is:
[0016]
[0017] Where C is the total number of categories, Z is the number of source domain models, and x t,i is the target domain sample, θ z ,θ z′ Represent different source domain models, Represent the target domain samples x t,i Probability output on different source domain models.
[0018] Furthermore, the virtual intermediate domain is {X v , Y v};
[0019] X v are some samples selected from the unlabeled samples in the target domain, X v ={x t,i |SI(x t,i )<ε,i∈[1,n t ]}, ε is the set threshold, n t is the number of samples in the target domain, Y v Labels after voting for multiple source domain models.
[0020] Further, step S3 specifically comprises:
[0021] Using feature adaptation algorithm, the original high-dimensional features of the virtual intermediate domain and the target domain are projected into low-dimensional space;
[0022] A classifier is trained on the low-dimensional intermediate domain to predict the motor imagery category of the target domain.
[0023] Furthermore, the joint discriminant distribution difference between the virtual intermediate domain and the target domain is minimized during the projection process.
[0024] Furthermore, regularization terms and principal component preservation constraints are introduced in the projection process.
[0025] In general, compared with the prior art, the above technical solution conceived by the present invention can achieve the following beneficial effects.
[0026] (1) The present invention generates API interfaces for multiple source domain models, so that new users can only query predictions of their personal data, thereby protecting the privacy of source domain users. The present invention builds a virtual intermediate domain to bridge the data distribution of target users and source domain users, thereby reducing marginal distribution differences, being simple and easy to implement, and improving the accuracy of motor imagery recognition.
[0027] (2) In the process of generating the API interface of the present invention, due to the use of center alignment, the data of different users can be jointly trained, thereby improving the quality of the source domain model; at the same time, ensemble learning is introduced to generate multiple models to improve the diversity of the source domain model; when a new user accesses the API, only one round of query is required, and the communication cost is low.
[0028] (3) The present invention introduces the idea of feature alignment, which reduces the conditional distribution difference between the virtual intermediate domain and the new user, and further improves the accuracy of motor imagery recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A model structure for classifying motor imagery across users in the present invention;
[0030] Figure 2 The detailed process of classifying motor imagery across users for the present invention;
[0031] Figure 3 A training process for cross-user motor imagery classification is performed for the present invention. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0033] The present invention aims to solve the following two problems existing in brain-computer interface.
[0034] First, the accuracy of brain-computer interfaces is poor across subjects: In order to enable new users to use the brain-computer interface system with little or no calibration, cross-subject is a common strategy, that is, using the data of other users collected by the same EEG device to train the model to assist the training of new users. However, since each user has a different reaction pattern to the same motor imagery instruction, the reaction pattern of the same user at different times will also change. Therefore, the model trained on the old user data often performs poorly on new users. The present invention considers cross-user motor imagery classification in an unsupervised scenario, that is, the EEG data from multiple auxiliary users are labeled, but the new user has only a small amount of unlabeled EEG data.
[0035] Second, the privacy protection performance of existing transfer learning methods is limited: most existing transfer learning methods are based on features or instances and require access to source data or features. However, EEG signals contain a variety of private information, such as health status, emotions, mental state, personal identity, etc. With the increasing awareness of people's personal privacy protection and the standardization of relevant laws and regulations, new requirements have been put forward for transfer learning in the current brain-computer interface field. Traditional privacy-preserving machine learning technology requires sacrificing accuracy or communication costs and is difficult to apply to brain-computer interface systems. Therefore, the development of transfer learning technology with privacy protection capabilities is a core issue. The present invention targets unlabeled samples in the target domain, only requires the source domain user to provide a trained model API interface, and only one round of queries are required for the unlabeled samples in the target domain, which reduces costs and improves privacy protection capabilities.
[0036] There have been some studies on transfer learning and privacy-preserving motor imagery BCIs. For example, in [1] H. He, and D. Wu. "Transfer learning for brain–computer interfaces: AEuclidean space data alignment approach." IEEE Transactions on Biomedical Engineering 67.2 (2019): 399-410. A Euclidean space data alignment method was proposed, which uses a congruence transformation to move the Euclidean center of the covariance matrix of EEG signals of different users to the unit matrix to alleviate the marginal distribution (the central difference of the overall distribution). This method requires extracting common spatial pattern filters on the auxiliary user and then transmitting them to the new user; Reference [2] Ju, Ce, et al. "Federated transfer learning for EEG signal classification." Proc. Annual Int'l Conf. of the IEEE Engineering in Medicine & Biology Society, 2020. Federated learning technology is applied to deep transfer learning. This method uses federated averaging technology to update the feature conversion layer and classifier parameters to achieve transfer learning optimization; Reference [3] J. Liang, D. Hu, and J. Feng, "Do we really need to access the source data? Source hypothesis transfer for unsupervised domain adaptation," in Proc. Int'l Conf. on Machine Learning, 2020, pp. 6028–6039. The source domain knowledge transfer is achieved by reusing the source network classification layer parameters and fine-tuning with the target domain unlabeled data.
[0037] Reference [1] has the problem of private data transmission and does not align the conditional distribution of different users (the central difference of different categories), resulting in poor transfer effect in motor imagery recognition; Reference [2] consumes high communication costs and transmits the model parameters of the auxiliary user during the communication process, which poses a risk of privacy leakage and is difficult to deploy in practice; Reference [3] requires a large amount of unlabeled data in the target domain and needs to transmit the model parameters of the auxiliary user, which poses a risk of privacy leakage and is not suitable for motor imagery knowledge transfer.
[0038] The present invention provides a privacy-preserving transfer learning method for a motor imagery brain-computer interface system, comprising:
[0039] 1) Multiple trained models are encapsulated into APIs for target users to query;
[0040] Specifically, the centers of the covariance matrices of EEG data of different users are aligned to the same position through congruence transformation on the Riemann manifold, and then the tangent space features are extracted through the tangent space projection technology, and multiple source domain models are trained using ensemble learning; the tangent space feature extraction uses the covariance matrix of the EEG signal as the sample point on the Riemann manifold, and then the covariance matrix is transformed to the tangent space through projection to calculate the features; the introduction of ensemble learning is used to generate diversified models to improve the robustness of the model to unknown samples.
[0041] Assume that there are K users in the auxiliary source domain, and each user contains n s,k A motor imagery sample. The EEG signal corresponding to a motor imagery task is X s,i ∈R m×l , where m is the number of EEG signal channels, l is the number of signal sampling points, and the covariance matrix of the sample is
[0042] Center alignment, first calculate each user's n s,k The covariance matrix mean M of the samples, the calculation methods of the mean include but are not limited to the Riemann mean, logarithmic Euclidean mean, and Euclidean mean; through P s,i ′=M -1 / 2 P s,i M -1 / 2 Get the aligned covariance matrix, where M -1 / 2 is the reference matrix, and the center of the covariance matrix of different users after alignment is the unit matrix.
[0043] Tangent space feature extraction technology is used to extract the motor imagery pattern information contained in the covariance matrix. s,i ′∈R m×m Projection from the Riemann manifold to the tangent space x s,i =upper(log(P′ s,i ))∈R m(m+1) / 2×1 , where upper(·) represents taking the upper triangular elements of a positive definite matrix. After projection, the original sample is transformed from a 2D matrix into feature data that can be used by common machine learning algorithms. After extracting the tangent space features from each user's sample to construct the sample, all samples of all users are merged to construct the source domain sample set D s ={X s , Y s} to expand the scale of training data.
[0044] like Figure 1As shown in the figure, after each user performs center alignment, extracts the cut space features, and merges the sample sets, multiple source domain models are generated using ensemble learning training. The classification model training strategies mainly include: a) Voting method trains multiple different types of classifiers on the same source domain data set b) Bagging (Bootstrap-aggregation) method uses multiple random sampling techniques with replacement to generate multiple copies of the source domain data set, and trains a certain classifier on each copy, such as support vector machine, linear discriminator, logistic regression and other machine learning models. The trained multiple models are encapsulated into APIs for target users to query. The above steps are all performed locally to avoid user privacy leakage to the cloud or third parties.
[0045] 2) Send the target domain data to the source model API, query the prediction probability of each category, and then calculate the source inconsistency index of each sample in the target domain, and select samples with low source inconsistency to build a virtual intermediate domain;
[0046] like Figure 2 As shown in the figure, when constructing the virtual intermediate domain, we first use the unlabeled dataset D t ={X t} Extract the tangent space features, and then send the data to the source model API for a round of query to obtain each target domain sample x t,i In each source domain model θ z The probability output on (·) The constructed virtual intermediate domain is called D v ={X v , Y v}, where X v are some samples selected from the unlabeled samples in the target domain, Y v Labels after voting for multiple source domain models. X v The selection is based on the source inconsistency index, which is used to measure the divergence of predictions of multiple pre-trained source models on a target sample. The target domain sample with smaller divergence is more suitable for bridging the source domain and the target domain. The index is defined as follows:
[0047]
[0048] Where C is the total number of categories, Z is the number of source models, and the size of this indicator reflects whether a target sample is suitable for selection as a virtual intermediate domain sample. The threshold ε of source inconsistency is defined, and then the virtual intermediate domain can be expressed as X v ={x t,i |SI(x t,i )<ε,i∈[1,n t ]}.
[0049] 3) Train a classifier on the virtual intermediate domain to predict the target user's motor imagery category;
[0050] Preferably, the embodiment of the present invention uses a feature adaptive algorithm to project the original high-dimensional features of the virtual intermediate domain and the target domain into a low-dimensional space, further reducing the distribution difference between the virtual domain and the new user, and then trains a classifier on the low-dimensional intermediate domain to predict the motor imagery category of the new user;
[0051] The feature adaptation algorithm uses the projection matrix A∈R m(m+1) / 2×p The original high-dimensional tangent space feature x s,i ∈R m(m +1) / 2×1 Project it into a low-dimensional space of dimension p, and minimize the difference in the joint discriminant distribution of the virtual intermediate domain and the target domain during the projection process, that is, minimize the following metric,
[0052]
[0053] The first item measures the difference in joint probabilities between the same category with different distributions, and the second item measures the difference in joint probabilities between different categories. Minimizing the above measures can constrain the projected low-dimensional subspace to have good migration and discriminability.
[0054] In addition, some regularization terms are introduced and principal component preservation constraints To ensure that some original geometric characteristics are retained during the dimensionality reduction process. The complete optimization goal is as follows:
[0055]
[0056] This optimization goal can be solved analytically by solving the convex optimization problem. The optimized projection matrix A acts on X v and X t Low-dimensional feature representation can be obtained and
[0057] Then train the classifier on the labeled virtual domain This classifier can be directly used to predict the target user's motor imagery category. The complete knowledge transfer process is as follows: Figure 3 shown.
[0058] In order to verify the effectiveness of the proposed method for motor imagery recognition, we conducted experiments on the same four motor imagery datasets with some existing mainstream methods, and compared and analyzed the accuracy of the target user. A cross-user (leave one user validation) experiment was conducted on each dataset. The auxiliary users and target users used by different methods on the same dataset were exactly the same. The average target domain accuracy of each method on the four datasets is shown in Table 1:
[0059] Table 1
[0060]
[0061] From the above comparison results, it can be seen that in the cross-user motion imagery classification task, compared with CA-JDA, the best method using the original data of the source domain user, the accuracy of the present invention is improved by 3.02%; compared with SHOT, the method using the model parameters of the source domain user, the accuracy of the present invention is improved by 5.23%. In addition, the present invention accesses the source model API by querying, which has stronger privacy protection performance than the method of transmitting original data or model parameters.
[0062] It will be easily understood by those skilled in the art that the above description is only 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 in the protection scope of the present invention.
Claims
1. A privacy-preserving transfer learning method for motor imagery brain-computer interface system, It is characterized in that include: S1. Encapsulate multiple source models into APIs; Multiple source models include models trained on the same source domain data set using multiple classifiers; or models trained on different data sets generated by random sampling of source domain data using the same classifier; The process of constructing the source domain dataset for training the model is as follows: align the centers of the EEG data covariance matrices of different users to the same position through congruence transformation on the Riemann manifold; perform tangent space projection on the aligned covariance matrix to extract motor imagery related features; Merge the features and labels of all source domain users to construct the source domain dataset; S2. Send the target domain data to the API to obtain the category prediction probability of each target domain sample on each source model. Based on the category prediction probabilities of different source models, quantify the differences in the prediction results of multiple source models on each target sample. Select samples and their labels with differences less than the set threshold to construct a virtual intermediate domain. The source inconsistency index is used to quantify the differences in the prediction results of multiple source models on each target sample. The calculation expression of the source inconsistency index is: Where C is the total number of categories, Z is the number of source models, and x t,i is the target domain sample, θ z ,θ z′ Represent different source models, Represent the target domain samples x t,i Probability output on different source models; S3. Train a classifier on the virtual intermediate domain to predict the target user’s motor imagery category.
2. According to claim 1, a privacy-preserving transfer learning method for a motor imagery brain-computer interface system, It is characterized in that The virtual intermediate domain is {X v ,Y v }; X v are some samples selected from the unlabeled samples in the target domain, X v ={x t,i |SI(x t,i )<ε,i∈[1,n t ]}, ε is the set threshold, n t is the number of samples in the target domain, Y v Labels after voting for multiple source models.
3. According to the privacy-preserving transfer learning method for a motor imagery brain-computer interface system according to claim 1, It is characterized in that Step S3 specifically comprises: Using feature adaptation algorithm, the original high-dimensional features of the virtual intermediate domain and the target domain are projected into low-dimensional space; A classifier is trained on the low-dimensional intermediate domain to predict the motor imagery category of the target domain.
4. According to claim 3, a privacy-preserving transfer learning method for a motor imagery brain-computer interface system, It is characterized in that The difference in the joint discriminant distribution of the virtual intermediate domain and the target domain is minimized during the projection process.
5. A privacy-preserving transfer learning method for a motor imagery brain-computer interface system according to claim 3 or 4, It is characterized in that Regularization terms and principal component preservation constraints are introduced in the projection process.
