Training method and application of variation data uncertainty analysis model of weak asymmetric visual stimulation

By using Bayesian networks and variational inference methods, the problems of inaccurate calculation of high-dimensional nonlinear data and insufficient threshold adaptability in the classification of EEG signals in existing technologies are solved, and efficient EEG signal classification and discrimination are achieved.

CN120687763BActive Publication Date: 2026-04-21TIANJIN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TIANJIN UNIV
Filing Date
2025-06-05
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing EEG signal classification techniques, uncertainty analysis-based methods suffer from inaccurate calculations when dealing with high-dimensional data and nonlinear relationships, and the threshold settings lack adaptability, leading to a decline in model performance when dynamic data changes.

Method used

By employing a Bayesian network model combined with variational inference, the EEG signals are mapped to a high-dimensional nonlinear space through a feature extraction module. The analytical posterior distribution and variational posterior distribution are calculated using learnable weights and variational distributions. By combining linear regression and random sampling, the uncertainty of the data is quantified and low-quality data is discarded.

Benefits of technology

It achieves accurate discrimination of high-dimensional nonlinear EEG data, improves the accuracy and stability of EEG signal classification, avoids dependence on prior distribution assumptions, and enhances the model's adaptability and the accuracy of discrimination results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687763B_ABST
    Figure CN120687763B_ABST
Patent Text Reader

Abstract

This invention relates to the field of electroencephalogram (EEG) signal classification technology, and discloses a training method and application for an uncertainty analysis model of variable data for weak asymmetric visual stimuli. The method includes acquiring an EEG signal dataset and dividing it into training, testing, and validation sets; constructing and training a Bayesian network model to obtain a feature extraction module, variational prior distribution, and variational posterior distribution; applying the feature extraction module to obtain training and testing feature data; using Bayesian inference to calculate the analytical posterior distribution of each category corresponding to the training feature data; calculating the analytical confidence and analytical variance of each category corresponding to the testing feature data; sampling uncertainty parameters in the variational posterior distribution to obtain multiple variational posterior discrimination matrices; calculating multiple variational confidences corresponding to the testing feature data; and solving for the variational average confidence; based on the variational average confidence, analytical confidence, and their corresponding analytical variance, determining the variability of the EEG signals according to preset rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electroencephalogram (EEG) signal classification technology, and in particular to a training method and application of an uncertainty analysis model for variable data of weak asymmetric visual stimuli. Background Technology

[0002] In recent years, an increasing number of companies and capital have invested in the research and development of brain-computer interface (BCI) products, exploring the commercialization of BCI applications. The commercialization of BCI places higher demands on the reliability, stability, and ease of use of the entire BCI product. It faces many obstacles rarely encountered in laboratory environments, one significant obstacle being the variability problem. A key assumption of learning-based methods is that training and test data have the same feature distribution. If the test data features are outside the training set's feature distribution or located in a sparse region of the training set's features, the model tends to make incorrect decisions based on such test data. Furthermore, the non-stationary nature of electroencephalogram (EEG) signals often fails to meet these assumptions, leading to reduced performance of EEG-based BCI systems.

[0003] Uncertainty analysis-based methods model the distribution of the training set and quantify the discrimination uncertainty of the observed data. This allows for the capture of the deviation of the observed data relative to the training set, proactively discarding some low-quality, variable data with large deviations from the training set, thereby improving model performance or efficiency. Uncertainty analysis can improve the quality of test data and is a highly promising research direction for reducing the impact of EEG signal variability on system performance in BCI (Brain-Induced Computation).

[0004] Currently, most uncertainty analysis methods use Bayesian inference to calculate the posterior distribution of the parameter space, and then calculate the uncertainty of the discrimination space to quantify the degree to which out-of-distribution data or sparse region data deviate from the training data in the discrimination space. However, the calculation of the posterior distribution of the parameter space depends on the assumption of the prior distribution. The response of sparse regions or out-of-distribution regions can be affected by the parameterization of the prior distribution, leading to inaccurate estimation of uncertainty.

[0005] Meanwhile, calculating uncertainty in the discriminant space typically employs Bayesian linear regression or Gaussian process regression (Bayesian linear regression involves two processes: inferring the posterior distribution of the parameter space using Bayesian methods, and quantifying uncertainty through Bayesian prediction to obtain the discriminant result; Gaussian process regression is a kernel-based Bayesian linear regression). While these two methods provide a more direct and mathematically rigorous quantification of uncertainty in the discriminant space, they struggle to handle high-dimensional data and nonlinear relationships. This is primarily because Bayesian linear regression, due to inherent algorithmic limitations, cannot actively map to a high-dimensional nonlinear space, potentially leading to information loss and decreased classification or prediction capabilities. Gaussian process regression, while a kernel-based Bayesian linear regression, is highly dependent on the kernel function design; traditional kernel functions may fail to capture the non-stationarity, multi-scale features, or sparse structure of the objective function. Furthermore, variational inference can approximate the uncertainty in the discriminant space, suitable for high-dimensional data and complex nonlinear relationships, but it struggles to accurately calculate the posterior distribution in the parameter space, resulting in inaccurate calculations of uncertainty in the discriminant space.

