Self-adaptive calibration method and system for brain-computer interface earphone
Through technologies such as federated learning, active learning and multi-level adaptive fusion network, combined with dynamic parameter optimization and abnormal detection and correction, the problem of brain-computer interface headphone calibration is solved, and a fast, accurate and personalized calibration process is achieved, which improves the stability and user experience of the system.
Patent Information
- Application Number
- CN202411444640.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-03-07
AI Technical Summary
The existing brain-computer interface headphone calibration methods take a long time, have low accuracy, poor generalization ability, and insufficient long-term stability, which seriously restricts the application and promotion of brain-computer interface technology.
Using a combination of federated learning and active learning, a fast, accurate and personalized calibration process is achieved through dynamic parameter optimization and multi-level adaptive fusion network algorithm, and the robustness of the system is improved through anomaly detection and correction mechanisms.
It significantly shortens calibration time, improves accuracy and anti-interference ability, enhances user adaptability and long-term stability, and achieves plug-and-play and high information transmission rates.
Smart Images

Figure CN119576120A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of brain-computer interface technology, and in particular to an adaptive calibration method and system for a brain-computer interface headset. Background Art
[0002] As a cutting-edge field in human-computer interaction, brain-computer interface (BCI) technology has garnered widespread attention from both academia and industry in recent years. With the increasing popularity of wearable devices, BCI headsets, particularly due to their portability and non-invasiveness, have become a hot topic of research. However, the practical application of BCI systems still faces many challenges, one of the most critical of which is how to quickly and accurately calibrate the system to a personalized level.
[0003] Traditional brain-computer interface calibration methods rely primarily on supervised learning with large amounts of labeled data, requiring users to undergo lengthy training sessions, often taking hours or even days to achieve stable performance. This approach is not only time-consuming but also places a significant burden on users, severely impacting user experience and the widespread adoption of the technology.
[0004] To address this issue, researchers have proposed various methods to shorten calibration time. Some scholars have proposed a method based on transfer learning, which pre-trains the model on a large-scale dataset and then fine-tunes it on user-specific data. While this method shortens calibration time to a certain extent, the following issues still exist:
[0005] 1. Privacy issues: Pre-training requires a large amount of user data, which can easily lead to the risk of privacy leakage.
[0006] 2. Poor domain adaptability: The pre-trained model may not be well adapted to the EEG characteristics of a specific user.
[0007] 3. Insufficient real-time performance: Model fine-tuning still requires a certain amount of time and cannot meet the plug-and-play requirements.
[0008] Another common improvement method is to adopt an adaptive learning strategy to adapt to user status changes by updating model parameters in real time. However, this method still has the following limitations:
[0009] 1. Low sample efficiency: A large number of online samples are required to achieve effective adaptation, and initial performance may be unstable.
[0010] 2. Overfitting risk: Rapid adaptation may cause the model to overfit the current state, resulting in reduced generalization ability.
[0011] 3. Lack of robustness: Sensitive to noise and abnormal data, which can easily lead to performance fluctuations.
[0012] In summary, existing technologies for BCI headset calibration still suffer from issues such as long calibration times, low accuracy, poor generalization, and insufficient long-term stability. These issues severely restrict the application and promotion of BCI technology in daily life. Therefore, a new method that can quickly, accurately, and stably perform personalized calibration is urgently needed. Summary of the Invention
[0013] To address these issues, the present invention proposes an innovative method and system for adaptive calibration of brain-computer interface headsets. This method and system aims to improve the ease of use and accuracy of brain-computer interface headsets, enabling them to better adapt to the individual differences of different users.
[0014] The present invention provides an adaptive calibration method for a brain-computer interface headset, comprising the following steps:
[0015] Obtaining electroencephalogram (EEG) data; constructing an initial model through federated learning based on the EEG data; selecting user-specific samples using an active learning strategy; dynamically optimizing parameters of the initial model; performing adaptive personalized calibration based on the results of the dynamic parameter optimization; performing anomaly detection and correction on the results of the adaptive personalized calibration; performing performance evaluation on the results after anomaly detection and correction, and feeding the evaluation results back to the aforementioned steps, wherein the steps form a closed-loop optimization process.
[0016] Specifically, the step of obtaining electroencephalogram data includes:
[0017] EEG signals were collected using a 64-channel high-precision EEG acquisition device with a sampling rate of 1000 Hz;
[0018] Preprocessing the EEG signal includes:
[0019] Apply a 4-45 Hz bandpass filter;
[0020] An improved surface Laplace filtering algorithm is used for spatial filtering;
[0021] Independent component analysis was used to remove artifacts.
[0022] Specifically, the step of constructing the initial model through federated learning adopts an improved federated averaging algorithm, including:
[0023] Train the model using local data on each client;
[0024] Aggregate model parameters of all clients on the server;
[0025] Distribute the aggregated model parameters to all clients;
[0026] The improved federated averaging algorithm introduces a dynamic weight allocation mechanism, and the weight calculation formula is:
[0027] w i =softmax(α·q i +β·n i )
[0028] Among them, w i is the weight of client i, q i is the data quality score, n i is the number of data, α and β are adjustable hyperparameters.
[0029] Specifically, the step of selecting user-specific samples using the active learning strategy adopts a multi-dimensional information entropy sampling algorithm, including:
[0030] Calculate the information entropy of each sample in multiple feature dimensions;
[0031] Use the weighted summation method to comprehensively consider the information entropy of each dimension;
[0032] Select the sample with the highest comprehensive information entropy for annotation;
[0033] The information entropy calculation formula is:
[0034] H(X)=-∑p(x i )·log(p(x i ))
[0035] The calculation formula for comprehensive information entropy is:
[0036] H total =∑γ j ·H(X j )
[0037] Among them, H(X j ) is the information entropy of the j-th feature dimension, γ j is the weight of this dimension.
[0038] Specifically, the dynamic parameter optimization step adopts an adaptive gradient clipping optimizer, including:
[0039] Calculate the second moment of the gradient;
[0040] Dynamically adjust the clipping threshold based on the second-order moment of the gradient;
[0041] Clipping gradients exceeding the threshold;
[0042] Apply the clipped gradient to update the parameters;
[0043] Among them, the gradient clipping threshold calculation formula is:
[0044]
[0045] The parameter update formula is:
[0046] θ t+1 =θ t -η·clip(g t ,-τ t ,τ t )
[0047] Among them, τ t is the clipping threshold at time t, λ is an adjustable hyperparameter, is the second-order moment estimate of the gradient, ∈ is a small constant, and η is the learning rate.
[0048] Specifically, the adaptive personalized calibration step adopts a multi-level adaptive fusion network algorithm, including:
[0049] Dynamic feature extraction module, where the improved dynamic convolution kernel calculation formula is:
[0050] K(tf)=σ(W k F(t,f)+b k )·G(f)
[0051] Among them, K(t,f) is the dynamic convolution kernel at time t and frequency f, F(t,f) is the time-frequency domain input feature, G(f) is the frequency modulation function, and the frequency modulation function calculation formula is:
[0052] G(f)=softmax(W f ·f+b f )
[0053] Hierarchical spatiotemporal attention mechanism, where the temporal attention weight is calculated as:
[0054]
[0055] The spatial attention weight is calculated as:
[0056]
[0057] The final attention weight is:
[0058] α=λ·α t +(1-λ)·α s
[0059] Among them, λ is a learnable trade-off parameter;
[0060] Recursive Bayesian update module, where the nonlinear observation model is:
[0061] yt =h(θ t )+v t
[0062] h(θ t )=tanh(W h ·θ t +b h )
[0063] The adaptive noise estimate is:
[0064] R t =ρ·R t-1 +(1-ρ)·(y t -h(θ t-1 )) 2
[0065] The parameter update formula is:
[0066] θ t =θ t-1 +K t (y t -h(θ t-1 ))
[0067]
[0068] P t =(IK t H t )P t-
[0069] Among them, h(·) is the nonlinear observation function, v t is the observation noise, R t is the observation noise covariance of the adaptive estimate, and is the forgetting factor.
[0070] Specifically, the anomaly detection and correction step uses a multimodal variational autoencoder, including:
[0071] Encoder network:
[0072] μσ=Encoder(x)
[0073] z=μ+∈·σ,∈~N(0,I)
[0074] Decoder network:
[0075] x′=Decoder(z)
[0076] Reconstruction loss:
[0077] L recon =||xx′|| 2
[0078] KL divergence:
[0079] L KL =KL(N(μ,σ)||N(0,I))
[0080] Anomaly score calculation:
[0081] S anomaly =w1·L recon +w2·L KL
[0082] Where x is the input data, z is the latent variable, μ and σ are the mean and standard deviation of the latent variable, respectively, and w1 and w2 are weight coefficients. When an anomaly is detected, the following anomaly correction strategy is executed:
[0083] Recollect data near the abnormal area;
[0084] Use surrounding normal data points to interpolate and fill in abnormal areas;
[0085] The interpolation formula is:
[0086] x corrected =∑(w i ·x i ) / ∑w i
[0087] w i =exp(-||xx i || 2 / (2σ 2 ))
[0088] Among them, x corrected is the corrected data point, x i is the surrounding normal data point, w i is the distance-based weight.
[0089] Specifically, the performance evaluation step adopts a multi-objective dynamic evaluation framework, including:
[0090] Calculation accuracy:
[0091]
[0092] Calculate the information transmission rate:
[0093]
[0094] Get user experience score: UX, based on a questionnaire, ranging from 0 to 100
[0095] Calculate the overall performance score: S overall=β1·Acc+β2·norm(ITR)+β3·norm(UX)
[0096] Among them, TP, TN, FP, and FN are true positive, true negative, false positive, and false negative respectively, N is the number of categories, P is the accuracy, T is the time for each decision (seconds), norm() is the normalization function, β1, β2, and β3 are weight coefficients, satisfying
[0097] ∑β i =1.
[0098] Specifically, the feedback step includes:
[0099] When S overall When <θ1, increase the active learning sampling rate;
[0100] When θ1≤S overall When <θ2, fine-tune the λ parameter in the multi-level adaptive fusion network algorithm;
[0101] When S overall When ≥θ2, the current parameter settings are maintained; θ1 and θ2 are preset performance thresholds.
[0102] A brain-computer interface headset adaptive calibration system for implementing the method comprises:
[0103] A data acquisition module is used to obtain electroencephalogram (EEG) data; a federated learning module is used to build an initial model based on the EEG data; an active learning module is used to select user-specific samples; a parameter optimization module is used to dynamically optimize the parameters of the initial model; a personalized calibration module is used to perform adaptive personalized calibration based on the results of the dynamic parameter optimization; an anomaly detection and correction module is used to detect and correct anomalies on the results of the adaptive personalized calibration; a performance evaluation and feedback module is used to perform performance evaluation on the results after anomaly detection and correction, and to feed the evaluation results back to other modules, wherein a closed-loop optimization process is formed between the modules.
[0104] The beneficial effects of the present invention are mainly reflected in the following aspects:
[0105] 1. Significantly shortened calibration time: By combining federated learning and active learning, this method reduces calibration time from 45 minutes with traditional methods to approximately 5 minutes, increasing efficiency by nearly 9 times. This significantly lowers the user barrier to entry and improves product practicality.
[0106] 2. Improved Accuracy: Utilizing the Multi-Level Adaptive Fusion Network (MAFN) algorithm, the present invention achieves an accuracy of 95.8%, an 8.6 percentage point improvement over traditional methods. This means users can control their devices more precisely, significantly improving the user experience.
[0107] 3. Enhanced anti-interference capability: Through a hierarchical spatiotemporal attention mechanism and anomaly detection and correction module, the present invention can maintain high performance in the presence of external noise interference, with an anti-interference capability score of 8.7 out of 10, far exceeding the 5.2 of traditional methods. This allows the brain-computer interface headset to be used reliably in more complex environments.
[0108] 4. Improved User Adaptability: The introduction of federated learning enables the system to learn common patterns from multi-user data while protecting user privacy. This invention achieved a performance stability score of 9.2 out of 10 across different users, significantly improving the product's universality.
[0109] 5. Extended long-term stability: Thanks to dynamic parameter optimization and continuous performance evaluation and feedback mechanisms, this method can maintain stable performance for 28 days, four times that of traditional methods. This means users can use the device stably for a long time without frequent recalibration.
[0110] 6. Improved Information Transmission Rate: The information transmission rate (ITR) of the present invention reaches 42.3 bits / min, which is 48% higher than that of the traditional method. This not only reflects the higher accuracy, but also shows a significant improvement in system response speed.
[0111] 7. Protecting user privacy: By adopting federated learning technology, this invention effectively protects user privacy data while utilizing multi-user data to improve model performance, meeting current strict data protection requirements.
[0112] 8. Plug and play: The fast calibration process and high adaptability enable the present invention to achieve plug and play of brain-computer interface headsets, greatly improving the convenience and user-friendliness of the product.
[0113] In summary, this invention, through the innovative integration of multiple advanced technologies, comprehensively addresses key issues in the existing BCI headset calibration process, achieving significant breakthroughs in calibration time, accuracy, stability, and other aspects. These improvements not only enhance the practicality of BCI technology but also lay a solid foundation for its widespread application in daily life, medical rehabilitation, education and training, and other fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0114] Figure 1 This is a flow chart of an adaptive calibration method for a brain-computer interface headset of the present invention.
[0115] Figure 2 This is a schematic diagram of the framework principle of the adaptive calibration system of the brain-computer interface headset of the present invention.
[0116] Figure 3This is a schematic diagram of the framework of the personalized calibration module of the present invention. DETAILED DESCRIPTION
[0117] To further illustrate the technical means and effects employed by the present invention to achieve its intended objectives, the following detailed description, along with the accompanying drawings and preferred embodiments, includes a detailed description of the specific implementations, structures, features, and effects thereof. In the following description, references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0118] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0119] The present invention provides an adaptive calibration method for a brain-computer interface headset and a corresponding system. The method includes the following steps: obtaining electroencephalogram (EEG) data, constructing an initial model based on the EEG data through federated learning, selecting user-specific samples using an active learning strategy, dynamically optimizing the parameters of the initial model, performing adaptive personalized calibration based on the results of the dynamic parameter optimization, detecting and correcting anomalies in the adaptive personalized calibration results, and performing performance evaluation on the results of the anomaly detection and correction, with the evaluation results fed back to the aforementioned steps. These steps form a closed-loop optimization process that continuously improves the performance and user experience of the brain-computer interface headset.
[0120] Please refer to Figure 1 , the technical solution of the present invention is clearly and completely described below in conjunction with specific embodiments.
[0121] In a typical application scenario, a user uses a new brain-computer interface headset to control smart home devices for the first time. Traditional methods may require users to undergo lengthy training and calibration, but the method provided by this invention can greatly simplify this process and improve the user experience.
[0122] 1. Obtaining EEG data: When a user puts on a BCI headset, the system first needs to acquire the user's EEG data. This system uses a 64-channel, high-precision EEG acquisition device (model: BrainAmpDC, Brain Products GmbH) with a sampling rate of 1000Hz. This high sampling rate captures subtle EEG signal changes, providing high-quality raw data for subsequent analysis.
[0123] During the acquisition process, users are required to remain relaxed and avoid large body movements. The system will guide users to perform some simple mental tasks, such as imagining moving their left or right hand, to stimulate specific EEG activity patterns.
[0124] After obtaining the raw EEG data, the system performs the following preprocessing steps:
[0125] a) Bandpass filtering: A 4-45 Hz bandpass filter is used to remove low-frequency drift and high-frequency noise. This frequency range covers most EEG wave bands associated with cognitive activity, such as theta (4-8 Hz), alpha (8-13 Hz), beta (13-30 Hz), and low gamma (30-45 Hz) waves.
[0126] b) Spatial filtering: An improved surface Laplacian (SL) filtering algorithm is used to improve spatial resolution. SL filtering can effectively reduce volume conduction effects and enhance the signal strength of local EEG activity. The improved SL algorithm takes into account the actual distance between electrodes and can better handle irregular electrode arrangements than traditional SL algorithms.
[0127] c) Artifact Removal: Independent Component Analysis (ICA) is used to remove artifacts such as electrooculography and electromyography. ICA decomposes mixed signals into statistically independent components. By identifying and removing components representing eye movements and muscle activity, it effectively cleans EEG data.
[0128] 2. Build an initial model using federated learning based on EEG data. To quickly build an initial model suitable for a new user, the present invention uses an improved Federated Averaging (FedAvg) algorithm. This method allows the system to use existing user data to train the model while protecting user privacy.
[0129] The specific steps are as follows:
[0130] a) Local model training: Each registered user device stores a local model. When a new user joins, the system trains the model using their data on each local device. This process is done locally on the user device; the original data is not uploaded to the central server.
[0131] b) Model aggregation: The central server collects the model parameters (not the original data) uploaded by all devices participating in the training and performs weighted averaging.
[0132] c) Model update: The aggregated model parameters are distributed to all clients, including the devices of new users.
[0133] The present invention introduces a dynamic weight allocation mechanism based on the traditional FedAvg algorithm. The weight calculation formula is:
[0134] w i =softmax(α·q i +β·n i )
[0135] Among them, w i is the weight of client i, q i is the data quality score (range 0-1, determined by factors such as the signal-to-noise ratio and completeness of the data), n i is the number of data, α and β are adjustable hyperparameters (usually α is in the range of 0.5-2, and β is in the range of 0.1-0.5). The softmax function is used to normalize the weights.
[0136] This dynamic weight distribution mechanism prioritizes the contribution of high-quality data while not neglecting clients with large amounts of data, thereby achieving a balance between model performance and training efficiency.
[0137] 3. Utilizing an active learning strategy to select user-specific samples. To quickly adapt to the characteristics of new users, this paper uses a multi-dimensional information entropy sampling (MIES) algorithm to select the most informative samples for labeling. This approach can significantly reduce the number of labeled samples required and accelerate the personalization process.
[0138] The specific steps of the MIES algorithm are as follows:
[0139] a) Calculate the information entropy of each sample in multiple feature dimensions. For EEG signals, the feature dimensions we consider include time domain features (such as mean and variance), frequency domain features (such as the energy of each frequency band), and time-frequency domain features (such as wavelet coefficients).
[0140] The calculation formula of information entropy is:
[0141] H(X)=-∑p(x i )·log(p(x i ))
[0142] Among them, p(x i ) is the feature X value x i In practice, we estimate p(x i ). b) Use the weighted summation method to comprehensively consider the information entropy of each dimension. The formula for calculating comprehensive information entropy is:
[0143] H total =∑γ j ·H(X j )
[0144] Among them, H(X j ) is the information entropy of the j-th feature dimension, γ j The weight of this dimension is set based on prior knowledge and empirical data. Usually, the weight of time-frequency domain features is slightly higher (such as 0.4), while the weights of time domain and frequency domain features are relatively low (such as 0.3 each).
[0145] c) Select samples with the highest comprehensive information entropy for labeling. In practice, we select the top 10% of samples with the highest comprehensive information entropy and request them to be labeled by the user. These samples typically represent edge cases or unique patterns in the user's EEG signals and are crucial for improving the model's generalization and robustness.
[0146] 4. Dynamic parameter optimization of the initial model. To enable the model to quickly adapt to the user's specific mode, the present invention uses the Adaptive Gradient Clipping Optimizer (AGCO) for dynamic parameter optimization. AGCO can effectively deal with the gradient explosion problem while maintaining the model's rapid learning ability.
[0147] AGCO's specific steps are as follows:
[0148] a) Calculate the second moment of the gradient. Before each parameter update, we calculate the gradient g t Exponential Moving Average
[0149]
[0150] Where β is a decay factor, usually set to 0.99
[0151] b) Dynamically adjust the clipping threshold according to the second-order moment of the gradient. Clipping threshold τ t The calculation formula is:
[0152]
[0153] where λ is an adjustable hyperparameter, typically between 0.1 and 1, and ∈ is a small constant (such as 1e-8) for numerical stability.
[0154] c) Clip the gradient that exceeds the threshold. We use the following function to clip the gradient:
[0155] clip(g t ,-τ t ,τ t )=min(max(g t ,-τ t ),τ t )
[0156] d) Apply the clipped gradient to update the parameters. The parameter update formula is
[0157] θ t+1 =θ t -η·clip(g t ,-τ t ,τ t )
[0158] Where η is the learning rate, which is usually initially set to 0.001 and dynamically adjusted according to the training process.
[0159] This dynamic parameter optimization method can adaptively handle gradients of different magnitudes, effectively preventing the gradient explosion problem while maintaining rapid learning capabilities.
[0160] 5. Based on the results of dynamic parameter optimization, adaptive personalized calibration is performed. This step is the core of the entire method and uses the Multi-Level Adaptive Fusion Network (MAFN) algorithm for adaptive personalized calibration. The MAFN algorithm consists of three innovative modules: a dynamic feature extraction module 51, a hierarchical spatiotemporal attention mechanism 52, and a recursive Bayesian update module 53.
[0161] 5.1 Dynamic feature extraction module, this module uses improved dynamic convolution kernel technology and introduces a frequency adaptive mechanism. The calculation formula of the dynamic convolution kernel is:
[0162] K(tf)=σ(W k F(t,f)+b k )·G(f)
[0163] Among them, K(t,f) is the dynamic convolution kernel at time t and frequency f, F(t,f) is the time-frequency domain input feature, σ is the activation function (such as ReLU), W k and b k is a learnable parameter. G(f) is the frequency modulation function, and its calculation formula is:
[0164] G(f)=softmax(W f ·f+b f )
[0165] W f and b f This design allows the model to dynamically adjust the convolution kernel according to the importance of different frequencies, thereby better capturing the spectral characteristics of EEG signals.
[0166] 5.2 Hierarchical Spatiotemporal Attention Mechanism
[0167] Temporal attention weight calculation:
[0168]
[0169] Spatial attention weight calculation:
[0170]
[0171] Final attention weights:
[0172] α=λ·α t+(1-λ)·α s
[0173] Among them, h t and h s are the hidden states in time and space dimensions, W t 、W s 、V t 、V s 、b t and b s is a learnable parameter, and λ is a learnable trade-off parameter.
[0174] This hierarchical attention mechanism can simultaneously consider the temporal dynamics and spatial distribution of EEG signals, improving the model's interpretability and performance.
[0175] 5.3 Recursive Bayesian update module, which introduces a nonlinear observation model and adaptive noise estimation to better handle the nonlinear and non-stationary characteristics of EEG signals.
[0176] Nonlinear observation model:
[0177] y t =h(θ t )+v t
[0178] h(θ t )=tanh(W h ·θ t +b h )
[0179] Adaptive noise estimation:
[0180] R t =ρ·R t-1 +(1-ρ)·(y t -h(θ t-1 )) 2
[0181] Parameter update formula:
[0182] θ t =θ t-1 +K t (y t -h(θ t-1 ))
[0183]
[0184] P t =(IK t H t )P t-
[0185] Among them, θt is the parameter estimate at time t, y t is the observed value, v t is the observation noise, R t is the observation noise covariance of the adaptive estimate, ρ is the forgetting factor (usually set between 0.95 and 0.99), K t is the Kalman gain, P t is the estimated error covariance matrix, H t is the observation matrix.
[0186] This recursive Bayesian update method can adjust model parameters in real time, quickly adapt to user state changes, and improve the accuracy and stability of calibration.
[0187] 6. To ensure the reliability of the calibration results, we use a multimodal variational autoencoder (MVAE) to detect and correct anomalies in the adaptive personalized calibration results. MVAE can simultaneously process EEG signal features in the time, frequency, and time-frequency domains, improving the accuracy of anomaly detection.
[0188] The structure and calculation process of MVAE are as follows:
[0189] Encoder network:
[0190] μσ=Encoder(x)
[0191] z=μ+∈·σ,∈~N(0,I)
[0192] Decoder network: x′=Decoder(z) reconstruction loss:
[0193] L recon =||xx′|| 2
[0194] KL divergence:
[0195] L KL =KL(N(μ,σ)||N(0,I))
[0196] Anomaly score calculation:
[0197] S anomaly =w1·L recon +w2·L KL
[0198] Among them, x is the input data (including time domain, frequency domain and time-frequency domain features), z is the latent variable, μ and σ are the mean and standard deviation of the latent variable respectively, w1 and w2 are weight coefficients (usually w1 is set to 0.7-0.8, w2 is set to 0.2-0.3). When an anomaly is detected (i.e. S anomalyIf the sample exceeds a preset threshold, usually set to the 95% quantile of the sample anomaly score distribution, the system will execute the following anomaly correction strategy:
[0199] a) Local resampling: re-collect data near the abnormal area. Specifically, the system prompts the user to repeat the brain control command that caused the abnormality and re-collect EEG data within a time window of ±500ms.
[0200] a) Adaptive interpolation: Use surrounding normal data points for interpolation to fill in abnormal areas. The interpolation formula is:
[0201] x corrected =∑(w i ·x i ) / ∑w i
[0202] w i =exp(-||xx i || 2 / (2σ 2 ))
[0203] Among them, x corrected is the corrected data point, x i is the surrounding normal data point, w i is the distance-based weight. σ is an adjustable parameter that controls how quickly the weight decays with distance and is typically set to 1 / 3 the size of the anomaly region.
[0204] This anomaly detection and correction mechanism can effectively identify and handle anomalies during the calibration process and improve the robustness of the system.
[0205] 7. Evaluate the performance of the anomaly detection and correction results and feed the evaluation results back to the previous steps:
[0206] The present invention adopts a multi-objective dynamic evaluation framework (MDEF) to perform performance evaluation, comprehensively considering accuracy, information transmission rate and user experience.
[0207] The specific evaluation indicators are as follows:
[0208] a) Accuracy:
[0209]
[0210] Among them, TP, TN, FP, and FN are true positive, true negative, false positive, and false negative, respectively.
[0211] b) Information Transmission Rate (ITR):
[0212]
[0213] Where N is the number of categories (e.g., N = 2 for a binary classification task), P is the accuracy, and T is the time it takes to make a decision (in seconds).
[0214] c) User Experience (UX) Score: Based on a questionnaire, the score ranges from 0 to 100. The questionnaire includes dimensions such as ease of use, comfort, and responsiveness. The score for each dimension is obtained using a 5-point Likert scale and then normalized to a range of 0 to 100.
[0215] Comprehensive performance score calculation:
[0216] S overall =β1·Acc+β2·norm(ITR)+β3·norm(UX)
[0217] Among them, norm() is a normalization function that normalizes ITR and UX to the range of 0-1. β1, β2, and β3 are weight coefficients that satisfy ∑β i = 1. Usually β1 is set to 0.4-0.5, and β2 and β3 are set to 0.25-0.3 respectively.
[0218] Based on S overall The system will automatically adjust the key parameters in the previous steps:
[0219] a) When S overall When θ<θ1 (θ1 is usually set to 0.6), increase the active learning sampling rate. Specifically, increase the proportion of samples selected in the MIES algorithm from 10% to 15%.
[0220] b) When θ1≤S overall When θ<θ2 (θ2 is usually set to 0.8), fine-tune the λ parameter in the MAFN algorithm. The adjustment range of λ is ±0.1, and the adjustment direction is based on the relative performance of temporal and spatial attention weights.
[0221] c) When S overall When ≥θ2, the current parameter settings remain unchanged.
[0222] This dynamic evaluation and feedback mechanism enables the system to continuously optimize itself and adapt to the specific needs of users and changes in the usage environment.
[0223] Please refer to Figure 2-3 The present invention also provides a brain-computer interface headset adaptive calibration system for implementing the above method, comprising the following modules:
[0224] Data Acquisition Module 1: Responsible for acquiring EEG data. This module includes a 64-channel high-precision EEG acquisition device and corresponding signal preprocessing unit.
[0225] Federated learning module 2: Builds an initial model based on EEG data. This module includes a local training unit, a model aggregation unit, and a model update unit.
[0226] Active learning module 3: used to select user-specific samples. This module implements the MIES algorithm, including an information entropy calculation unit and a sample selection unit.
[0227] Parameter Optimization Module 4: Dynamically optimizes the parameters of the initial model. This module implements the AGCO algorithm, including a gradient calculation unit, a threshold adjustment unit, and a parameter update unit.
[0228] Personalized calibration module 5: performs adaptive personalized calibration. This module implements the MAFN algorithm and includes a dynamic feature extraction unit 51, a hierarchical attention unit 52, and a recursive Bayesian update unit 53.
[0229] Anomaly Detection and Correction Module 6: Detects and corrects anomalies in the results of adaptive personalized calibration. This module implements the MVAE algorithm, including an encoder, a decoder, an anomaly score calculation unit, and a correction strategy execution unit.
[0230] Performance Evaluation and Feedback Module 7: This module performs performance evaluation on the results of anomaly detection and correction and feeds the evaluation results back to other modules. This module implements the MDEF framework, including a multi-metric evaluation unit and a parameter adjustment unit.
[0231] These modules are tightly connected through data and control flows, forming a closed-loop optimization system. The system can be deployed on wearable devices with sufficient computing power, such as smartphones or dedicated neural signal processors.
[0232] The brain-computer interface headset adaptive calibration method and system of the present invention realizes a fast, accurate and personalized calibration process by innovatively combining multiple advanced technologies. This method can effectively solve the problems of traditional calibration methods such as long time consumption, low accuracy and poor generalization, and greatly improves the ease of use and performance of brain-computer interface headsets. In actual applications, users only need to wear headphones and perform simple tasks for a few minutes, and the system can quickly establish a personalized EEG signal decoding model, allowing users to control smart devices more naturally and accurately through thinking. The application of this technology will greatly promote the popularization and development of brain-computer interface technology in daily life, medical rehabilitation, education and training and other fields.
[0233] To verify the superiority of the present invention, we conducted a set of comparative experiments, including one embodiment and three comparative examples.
[0234] Example 1 (method of the present invention): The complete adaptive calibration method described in the present invention is adopted, including federated learning, active learning, dynamic parameter optimization, multi-level adaptive fusion network (MAFN), anomaly detection and correction, and performance evaluation and feedback.
[0235] Comparative Example 1: Traditional supervised learning method, using a fixed number of training samples and standard convolutional neural network calibration.
[0236] Comparative Example 2: Using transfer learning methods, the model is first pre-trained on a large-scale dataset and then fine-tuned on user-specific data.
[0237] Comparative Example 3: Use a simplified version of the adaptive method, including active learning and parameter fine-tuning, but excluding federated learning, MAFN, and anomaly detection and correction.
[0238] Test indicators and detection methods:
[0239] 1. Calibration time (minutes): The time required from the user starting to wear the device until the system reaches stable performance.
[0240] 2. Accuracy (%): Use the five-fold cross-validation method to calculate the classification accuracy of the model on the test set.
[0241] 3. Information Transfer Rate (ITR, bit / min): Calculated using the ITR formula described above, this value reflects the information transfer efficiency of the system.
[0242] 4. Anti-interference capability (points): Tested in the presence of external noise interference, the score is based on the degree of performance degradation, with a maximum score of 10.
[0243] 5. User adaptability (score): Tests the differences in system performance among different users. The score range is 0-10, and the smaller the difference, the higher the score.
[0244] 6. Long-term stability (days): The number of days during which the system performance remains stable (accuracy does not decrease by more than 5%) when used continuously.
[0245] The test results are shown in the following table:
[0246] index Example 1 Comparative Example 1 Comparative Example 2 Comparative Example 3 Calibration time (minutes) 5.2 5.3 8.7 12.5 Accuracy (%) 95.8 87.2 91.5 93.1 ITR (bit / min) 42.3 28.6 35.2 38.9 Anti-interference ability (points) 8.7 5.2 7.1 7.8 User adaptability (points) 9.2 6.5 8.3 8.7 Long-term stability (days) 287 14 21 1
[0247] Analysis and interpretation:
[0248] 1. Calibration Time: The proposed method significantly shortens calibration time, being nearly 9 times faster than the traditional method (Comparative Example 1) and 2-3 times faster than other improved methods. This is primarily due to the good initial model provided by federated learning and the efficient sample selection strategy of active learning.
[0249] 2. Accuracy: The proposed method achieved the highest accuracy, 8.6 percentage points higher than the traditional method. This demonstrates the advantages of the MAFN algorithm in feature extraction and fusion, as well as the effectiveness of its anomaly detection and correction mechanism.
[0250] 3. Information Transfer Rate (ITR): The proposed method achieves the highest ITR, a 48% improvement over conventional methods. This not only reflects higher accuracy but also demonstrates improved system response speed, thanks to dynamic parameter optimization and real-time calibration strategies.
[0251] 4. Anti-interference ability: The proposed method performs best, which is mainly attributed to the hierarchical spatiotemporal attention mechanism in MAFN, which can effectively filter external interference, as well as the role of the anomaly detection and correction module.
[0252] 5. User adaptability: The method of the present invention has the most stable performance across different users, which reflects the advantages of federated learning in providing a universal initial model and the effect of adaptive personalized calibration.
[0253] 6. Long-term stability: The method of this invention can maintain stable performance for 28 days, far exceeding other methods. This is mainly due to dynamic parameter optimization and continuous performance evaluation and feedback mechanisms, which enable the system to continuously adapt to subtle changes in user status.
[0254] The method of the present invention performed optimally across all test parameters, with particular strengths in calibration time, accuracy, and long-term stability. These results fully validate the core innovations of the present invention, including:
[0255] 1. The combination of federated learning and active learning greatly shortens the calibration time while ensuring model performance.
[0256] 2. The multi-level adaptive fusion network (MAFN) improves the effect of feature extraction and fusion, and enhances the accuracy and anti-interference ability of the system.
[0257] 3. Dynamic parameter optimization and anomaly detection and correction mechanisms improve the stability and robustness of the system.
[0258] 4. Continuous performance evaluation and feedback mechanism ensures the long-term stability and user adaptability of the system.
[0259] The combined effect of these innovations has significantly improved the practicality, performance and user experience of the brain-computer interface headset adaptive calibration method of the present invention, laying a solid foundation for the widespread application of brain-computer interface technology.
[0260] Based on the above test results, Example 1 (the method of the present invention) was determined to be the best embodiment. It performed optimally across all key metrics, particularly with respect to calibration time and long-term stability, which are crucial for the practical application of brain-computer interface devices. This method not only improved system performance but also significantly enhanced the user experience, bringing brain-computer interface technology closer to the requirements of everyday life applications.
[0261] It should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. An adaptive calibration method for a brain-computer interface headset, characterized in that: The following steps are involved: Obtaining electroencephalogram data; and constructing an initial model through federated learning based on the electroencephalogram data; Select user-specific samples using active learning strategies; Performing dynamic parameter optimization on the initial model; and performing adaptive personalized calibration based on the result of the dynamic parameter optimization; performing anomaly detection and correction on the result of the adaptive personalized calibration; The performance of the results after the anomaly detection and correction is evaluated, and the evaluation results are fed back to the aforementioned steps, wherein the steps form a closed-loop optimization process.
2. The method according to claim 1, characterized in that The step of obtaining electroencephalogram data comprises: EEG signals were collected using a 64-channel high-precision EEG acquisition device with a sampling rate of 1000 Hz; Preprocessing the EEG signal includes: Apply a 4-45Hz bandpass filter; An improved surface Laplace filtering algorithm is used for spatial filtering; Independent component analysis was used to remove artifacts.
3. The method according to claim 1, characterized in that: The step of constructing the initial model through federated learning adopts an improved federated average algorithm, including: Train the model using local data on each client; Aggregate model parameters of all clients on the server; Distribute the aggregated model parameters to all clients; The improved federated averaging algorithm introduces a dynamic weight allocation mechanism, and the weight calculation formula is: w i =softmax(α·q i +β·n i ) Among them, w i is the weight of client i, q i is the data quality score, n i is the number of data, α and β are adjustable hyperparameters.
4. The method according to claim 1, characterized in that: The step of selecting user-specific samples by using an active learning strategy adopts a multi-dimensional information entropy sampling algorithm, including: Calculate the information entropy of each sample in multiple feature dimensions; Use the weighted summation method to comprehensively consider the information entropy of each dimension; Select the sample with the highest comprehensive information entropy for annotation; The information entropy calculation formula is: H(X)=-Σp(x i )·log(p(x i )) The calculation formula of comprehensive information entropy is: H total =∑γ j ·H(X j ) Among them, H(X j ) is the information entropy of the j-th feature dimension, γ j is the weight of this dimension.
5. The method according to claim 1, characterized in that The dynamic parameter optimization step uses an adaptive gradient clipping optimizer, including: Calculate the second moment of the gradient; Dynamically adjust the clipping threshold according to the second-order moment of the gradient; Clip the gradients that exceed the threshold; Apply the clipped gradient to update the parameters; Among them, the gradient clipping threshold calculation formula is: The parameter update formula is: i t+1 =θ t -η·clip(g t ,-t t ,t t ) Among them, τ t is the pruning threshold at time t, λ is an adjustable hyperparameter, is the second-order moment estimate of the gradient, ∈ is a small constant, and η is the learning rate.
6. The method according to claim 1, characterized in that The adaptive personalized calibration step adopts a multi-level adaptive fusion network algorithm, including: Dynamic feature extraction module, where the improved dynamic convolution kernel calculation formula is: K(t,f)=σ(W k ·F(t,f)+b k )·G(f) Among them, K(t,f) is the dynamic convolution kernel at time t and frequency f, F(t,f) is the time-frequency domain input feature, G(f) is the frequency modulation function, and the frequency modulation function calculation formula is: G(f)=softmax(W f ·f+b f ) Hierarchical spatiotemporal attention mechanism, where the temporal attention weight is calculated as: The spatial attention weight is calculated as: The final attention weight is: a=l·a t +(1-λ)·a s Among them, λ is a learnable trade-off parameter; Recursive Bayesian update module, where the nonlinear observation model is: y t =h(θ t )+v t h(θ t )=tanh(W h ·θ t +b h ) The adaptive noise estimate is: R t =ρ·R t-1 +(1-ρ)·(y t -h(θ t-1 )) 2 The parameter update formula is: i t =θ t-1 +K t (y t -h(θ t-1 )) P t =(I-K t H t )P t-1 Among them, h(·) is the nonlinear observation function, v t is the observation noise, R t is the observation noise covariance of the adaptive estimate, and ρ is the forgetting factor.
7. The method according to claim 1, characterized in that The anomaly detection and correction step uses a multimodal variational autoencoder, including: Encoder Network: μ,σ=Encoder(x) z=μ+∈·σ,∈~N(0,I) Decoder network: x′=DDecoder(z) Reconstruction loss: L recon =||x-x′|| 2 KL divergence: L KL =KL(N(μ,σ)||N(0,I) Anomaly score calculation: S anomaly =w1·L recon +w2·L KL Among them, x is the input data, z is the latent variable, μ and σ are the mean and standard deviation of the latent variable respectively, w1 and w2 are weight coefficients; when an anomaly is detected, the following anomaly correction strategy is executed: Re-collect data near the abnormal area; Use surrounding normal data points to interpolate and fill in abnormal areas; The interpolation formula is: x corrected =∑(w i ·x i ) / ∑w i w i =exp(-||x-x i || 2 / (2σ 2 )) Among them, x corrected is the corrected data point, x i is the surrounding normal data point, w i is the distance-based weight.
8. The method according to claim 1, characterized in that The performance evaluation step adopts a multi-objective dynamic evaluation framework, including: Calculation accuracy: Calculate the information transfer rate: Get user experience score: UX, based on questionnaire, range 0-100 Calculate the overall performance score: S overall =β1·Acc+β2·norm(ITR)+β3·norm(UX) Among them, TP, TN, FP, and FN are true positive, true negative, false positive, and false negative, respectively, N is the number of categories, P is the accuracy, T is the time for each decision (seconds), norm() is the normalization function, β1, β2, and β3 are weight coefficients, and ∑β i =1.
9. The method according to claim 8, characterized in that The feedback step includes: When S overall <θ1, increase the active learning sampling rate; When θ1≤S overall <θ2, fine-tune the λ parameter in the multi-level adaptive fusion network algorithm; When S overall ≥θ2, keep the current parameter settings; where θ1 and θ2 are preset performance thresholds.
10. A brain-computer interface headset adaptive calibration system implementing the method according to any one of claims 1 to 9, characterized in that: include: A data acquisition module for obtaining EEG data; A federated learning module, for building an initial model based on the EEG data; Active learning module for selecting user-specific samples; A parameter optimization module, used for dynamically optimizing the parameters of the initial model; a personalized calibration module, used for performing adaptive personalized calibration based on the result of the dynamic parameter optimization; An anomaly detection and correction module is used to perform anomaly detection and correction on the results of the adaptive personalized calibration; a performance evaluation and feedback module is used to perform performance evaluation on the results after the anomaly detection and correction, and feed back the evaluation results to other modules, wherein a closed-loop optimization process is formed between the modules.
Citation Information
Cited By
Key component dynamic abnormal element adjusting system based on 3D laser scanning
CN120031866A
OpenViBE brain-computer interface decoding control method and system driven by efficient channel selection algorithm
CN120295477A
OpenViBE brain-computer interface decoding control method and system driven by efficient channel selection algorithm
CN120295477B