Abstract
Surface Electromyography (sEMG) is a critical modality for controlling assistive and rehabilitative robotic systems. However, the inherent noise in sEMG signals and the computational constraints of wearable hardware pose significant challenges for real-time activity recognition. This paper proposes a lightweight, attention-based 1D Convolutional Neural Network (CNN) designed to classify lower limb activities from raw sEMG data. By employing a Bahdanau attention mechanism, the model focuses on salient temporal features within a 256ms window, achieving an accuracy of 85.38% on unseen subjects with only 62,876 parameters. The model's inference time of less than 1ms makes it highly suitable for real-time deployment in prosthetic control.
Introduction
The development of intuitive control interfaces for lower-limb prostheses and exoskeletons relies heavily on the accurate interpretation of user intent. sEMG signals, which record the electrical activity of muscles, provide a direct link to neural drive. Despite their potential, sEMG signals are susceptible to motion artifacts, muscle cross-talk, and signal instability. Traditional approaches often rely on computationally intensive preprocessing or large-scale deep learning models that introduce latency and struggle with generalization across different users. This study addresses these issues by introducing a compact architecture that leverages attention mechanisms to process raw signals efficiently.
Methodology
The proposed architecture utilizes a 1D CNN backbone integrated with a Bahdanau attention mechanism. The input consists of four channels of raw sEMG data, sampled at 1000 Hz and segmented into 256ms windows.
Model Architecture
The network comprises three consecutive 1D convolutional layers designed to extract spatial and temporal features. These layers are followed by max-pooling operations to reduce dimensionality while preserving key information. The core innovation is the inclusion of an attention layer, which assigns varying weights to different temporal segments of the feature maps, allowing the model to prioritize the most informative patterns for classification.
The final stages of the model involve flattening the attended features, followed by concatenation and dense layers with ReLU activation. A SoftMax layer provides the final classification across three movement categories.
Experimental Setup
The model was evaluated using the BASAN dataset, which includes sEMG recordings from 22 subjects (11 healthy and 11 with lower-limb injuries). Data were collected from four key muscles: Vastus Medialis, Semitendinosus, Biceps Femoris, and Rectus Femoris. To rigorously assess generalization, a leave-one-out cross-validation strategy was employed, ensuring the model was tested on subjects not present in the training set.
Results and Discussion
The attention-based model demonstrated robust performance across various metrics. It achieved a validation accuracy of 86.74% and a test accuracy of 85.38% on unseen subjects.
As shown in the performance plots, the model exhibits stable convergence during training. The confusion matrix reveals high precision for "Movement 1" (90.56%), while "Movement 3" (walking) showed slightly lower performance due to the inherent variability of gait cycles. Crucially, the model maintains a small footprint of approximately 63k parameters, representing a significant reduction compared to state-of-the-art models that often exceed 400k parameters. Inference times were consistently below 1ms, meeting the strict latency requirements for seamless human-robot interaction.
Conclusion
This research demonstrates that a lightweight, attention-based CNN can effectively recognize lower limb activities from raw sEMG signals with high accuracy and minimal latency. The use of attention mechanisms allows for the bypass of traditional denoising steps, simplifying the deployment pipeline for wearable assistive devices. Future work will focus on expanding the range of recognized activities, including transitions between movements, and conducting human-in-the-loop trials to evaluate real-world usability.
Summary updated