[0006] Most uncertainty analysis methods require setting thresholds based on prior knowledge as a basis for discarding some low-quality variability data. However, setting thresholds may cause the model to be unable to cope with changes in dynamic data and lack adaptability. Summary of the Invention

[0007] The purpose of this invention is to provide a training method and application for an uncertainty analysis model of variable data for weak asymmetric visual stimuli. This training method can be easily combined with existing deep learning-based EEG decoding algorithms, and can output discrimination results while measuring the uncertainty of observation data.

[0008] To achieve the above objectives, the present invention provides the following technical solution:

[0009] In a first aspect, the present invention provides a method for training a model for analyzing the uncertainty of variational data in the face of weak asymmetric visual stimuli, the method comprising the following steps:

[0010] Obtain the EEG signal dataset, divide it into training, testing and validation sets according to the proportions, and obtain the corresponding discrimination set;

[0011] A Bayesian network model is constructed and trained using a training set to obtain a feature extraction module, a variational prior distribution following a Gaussian distribution, and a variational posterior distribution. The feature extraction module maps EEG signal data from the training set to a high-dimensional nonlinear feature space. The variational prior distribution is composed of multiple custom Gaussian distributions with different variances and zero mean, linearly superimposed with their corresponding learnable weights. The learnable weights are used to measure the contribution of different custom Gaussian distributions to the variational prior distribution. The variational posterior distribution is linearly composed of variational bias, variational weights, and an uncertainty parameter. The variational bias and variational weights are parameters to be learned, and the uncertainty parameter is a hyperparameter.

[0012] The EEG signals in the training set are processed by the feature extraction module to obtain training feature data, and Bayesian inference is used to calculate the analytical posterior distribution of each category corresponding to the training feature data.

[0013] The EEG signals in the test set are processed by the feature extraction module to obtain test feature data. Linear regression is used to calculate the analytical confidence and analytical variance of each category corresponding to the test feature data. The analytical confidence represents the predicted probability of each category corresponding to the test feature data, and the analytical variance represents the degree of uncertainty of the test feature data with respect to the current predicted probability.

[0014] The uncertainty parameters in the variational posterior distribution are randomly sampled to obtain multiple corresponding variational posterior discriminant matrices; multiple variational confidences corresponding to the test feature data are calculated using linear regression, and the variational average confidence is obtained by averaging.

[0015] Based on the variational mean confidence level, analytical confidence level, and their corresponding analytical variance, the variability of the EEG signal is further judged according to preset rules, and the variability is used as the criterion for discarding the EEG data.

[0016] As one possible implementation, training a Bayesian network model using a training set specifically includes: inputting the training set and its corresponding discriminant set into the Bayesian network model to calculate the variational posterior loss, variational antecedent loss, and variational likelihood function loss, respectively; and iteratively updating the parameters in the Bayesian network using backpropagation of the aforementioned losses. The parameters to be iteratively updated include: the weights and biases of the feature extraction module in the Bayesian network; the learnable weights of the variational antecedent distribution in the Bayesian network model; and the learnable variational biases and variational weights of the variational posterior distribution in the Bayesian network model.

[0017] One iteration is denoted as one training round, and a total of N training rounds are performed, where N≥2;

[0018] After each training round, the discrimination performance of the trained Bayesian network model is verified using the validation set and its corresponding discriminant set. The accuracy of the validation set is calculated, and the parameters of the Bayesian network model with the highest accuracy are saved.

[0019] As one possible implementation, the variational prior distribution is denoted as... It is obtained by calculation as follows:

[0020]

[0021] in, Indicates generation diagonal matrix, The length of the flattened EEG data after feature extraction by the feature extraction module is given. Further expressed as:

[0022]

[0023]

[0024]

[0025] in, , ... These are learnable weights; , ... For multiple custom Gaussian distributions with different variances; , ... These represent different variances and are preset hyperparameters.

[0026] As one possible implementation, the variational posterior distribution is denoted as... It is obtained by calculation as follows:

[0027]

[0028] in, These are variational bias and partial weight, respectively; For uncertain parameters, ;in , This represents the total number of categories.

