TL;DR
This paper tackles the challenge of deploying motor-imagery brain-computer interfaces (MI-BCIs) on resource-constrained devices by proposing novel binarization methods for both feature-based and deep learning (CNN) approaches. By transforming real-valued weights and features into binary representations, they achieve significant memory footprint reductions with minimal accuracy loss, paving the way for efficient, real-time MI-BCI applications at the edge.
What Problem Does This Paper Address?
Motor-imagery brain-computer interfaces (MI-BCIs) hold immense promise for controlling external devices through thought alone, with applications ranging from assistive technologies for individuals with disabilities to enhanced human-computer interaction. However, current MI-BCI algorithms, whether relying on handcrafted features or deep convolutional neural networks (CNNs), typically involve large numbers of real-valued weights and complex computations. This high computational and memory overhead makes them unsuitable for deployment on resource-limited embedded systems, such as microcontrollers, which are crucial for real-time, near-sensor processing at the edge. The paper aims to bridge this gap by developing methods to binarize these MI-BCI models, making them significantly more efficient without sacrificing performance.
Methods
The authors propose two main binarization strategies:
- Feature-based Binarization: This approach focuses on binarizing the output of traditional MI-BCI feature extraction methods, specifically multi-spectral Riemannian covariance features. They employ sparse bipolar random projection to map these high-dimensional real-valued features into a lower-dimensional binary space. A binarized linear Support Vector Machine (SVM) is then trained on these binary features, performing classification using computationally efficient Hamming distance calculations. The sparsity in the random projection matrix allows for efficient regeneration, avoiding increased memory storage.
- CNN-based Binarization (MI-MANN): For CNN-based MI-BCIs, they introduce a novel architecture called MI-MANN (Memory-Augmented Neural Network). This approach augments a pre-trained EEGNet (a compact CNN for MI-BCI) with a projection layer and a binary augmented memory. The projection layer, using either random or learned projections, maps the EEGNet's features into a binary space. The augmented memory stores learned representations, enabling efficient classification. The key innovation here is that the entire memory and the projection layer's weights are binarized, further reducing computational complexity and memory footprint.
Datasets
The proposed methods were evaluated on the BCI Competition IV-2a dataset. This dataset consists of EEG data from nine subjects performing four different motor imagery tasks (left hand, right hand, both feet, tongue). For each subject, one session was used for training and another for testing.
Key Insights and Ideas
- Binarization is Feasible and Beneficial: The core insight is that binarizing MI-BCI models is not only possible but also highly beneficial for edge deployment, offering substantial memory savings with minimal accuracy degradation.
- Random Projection as a Key Enabler: Sparse bipolar random projection proves to be a crucial technique for mapping high-dimensional real-valued features into a binary space while preserving essential information for classification. Its sparsity allows for efficient on-the-fly generation, avoiding extra memory overhead.
- MI-MANN Architecture for Compact CNNs: The MI-MANN architecture effectively combines a compact CNN (EEGNet) with a binarized augmented memory, demonstrating that deep learning models can be made significantly more efficient for MI-BCI tasks.
- Trade-offs in Learned vs. Random Projections: While learned projections in MI-MANN can yield higher accuracy, they come at the cost of increased memory footprint compared to random projections. This highlights a critical design choice between accuracy and resource constraints.
- Pareto Optimality Achieved: The proposed binarized classifiers consistently achieve Pareto optimality, meaning they offer a better trade-off between classification accuracy and memory footprint compared to existing methods.
Key Results
- Feature-based: The binarized Riemannian features with sparse random projection and binarized SVM achieved an average accuracy of 73.55%, only 1.27% lower than the float16 SVM baseline, while reducing the memory footprint by 1.51x.
- CNN-based (MI-MANN with Random Projection): MI-MANN with random projection achieved an accuracy of 72.31% (comparable to float16 EEGNet at 72.32%) with a 1.28x smaller memory footprint.
- CNN-based (MI-MANN with Learned Projection): MI-MANN with learned projection achieved a higher accuracy of 76.21%, but with a significantly increased memory footprint (27.28x compared to float16 EEGNet). However, at a reduced dimension (d=128), it achieved 75.4% accuracy with a memory footprint reduction of 1.29x compared to Shallow ConvNet.
- Computational Complexity: The binarized approaches significantly reduce the memory footprint. While the feature extraction in the Riemannian approach can be computationally intensive, the binarized classification step is highly efficient. For CNNs, the binarized MI-MANN adds a negligible impact on MAC operations compared to the original EEGNet.
Limitations and Future Work
- Training Complexity: The training of the MI-MANN architecture, particularly the controller and memory updates, can be computationally intensive and requires a large number of epochs, as illustrated by the training curves.
- Learned Projection Memory Overhead: While learned projections offer accuracy benefits, the associated memory overhead can be substantial, potentially limiting their applicability on extremely constrained devices.
- Future Work: The authors suggest that their MI-MANN architecture could be extended to enable cheap model updates/extensions on the device at the edge without requiring backpropagation, which is a significant advantage for adaptive BCIs. Further exploration of learned projections with optimized dimensionality could lead to even better accuracy-efficiency trade-offs. The paper also implicitly points towards the need for hardware acceleration for efficient random projection generation on embedded systems.
Summary updated