TrustEMG-Net: Robust sEMG Denoising Framework
- The paper’s main contribution is integrating U-Net with a representation-masking Transformer to effectively suppress noise in sEMG signals.
- It employs a synergistic design where local convolutional feature extraction is combined with global self-attention, validated by improvements in SNR and RMSE.
- The framework outperforms traditional denoising methods, enabling robust applications in clinical monitoring, prosthetics, and human-computer interaction.
TrustEMG-Net is a neural network-based framework for single-channel surface electromyography (sEMG) denoising, employing a synergistic architecture that combines U-Net and a representation-masking Transformer encoder. Designed specifically to enhance robustness and generalizability across diverse noise sources and signal-to-noise ratio (SNR) conditions, TrustEMG-Net advances the state of sEMG enhancement by leveraging nonlinear representation learning in a denoising autoencoder structure (Wang et al., 2024).
1. Architectural Design: U-Net and Representation-Masking Transformer
TrustEMG-Net integrates the local feature extraction capacity of U-Net with global context modeling via a Transformer encoder, connected through a learnable feature-space mask. The network is configured for end-to-end single-channel waveform denoising.
- U-Net Encoder: Accepts a noisy waveform and processes it through five 1D convolutional layers (kernel size 8, ReLU activations). Stride-1 at the first layer yields features, with subsequent layers doubling feature channels and halving time resolution, ending at . Features from each encoding stage are preserved for skip connections.
- Transformer Bottleneck: The encoded tensor receives sinusoidal positional encoding before passing through a single Transformer encoder layer (multi-head self-attention, 8 heads, ). The output is mapped to via a sigmoid, producing a learnable representation mask . The mask modulates via elementwise product: .
- Intuition: Channels with 0 close to 1 preserve sEMG information, while those near 0 are suppressed as likely noise.
- U-Net Decoder: Four upsampling modules (transpose convolution and convolutional layer, with batch norm and ReLU) reconstruct temporal resolution; skip connections inject preserved features. A final transposed convolution restores the signal to 1.
The end-to-end process begins with a 2-second noisy sEMG segment, transforms its latent space through U-Net encoding, globally contextualizes features with the masked Transformer, and reconstructs a denoised waveform using the decoder with multi-scale skip connections.
2. Mathematical Formulation
The U-Net encoder's per-layer operation for the 2-th block is: 3 where 4 denotes 1D convolution, and 5, 6 are the layer-specific weights and biases.
Self-attention in the Transformer is computed as: 7 with multi-head formulation: 8
The representation-masking operation is: 9 where 0 denotes the elementwise sigmoid and 1 the Transformer mapping.
The network is supervised via an L1 loss between ground-truth 2 and denoised output 3: 4 No adversarial or perceptual losses are incorporated.
3. Data Preparation and Training Protocol
- Signal Source: Clean sEMG is sourced from the Ninapro DB2 database (40 subjects, 12 channels, Exercises 1–2), undergoing bandpass filtering (20–500 Hz, 4th-order Butterworth), 1 kHz downsampling, normalization, and 2-second window segmentation (non-silent data only).
- Noise Contaminants: Five types are synthesized: baseline wander (MIT-BIH NSTDB), powerline interference (58.5–61.5 Hz drifting sine), ECG (MIT-BIH NSR), motion artifacts (NSTDB and tapping datasets), and white Gaussian noise. Mixtures of three or all five contaminants are created, each with equal energy contribution.
- SNR Conditions: Training SNRs are 5 dB; testing SNRs are 6 dB.
- Optimization: The Adam optimizer is used with a decaying learning rate (0.01 for 3 epochs, 0.001 through 30 epochs, then 0.0001) and a batch size of 256. Early stopping is triggered if validation loss stagnates for 15 epochs. Evaluation uses four-fold subject-wise cross-validation (10 subjects per fold).
4. Performance Evaluation and Comparative Results
TrustEMG-Net is benchmarked against five classical denoising algorithms (IIR, TS+IIR, EMD, CEEMDAN, VMD) and four neural baselines (CNN, FCN, U-Net, and TrustEMG-Net without masking). Evaluation addresses both reconstruction fidelity and feature preservation using five metrics:
- SNR Improvement (7): Gain between output and input SNRs.
- RMSE: Root mean squared error between target and output.
- Percentage RMS Difference (PRD)
- ARV-RMSE: Root mean square error of the average rectified value over 200 ms windows.
- MF-RMSE: RMSE for mean frequency across 10–500 Hz as derived from the STFT.
| Method | SNR_imp (dB) | RMSE (8) | PRD (%) | ARV-RMSE (9) | MF-RMSE (Hz) |
|---|---|---|---|---|---|
| TrustEMG-Net | 13.64 | 2.18 | 48.44 | 8.72 | 16.63 |
| CEEMDAN (next best) | 10.68 | 2.95 | 67.00 | 11.08 | 32.14 |
Across all SNRs (–14 to 2 dB) and all contaminant types, TrustEMG-Net outperforms baselines, particularly for powerline interference (21.45 dB SNR improvement versus CEEMDAN’s 17.22 dB). On 3-/5-type contaminant mixtures, TrustEMG-Net consistently remains superior.
5. Ablation Analysis and Representation Masking Effects
Ablation studies assess the contribution of U-Net, Transformer direct mapping (DM), and representation masking (RM):
- U-Net alone surpasses CNN/FCN by 10–20% on SNR_imp and RMSE, underscoring the importance of skip connections.
- Inclusion of Transformer (DM) provides additional 2–3 dB SNR_imp over pure U-Net, capturing contextual global dependencies.
- RM Layer offers further gains, particularly for narrowband interference (e.g., PLI: DM = 20.90 dB SNR_imp, RM = 21.45 dB; 5-type mixture: DM = 12.91, RM = 13.09 dB).
- Mask analyses reveal the 1024-dimensional mask selectively suppresses features where interference is present, preserving those tied to sEMG; manual manipulation of mask weights recapitulates or distorts specific signal/noise elements, validating the mask’s interpretability.
6. Computational Considerations and Applications
- Efficiency: TrustEMG-Net comprises 25.1 million parameters, requires 2.84 GFLOPs per run, and achieves inference latency of ~3.5 ms on an RTX 3090 GPU (~13 ms on CPU). Execution time is lower than EMD/CEEMDAN/VMD.
- Applications:
- Clinical gait and muscle-fatigue monitoring (leveraging ARV/MF indices in rehabilitation).
- Prosthetics and human-computer interaction, where denoised sEMG improves gesture recognition or force estimation.
- Speech prostheses and silent-speech interfaces requiring noise-robust processing.
- Multimodal biosignal denoising where sEMG is accompanied by ECG, EEG, or audio.
TrustEMG-Net’s combination of local and global modeling, via U-Net and representation-masking Transformer, establishes a robust and generalizable paradigm for sEMG denoising under a broad array of noise sources and SNR scenarios (Wang et al., 2024).