[0029] As one possible implementation, the variational posterior loss is denoted as... It is determined by calculation as follows:

[0030]

[0031] in, , They are respectively Elements in;

[0032] Variational prior loss is denoted as It is obtained by calculation as follows:

[0033]

[0034] in, , ... For custom probability density functions of Gaussian distributions with different variances;

[0035] The variational likelihood function loss is denoted as It is obtained by calculation as follows:

[0036]

[0037]

[0038] in, For training set The elements in The discrimination set of the training set In the middle The corresponding element; , for The elements in According to the reparameterization theory , , , These represent the number of leads and the number of sampling points, respectively. This represents the number of trials in the training set.

[0039] As one possible implementation, the following decay strategy is adopted for all variational weights in the variational posterior distribution of the Bayesian network:

[0040] A uniform distribution was obtained using the Xavier method;

[0041] A sample is obtained by randomly sampling from a uniform distribution;

[0042] The variational bias of the variational posterior distribution is initialized using the sample; the variational weight of the variational posterior distribution is initialized to 1.

[0043] The variational bias and variational weights are iteratively updated based on the initial variational bias and variational weights through backpropagation; wherein, as the number of training rounds increases, the decay of the variational weights gradually increases according to the gradient descent method.

[0044] As one possible implementation, Bayesian inference is used to compute the analytical posterior distribution of each category corresponding to the training set data, denoted as . It is obtained by calculation as follows:

[0045]

[0046] in, , A subset of a class in the training set. This is the feature extraction part of the deep learning-based EEG decoding algorithm, used to map EEG data to a high-dimensional nonlinear feature space; Let be the analytical discrimination matrix to be obtained for a certain category. , To determine the concentration and A subset of the corresponding category;

[0047] because and It is irrelevant, therefore it is considered Assuming that all elements in the training set are independent and identically distributed, then the analytical likelihood function of each class in the feature-based parameter space is... The calculation is as follows:

[0048]

[0049] in, for The elements in for The elements in.

[0050] Assume analytical likelihood function It follows a Gaussian distribution, and its variational prior distribution is... If it follows a Gaussian distribution, then the analytic posterior distribution is... It also follows a normal distribution, let , , The results were obtained through Bayesian inference calculations:

[0051]

[0052]

[0053]

[0054] in, Let be the mean of the analytic posterior for each category. Let V be the variance of the analytic posterior for each category.

[0055] As one possible implementation, the analytical posterior distribution is denoted as... , , The analytical confidence score and analytical variance are calculated based on linear regression using the following formulas:

[0056]

[0057]

[0058] in, For the validation set The elements in for Predicted as category The analytical confidence level is denoted as , for The corresponding analytical variance is denoted as This represents the uncertainty in this judgment. Represents flattening operation, Represents the number of trials in the training set. Represents the number of trials performed in combination;

[0059] The variational average confidence level is calculated as follows:

[0060]

[0061]

[0062] because , for Variational posterior discriminant matrix obtained by random sampling , This represents the number of samples taken.

[0063] As one possible implementation method, the preset rule is: ,in, To determine the variational average confidence level of an element in the test set. and Each element is a category The analytical confidence level and the corresponding analytical variance, and These represent the analytical confidence level and the corresponding analytical variance of a given element.

[0064] Secondly, the present invention provides an application of a training method for an uncertainty analysis model of variable data of weak asymmetric visual stimuli. The EEG signal variable data uncertainty analysis model obtained by training the uncertainty analysis model of variable data of weak asymmetric visual stimuli provided by the present invention is configured in an EEG signal processing system to discard highly variable EEG signals.

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

[0066] 1. This invention provides a training method for an uncertainty analysis model of variable data with weak asymmetric visual stimuli. For the assumption of prior distribution, a strong prior and weak prior smoothing method is adopted, combined with Bayesian network adaptive learning of smoothing parameters of prior with different strengths, to avoid the influence of the choice of prior distribution based on experience on the calculation of posterior distribution in parameter space.

[0067] 2. This invention provides a training method for a variable data uncertainty analysis model of weak asymmetric visual stimuli. In the parameter update process of Bayesian networks, the gradients of some parameters follow a Gaussian distribution with a mean of 0 and a variance of 1, which makes it difficult for the model to converge. This invention uses a parameter decay strategy for these parameters with stochastic gradients, making the model training process more stable.

