An electromyographic signal self-supervised pre-training method based on a mask autoencoder

By employing a self-supervised pre-training method using a masked autoencoder, the problem of insufficient electromyographic signal datasets was addressed, improving the robustness and generalization ability of the model and achieving more efficient electromyographic pattern recognition.

CN116049635BActive Publication Date: 2025-10-21SHANGHAI HUINENGXUN TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310037682.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-09
Publication Date
2025-10-21
Estimated Expiration
2043-01-09

AI Technical Summary

Technical Problem

Existing electromyography pattern recognition methods suffer from poor model generalization ability and reduced robustness under electrode offset and cross-user differences due to insufficient dataset size and insufficient labels.

Method used

We employ a self-supervised pre-training method for electromyographic signals based on a masked autoencoder. This method performs self-supervised learning by randomly masking part of the signal information. Using a Transformer encoder and decoder architecture, we reconstruct the original signal to obtain robust feature representations, which are then transferred to downstream tasks.

Benefits of technology

It improves the training speed and accuracy of the electromyography signal model, enhances the model's generalization ability, and enables it to perform well in different downstream tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116049635B_ABST
    Figure CN116049635B_ABST
Patent Text Reader

Abstract

The application relates to a kind of myoelectric signal self-supervised pre-training methods based on mask autoencoder, comprising the following steps: the high-density surface myoelectric signal X (n) of M channel length N is preprocessed into a set of word vectors that can be used for Transformer input;Part of the word vectors is masked as network input using a mask mechanism;The network uses an asymmetric encoder and decoder structure in series, that is, the encoder can only see the unmasked part of the word vector information, while the decoder decodes the feature information of all word vectors;Myoelectric signal reconstruction is used as a self-supervised learning task, that is, the myoelectric signal is mapped to a feature vector using the encoder, and the original signal is reconstructed using the feature information obtained by the decoder;The encoder pre-trained through the above self-supervised task can be directly used for various downstream tasks after fine-tuning on the downstream data set.The application can greatly accelerate the training speed during model fine-tuning and improve the accuracy, and the downstream migration performance is better than supervised pre-training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of biomedical signal processing, artificial intelligence and computer application technology, and in particular to a self-supervised pre-training method for electromyographic signals based on a masked autoencoder. Background Art

[0002] Electromyography (EMG) is the fusion of the spatiotemporal superposition of motor unit action potentials (MUAPs) involved in muscle activity at the detection electrode. It can be acquired noninvasively using electrodes placed on the skin surface. In recent years, with improvements in gate technology and the development of microprocessors, flexible high-density electrode arrays have been proposed for collecting high-density surface EMG (HD-sEMG). By combining the powerful data modeling and feature extraction capabilities of deep learning algorithms, these arrays can decode the activation patterns and movement information of EMG signals for applications such as myoelectric control, human-computer interaction, and medical rehabilitation.

[0003] However, surface electromyography (EMG), as a weak, non-stationary physiological signal, is inevitably affected by electrode offset, inter-user variability, and variations in muscle force levels, resulting in reduced robustness of myoelectric control. Furthermore, insufficient EMG sample size and lack of manual annotation impair the generalization ability of deep learning models, leading to slow convergence and overfitting of large models on small datasets.

[0004] To address these issues, self-supervised pre-training methods have been proposed to learn universal representations of raw signals. These methods, without the need for manual labeling, rely on the inherent structure of the data itself for knowledge learning, enabling easy transfer to multiple downstream application scenarios and improving the robustness of model training. Masked Autoencoders (MAEs), a novel self-supervised learner, work by randomly masking portions of signal or image information and treating signal or image reconstruction as a self-supervised learning task. This significantly accelerates model training and improves accuracy, outperforming supervised pre-training on downstream transfer tasks and demonstrating excellent scalability. The advantages of this masking concept have been demonstrated in image classification and speech processing, but its application to electromyography (EMG) is relatively limited. Therefore, a self-supervised pre-training method for EMG signals based on MAEs is proposed. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide a self-supervised pre-training method for electromyographic signals based on a masked autoencoder, which solves the problems that the existing electromyographic pattern recognition is often supervised learning with labels, the insufficient capacity of the data set leads to poor generalization ability of the model, and the robustness of the model is reduced under interference from factors such as electrode offset and cross-user.

