Few-Shot Relation Learning with Attention for EEG-based Motor Imagery Classification

Sion An, Soopil Kim, Philip Chikontwe, Sang Hyun ParkarXiv 2020 · DOI · arXiv

TL;DR

Researchers have developed a novel few-shot learning framework that allows Brain-Computer Interfaces (BCIs) to accurately classify motor imagery EEG signals for new users with minimal data. By combining a specialized 1D-CNN embedding with an attention-based relation network, the model achieves a 9.3% accuracy boost over state-of-the-art methods, effectively tackling the long-standing problem of inter-subject variability in EEG data.

What Problem Does This Paper Address?

Brain-Computer Interfaces (BCIs) that rely on motor imagery (MI)—the act of imagining limb movement—hold immense promise for rehabilitation and assistive technologies. However, translating these brain signals into reliable commands is notoriously difficult.

The primary hurdles are:

  1. Inter-subject variability: Brain signals for the same task look very different from one person to the next.
  2. Low Signal-to-Noise Ratio (SNR): EEG data is messy and easily corrupted by external noise or internal biological artifacts.
  3. Data Scarcity: Standard deep learning models require massive amounts of labeled data from a specific user to perform well. Collecting hundreds of trials from a new patient or user is often impractical.

This paper addresses these gaps by framing EEG classification as a few-shot learning problem, where the system must learn to recognize a new subject's intent using only a handful of labeled examples (the "support set").

Methods

The authors propose a 2-way K-shot relation network specifically tailored for 1D bio-signals. The architecture consists of three integrated modules:

  1. Embedding Module ($F(\cdot)$): To handle noisy signals, the authors modified a Hybrid Convolution Scale CNN (HS-CNN). It splits the raw EEG signal into three distinct frequency bands (4–7Hz, 8–13Hz, and 13–32Hz) using Butterworth filters. It then applies 1D convolutions with varying kernel sizes to extract multi-scale temporal features.
  2. Attention Module ($A(\cdot)$): Recognizing that not all support trials are equally "clean" or representative, this module calculates an attention score. It compares support samples to the query signal, emphasizing the most relevant support features while suppressing noisy ones to create a "class-representative vector."
  3. Relation Module ($R(\cdot)$): Instead of using a simple distance metric (like Euclidean distance), this module is a learnable non-linear comparator. It takes the class-representative vector and the query vector as input and outputs a "relation score" (0 to 1) representing the likelihood that they belong to the same class.
Overview of the proposed few-shot relation network architecture

Datasets

The model was evaluated using two primary benchmarks:

  • BCI Competition IV 2b: The main dataset used for training and cross-validation, featuring 9 subjects performing left-hand vs. right-hand motor imagery tasks.
  • BCI Competition IV 2a: Used as an external validation set to test the model's generalization capabilities on unseen tasks and different recording setups without re-training.

Key Insights and Ideas

  • Learning "How to Learn": The core shift here is moving from training a static classifier to training a model that understands the relationship between signals. This allows it to generalize to a new subject's unique brain patterns almost instantly.
  • Attention is a Filter: In EEG, a single "bad" trial in the support set can ruin a prototype. The attention mechanism acts as a dynamic filter, ensuring that the model doesn't get distracted by noisy or atypical support samples.
  • Frequency Matters: By explicitly splitting the signal into frequency bands (theta, alpha, and beta ranges) before convolution, the embedding module mimics traditional neuroscientific feature extraction (like Common Spatial Patterns) but within a deep learning framework.
  • Augmentation Paradox: Interestingly, the authors found that standard data augmentation techniques—which usually help deep learning—were often ineffective or even harmful in this few-shot setting. They hypothesize that augmented samples from other subjects don't accurately reflect the specific signal characteristics of a new, unseen subject.

Key Results

The proposed RelationNet-attention model significantly outperformed baseline supervised models:

  • Accuracy Boost: In a 20-shot setting, the model achieved 74.6% mean accuracy, a 9.3% improvement over the baseline HS-CNN-All model.
  • Consistency: The attention module provided a consistent performance gain of approximately 1.6% across all K-shot settings (5, 10, and 20 shots).
  • Generalization: When tested on the external BCI IV 2a dataset, the model maintained a 6.0% lead over standard CNN approaches, proving it isn't just overfitting to one specific dataset's quirks.
TABLE I

Limitations and Future Work

While the results are promising, the authors note that performance remains relatively poor on certain "difficult" subjects (specifically folds 2 and 3 in their cross-validation). They attribute this to extremely low SNR in those specific individuals, where even few-shot learning struggles to find a clear signal.

Future directions include: * Developing more robust noise-reduction techniques that can be integrated directly into the few-shot pipeline. * Applying this framework to other types of bio-signals, such as Electromyography (EMG) for prosthetic control or Electrocardiography (ECG) for cardiac monitoring, which suffer from similar inter-subject variability issues.

Summary updated

Abstract

Brain-Computer Interfaces (BCI) based on Electroencephalography (EEG) signals, in particular motor imagery (MI) data have received a lot of attention and show the potential towards the design of key technologies both in healthcare and other industries. MI data is generated when a subject imagines movement of limbs and can be used to aid rehabilitation as well as in autonomous driving scenarios. Thus, classification of MI signals is vital for EEG-based BCI systems. Recently, MI EEG classification techniques using deep learning have shown improved performance over conventional techniques. However, due to inter-subject variability, the scarcity of unseen subject data, and low signal-to-noise ratio, extracting robust features and improving accuracy is still challenging. In this context, we propose a novel two-way few shot network that is able to efficiently learn how to learn representative features of unseen subject categories and how to classify them with limited MI EEG data. The pipeline includes an embedding module that learns feature representations from a set of samples, an attention mechanism for key signal feature discovery, and a relation module for final classification based on relation scores between a support set and a query signal. In addition to the unified learning of feature similarity and a few shot classifier, our method leads to emphasize informative features in support data relevant to the query data, which generalizes better on unseen subjects. For evaluation, we used the BCI competition IV 2b dataset and achieved an 9.3% accuracy improvement in the 20-shot classification task with state-of-the-art performance. Experimental results demonstrate the effectiveness of employing attention and the overall generality of our method.
BibTeX
@misc{an2020few,
  author = {Sion An and Soopil Kim and Philip Chikontwe and Sang Hyun Park},
  title = {{Few-Shot Relation Learning with Attention for EEG-based Motor Imagery Classification}},
  year = {2020},
  eprint = {2003.01300},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2003.01300},
}
Figure