[0068] 3. This invention provides a training method for an uncertainty analysis model of variable data with weak asymmetric visual stimuli. This training method includes a feature extraction module and an uncertainty analysis module. The feature extraction module utilizes the feature extraction portion of existing deep learning-based EEG decoding algorithms to map EEG data to a high-dimensional nonlinear feature space. The uncertainty analysis module calculates the posterior distribution in the feature-based parameter space through Bayesian inference, and then establishes a linear mapping relationship between the discriminant value and the feature through Bayesian linear prediction to calculate the uncertainty in the feature-based discriminant space. This method not only accurately solves for the posterior distribution in the parameter space and provides more rigorous quantification of uncertainty in the discriminant space, but also captures the non-stationarity and multi-scale features of EEG data, resulting in more accurate discrimination results.

[0069] 4. This invention provides a training method for an uncertainty analysis model of variant data for weak asymmetric visual stimuli. This training method comprehensively considers the confidence and uncertainty of each discrimination result in the discrimination space and proposes a variant data screening strategy by combining the idea of ​​ensemble learning, which can screen out high-quality trials without the need for a threshold. Attached Figure Description

[0070] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:

[0071] Figure 1 A flowchart illustrating the training method for a variation data uncertainty analysis model of weak asymmetric visual stimuli provided in an embodiment of the present invention.

[0072] Figure 2 To validate the performance of the 9-lead ShallowNet algorithm combined with uncertainty analysis using three-fold cross-validation;

[0073] Figure 3To validate the performance of the 9-guided ShallowNet algorithm combined with uncertainty analysis using five-fold cross-validation;

[0074] Figure 4 To validate the performance of the 9-guided ShallowNet algorithm combined with uncertainty analysis using 10-fold cross-validation;

[0075] Figure 5 To verify the performance of the 9-lead EEGNet algorithm combined with uncertainty analysis through three-fold cross-validation;

[0076] Figure 6 To validate the performance of the 9-lead EEGNet algorithm combined with uncertainty analysis using five-fold cross-validation;

[0077] Figure 7 To validate the performance of the 9-lead EEGNet algorithm combined with uncertainty analysis using 10-fold cross-validation. Detailed Implementation

[0078] To facilitate a clear description of the technical solutions in the embodiments of the present invention, the terms "first" and "second" are used to distinguish identical or similar items with essentially the same function and effect. For example, the first threshold and the second threshold are merely used to distinguish different thresholds and do not limit their order. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" are not necessarily different.

[0079] It should be noted that in this invention, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in this invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0080] In this invention, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one" or similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, "at least one of a, b, or c" can represent: a, b, c, a combination of a and b, a combination of a and c, a combination of b and c, or a, b, and c, where a, b, and c can be single or multiple.

[0081] This invention aims to provide a training method and application for an uncertainty analysis model of variable data involving weak asymmetric visual stimuli. Specific implementation details are as follows:

[0082] In a first aspect, embodiments of the present invention provide a training method for an uncertainty analysis model of variational data for weak asymmetric visual stimuli, see [link to relevant documentation]. Figure 1 The training method includes the following steps:

[0083] Obtain the EEG signal dataset, divide it into training, testing and validation sets according to the proportions, and obtain the corresponding discrimination set;

[0084] For example, acquiring a dataset of electroencephalogram (EEG) signals;

[0085] The EEG signal is the unprocessed EEG signal input into the brain-computer interface system;

[0086] The EEG signal data was divided into 250ms segments for each trial, thus obtaining the EEG signal dataset. ;

[0087] in, Represents the set of real numbers; These represent the total number of categories, the number of trials, the number of leads, and the number of sampling points, respectively; the number of trials represents the number of trials collected in repeated experiments within the same category.

[0088] For example, it is divided into training set, test set and validation set proportionally;

[0089] EEG data It is divided into three subsets: training set, test set, and validation set, which are used to train the model, validate the model performance, and save the model's optimal parameters, respectively.

[0090] For example, the training set is The test set is The validation set is ,in ; The number of trials represents the number of times the training set has been tested. The number of trials for the test set; This represents the number of trials for the validation set.

[0091] For example, the division method is as follows:

[0092]

[0093]

[0094] in, To randomly divide the original dataset into A mutually exclusive subset of similar size; each time one is used... ) subsets, randomly selected 90% of the trials in each subset are used as the training set, the remaining 10% as the validation set, and the remaining 1 subset as the test set; repeat. Each time, a different subset is selected as the test set, ultimately yielding... The average of the evaluation results is taken as the final evaluation indicator.

[0095] For example, the discrimination sets corresponding to the training set, test set, and validation set are obtained respectively;