[0006] The above-mentioned object of the present invention is achieved through the following technical solutions:

[0007] A self-supervised pre-training method for electromyographic signals based on a masked autoencoder comprises the following steps:

[0008] Step 1: Signal acquisition: collect high-density surface EMG signals at a sampling frequency of f_s, expressed as: X(n)=[x_1(n),x_2(n),…,x_m(n),], 1≤m≤M, 0≤n≤N; where x_m(n) is the discrete EMG signal of the mth channel, M is the total number of channels, and N is the total number of sample points recorded;

[0009] Step 2: Signal preprocessing: Under the self-supervised pre-training scheme, the surface electromyography signals of different gestures are collected and their labels are removed. The power frequency interference and equipment electronic noise are filtered through a bandpass filter.

[0010] Step 3: Signal segmentation: Use continuous and non-overlapping sliding windows to segment each EMG signal data segment x_m (n) of length N into a series of data frames to represent the timing information of the signal. The total number of frames is set to T, and the data length of each frame is N / T.

[0011] Step 4: Signal masking: Convert all segmented data frames into M∙T word vectors of length N / T. Randomly and uniformly select D of these word vectors for masking, and retain the rest.

[0012] Step 5: Encoder input: Use position encoding to add position mapping information to the unmasked (M∙TD) word vectors as the encoder input. The encoder adopts the standard Transformer structure.

[0013] Step 6: The decoder reconstructs the original signal. The decoder input contains two parts of information: the unmasked word vector is generated by the feature vector of the encoder and the masked word vector information. The masked word vector information is all represented by the same learnable feature vector. The original signal is reconstructed from the potential representation and the mask mark.

[0014] Step 7: Downstream migration: migrate the encoder trained on the above masked self-supervised task to the downstream dataset, and after fine-tuning it, it can be used for different EMG pattern recognition tasks.

[0015] In a preferred example, the present invention may be further configured as follows: in the step 2, the frequency of the band-pass filter is 20-500 Hz.

[0016] In a preferred example, the present invention can be further configured as follows: in step four, setting random sampling with a high masking ratio can reduce redundant information between data frames, and the uniformly distributed selection prevents potential center bias, forcing the model to learn the global features of the signal rather than the local features, thereby obtaining better signal reconstruction capabilities.

[0017] In a preferred example, the present invention can be further configured as follows: in step five, the network adopts an asymmetric encoder-decoder architecture, in which the encoder only analyzes visible and unmasked word vectors, reducing memory consumption and speeding up training, while the complete word vector set is processed by a lightweight decoder, greatly reducing training time.

[0018] In a preferred example, the present invention can be further configured as follows: in step 6, the Transformer cannot learn position information, and a position code needs to be added to indicate the position of the mask part in the complete word vector;

[0019] Using the mean square error between the original signal and the reconstructed signal as the loss function, calculating the average mean square error of each word vector and normalizing it can significantly improve the representation quality.

[0020] In a preferred embodiment, the present invention may be further configured as follows: in step seven, the decoder is only used to perform the signal reconstruction task during the self-supervised pre-training phase, and only the encoder is used to generate a feature vector that can effectively characterize the signal;

[0021] The decoder architecture can be flexibly designed independently of the encoder, and has good scalability compared to direct supervised training on the original dataset.

[0022] In summary, the present invention includes at least one of the following beneficial technical effects:

[0023] 1. The present invention discloses a self-supervised pre-training method for electromyographic signals based on a masked autoencoder. Under self-supervised learning, electromyographic signal data does not need to be manually labeled, which solves the problem of insufficient data volume / data set.

[0024] 2. This self-supervised pre-training method for electromyographic signals avoids the overfitting problem of large models of deep learning algorithms on small data sets.

[0025] 3. This self-supervised pre-training method for electromyographic signals can learn a more robust representation of electromyographic signals, further improving the accuracy of classification and recognition.

