MI-BMInet: An Efficient Convolutional Neural Network for Motor Imagery Brain–Machine Interfaces With EEG Channel Selection

Xiaying Wang, Michael Hersche, Michele Magno, Luca BeniniIEEE Sensors Journal 2022

TL;DR

This paper introduces MI-BMInet, a highly efficient Convolutional Neural Network (CNN) for brain-computer interfaces (BCIs) that decode motor imagery from EEG signals. By combining a novel channel selection method with aggressive quantization and optimized deployment on low-power microcontrollers, MI-BMInet achieves state-of-the-art accuracy with drastically reduced computational and energy costs, paving the way for truly wearable and long-lasting BCIs.

What Problem Does This Paper Address?

Brain-Computer Interfaces (BCIs) that use motor imagery (MI) allow users to control devices by simply imagining movements. This technology holds immense promise for prosthetics and rehabilitation. However, a major hurdle for widespread adoption, especially in wearable devices, is the high computational and energy demand of current BCI algorithms. These algorithms, often complex deep learning models, require significant processing power and memory, making them unsuitable for low-power microcontrollers (MCUs) that are essential for comfortable, long-lasting, and privacy-preserving edge devices. The challenge is to achieve high classification accuracy for MI tasks while drastically reducing the model's resource footprint (memory, computation, and power).

Methods

The authors propose a multi-pronged approach to create an energy-efficient MI-BMI system:

  • Efficient CNN Architecture (MI-BMInet): They designed a compact CNN that prioritizes spatial feature extraction before temporal feature extraction. This "depth-first" approach, as opposed to the more common "time-first" approach, significantly reduces the memory and computational overhead.
  • Automatic EEG Channel Selection: A novel method is introduced that leverages the spatial filters learned by the CNN. By analyzing the magnitude of weights associated with each EEG channel, the method identifies the most informative channels, reducing the input dimensionality without sacrificing accuracy.
  • Quantization: Both model weights and activations are quantized to 8-bit precision using quantization-aware training. This technique drastically reduces memory requirements and allows for more efficient computation on hardware with specialized integer arithmetic units.
  • Optimized Embedded Deployment: The quantized models are manually implemented on leading-edge parallel ultra-low-power (PULP) MCUs (Mr. Wolf and Vega). This implementation exploits custom hardware extensions for digital signal processing (DSP) and parallel processing to maximize performance.

Datasets

The proposed methods were evaluated on two widely used EEG datasets for motor imagery:

  • BCI Competition IV-2a: This dataset contains EEG data from 9 subjects performing 4 types of motor imagery (left hand, right hand, both feet, tongue). It's used for evaluating subject-specific models and inter-session variability.
  • Physionet EEG Motor Movement/Imagery (MM/MI): This larger dataset includes data from 105 subjects and is used to assess inter-subject variability.

Key Insights and Ideas

  • Spatial-first processing is key for efficiency: The paper demonstrates that reordering feature extraction from temporal-first to spatial-first significantly reduces computational and memory demands, a crucial insight for resource-constrained edge devices.
  • Learned spatial filters are excellent channel selectors: Instead of relying on traditional feature engineering or manual selection, the authors show that the weights of the CNN's initial spatial filters can directly guide the selection of the most informative EEG channels, leading to a more effective and automated process.
  • 8-bit quantization is sufficient for high accuracy: The aggressive 8-bit quantization, combined with quantization-aware training, achieves comparable accuracy to full-precision models while dramatically reducing memory footprint, making deployment on MCUs feasible.
  • The trade-off is achievable: The work successfully navigates the critical three-way trade-off between accuracy, computational cost, and power consumption, defining a new Pareto frontier for embedded MI-BCIs.

Key Results

  • Accuracy: MI-BMInet achieves comparable accuracy to state-of-the-art (SoA) models. For the 2-class task on the MM/MI dataset, it reaches 82.51% accuracy with only 10 EEG channels. For the 4-class task on the IV-2a dataset, it achieves 76.03% accuracy.
  • Resource Reduction:
    • Channels: The automatic channel selection reduces the number of EEG channels by up to 6.4x (from 64 to 10).
  • Memory: The 8-bit quantized model has a memory footprint of less than 50kB, fitting within the fast L1 memory of the target MCUs. This is orders of magnitude smaller than many SoA models.
  • Computation: The model requires significantly fewer Multiply-Accumulate (MACC) operations, with the MM/MI dataset requiring only 1.51 million MACCs.
  • Energy Efficiency: The final 2-class solution consumes as little as 30 µJ per inference.
  • Runtime: The inference time is reduced to 2.95 ms.
  • Battery Life: The reduction in channels and power consumption can extend battery life from 3.8 to 22 hours.

Limitations and Future Work

  • Manual Implementation: The authors note that they performed a manual implementation of the quantized models due to the lack of direct tool support for the selected MCUs. Future work could explore automated deployment tools.
  • Subject-Specific Hyperparameter Tuning: While the paper shows that subject-specific hyperparameter tuning can further improve accuracy (as seen in related works), their proposed model is evaluated with averaged results. Adapting this tuning to MI-BMInet could yield even better performance.
  • Automated Detection of MI Onset: For truly asynchronous, self-paced BCIs, algorithms that can autonomously detect the onset of motor imagery intention without visual cues are needed. This is suggested as a future research direction.
  • Investigating Spatial Filter Insights: The paper discusses interesting observations from the learned spatial filters (e.g., activations near F7/F8 electrodes) and suggests further investigation into their meaning, particularly in relation to attentional processes and potential artifact sources.

Summary updated

BibTeX
@article{wang2022mi,
  author = {Xiaying Wang and Michael Hersche and Michele Magno and Luca Benini},
  title = {{MI-BMInet: An Efficient Convolutional Neural Network for Motor Imagery Brain–Machine Interfaces With EEG Channel Selection}},
  journal = {IEEE Sensors Journal},
  year = {2022},
}
Figure