[0096] training set and verification set The first two dimensions are expanded into one dimension, that is... ( ), ( ); test set Transform into ,in This represents the number of trials performed. Typically, single-trial performance is poor, requiring multiple trials with class confidence scores to make a joint decision to improve performance. For each dataset, a discrimination set can be obtained, i.e. These represent the labeled categories of elements in the training, validation, and test sets, respectively. The meaning of the discriminant set elements is explained using a four-category classification. If the labeled category is 1, then the discriminant set element... If the labeled category is 2, then the discriminant set elements If the labeled category is 3, then the discriminant set elements If the labeled category is 4, then the discriminant set elements .

[0097] A Bayesian network model is constructed and trained using a training set to obtain a feature extraction module, a variational prior distribution following a Gaussian distribution, and a variational posterior distribution. The feature extraction module maps EEG signal data from the training set to a high-dimensional nonlinear feature space. The variational prior distribution is composed of multiple custom Gaussian distributions with different variances and zero mean, linearly superimposed with their corresponding learnable weights. The learnable weights are used to measure the contribution of different custom Gaussian distributions to the variational prior distribution. The variational posterior distribution is linearly composed of variational bias, variational weights, and an uncertainty parameter. The variational bias and variational weights are parameters to be learned, and the uncertainty parameter is a hyperparameter.

[0098] As one possible implementation, the variational prior distribution is denoted as... It is obtained by calculation as follows:

[0099]

[0100] in, Indicates generation diagonal matrix, The length of the flattened EEG data after feature extraction by the feature extraction module is given. Further expressed as:

[0101]

[0102]

[0103]

[0104] in, For the variational discriminant matrix, , ... These are learnable weights; , ... For multiple custom Gaussian distributions with different variances; , ... These represent different variances and are preset hyperparameters.

[0105] As one possible implementation, the variational posterior distribution is denoted as... It is obtained by calculation as follows:

[0106]

[0107] in, These are variational bias and partial weight, respectively; For uncertain parameters, ;in , This represents the total number of categories.

[0108] For example, Bayesian networks approximate the posterior function through variational inference, and variational inference obtains the variational posterior. Approximate true posterior distribution ;

[0109] in, It can be a feature extraction module for any deep learning EEG decoding algorithm, used to map EEG data to a high-dimensional nonlinear feature space; This is the variational discriminant matrix, used to map the feature space to the discriminant space. , for The elements in, according to the reparameterization theory , , ,in, The variational parameters are variational bias and variational weight, respectively. For uncertain parameters, and for The elements in The dimension of an element in the EEG dataset after feature extraction and flattening. This represents the total number of categories.

[0110] For example, the variational inference process is as follows:

[0111]

[0112]

[0113]

[0114]

[0115] in, This represents the divergence.

[0116] because Regardless of the parameter to be optimized, the optimization objective is as follows:

[0117]

[0118] Based on Monte Carlo sampling, the optimization objective can be approximated as:

[0119]

[0120] in For variational posterior loss, For variational prior loss, This is the variational likelihood loss.

[0121] As one possible implementation, the variational posterior loss is denoted as... It is determined by calculation as follows:

[0122]

[0123] in, , They are respectively Elements in; For uncertain parameters; .

[0124] Variational prior loss is denoted as It is obtained by calculation as follows:

[0125]

[0126] in, , ... For custom probability density functions of Gaussian distributions with different variances; , ... These are learnable weights; , , ... Representing different variances;

[0127] The variational likelihood function loss is denoted as It is obtained by calculation as follows:

[0128]

[0129]

[0130] in, For training set The elements in The discrimination set of the training set In the middle The corresponding element; , for The elements in According to the reparameterization theory , , .

[0131] As one possible implementation, training a Bayesian network model using a training set specifically includes: inputting the training set and its corresponding discriminant set into the Bayesian network model to calculate the variational posterior loss, variational antecedent loss, and variational likelihood function loss, respectively; and iteratively updating the parameters in the Bayesian network using backpropagation of the aforementioned losses. The parameters to be iteratively updated include: the weights and biases of the feature extraction module in the Bayesian network; the learnable weights of the variational antecedent distribution in the Bayesian network model; and the learnable variational biases and variational weights of the variational posterior distribution in the Bayesian network model.

[0132] One iteration is denoted as one training round, and a total of N training rounds are performed, where N≥2;

[0133] After each training round, the discrimination performance of the trained Bayesian network model is verified using the validation set and its corresponding discriminant set. The accuracy of the validation set is calculated, and the parameters of the Bayesian network model with the highest accuracy are saved.

[0134] For example, the backpropagation process will respectively and Input the parameters into the model for training to update the parameters in the Bayesian network, including the feature extraction module. The weights and biases, the variational bias of the variational posterior distribution to be learned and variational weights and the learnable weights of the variational prior distribution , ... The condition for stopping training is 20 training rounds. This is done after each training session. and To validate the discriminative performance of the model, calculate the accuracy of the validation set, and save the parameters of the Bayesian network with the highest accuracy.