[0026] 4. The pre-trained encoder of this electromyographic signal self-supervised pre-training method has stronger generalization ability and can be extended to different downstream tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 Flowchart of the present invention.

[0028] Figure 2 This is a schematic diagram of the mask encoding of electromyographic signals provided by the present invention. DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application; it is obvious that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0030] Example 1:

[0031] Reference Figure 1 , is a self-supervised pre-training method for electromyographic signals based on a masked autoencoder disclosed in the present invention, comprising the following steps:

[0032] Step 1: Signal acquisition: collect high-density surface EMG signals at a sampling frequency of f_s, expressed as: X(n)=[x_1(n),x_2(n),…,x_m(n),], 1≤m≤M, 0≤n≤N; where x_m(n) is the discrete EMG signal of the mth channel, M is the total number of channels, and N is the total number of sample points recorded;

[0033] Step 2: Signal preprocessing: Under the self-supervised pre-training scheme, the surface electromyography signals of different gestures are collected and their labels are removed. The power frequency interference and equipment electronic noise are filtered through a bandpass filter.

[0034] Step 3: Signal segmentation: Use continuous and non-overlapping sliding windows to segment each EMG signal data segment x_m (n) of length N into a series of data frames to represent the timing information of the signal. The total number of frames is set to T, and the data length of each frame is N / T.

[0035] Step 4: Signal masking: Convert all segmented data frames into M∙T word vectors of length N / T. Randomly and uniformly select D of these word vectors for masking, and retain the rest.

[0036] Step 5: Encoder input: Use position encoding to add position mapping information to the unmasked (M∙TD) word vectors as the encoder input. The encoder adopts the standard Transformer structure.

[0037] Step 6: The decoder reconstructs the original signal. The decoder input contains two parts of information: the unmasked word vector is generated by the feature vector of the encoder and the masked word vector information. The masked word vector information is all represented by the same learnable feature vector. The original signal is reconstructed from the potential representation and the mask mark.

[0038] Step 7: Downstream migration: migrate the encoder trained on the above masked self-supervised task to the downstream dataset, and after fine-tuning it, it can be used for different EMG pattern recognition tasks.

[0039] In step 2, the frequency of the bandpass filter is 20-500 Hz.

[0040] In step 4, setting random sampling with a high masking ratio can reduce redundant information between data frames. Uniformly distributed selection prevents potential center bias and forces the model to learn the global features of the signal rather than the local features, thereby obtaining better signal reconstruction capabilities.

[0041] In step five, the network adopts an asymmetric encoder-decoder architecture, in which the encoder only analyzes the visible, unmasked word vectors, reducing memory consumption and speeding up training, while the complete set of word vectors is processed by a lightweight decoder, greatly reducing training time.

[0042] In step six, the Transformer cannot learn position information, so position encoding needs to be added to indicate the position of the mask part in the complete word vector. Using the mean square error between the original signal and the reconstructed signal as the loss function, calculating the average mean square error of each word vector and normalizing it can significantly improve the representation quality.

[0043] In step seven, the decoder is only used to perform the signal reconstruction task in the self-supervised pre-training phase, and only the encoder is used to generate feature vectors that can effectively represent the signal; the decoder architecture can be flexibly designed independently of the encoder, and has good scalability compared to directly performing supervised training on the original dataset.

[0044] Reference Figure 2, the high-density surface electromyographic signal X(n) with M channels and length N is preprocessed into a set of word vectors that can be used for Transformer input; a masking mechanism is used to mask some of the word vectors and then use them as network input; the network adopts an asymmetric encoder and decoder series structure, that is, the encoder can only see the unmasked part of the word vector information, while the decoder decodes the feature information of all word vectors; the electromyographic signal reconstruction is used as a self-supervised learning task, that is, the encoder is used to map the electromyographic signal into a feature vector, and the feature information obtained by the decoder is used to reconstruct the original signal; the encoder pre-trained by the above self-supervised task can be directly used for various downstream tasks after fine-tuning on the downstream dataset.

[0045] The present invention performs self-supervised pre-training of high-density surface electromyography signals based on a masked autoencoder, which can greatly accelerate the training speed and improve the accuracy during model fine-tuning. The downstream migration performance is better than that of supervised pre-training, and it has good scalability and robustness.

