TL;DR
This paper introduces "bioformers," a novel, energy-efficient transformer architecture for sEMG-based gesture recognition on edge devices. By combining these bioformers with a dynamic inference strategy, the system achieves state-of-the-art accuracy while significantly reducing energy consumption, making advanced gesture recognition feasible for wearables.
What Problem Does This Paper Address?
Surface electromyography (sEMG) signals offer a promising way to recognize hand gestures for human-machine interfaces, especially for applications in personalized healthcare and assistive technologies. However, deploying sophisticated deep learning (DL) models for this task on resource-constrained edge devices (like wearables) is challenging due to their limited memory and power budgets. While traditional methods rely on handcrafted features, DL models learn features automatically but are often too complex for the edge. Existing edge-optimized DL models, like CNNs, have limitations. Furthermore, the "always-on" nature of edge devices means even efficient models can drain batteries quickly. This paper tackles the dual challenge of achieving high accuracy with minimal energy consumption for sEMG gesture recognition on edge devices, specifically by adapting state-of-the-art transformer architectures and introducing dynamic inference techniques.
Methods
The core of this work lies in two main innovations:
- Bioformers (Tiny Transformers for sEMG): The authors adapt the transformer architecture, originally designed for natural language processing and computer vision, for sEMG data. They create "bioformers," which are significantly smaller and more efficient transformer models. This involves an extensive architecture exploration, tuning hyperparameters like the number of convolutional layers, attention heads, and patch sizes, to find Pareto-optimal configurations balancing accuracy and computational complexity (measured in MACs and parameters).
- Dynamic Inference: To further reduce energy consumption at runtime, a multi-stage dynamic inference mechanism is proposed. This system uses a three-level approach:
- Rest Detector: A lightweight Random Forest (RF) quickly identifies "rest" (no gesture) inputs, which are common and easy to classify.
- Little Bioformer: If an input is not classified as rest, it's processed by a smaller, less complex bioformer.
- Big Bioformer: If the confidence from the little bioformer is low, a larger, more accurate bioformer is invoked. This "big/little" approach, combined with the rest detector, allows the system to adapt its computational effort based on the input's complexity, saving energy by avoiding unnecessary computations for "easy" inputs.
Datasets
The primary dataset used for training and evaluation is the Ninapro DB6 dataset. This dataset is specifically designed for sEMG-based hand gesture recognition and includes data from multiple subjects across several sessions, allowing researchers to study the degradation of classification accuracy over time due to factors like electrode repositioning and user adaptation. The dataset consists of seven different grasp gestures and a rest position.
Key Insights and Ideas
- Transformers are Viable for sEMG: The paper demonstrates that transformer architectures, when appropriately scaled down ("bioformers"), can achieve state-of-the-art accuracy on sEMG gesture recognition tasks, outperforming previous CNN-based methods.
- Dynamic Inference is Crucial for Edge Efficiency: Simply having an efficient model isn't enough for battery-powered devices. The dynamic inference strategy, by intelligently skipping computation for easy inputs, provides significant additional energy savings without a substantial drop in accuracy.
- Patch Size Trade-offs: The exploration of patch size revealed a clear trade-off: larger patch sizes reduce computational complexity (MACs) but generally lead to lower accuracy. Conversely, smaller patch sizes increase complexity but can improve accuracy. This allows for fine-tuning the system based on specific hardware constraints.
- Memory Efficiency is Key: The bioformers are remarkably memory-efficient, requiring significantly less memory than previous state-of-the-art models, making them suitable for embedded systems with limited RAM.
Key Results
- Accuracy: The most accurate bioformer achieved an accuracy of 69.8% on the Ninapro DB6 dataset, outperforming the state-of-the-art CNN (TEMPONet) by 3.1%.
- Energy Efficiency: Bioformers consumed 7.8× to 44.5× less energy per inference compared to TEMPONet on the GAP8 SoC.
- Dynamic Inference Gains: The dynamic inference system achieved a further 1.03× to 1.35× energy reduction at iso-accuracy compared to static bioformers.
- Memory Footprint: Bioformers required as little as 44.35 kB of memory, significantly smaller than TEMPONet's 461 kB.
- Flexibility: The dynamic system, by tuning parameters like the confidence threshold and enabling/disabling the rest detector, offers approximately 100 distinct operating points at runtime, allowing for a flexible trade-off between accuracy and energy consumption.
Limitations and Future Work
- Generalization to Other Datasets: While the results on Ninapro DB6 are strong, the paper doesn't extensively explore how these bioformers generalize to other sEMG datasets with different gestures or recording conditions.
- Real-World Deployment: The study focuses on performance on the GAP8 SoC. Further work could explore deployment on a wider range of edge devices with varying hardware capabilities.
- User Adaptation: While Ninapro DB6 accounts for inter-session variability, long-term user adaptation and drift over extended periods could be further investigated.
- More Complex Gestures: The current work focuses on grasps. Extending the system to recognize more dynamic and complex gestures could be a future direction.
Summary updated