[0135] The EEG signals in the training set are processed by the feature extraction module to obtain training feature data, and Bayesian inference is used to calculate the analytical posterior distribution of each category corresponding to the training feature data.

[0136] As one possible implementation, Bayesian inference is used to compute the analytical posterior distribution of each category corresponding to the training set data, denoted as . It is obtained by calculation as follows:

[0137]

[0138] in, , A subset of a class in the training set. This is the feature extraction part of the deep learning-based EEG decoding algorithm, used to map EEG data to a high-dimensional nonlinear feature space; Let be the analytical discrimination matrix to be obtained for a certain category. , To determine the concentration and A subset of the corresponding category;

[0139] because and It is irrelevant, therefore it is considered Assuming that all elements in the training set are independent and identically distributed, then the analytical likelihood function of each class in the feature-based parameter space is... The calculation is as follows:

[0140]

[0141] in, for The elements in for The elements in.

[0142] Assume analytical likelihood function It follows a Gaussian distribution, and its variational prior distribution is... If it follows a Gaussian distribution, then the analytic posterior distribution is... It also follows a normal distribution, let , , The results were obtained through Bayesian inference calculations:

[0143]

[0144]

[0145]

[0146] Let be the mean of the analytic posterior for each category. Let V be the variance of the analytic posterior for each category.

[0147] The EEG signals in the test set are processed by the feature extraction module to obtain test feature data. Linear regression is used to calculate the analytical confidence and analytical variance of each category corresponding to the test feature data. The analytical confidence represents the predicted probability of each category corresponding to the test feature data, and the analytical variance represents the degree of uncertainty of the test feature data with respect to the current predicted probability.

[0148] As one possible implementation, the analytical posterior distribution is denoted as... , , The analytical confidence score and analytical variance are calculated based on linear regression using the following formulas:

[0149]

[0150]

[0151] in, For the validation set The elements in for Predicted as category The analytical confidence level is denoted as , for The corresponding analytical variance is denoted as This represents the uncertainty in this judgment. This represents the flattening operation. Represents the number of trials in the training set. This represents the number of trials performed.

[0152] The uncertainty parameters in the variational posterior distribution are randomly sampled to obtain multiple corresponding variational posterior discriminant matrices; multiple variational confidences corresponding to the test feature data are calculated using linear regression, and the variational average confidence is obtained by averaging.

[0153] As one possible implementation, the variational average confidence level is calculated as follows:

[0154]

[0155]

[0156] because , for Variational posterior discriminant matrix obtained by random sampling , This represents the number of samples taken.

[0157] As one possible implementation, the following decay strategy is adopted for the training convergence of each parameter in the variational posterior discriminant matrix of the Bayesian network model:

[0158] A uniform distribution was obtained using the Xavier method;

[0159] A sample is obtained by randomly sampling from a uniform distribution;

[0160] The variational bias of the variational posterior distribution is initialized using the sample; the variational weight of the variational posterior distribution is initialized to 1.

[0161] The variational bias and variational weights are iteratively updated based on the initial variational bias and variational weights through backpropagation; wherein, as the number of training rounds increases, the decay of the variational weights gradually increases according to the gradient descent method.

[0162] For example, Xavier is used for initialization. ;

[0163] from Uniformly distributed sampling ;

[0164] initialization ,make ;

[0165] in, , Gradient during training, , Gradually reduce during training; The number of training iterations; according to gradient descent, as the number of training iterations increases, The attenuation rate gradually increases, as shown in the following formula:

[0166]

[0167] in, The learning rate is a hyperparameter that increases with the number of training iterations. The rate of decay gradually increases.

[0168] For example, The number of training sessions can be set to 20.

[0169] Based on the variational mean confidence level, analytical confidence level, and their corresponding analytical variance, the variability of the EEG signal is further judged according to preset rules, and the variability is used as the criterion for discarding the EEG data.

[0170] As one possible implementation method, the preset rule is: ,in, To determine the variational average confidence level of an element in the test set. and Each element is a category The analytical confidence level and the corresponding analytical variance, and These represent the analytical confidence level and the corresponding analytical variance of a given element.

[0171] Models typically tend to be more confident in low-confidence results, that is, in contrast to high-confidence results. The values ​​are smaller, so the analytical confidence and analytical variance, as well as the variational mean confidence, are satisfied for the same test set elements. We consider the EEG data to have low variability if it is otherwise considered to have high variability and will discard it. Taking into account the confidence and uncertainty of each discrimination result in the discrimination space, and combining the idea of ​​ensemble learning, a method is proposed that considers whether the following conditions are met. The criteria are used as the standard for discarding trials, and high-quality trials can be screened out without the need for a threshold.

