Human movement intention detection method based on reconstruction model
Through EEG analysis based on the reconstruction model, using reconstruction errors and multiple query strategies, the problem of EEG system reliability and complex scenarios in detecting motion intentions is solved, and more efficient intention detection and System stability.
Patent Information
- Application Number
- CN201911006001.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-01-16
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-01-16
AI Technical Summary
Existing electroencephalography (EEG) systems have reliability and practicality issues in detecting whether users have motor intentions, especially in complex scenarios and infrequent intentions, and traditional methods are difficult to deal with the psychological state of the user. Unlimited possibilities and variability of EEG signals.
Using the human motion intention detection method based on the reconstruction model, the feature extraction and classification of the training stage is extracted and classified, and the reconstruction error is used to determine whether there is motion intention, and the intention detection is realized through subspace projection, automatic encoder and sparse dictionary learning, combined with attempts Formula, record and segmented query strategies.
Improves the reliability and flexibility of the BCI system, enables accurate detection of motion intentions in complex scenarios, reduces uncertain operations, and does not require manual processing and expertise.
Smart Images

Figure CN110991226B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to human body movement intention detection, and in particular to a reconstruction-based human intention detection (RID) method and application thereof. Background Art
[0002] Electroencephalogram (EEG) signals are voltages collected from different parts of the user's scalp to measure brain activity. EEG has been widely used in brain-computer interface (BCI) systems due to its zero clinical risk and portable acquisition equipment. BCI systems provide a potential bridge from the brain to peripheral devices for normal and disabled users. Through this BCI technology, signals of brain activity (such as movement intention) can be used as control commands. A classic application of this system is BCI-assisted stroke rehabilitation. Due to its potential medical and industrial application prospects, the study of EEG signals has attracted more and more attention from researchers.
[0003] Since the paradigm shift in BCI systems, machine learning has been recognized as a key tool for EEG analysis. Although previous studies have demonstrated the effectiveness of DE15 encoding brain signals, there are still some well-known challenges that prevent the widespread application of EEG-based BCI systems. One of the key obstacles is that most EEG decoding studies focus on answering questions such as "Which hand is a subject imagining moving, left or right?" This type of question can be modeled as a classification problem and solved by supervised learning methods. However, such a question must come before the above question: "Is a subject imagining moving a hand?" Before answering the "which" question, if the "yes" question is not answered, the BCI system may perform some uncertain operations. For example, wheelchairs based on BCI technology have been proven to be promising through several prototypes controlled by motion intentions. Assuming that the core algorithm of the system is a four-level classification model to control the wheelchair to move in four directions, the subject should maintain a fixed and accurate motion intention to accurately control the direction of the wheelchair movement. However, the situation in the real world is more complicated and unexpected, because the user's true intention is usually 30 occurring in different and infrequent places. For example, if the user is interrupted by an event (such as a phone call) or the user's mind has just wandered away, current solutions cannot handle this situation, but it still has to determine which of the four classes to classify the brain signal into and then control the wheelchair to the corresponding direction. Therefore, this system is neither reliable nor practical, and may cause serious accidents. In addition to uncertainty, collecting intention data can be cumbersome because it requires the subject to concentrate, which is particularly unrealistic for people with special needs such as children (for example, BCI helps with autism treatment), the elderly or people with disabilities. The scarcity of intention occurrences and the difficulty of obtaining accurate movement intentions lead to insufficient data obtained through training.
[0004] It would be more ideal if the intention detection method could first determine whether the user is performing a motor intention, and then determine the direction the user wants to move. Therefore, the entire system will be more powerful and can better cope with complex situations. Therefore, in this study, the present invention aims to answer such a "yes or not" question, which can be abstracted into an intention detection problem through EEG signals. The purpose is to accurately determine whether the subject has a certain motor intention during the observation period.
[0005] However, challenges remain for the following reasons. One reason lies in the EEG signal itself, which shows strong variability between different subjects, and even between different segments of the EEG signal of the same user recorded in the same experiment. Another key challenge is that although this problem seems to be a binary classification problem, the present invention does not know the "no" class. Unlike previous EEG analysis studies, in which subjects were guided to perform certain mental tasks, such as imagining the movement of the left or right hand, the present invention cannot define a user's mental state by excluding that he did not perform a certain mental task. The possibilities of a user's mental state are endless, except for certain intentions, such as imagining a movie, a food, or even something he himself does not recognize. Therefore, traditional supervised classification methods in the field of machine learning cannot solve this problem. Summary of the invention
[0006] 1. Purpose of the present invention
[0007] Brain-computer interfaces (BCIs) enable humans to communicate with external devices through brain signals and intuitively control external devices. The successful detection of motor intentions paves the way for the development of BCI applications. Current research mainly focuses on answering questions such as "Which hand of a subject is moving in imagination, the right hand or the left hand?". When answering questions such as "Is a subject imagining moving a hand?", because the present invention cannot continuously perform the intention detection task during the use of the brain wave detection device, the interval period (not performing a certain movement intention detection) may cause unexpected operations, resulting in BCI system failure. However, this intention detection task is more difficult because for a "yes" question, it is difficult to know what the "no" situation is, so as to obtain training samples for the "no" situation. In addition, some movement intentions or unexpected situations that actually occur rarely make the intention detection task more difficult. In order to solve this problem, a human movement intention detection method based on a reconstruction model is proposed.
[0008] 2. Technical solution adopted by the present invention
[0009] The present invention discloses a method for detecting human body movement intention based on a reconstruction model, which is performed according to the following steps:
[0010] Step 1: In the training phase, the reconstruction model is trained using EEG signals of performing a specific artificial processing intention task, including a feature extraction step and a classification step. The feature extraction step uses a combined algorithm wavelet group FBCSP to extract features. The classification step uses a classifier to classify and identify whether the user is performing a certain motion intention task.
[0011] Step 2: In the detection phase, the EEG cycle to be determined is input into the reconstruction model to calculate its reconstruction error; the smaller the reconstruction error, the greater the possibility that a certain movement intention task exists in the observation period;
[0012] Step 2.1, using subspace projection to train the reconstruction model, treating samples with large reconstruction errors as outliers. The reconstruction model can also be used as a classifier to train the reconstruction model and classify each sample into the category that best suits the reconstruction model.
[0013] Step 2.2, Autoencoder,The reconstruction model is trained. Two types of autoencoders are applied according to three query strategies for motion intention detection, namely, trial, record and segment. The fully connected autoencoder and CNN autoencoder;
[0014] Step 2.3 Sparse dictionary learning is used as a reconstruction model to implement the RID scheme. A sparse representation of the input data is learned through a dictionary, resulting in redundant atoms, allowing a single sample to have multiple representations; the potential representation is composed of a dictionary consisting of several atoms and a sparse code. During the reconstruction process, the sparse coding, as well as the atoms themselves and linear combinations of atoms, are used to approximate the original input.
[0015] Furthermore, step 2.1 uses subspace projection to define a set of m-dimensional vectors that belong to R d The sample x belongs to R m Samples of (m≤d) And the principal component is obtained by an m-dimensional vector with three properties, which are as follows:
[0016] 1) The principal components are orthogonal;
[0017] 2) The first principal component has the largest variance, and the variance of each subsequent component gradually decreases;
[0018] 3) The sum of the changes in all principal components is equal to the sum of the changes in the original variables;
[0019] Assumptions is composed of d-dimensional vectors v1, v2...v d The goal is to reconstruct the correlation matrix calculated from the training set, calculate d eigenvalue and eigenvector pairs from R, and sort them by eigenvalue to obtain (λ1,e1),(λ2,e2),...,(λ d ,e d ), where λ1≥λ2≥...λ d ;and Sample x=(x1,x2,...x d )T The i-th principal component can be calculated as:
[0020]
[0021] Select the first m eigenvalues and eigenvector pairs (λ1,e1),(λ2,e2),...,(λ m ,e m ), the projection matrix P is obtained as:
[0022] P=(e1,e2...e m ) T (3)
[0023] in So any observation x can be transformed into:
[0024] y=Px (4)
[0025] in Due to the properties of eigenvectors, the reconstruction process is simple:
[0026]
[0027] It should be noted that only when m=d,P -1 =P T , the reconstruction is perfect; otherwise, due to compression, and x are different, set m<d,
[0028] Considering that an overly perfect reconstruction may limit the effectiveness of identifying data patterns from the reconstruction loss;
[0029] Therefore, the reconstruction model based on subspace projection can be defined as:
[0030]
[0031] in It can be calculated by obtaining the projection matrix of PCA; after training, the reconstruction error of the EEG query segment q can be calculated as:
[0032] Furthermore, in step 2.2, the autoencoder is used as the reconstruction model. According to the three query strategies for motion intention detection, namely, trial, record and segment, two types of autoencoders are applied: fully connected autoencoder and CNN autoencoder, as follows:
[0033] Step 2.2.1. Fully Connected Autoencoder
[0034] The fully connected autoencoder consists of an encoder Φ: m is the dimension of the hidden layer and a decoder Ψ: Each layer consists of corresponding weights W, biases b and activation functions:
[0035] Φ=f Φ (W Φ x+b Φ ) (7)
[0036] Ψ=f Ψ (W Ψ x+b Ψ ) (8)
[0037] in and f Φ and f Ψ Respectively represent the encoding activation function and the decoding activation function, and the reconstruction model is defined as:
[0038]
[0039] The parameter θ can be obtained by minimizing:
[0040]
[0041] After training, the reconstruction error of the EEG query segment q can be calculated as:
[0042]
[0043] It should be noted that using a linear activation function, the autoencoder can generate the same subspace as PCA; therefore, the nonlinear rectified linear unit is used as the activation function;
[0044] Step 2.2.2. CNN Autoencoder
[0045] Since EEG signals are time series data with multiple channel readings at each time point, the input data of the autoencoder can be in two-dimensional (2D) format; therefore, we apply CNN autoencoder as a reconstruction model to process 2D EEG data; similar to the fully connected autoencoder, CNN autoencoder also has an encoder part and a decoder part; the main difference is that the encoder and decoder parts are mainly built using convolutional neural networks;
[0046] Specifically, there are three 2D-CNN layers in the encoder stage, each followed by a max pooling layer, and three upsampling layer and convolution layer pairs in the decoder layer; to formalize the two-dimensional convolution operation, the value of the neuron at position (x, y) in the k-th feature map of layer L is given by:
[0047]
[0048] where relu(x)=max(0,x) is the activation function; in this equation, b kl Yes th Layer k th The bias of the feature map, is the weight at (p,q) connected to the kernel of this feature map, covering the feature map in the previous layer, P k and Q l Indicates the size of the kernel;
[0049] After each convolutional layer, a maximum pooling operation with a stride of [2×2] is applied to reduce the data dimension by half. Therefore, in the decoder stage, the data dimension needs to be expanded twice in each decoder layer. There are two ways to expand the decoder phase data dimension: transposed convolution operation and upsampling interpolation, using the nearest neighbor upsampling interpolation method and convolution layer as the basic components of the decoder phase. After the CNN decoder, a final output layer is used to reconstruct the input data. The final output layer is a convolutional layer, and the output data size is the same as the input data size.
[0050] Use stochastic gradient descent with the Adam update rule to minimize the loss function:
[0051]
[0052] where θ i is the parameter set of the neural network, and the network parameters are 10 -4 Optimize the learning rate;
[0053] Step 2.3: Learning a sparse representation of the input data through a dictionary leads to redundant atoms, allowing a single sample to have multiple representations.
[0054] Furthermore, step 3, sparse dictionary learning as a reconstruction model to implement the RID scheme
[0055] The latent representation is composed of a dictionary of several atoms and a sparse code. During the reconstruction process, the sparse code, as well as the atoms themselves and linear combinations of atoms, is used to approximate the original input; formally, the reconstruction model is defined as:
[0056]
[0057] where θ i =[d1,d2,...,d m ] is a dictionary containing m atoms, is the input vector The sparse code of , most of the coefficients are zero or close to zero to construct an over-complete dictionary, and the dictionary dimension m is set to be larger than the input dimension d; the super-complex dictionary does not require the atoms to be orthogonal, thus allowing more flexible dictionaries and richer data representations; the dictionary θ i and sparse code c i It can be learned during the training phase by solving the following optimization problem:
[0058]
[0059] Obey||d k ||2=1 represents all 1≤k≤m; the first term is the data fitting term, and the second term is the sparsity-induced regularization; this minimization problem is an NP-hard problem because of the l0-norm, and it can be approximated by replacing the l0-norm with its convex relaxation, that is, using the l1-norm; for θ i and c i For example, one is fixed, then the problem becomes a convex problem; we get an approximate result because it is not jointly convex (θ i ,c i ); The optimal sparse code and dictionary can be obtained through the alternating update scheme:
[0060] 1) Sparse code approximation: Update the sparse code c by solving equation (15) i , and use the dictionary modified by the previous iteration;
[0061] 2) Dictionary refinement: Update the dictionary θ by solving equation (15) i , and use the sparse code fixed in the previous iteration;
[0062] In the detection phase, given a query fragment q, its sparse code can be calculated as c i (q), the reconstruction is represented as θ i c i (q); therefore the reconstruction error is
[0063] After getting the reconstruction error, an intent-specific threshold needs to be applied to determine whether the query fragment is an intent execution fragment or a normal fragment.
[0064] Furthermore, a given observation period can be divided into a series of short segments. The intention detection task can be regarded as determining whether a subject is executing a specific intention in a short segment, and the research target is changed from a long period that may have both intention execution and non-intention execution parts to a short segment with or without a specific intention. The intention-demonstration segment is a time segment during which a subject demonstrates a specific intention task; the ordinary segment is a time segment when a subject does not perform a certain intention task; the query segment is a time segment to determine whether the subject performs a certain task; the training segment is a time segment used to train the reconstruction model, which must be a segment of execution intention;
[0065] Given a query segment of an EEG recording q, determine whether the subject is performing a certain intention task T in the segment i ;Formally, given a set of N EEG fragments In each period, the same purpose task T i , the reconstructed model is expressed as Where d is the dimension of the reconstructed model and θ is the input i are the parameters of the reconstruction model, which can be obtained by minimizing the loss function during the training phase:
[0066]
[0067] After the reconstruction model is established, for each EEG query segment q, the reconstruction error is calculated As a similarity measure, determine the relevance of the EEG query segment to the psychological intent; reconstruction error The smaller the EEG query segment q is, the smaller the psychological intention T i The greater the correlation.
[0068] Furthermore, in the detection of motion intention to perform yes or no, the performance of the RID scheme implemented by subspace projection, autoencoder, and sparse dictionary learning is normalized by the average reconstruction error of the intention segments that divide the query;
[0069] Normalized relative mean error (NRME) φ relative Defined as:
[0070]
[0071]
[0072] φ o and φ i are the average reconstruction errors for the normal and intended execution query fragments, respectively.
[0073] Furthermore, the normalized relative reconstruction error is calculated as follows:
[0074]
[0075] where e k is the reconstruction error of the kth instance, is the average reconstruction error of the intent executing the query fragment.
[0076] 3. Beneficial effects of the present invention
[0077] (1) The present invention uses a reconstruction model to represent a high-level abstraction of motion intention, and uses the reconstruction error to determine whether there is motion intention.
[0078] (2) The present invention uses different reconstruction models to conduct comprehensive detection experiments on two motion intention tasks, proving that the proposed RID scheme has good performance. It is not only theoretically flexible and reliable for any complex real-world situation, but also does not require manual processing and in-depth professional knowledge.
[0079] (3) The present invention demonstrates good performance on comprehensive query fragments, and can obtain "baseline" query fragments when acquiring intended execution task data, even in an environment where baseline data is acquired, thereby obtaining competitive results.
[0080] (4) The present invention explores three query strategies for motion intention detection, namely, trial, record and segmentation, and constructs three different reconstruction models to implement the scheme to show its flexibility for various reconstruction models. In addition, the scheme of the present invention does not require any manual processing and excessively deep professional knowledge. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] Figure 1 It is an intention detection scheme based on reconstruction.
[0082] Figure 2 It is a flowchart of intention detection based on reconstruction.
[0083] Figure 3 Left fist: Normalized relative reconstruction error distribution for different query strategies and different reconstruction models. (Query relevance refers to the query fragments that execute the intent).
[0084] Figure 4 Left Fist: Average precision and recall of different query strategies and different reformulation models at different thresholds. (Query relevance refers to the query fragment that performs the intent).
[0085] Figure 5 Right fist: Normalized relative reconstruction error distribution for different query strategies and different reconstruction models. (Query relevance refers to the query fragments that execute the intent).
[0086] Figure 6Right Fist: Average precision and recall at different thresholds under different query strategies and different reformulation models. (Related queries refer to the intent of executing query fragments).
[0087] Figure 7 is the F1 score of motion intention detection with the optimal determination threshold with different query strategies and reconstruction models.
[0088] Figure 8 It is the intent detection of the comprehensive query fragment and the left fist movement intent fragment: the F1 score is based on the threshold.
[0089] Fig. 9 It is the intent detection of the comprehensive query fragment and the right fist movement intent fragment: the F1 score is based on the threshold. DETAILED DESCRIPTION
[0090] The following is a clear and complete description of the technical solutions in the examples of the present invention in conjunction with the accompanying drawings in the examples of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the protection scope of the present invention.
[0091] The examples of the present invention will be described in further detail below with reference to the accompanying drawings.
[0092] The present invention discloses a reconstruction-based human intention detection (RID) method, which can identify whether a subject is determined to perform a certain movement intention within a given observation period. We use the reconstruction error as a criterion for identifying the execution of intention. In the training phase, the reconstruction model is trained using EEG signals that perform a specific artificial processing intention task. In the detection phase, the EEG cycle to be determined is input into the reconstruction model and its reconstruction error is calculated. The smaller the reconstruction error, the greater the possibility that a certain movement intention task exists in the observation period. The proposed scheme is scalable in any realistic scenario without the need for prior knowledge of what the scenario that is not intended to be performed looks like. In addition, the scheme does not require manual processing and excessive expertise, which is usually important in the traditional EEG analysis community. Systematic experiments on a large EEG dataset with two movement intention tasks are aimed at studying the effectiveness of the RID scheme. Three different reconstruction models established in the study, namely autoencoder, subspace projection and sparse dictionary learning, implement the RID scheme. In addition, three strategies for intention detection using EEG signals are studied. Experimental results show that the RID scheme proposed in this paper has good results in detecting left and right fist movement intentions. This scheme lays a foundation for the development of more reliable and practical BCI systems.
[0093] The reconstruction-based human intention detection (RID) method is carried out in the following steps:
[0094] Step 1. In the field of EEG analysis, the present invention proposes a scheme for detecting a person's intention. Compared with the traditional intention recognition scheme, our goal is to determine whether the user is executing the intention, which is more critical for building a reliable and flexible BCI system. As one of the most commonly used monitoring methods for recording human brain electrical activity, EEG signals have potential application prospects in the fields of mind-controlled wheelchairs and disease diagnosis.
[0095] Most existing EEG analysis works focus on classifying an instance into predefined classes through recognition tasks. Common methods include two parts: feature extraction and classification.
[0096] Step 1.1. Traditional EEG feature extraction includes frequency bandpass filtering and spatial filtering. Frequency bandpass filtering retains the significant information in the active frequency band and filters the non-active frequency band where noise may exist. Spatial filtering usually uses common spatial patterns and their variations. In addition, this scheme also develops a combination algorithm, namely filter bank CSP (FBCSP), which demonstrates its competitiveness.
[0097] Step 1.2. In terms of the components of the classifier, many machine learning methods, such as linear discriminant analysis (LDA), support vector machine (SVM), and random forest (RF), have been applied in EEG-based motion image classification. Recently, some studies have investigated deep learning methods for EEG analysis. The most commonly used deep models are convolutional neural networks (CNN) and recurrent neural networks (RNN). However, these deep models only consider data collected during the target intention task, ignoring the impact of EEG signals generated when the user does not perform a specific intention and the practical application of EEG-based BCI systems. Therefore, in this scheme, our goal is to identify whether the user is performing a certain motion intention task, rather than classifying which motion intention task the user is performing.
[0098] Step 2. A reconstruction-based EEG signal intention detection scheme is proposed. This scheme is completely different from the classification machine learning method. It targets detection tasks rather than traditional recognition tasks. Our scheme can theoretically handle any real scenario and does not require domain knowledge and manual processing, which is a common method commonly used in the field of EEG analysis. Reconstruction models have been widely used in various fields of data mining, especially the detection or removal of outliers in computer vision. The reconstruction model is trained and samples with large reconstruction errors are regarded as outliers. In addition, the reconstruction model can also be used as a classifier. The authors train the reconstruction model for classification and classify each sample into the category that best suits the reconstruction model. These methods can be summarized into three categories.
[0099] Step 2.1, the first category is subspace projection. When a set of observations of possibly correlated variables is transformed into a set of values of linearly uncorrelated variables, one of the most representative methods is principal component analysis (PCA), which obtains the principal subspace through orthogonal transformation. PCA, kernel PCA, robust PCA and robust kernel PCA are used to reconstruct the training set, which select or delete outliers that produce high reconstruction losses.
[0100] We use subspace projection as the reconstruction method for this scheme. Our goal is to define a set of m-dimensional vectors that map to R d The sample x belongs to R m Samples of (m≤d) And the principal component is obtained by an m-dimensional vector with three properties, which are as follows:
[0101] 1) The principal components are orthogonal.
[0102] 2) The first principal component has the largest variance, and the variance of each subsequent component gradually decreases.
[0103] 3) The sum of the changes in all principal components is equal to the sum of the changes in the original variables.
[0104] Assumptions is composed of d-dimensional vectors v1, v2...v d The goal is to reconstruct the correlation matrix calculated from the training set. Calculate d eigenvalue and eigenvector pairs from R and sort them by eigenvalue to obtain (λ1,e1),(λ2,e2),...,(λ d ,e d ), where λ1≥λ2≥...λ d .and Sample x=(x1,x2,...x d ) T The i-th principal component can be calculated as:
[0105]
[0106] In general, we select the first m eigenvalues and eigenvector pairs (λ1,e1),(λ2,e2),...,(λ m ,e m ), the projection matrix P is obtained as:
[0107] P=(e1,e2...e m ) T (3)
[0108] in So any observation x can be transformed into:
[0109] y=Px(4)
[0110] in Due to the properties of eigenvectors, the reconstruction process is simple:
[0111]
[0112] It should be noted that only when m=d,P -1 =P T , the reconstruction is perfect; otherwise, due to compression, and x are not the same. Therefore, we set m < d, considering that a too perfect reconstruction may limit the effectiveness of identifying data patterns from the reconstruction loss.
[0113] Therefore, the reconstruction model based on subspace projection can be defined as:
[0114]
[0115] in It can be calculated by obtaining the projection matrix of PCA. After training, the reconstruction error of the EEG query segment q can be calculated as:
[0116] Step 2.2, the second category is to learn a compact encoding to represent the summary training samples. For example, existing work uses autoencoders to transform observations from one feature space to a new feature space where the data separates the factors of variation. We deploy the autoencoder as another reconstruction model in the scheme. The autoencoder is a neural network-based reconstruction model with good performance in denoising and dimensionality reduction problems. According to three query strategies for motion intention detection, namely trial, recording, and segmented (different EEG data organization strategies for inputting different reconstruction models), we applied two types of autoencoders: fully connected autoencoders and CNN autoencoders. The details are as follows:
[0117] Step 2.2.1. Fully connected autoencoder Similar to multilayer perceptron (MLP), fully connected autoencoder is a feedforward artificial neural network. The autoencoder consists of an encoder Φ: m is the dimension of the hidden layer and a decoder Ψ: Each layer consists of corresponding weights W, biases b and activation functions:
[0118] Φ=f Φ (W Φ x+b Φ ) (7)
[0119] Ψ=f Ψ (W Ψ x+b Ψ ) (8)
[0120] in and f Φ and f Ψ denote the encoding activation function and the decoding activation function respectively. Therefore, in our case, the reconstruction model is defined as:
[0121]
[0122] The parameter θ can be obtained by minimizing:
[0123]
[0124] After training, the reconstruction error of the EEG query segment q can be calculated as:
[0125]
[0126] It should be noted that using a linear activation function, the autoencoder can generate the same subspace as PCA. Therefore, we use the nonlinear rectified linear unit (relu) as the activation function.
[0127] Step 2.2.2. CNN Autoencoder
[0128] Since EEG signals are time series data with multiple channel readings at each time point, the input data of the autoencoder can be in two-dimensional (2D) format. Therefore, we apply CNN autoencoder as a reconstruction model to process 2D EEG data. Similar to the fully connected autoencoder, CNN autoencoder also has an encoder part and a decoder part. The main difference is that the encoder and decoder parts are mainly built using convolutional neural networks.
[0129] Specifically, there are three 2D-CNN layers in the encoder stage, each followed by a max pooling layer, and three upsampling and convolution layer pairs in the decoder layer. To formalize the 2D convolution operation, the value of the neuron at position (x, y) in the k-th feature map of layer L is given by:
[0130]
[0131] Where relu(x)=max(0,x) is the activation function. In this equation, b kl Yes th Layer k th The bias of the feature map, is the weight at (p,q) connected to the kernel of this feature map, covering the feature map in the previous layer, P k and Q l Indicates the size of the kernel.
[0132] After each convolutional layer, a max pooling operation with a stride of [2×2] is applied to reduce the data dimension by half. Therefore, in the decoder stage, we need to expand the data dimension twice in each decoder layer. There are two ways to expand the data dimension of the decoder phase: transposed convolution operation and upsampling interpolation. The transposed convolution operation works almost exactly like the convolution operation, but in reverse: the data dimension of a unit in the input layer will be expanded larger in the transposed convolution layer. However, some researchers claim that interpolation layers followed by convolutional layers perform better than transposed convolutional layers, and nearest neighbor upsampling interpolation works best for upsampling. Therefore, in this study, we use the nearest neighbor upsampling interpolation method with convolutional layers as the basic building block of the decoder phase. After the CNN decoder, a final output layer is used to reconstruct the input data. The final output layer is a convolutional layer with the same output data size as the input data size.
[0133] The number of feature maps of the three convolutional encoding layers in the encoder phase is 16, 8, and 8 respectively, whereas the final output convolution is 1 in the decoder phase. The kernel size of each convolution operation in both the encoder and decoder stages is kept as [3×3] and the stride is kept as [1×1]. The max pooling kernel size is set to [2×2]. Batch normalization is applied for better performance.
[0134] Use stochastic gradient descent with the Adam update rule to minimize the loss function:
[0135]
[0136] where θ i is the parameter set of the neural network. The network parameters are expressed in 10 -4 The learning rate is optimized.
[0137] Step 2.3, the third category learns a sparse representation of the input data through a dictionary. It leads to redundant atoms, allowing a single sample to have multiple representations. In particular, works including those that study sparse dictionary learning to improve the sparsity and flexibility of representation. However, most of the existing research still follows the basic assumption of "few and different" outliers. Due to the complexity of human intentions, the problem we face is more complicated than outlier detection. The first difficulty is that the number of "normal fragment" data is larger than the number of fragment data that executes the intention. In addition, unlike outliers, "normal fragment" data is usually diverse and may have some correlation with the fragment data that executes the intention.
[0138] Step 3: Two EEG-based movement intention detection tasks, yes and no, were evaluated, and different types of EEG reconstruction models and various EEG data organization strategies were systematically studied and analyzed.
[0139] According to step 2.3, we learn a sparse representation of the input data through a dictionary. We also study sparse dictionary learning as a reconstruction model to implement the RID scheme. Sparse dictionary learning is a learning method that constructs a compact representation for the input data. The potential representation is composed of a dictionary consisting of several atoms and a sparse code. In the reconstruction process, the sparse coding, as well as the atoms themselves and the linear combination of atoms, can be used to approximate the original input well. Formally, the reconstruction model is defined as:
[0140]
[0141] where θ i =[d1,d2,...,d m ] is a dictionary containing m atoms, is the input vector The sparse code has most of its coefficients at or near zero. To construct an overcomplete dictionary, the dictionary dimension m is set larger than the input dimension d. The overcomplex dictionary does not require the atoms to be orthogonal, thus allowing for more flexible dictionaries and richer data representations. The dictionary θ i and sparse code c i It can be learned during the training phase by solving the following optimization problem:
[0142]
[0143] Obey||d k ||2=1 represents all 1≤k≤m. The first term is the data fitting term, and the second term is the sparsity-inducing regularization. This minimization problem is an NP-hard problem because of the l0-norm, and can be approximately solved by replacing the l0-norm with its convex relaxation, i.e., using the l1-norm. For θ i and c i For example, one is fixed, then the problem becomes a convex problem. We get an approximate result because it is not jointly convex (θ i ,c i ). The optimal sparse code and dictionary can be obtained through the alternating update scheme:
[0144] 1) Sparse code approximation: Update the sparse code c by solving equation (15) i , and use the dictionary modified by the previous iteration;
[0145] 2) Dictionary refinement: Update the dictionary θ by solving equation (15) i , and uses the sparse code fixed in the previous iteration.
[0146] In the detection phase, given a query fragment q, its sparse code can be calculated as c i(q), and the reconstruction is represented as θ i c i (q). Therefore, the reconstruction error is
[0147] After getting the reconstruction error, an intent-specific threshold needs to be applied to determine whether the query fragment is an intent execution fragment or a normal fragment, such as Figure 1 The final stage is shown.
[0148] 3. A reconstruction-based intention detection (RID) scheme according to step 1, wherein the purpose of EEG-based intention detection is to determine whether the subject has had a certain intention during a given observation period by analyzing the EEG recordings of the corresponding time period. Without loss of generality and practicality, we assume that the execution of an intention (if any) can last for several seconds. Therefore, a given observation period can be divided into a series of short segments. The intention detection task can be viewed as determining whether a subject is executing a specific intention in a short segment, and the research target is shifted from long periods that may have both intention-execution parts and non-intention-execution parts to short segments with or without specific intentions.
[0149] For the sake of clarity, we explain several terms used in the rest of this article:
[0150] 1) Intention-demonstration episode: a time segment during which a subject demonstrates a specific intention task;
[0151] 2) Ordinary segments: time segments in which a subject does not perform an intended task;
[0152] 3) Query fragment: the time fragment to determine whether the subject performs a certain task;
[0153] 4) Training segment: The time segment used to train the reconstruction model, which must be a segment of execution intention. Given a query segment of an EEG recording q, our goal is to determine whether the subject is performing a certain intention task T in this segment. i To achieve this goal, Figure 1 As shown in Figure 2, our reconstruction-based intention detection (RID) scheme consists of two phases: training phase and detection phase. In the training phase, several sets of EEG records obtained when performing a certain intention task are used to train a class-specific reconstruction model; in the detection phase, the queried EEG segments are input into the reconstruction model, and whether a certain motor intention is performed is determined based on its reconstruction error. Figure 1 As shown in the training phase of Figure 1, each candidate intention requires its own reconstruction model during the training phase. The reconstruction model is a high-level representation extracted from the EEG recordings of the candidate intention activity. It is compact and does not require manual processing and excessive expertise.
[0154] Formally, given a set of N EEG fragments In each period, the same purpose task T i , the reconstructed model is expressed as Where d is the dimension of the reconstructed model and θ is the input i are the parameters of the reconstruction model, which can be obtained by minimizing the loss function during the training phase:
[0155]
[0156] After the reconstruction model is established, for each EEG query segment q, the reconstruction error is calculated As a similarity measure, the relevance of the EEG query segment to the psychological intent is determined. Reconstruction error The smaller the EEG query segment q is, the smaller the psychological intention T i The greater the correlation.
[0157] Example
[0158] The present invention describes a new research problem, "whether" to perform a motor intention task, and proposes a reconstruction-based intention detection (RID) scheme that demonstrates the potential ability to solve such problems. In the field of traditional human intention analysis, most works try to answer questions such as "which one does the subject want to move". However, in practical applications, this may lead to incorrect operations. For example, a BCI system controls the opening or closing of a door with brain intention. If an algorithm is only aimed at recognizing that a person wants to open or close a door, when a user wants to open or close the door, he must wear an EEG headset and take off the headset after the door is opened or closed. If he has been wearing the headset, then the opening or closing of the door is uncertain. In order to solve such a practical problem, a question about whether a user is trying to control a door, that is, this "A or no" problem is much more difficult than the traditional "A or B" problem, because the present invention cannot define the "no" situation as the "A or B" problem is usually defined.
[0159] In response to this "A or No" problem, the present invention proposes a reconstruction-based intention detection scheme, which uses a reconstruction model to represent the "A" state and uses the reconstruction error to determine the correlation between the query and the "A" state instead of defining a "No" state. Systematic experiments are conducted on a large EEG dataset of 55 subjects who imagine their fists moving left or right. The feasibility of the proposed RID scheme is verified by using synthetic data with random values between the possible maximum and minimum EEG readings, an eyes-open baseline task, and an eyes-closed baseline task as three "No" cases as query fragments. The present invention shows good performance on synthetic query fragments, and can obtain "baseline" query fragments even in the environment of obtaining baseline data when acquiring intention execution task data, thereby obtaining competitive results. The present invention explores three query strategies for motion intention detection, namely, trial, record, and segment, and builds three different reconstruction models to implement the scheme to show its flexibility for various reconstruction models. In addition, the scheme of the present invention does not require any manual processing and excessively deep expertise.
[0160] There are many future research directions for such a "yes or no" question. One is to build a two-stage algorithm: the first stage is responsible for answering "whether" to try to move the fist; the second stage is responsible for answering "which" to try to move the fist. Another direction is to implement a real intention detection BCI system to evaluate the effectiveness of the scheme in real scenarios.
[0161] 1. The present invention evaluates the effectiveness of the RID scheme on a large-scale EEG motor intention dataset, which contains 55 subjects performing left / right fist opening and closing motor intention tasks, as well as two baseline tasks (eyes open and eyes closed). The EEG data were collected using a BCI2000 instrument with 64 electrode channels and a sampling rate of 160Hz. Each subject performed approximately 45 trials (continuous EEG recording time periods in which only a specific psychological task was performed), and the balance rate of left and right fist movement intentions was roughly the same. There were 2347 trials, 1179 for left fists and 1168 for right fists. Each trial lasted about 4 seconds, and data was selected from 1 second after the prompt (instructing the subject to perform a certain task) appeared until the end of the trial. Each trial completed a total of 497 time steps. During the baseline trial, the subject's eyes remained open or closed for 1 minute without performing any psychological tasks.
[0162] To evaluate intent detection solutions, two query fragments should be used:
[0163] 1) Intention execution query fragment: the query fragment in which the subject actually performs a certain intention task;
[0164] 2) Ordinary query fragments: query fragments in which a subject actually has any possible mental state, but does not include a specific intention.
[0165] However, the most difficult part of modeling such a "yes or no" question is that common query fragments may be in many different forms or even have nothing to do with each other. In addition, human activities such as walking or facial movements have a significant impact on EEG readings. Therefore, it is impossible to have a set of common query fragments to exhaustively define and model all "common" mental states. Taking into account the above situation and the fact that EEG signals are always noisy due to electrical reasons, the present invention establishes synthetic data to simulate the EEG readings of "no" in the case of performing a certain motor intention. The synthetic data is constructed using random values between the possible maximum and minimum EEG readings. At the same time, in order to evaluate the effectiveness of the proposed RID scheme, two baseline tasks in the dataset, namely eyes open and eyes closed, are used as special states of "no" to perform a certain motor intention. Therefore, the present invention tested three common query fragments and one intention to execute the query fragment:
[0166] 1) Synthetic query fragment: a query fragment built by randomly selecting a value between the maximum and minimum possible EEG readings;
[0167] 2) Eyes-open query snippets: query snippets generated using the eyes-open task in the dataset;
[0168] 3) Eyes closed query snippets: query snippets generated using the eyes closed task in the dataset.
[0169] 4) Intent execution query fragment: The intent execution fragment is used as a query fragment.
[0170] 2. The present invention evaluates the RID scheme to detect two motion intention tasks: imagining the movement of the left fist and the right fist. Therefore, two RID schemes are constructed using the left fist action intention fragment and the right fist action intention fragment in the training phase. One attempts to answer "whether to imagine moving the left fist", and the other attempts to answer "whether to imagine moving the right fist". The left fist action intention fragment and the right fist action intention fragment are respectively divided into two parts: one part is used as a training fragment, and the other part is used as a query fragment.
[0171] Since a single EEG trial is a long-term trial containing multiple EEG recordings / time steps, the present invention adopts three EEG data organization strategies (query strategies) to evaluate the RID scheme, namely, trial strategy, recording strategy and slice strategy.
[0172] 1) Experimental strategy
[0173] The present invention uses separate EEG trials, each of the shape (height = 64, length = 497) as examples to train the reconstruction model. The height 64 corresponds to 64 EEG channels, while the length is the number of recording time points in a single EEG trial. In the detection phase, the query fragment is also a separate EEG trial with the same shape as used for training. For each evaluation task, 90% of the intended execution fragment tests are randomly selected to train the reconstruction model, and the remaining 10% of the tests are used as query fragments to evaluate the RID scheme. The recordings of the baseline task are cut into fragments of the same shape (height = 64, length = 497) and tested separately using a sliding window method without any overlap. The present invention has the same number of synthetic fragments, containing the query fragments of the intended execution. In this strategy, a CNN autoencoder is used as an autoencoder reconstruction model.
[0174] 2) Recording strategy
[0175] Since there are many records, each of which is recorded at a single point in time, the present invention uses a single record as input to the reconstruction model. Therefore, an EEG trial is divided into several record vectors, each of which has 64 elements, corresponding to 64 EEG channels. Taking into account that an EEG trial may have potential similarities that affect the evaluation process, the records of the same EEG trial are used as training fragments or query fragments. The present invention still uses 90% of randomly selected trials for training and the remaining 10% of trials for evaluation. The processing of common query fragments is consistent with the training instances. A fully connected autoencoder is used as a specific autoencoder reconstruction model.
[0176] 3) Slicing strategy
[0177] Similar to the recording strategy, the EEG trial was divided into several time slices as the period of interest. Specifically, an EEG trial of a shape (height = 64, length = 497) was cut into 18 slices of shape (height = 64, length = 320) using a sliding window technique with a window size of 320 and a sliding step of 10. The present invention still uses all slices of the same trial in the training phase or the detection phase to avoid the same trial similarity. The baseline EEG recording was also processed using the sliding window method with the same settings. Similar to the experimental strategy, a CNN autoencoder was used as an autoencoder reconstruction model.
[0178] Table 1: Left fist: Normalized relative average reconstruction error of common query fragments to intended execution query fragments on different purpose tasks, query strategies and reconstruction models.
[0179]
[0180] Table 2: Right fist: Normalized relative average reconstruction error of common query fragments to intended execution query fragments on different purpose tasks, query strategies and reconstruction models.
[0181]
[0182] 3. In two EEG-based motion intention detections, the present invention evaluates the performance of the RID scheme implemented by subspace projection, autoencoder and sparse dictionary learning. The present invention conducted systematic experiments on the EEG data of 55 subjects with three query strategies. Since the smaller the hypothesis value, the larger the reconstruction error and the greater the correlation between the query fragment and the purpose, the present invention uses the relative average reconstruction error from the ordinary query fragment to the intention execution query fragment to evaluate the detection ability of the proposed scheme. The present invention normalizes the relative average error by dividing the average reconstruction error of the intention fragment of the execution query.
[0183] Normalized relative mean error (NRME) φ relative Defined as:
[0184]
[0185]
[0186] φ o and φ i are the average reconstruction errors of the common and intended execution query fragments, respectively. The overall results are shown in Tables 1 and 2. The results show that under all query strategies and reconstruction models, for both intent tasks, the average reconstruction errors of the three types of common query fragments are always greater than those of their corresponding intended execution fragments. This indicates that the reconstruction-based scheme has the potential to identify intended execution or common query fragments, and thus can detect human intentions. The reconstruction error of the synthetic query fragments is about 15 to 35 times that of the intention execution query fragments, which means that the RID scheme of the present invention is very powerful in dealing with noisy common query fragments. Compared with the synthetic query fragments, the difference in reconstruction error between the baseline query fragments (eyes closed or eyes open) and the intention execution query fragments is relatively small. The reason for this result is that the EEG acquisition conditions of the intention execution task and the baseline task are similar: the subjects are required to sit in front of the computer, perform the intention and baseline tasks simultaneously in the same time period, and do not make unnecessary body movements. In addition, imagining fist movement mainly affects three EEG channels "c3, c4, and cz", while other channels may fluctuate in a similar way to the baseline task. Even with this special query condition, the RID solution of the present invention can still achieve a difference of about 30% in reconstruction error.
[0187] For the left and right fist intention tasks, the subspace projection reconstruction model adopted a slicing query strategy and obtained the best average results. When analyzed in detail, the subspace projection method with a record query strategy obtained the best results in most cases, while the results obtained were slightly lower than the best results in other cases. The instance input dimension of the record query strategy is smaller, 64, while the instance dimensions of the three-axis or slice query strategies are 64×497 and 64×320, respectively, which are much larger than the instance dimension of the record query strategy. This increases the difficulty of building a robust reconstruction model. In addition, compared with other strategies, the record strategy has more training examples, which also helps to train a better generalized reconstruction model.
[0188] Figure 3-6 Detailed statistical experimental results of two intent detection tasks are described. The normalized relative reconstruction error is calculated as follows:
[0189]
[0190] where e k is the reconstruction error of the kth instance, is the average reconstruction error of the intent executing the query fragment.
[0191] As shown in Tables 1 and 2, the reconstruction error of the synthetic query fragment is one order of magnitude larger than the reconstruction error of the intended query fragment, so the present invention does not add it to the reconstruction error distribution diagram ( Figure 3 and Figure 5 ).
[0192] The results show that under all query strategies and all reconstruction models, the leftmost part of the relative reconstruction error distribution only appears for the intent fragments of the executed query. This means that the reconstruction model successfully reveals the underlying patterns of the training EEG signals. However, the eyes-open and eyes-closed query fragments obtain a large overlap in the reconstruction error distribution of the query fragments of the intent execution. This is largely due to the similar situation when implementing the experiments to obtain EEG data for different tasks, resulting in only a few EEG channels working in different ways. In the general case, the EEG readings can be any possible value (synthetic query fragments), and Tables 1 and 2 show that their relative reconstruction errors are much larger than the reconstruction errors of the intent execution query fragments.
[0193] In order to make a final decision, the present invention must use a threshold so that the query fragments with a reconstruction error less than this threshold can be classified as performing a certain intention task, and the query fragments with a reconstruction error greater than this threshold are determined as not performing a certain intention task. The present invention uses precision and recall to describe the performance of the present invention under different thresholds. Precision can be interpreted as "how accurate it is when an EEG cycle is determined as whether a certain intention is performed". The higher the value of precision, the fewer uncertain operations the system has, and therefore the higher the reliability of the system. Recall can be interpreted as "multiple intentions are performed, and how many intentions can be identified". The higher the value of recall, the more sensitive the system is. Therefore, both accuracy and recall are very important for building an effective and efficient system. Figure 4 and Figure 6 The average precision recovery threshold curves for the left and right fist intention tasks are shown separately. The results show that the precision of all strategies and reconstruction models can reach about 100% at a lower threshold, and then drop to 50% of the random value as the threshold increases. The peak of recall occurs to the right of the peak of precision. The fluctuation range of recall is very small, ranging from 50% to 65%.
[0194] The F1 score is an evaluation method that takes both precision and recall into account. Figure 7 The F1 scores with the optimal decision threshold under different query strategies and different reconstruction models are shown. The results show that when balancing precision and recall, the slicing query strategy gives the best results, and the record query strategy has a significantly lower F1 score than the other two strategies. In most cases, the subspace projection-based reconstruction model provides the best F1 score, while in other cases it can also be highly competitive. The best F1 score for left fist movement intention detection is 66.64%, and the best F1 score is R using the subspace projection reconstruction model and the slicing query strategy. Using the subspace projection reconstruction model, combined with the trial query strategy, the detection rate of right fist movement intention is 66.38%. In general, if Figure 8 and Fig. 9 As shown, by arbitrarily selecting possible EEG values, the proposed RID scheme achieves perfect performance within a certain threshold range. In summary, the subspace projection model provides a wider threshold range for perfect performance detection.
[0195] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for detecting human movement intention based on a reconstruction model, characterized in that: Step 1: In the training phase, the reconstruction model is trained using the EEG signals of the artificial processing intention task, including feature extraction and classification steps. The feature extraction step uses the combined algorithm wavelet group FBCSP to extract features. The classification step uses the classifier to classify and identify whether the user is performing a certain movement intention task. Step 2: During the detection phase, the EEG cycle to be determined is input into the reconstruction model to calculate its reconstruction error; The smaller the reconstruction error, the greater the possibility that a certain motor intention task exists in the EEG cycle; The reconstruction model is trained by using subspace projection. The reconstruction model can also be used as a classifier. The reconstruction model is trained for classification and each sample is classified into the category that best suits the reconstruction model. Autoencoder,To train the reconstruction model, two types of autoencoders were applied,: fully connected autoencoder and CNN autoencoder, according to three query strategies,,i.e., trial-based, record-based, and segment-based,for motion intention detection; Sparse dictionary learning is used as a reconstruction model to implement the RID scheme. The sparse representation of the input data is learned through the dictionary, which leads to redundant atoms and allows a single sample to have multiple representations. The potential representation is composed of a dictionary consisting of several atoms and a sparse code. During the reconstruction process, the sparse code is used, as well as the atoms themselves and linear combinations of atoms to approximate the original input; Using subspace projection, we define a set of m-dimensional vectors, which belong to R d The sample x belongs to R m Samples of (m≤d) And the principal component is obtained by an m-dimensional vector with three properties, which are as follows: 1) The principal components are orthogonal; 2) The first principal component has the largest variance, and the variance of each subsequent component gradually decreases; 3) The sum of the changes in all principal components is equal to the sum of the changes in the original variables; Assumptions is composed of d-dimensional vectors v1, v2...v d The goal is to reconstruct the correlation matrix calculated from the training set, calculate d eigenvalue and eigenvector pairs from R, and sort them by eigenvalue to obtain (λ1,e1),(λ2,e2),...,(λ d ,e d ), where λ1≥λ2≥...λ d ;and Sample x=(x1,x2,...x d ) T The i-th principal component can be calculated as: Select the first m eigenvalues and eigenvector pairs (λ1,e1),(λ2,e2),...,(λ m ,e m ), the projection matrix P is obtained as: P=(e1,e2...e m ) T (3) in So any observation x can be transformed into: y=Px (4) in Due to the properties of eigenvectors, the reconstruction process is simple: It should be noted that only when m=d,P -1 =P T , the reconstruction is perfect; otherwise, due to compression, and x are different, set m<d, Considering that an overly perfect reconstruction may limit the effectiveness of identifying data patterns from the reconstruction loss; Therefore, the reconstruction model based on subspace projection can be defined as: in It can be calculated by obtaining the projection matrix of PCA; after training, the reconstruction error of the EEG query segment q can be calculated as: Taking the autoencoder as the reconstruction model, two types of autoencoders, fully connected autoencoder and CNN autoencoder, are applied according to three query strategies for motion intention detection, namely, trial, record and segment, as follows: Fully Connected Autoencoder The fully connected autoencoder consists of an encoder m is the dimension of the hidden layer and a decoder Each layer consists of corresponding weights W, biases b and activation functions: Φ=f Φ (W Φ x+b Φ ) (7) Ψ=f Ψ (W Ψ x+b Ψ ) (8) in and f Φ and f Ψ Respectively represent the encoding activation function and the decoding activation function, and the reconstruction model is defined as: The parameter θ can be obtained by minimizing: After training, the reconstruction error of the EEG query segment q can be calculated as: It should be noted that using a linear activation function, the autoencoder can generate the same subspace as PCA; therefore, the nonlinear rectified linear unit is used as the activation function; CNN Autoencoder Since EEG signals are time series data with multiple channel readings at each time point, the input data of the autoencoder can be in two-dimensional (2D) format; therefore, we apply CNN autoencoder as a reconstruction model to process 2D EEG data; similar to the fully connected autoencoder, CNN autoencoder also has an encoder part and a decoder part; the main difference is that the encoder and decoder parts are mainly built using convolutional neural networks; Specifically, there are three 2D-CNN layers in the encoder stage, each followed by a max pooling layer, and three upsampling layer and convolution layer pairs in the decoder layer; to formalize the 2D convolution operation, the value of the neuron at position (x, y) in the k-th feature map of layer l is given by: where relu(x)=max(0,x) is the activation function; in this equation, b kl Yes th Layer k th The bias of the feature map, is the weight at (p,q) connected to the kernel of this feature map, covering the feature map in the previous layer, P k and Q l Indicates the size of the kernel; After each convolutional layer, a maximum pooling operation with a stride of [2×2] is applied to reduce the data dimension by half. Therefore, in the decoder stage, the data dimension needs to be expanded twice in each decoder layer. There are two ways to expand the decoder phase data dimension: transposed convolution operation and upsampling interpolation, using the nearest neighbor upsampling interpolation method and convolution layer as the basic components of the decoder phase. After the CNN decoder, a final output layer is used to reconstruct the input data. The final output layer is a convolutional layer, and the output data size is the same as the input data size. Use stochastic gradient descent with the Adam update rule to minimize the loss function: where θ i is the parameter set of the neural network, and the network parameters are 10 -4 Optimize the learning rate; Step 3: Sparse dictionary learning as a reconstruction model to implement the RID scheme The latent representation is composed of a dictionary of several atoms and a sparse code. During the reconstruction process, the sparse code, as well as the atoms themselves and linear combinations of atoms, is used to approximate the original input; formally, the reconstruction model is defined as: where θ i =[d1,d2,...,d m ] is a dictionary containing m atoms, is the input vector The sparse code of , most of the coefficients are zero or close to zero to construct an over-complete dictionary, and the dictionary dimension m is set to be larger than the input dimension d; Supercomplex dictionaries do not require atoms to be orthogonal, thus allowing for more flexible dictionaries and richer data representations; the dictionary θ i and sparse code c i It can be learned during the training phase by solving the following optimization problem: Obey||d k ||2=1 represents all 1≤k≤m; the first term is the data fitting term, and the second term is the sparsity-induced regularization; this minimization problem is an NP-hard problem because of the l0-norm, and it can be approximated by replacing the l0-norm with its convex relaxation, that is, using the l1-norm; for θ i and c i For example, one is fixed, then the problem becomes a convex problem; we get an approximate result because it is not jointly convex (θ i ,c i ); The optimal sparse code and dictionary can be obtained through the alternating update scheme: 1) Sparse code approximation: Update the sparse code c by solving equation (15) i , and use the dictionary modified by the previous iteration; 2) Dictionary refinement: Update the dictionary θ by solving equation (15) i , and use the sparse code fixed in the previous iteration; In the detection phase, given a query fragment q, its sparse code can be calculated as c i (q), and the reconstruction is represented as θ i c i (q); therefore the reconstruction error is After obtaining the reconstruction error, an intent threshold needs to be applied to determine whether the query fragment is an intent execution fragment or a normal fragment; A given observation period can be divided into a series of short segments. The intention detection task can be regarded as determining whether a subject is executing a certain intention in a short segment, and the research target is transformed from a long period that may have both intention execution and non-intention execution parts to a short segment with or without intention. The intention-demonstration segment is a time segment during which a subject demonstrates an intention task; the ordinary segment is a time segment when a subject does not perform a certain intention task; the query segment is a time segment to determine whether the subject performs a certain task; the training segment is a time segment used to train the reconstruction model, which must be a segment of execution intention.
2. The human body movement intention detection method based on reconstruction model according to claim 1 is characterized in that: Given a query segment of an EEG recording q, determine whether the subject is performing a certain intention task T in the segment i ;Formally, given a set of N EEG fragments In each period, the same purpose task T i , the reconstructed model is expressed as d is the dimension of the R set space in the reconstruction model and θ i are the parameters of the reconstruction model, which can be obtained by minimizing the loss function during the training phase: After the reconstruction model is established, for each EEG query segment q, the reconstruction error is calculated As a similarity measure, the relevance of the EEG query fragment to the psychological intention is determined; Reconstruction error The smaller the EEG query segment q is, the smaller the psychological intention T i The greater the correlation.
3. The method for detecting human movement intention based on reconstruction model according to claim 1, characterized in that: Performance of the RID scheme implemented by subspace projection, autoencoder, and sparse dictionary learning in motion intention detection for yes or no execution. The relative average error is normalized by dividing the average reconstruction error of the intent segments of the execution query; Normalized relative mean error (NRME) φ relative Defined as: φ o and φ i are the average reconstruction errors for the normal and intended execution query fragments, respectively.
4. The method for detecting human movement intention based on a reconstruction model according to claim 1, characterized in that: The normalized relative reconstruction error is calculated as follows: where e k is the reconstruction error of the kth instance, is the average reconstruction error of the intent executing the query fragment.
Citation Information
Patent Citations
Image classification method based on characteristic weight learning and nuclear sparse representation
CN102930301A
Plant image set classification identification method based on nonlinear reconfiguration model
CN106127240A
Electroencephalogram signal identification method based on emotional inducement
CN106725452A
Method and device for detecting electroencephalogram through kernel function and dictionary pair learning model
CN108742603A
electroencephalogram signal feature extraction and classification recognition method based on LSTM-FC
CN109583346A