[0046] The implementation principle of this embodiment is as follows: The present invention discloses a self-supervised pre-training method for electromyographic signals based on a masked autoencoder. Under self-supervised learning, the electromyographic signal data does not need to be manually labeled, which solves the problem of insufficient data volume / data set. It not only avoids the overfitting problem of large models of deep learning algorithms on small data sets. It can also learn a more robust representation of electromyographic signals, further improving the accuracy of classification and recognition. In addition, this encoder has stronger generalization capabilities and can be extended to different downstream tasks.

[0047] The embodiments of this specific implementation method are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A self-supervised pre-training method for electromyographic signals based on masked autoencoders, characterized in that: The following steps are involved: Step 1: Signal acquisition: collect high-density surface EMG signals at a sampling frequency of f_s, expressed as: X(n)=[x_1(n),x_2(n),…,x_m(n),], 1≤m≤M, 0≤n≤N; where x_m(n) is the discrete EMG signal of the mth channel, M is the total number of channels, and N is the total number of sample points recorded; Step 2: Signal preprocessing: Under the self-supervised pre-training scheme, the surface electromyography signals of different gestures are collected and their labels are removed. The power frequency interference and equipment electronic noise are filtered through a bandpass filter. Step 3: Signal segmentation: Use continuous and non-overlapping sliding windows to segment each EMG signal data segment x_m (n) of length N into a series of data frames to represent the timing information of the signal. The total number of frames is set to T, and the data length of each frame is N / T. Step 4: Signal masking: Convert all segmented data frames into M∙T word vectors of length N / T. Randomly and uniformly select D of these word vectors for masking, and retain the rest. Step 5: Encoder input: Positional encoding is used to add position mapping information to the unmasked (M∙TD) word vectors as encoder input. The encoder adopts a standard Transformer structure. Step 6: Decoder reconstructs the original signal. The decoder input contains two parts of information: the unmasked word vectors generated by the encoder feature vector and the masked word vector information. The masked word vector information is all represented by the same learnable feature vector. The original signal is reconstructed from the latent representation and the masked label. Step 7: Downstream migration: The encoder trained by the above masked self-supervised task is migrated to the downstream dataset and fine-tuned for different EMG pattern recognition tasks.

2. The method for self-supervised pre-training of electromyographic signals based on a masked autoencoder according to claim 1, wherein: In the step 2, the frequency of the bandpass filter is 20-500 Hz.

3. The method for self-supervised pre-training of electromyographic signals based on a masked autoencoder according to claim 1, wherein: In step 4, setting random sampling with a high masking ratio can reduce redundant information between data frames. Uniformly distributed selection prevents potential center bias and forces the model to learn the global features of the signal rather than the local features, thereby obtaining better signal reconstruction capabilities.

4. The method for self-supervised pre-training of electromyographic signals based on a masked autoencoder according to claim 1, wherein: In step five, the network adopts an asymmetric encoder-decoder architecture, in which the encoder only analyzes visible, unmasked word vectors, reducing memory consumption and speeding up training, while the complete word vector set is processed by a lightweight decoder, greatly reducing training time.

5. The method for self-supervised pre-training of electromyographic signals based on a masked autoencoder according to claim 1, wherein: In step 6, the Transformer cannot learn position information, so it is necessary to add position encoding to indicate the position of the mask part in the complete word vector; Using the mean square error between the original signal and the reconstructed signal as the loss function, calculating the average mean square error of each word vector and normalizing it can significantly improve the representation quality.

6. The method for self-supervised pre-training of electromyographic signals based on a masked autoencoder according to claim 1, wherein: In step 7, the decoder is only used to perform the signal reconstruction task in the self-supervised pre-training stage, and only the encoder is used to generate a feature vector that can effectively represent the signal; The decoder architecture can be flexibly designed independently of the encoder, and has good scalability compared to directly performing supervised training on the original dataset.

Citation Information

Patent Citations

  • Knowledge migration method for improving remote sensing downstream task performance

    CN115346130A

  • Electrocardiogram characterization self-supervised learning method

    CN115429286A