[0172] Next, experiments will be conducted to evaluate the accuracy of the training method for the variable data uncertainty analysis model of weak asymmetric visual stimuli proposed in this embodiment.

[0173] Data were collected from 14 participants. Each participant's data consisted of 4×1800×9×250, which corresponded to the EEG category, number of trials, number of leads, and number of sampling points, respectively. Figures 2-7The uncertainty analysis method proposed in this invention is combined with ShallowNet and EEGNet. The performance of different algorithms is compared on the test set with 1 to 8 trials in 9 leads. The results show that under three-fold, five-fold and ten-fold cross-validation, the uncertainty analysis method proposed in this invention can improve the quality of test data and effectively reduce the impact of the variability of EEG signals in BCI on system performance.

[0174] Secondly, the present invention provides an application of a training method for a variable data uncertainty analysis model of weak asymmetric visual stimuli. Specifically, the variable data uncertainty analysis model of EEG signals obtained by training the variable data uncertainty analysis model of weak asymmetric visual stimuli provided by the present invention is configured in an EEG signal processing system for discarding EEG signals.

[0175] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, disclosure, and other materials. In this specification, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple components. A single processor or other unit can implement several functions listed in the specification. While certain measures are described in different embodiments, this does not mean that these measures cannot be combined to produce good results.

[0176] Although the invention has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made therein without departing from the spirit and scope of the invention. Accordingly, this specification and drawings are merely illustrative of the invention and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if such modifications and modifications fall within the scope of the invention and its equivalents, the invention is also intended to include such modifications and modifications.

Claims

1. A training method for an uncertainty analysis model of variable data for weak asymmetric visual stimuli, characterized in that, Includes the following steps: Obtain the EEG signal dataset, divide it into training, testing and validation sets according to the proportions, and obtain the corresponding discrimination set at the same time; A Bayesian network model is constructed and trained using a training set to obtain a feature extraction module, a variational prior distribution following a Gaussian distribution, and a variational posterior distribution. The feature extraction module maps EEG signal data from the training set to a high-dimensional nonlinear feature space. The variational prior distribution is composed of multiple custom Gaussian distributions with different variances and zero mean, linearly superimposed with their corresponding learnable weights. The learnable weights are used to measure the contribution of different custom Gaussian distributions to the variational prior distribution. The variational posterior distribution is linearly composed of variational bias, variational weights, and an uncertainty parameter. The variational bias and variational weights are parameters to be learned, and the uncertainty parameter is a hyperparameter. The EEG signals in the training set are processed by the feature extraction module to obtain training feature data, and Bayesian inference is used to calculate the analytical posterior distribution of each category corresponding to the training feature data. The EEG signals in the test set are processed by the feature extraction module to obtain test feature data. Linear regression is used to calculate the analytical confidence and analytical variance of each category corresponding to the test feature data. The analytical confidence represents the predicted probability of each category corresponding to the test feature data, and the analytical variance represents the degree of uncertainty of the test feature data with respect to the current predicted probability. The uncertainty parameters in the variational posterior distribution are randomly sampled to obtain multiple corresponding variational posterior discriminant matrices; multiple variational confidences corresponding to the test feature data are calculated using linear regression, and the variational average confidence is obtained by averaging. Based on the variational mean confidence level, analytical confidence level, and their corresponding analytical variance, the variability of the EEG signal is further judged according to preset rules, and the variability is used as the criterion for discarding the EEG signal.

2. The training method for the uncertainty analysis model of weak asymmetric visual stimuli according to claim 1, characterized in that, The specific steps for training a Bayesian network model using the training set include: inputting the training set and its corresponding discriminant set into the Bayesian network model to calculate the variational posterior loss, variational antecedent loss, and variational likelihood function loss, respectively; and iteratively updating the parameters in the Bayesian network using backpropagation of the aforementioned losses. The parameters updated iteratively include: the weights and biases of the feature extraction module in the Bayesian network; the learnable weights of the variational antecedent distribution in the Bayesian network model; and the learnable variational biases and variational weights of the variational posterior distribution in the Bayesian network model. One iteration is denoted as one training round, and a total of N training rounds are performed, where N≥2; After each training round, the discrimination performance of the trained Bayesian network model is verified using the validation set and its corresponding discriminant set. The accuracy of the validation set is calculated, and the parameters of the Bayesian network model with the highest accuracy are saved.

3. The training method for the uncertainty analysis model of weak asymmetric visual stimuli according to claim 1, characterized in that, The variational prior distribution is denoted as It is obtained by calculation as follows: in, Indicates generation diagonal matrix, The length of the flattened EEG data after feature extraction by the feature extraction module is given. Further expressed as: in, For the variational discriminant matrix, , … These are learnable weights; , … For multiple custom Gaussian distributions with different variances; , … These represent different variances and are preset hyperparameters.

4. The training method for the uncertainty analysis model of weak asymmetric visual stimuli according to claim 3, characterized in that, The variational posterior distribution is denoted as It is obtained by calculation as follows: in, For the variational discriminant matrix, These are variational bias and partial weight, respectively; For uncertain parameters, ;in , This represents the total number of categories.

5. The training method for the uncertainty analysis model of weak asymmetric visual stimuli according to claim 4, characterized in that, Variational posterior loss is denoted as It is determined by calculation as follows: in, , They are respectively Elements in; Variational prior loss is denoted as It is obtained by calculation as follows: in, , … For custom probability density functions of Gaussian distributions with different variances; The variational likelihood function loss is denoted as It is obtained by calculation as follows: in, For training set The elements in The discrimination set of the training set In the middle The corresponding element; For the variational discriminant matrix, , for The elements in According to the reparameterization theory , , , These represent the number of leads and the number of sampling points, respectively. This represents the number of trials in the training set.

6. The training method for the uncertainty analysis model of weak asymmetric visual stimuli according to claim 1, characterized in that, The following decay strategy is adopted for all variational weights in the variational posterior distribution of Bayesian networks: A uniform distribution was obtained using the Xavier method; A sample is obtained by randomly sampling from a uniform distribution; The variational bias of the variational posterior distribution is initialized using the sample; the variational weight of the variational posterior distribution is initialized to 1. The variational bias and variational weights are iteratively updated based on the initial variational bias and variational weights through backpropagation; wherein, as the number of training rounds increases, the decay of the variational weights gradually increases according to the gradient descent method.

7. The training method for the uncertainty analysis model of weak asymmetric visual stimuli according to claim 1, characterized in that, The analytic posterior distribution of each category in the training set data is calculated using Bayesian inference and denoted as follows: It is obtained by calculation as follows: in, , A subset of a class in the training set. This is the feature extraction part of the deep learning-based EEG decoding algorithm, used to map EEG data to a high-dimensional nonlinear feature space; Let be the analytical discrimination matrix to be obtained for a certain category. , To determine the concentration and A subset of the corresponding category; because and It is irrelevant, therefore it is considered Assuming that all elements in the training set are independent and identically distributed, then the analytical likelihood function of each class in the feature-based parameter space is... The calculation is as follows: in, for The elements in for The elements in the equation, assuming the analytical likelihood function It follows a Gaussian distribution, and its variational prior distribution is... If it follows a Gaussian distribution, then the analytic posterior distribution is... It also follows a normal distribution, let , , The results were obtained through Bayesian inference calculations: Let be the mean of the analytic posterior for each category. Let V be the variance of the analytic posterior for each category.

8. The training method for the uncertainty analysis model of weak asymmetric visual stimuli according to claim 1, characterized in that, The analytical posterior distribution is denoted as , , The analytical confidence score and analytical variance are calculated based on linear regression using the following formulas: in, For the validation set The elements in for Predicted as category The analytical confidence level is denoted as , for The corresponding analytical variance is denoted as This represents the uncertainty in this judgment. Represents flattening operation, The number of trials represents the number of trials in the training set. Represents the number of trials performed. The variational average confidence level is calculated as follows: because , for Variational posterior discriminant matrix obtained by random sampling , This represents the number of samples taken.

9. The training method for the uncertainty analysis model of weak asymmetric visual stimuli according to claim 1, characterized in that, The default rule is ,in, To determine the variational average confidence level of an element in the test set. and Each element is a category The analytical confidence level and the corresponding analytical variance, and These represent the analytical confidence level and the corresponding analytical variance of a given element.

10. An application of a training method for a variational data uncertainty analysis model of weak asymmetric visual stimuli, characterized in that, The EEG signal variation data uncertainty analysis model trained using the training method of the variation data uncertainty analysis model of weak asymmetric visual stimuli according to any one of claims 1 to 9 is configured in the EEG signal processing system to discard EEG signals with high variability, i.e., discard those that do not meet the requirements. Standard EEG signals.

Citation Information

Patent Citations

  • Brain-computer interface online model updating method based on Bayesian estimation

    CN119718067A

  • Deep learning uncertainty measurement system based on Bayesian segmentation network

    CN119785155A