Decoding Natural Images from EEG for Object Recognition

Yonghao Song, Bingchuan Liu, Xiang Li, Nanlin Shi, Yijun Wang, Xiaorong Gao

TL;DR

The NICE (Natural Image Contrast EEG) framework uses self-supervised contrastive learning to align noisy EEG brain signals with pre-trained image embeddings (like CLIP and ViT). This approach achieves state-of-the-art accuracy in challenging 200-way zero-shot object recognition tasks while providing comprehensive insights into how the human brain processes visual semantics across time, space, and frequency.

What Problem Does This Paper Address?

Reading the human mind to decode visual stimuli has long been a goal for brain-computer interfaces (BCIs). While Functional Magnetic Resonance Imaging (fMRI) offers excellent spatial resolution, it takes seconds to record a stable response, making real-world, real-time applications impractical. Magnetoencephalography (MEG) has high temporal resolution but requires massive, expensive equipment.

Electroencephalography (EEG) is cheap, portable, and fast, but it suffers from an incredibly low signal-to-noise ratio (SNR). Furthermore, previous EEG-based image decoding attempts often relied on flawed "block-design" experiments (grouping similar images together, which causes models to learn temporal blocks rather than actual image features) or generalized poorly to unseen object categories. This paper tackles these limitations by introducing a robust, self-supervised framework capable of zero-shot generalization on a massive, diverse dataset.

Methods

The authors propose NICE (Natural Image Contrast EEG), a self-supervised framework that connects image stimuli to EEG responses using contrastive learning.

Figure 1: (A) Overall framework for EEG-based object recognition. During training, image-EEG pairs are processed by an image encoder (pre-trained) and an EEG encoder. The objective is to increase the similarity between matched pairs while decreasing it for unmatched pairs. During testing, a few unseen images of target concepts (classes) are processed in advance into templates. Then, the model obtains results by matching test data to templates. (B) Architecture of the EEG encoder. Temporal-spatial convolution is used with spatial modules, made with self and graph attention, to reveal spatial features of brain activity. The linear layer is used to project the feature dimension.

The architecture consists of two main components:

  1. Image Encoder: Features are extracted from visual stimuli using powerful, frozen pre-trained computer vision models (such as CLIP, ViT, or ResNet).
  2. EEG Encoder (TSConv): A custom-designed Temporal-Spatial Convolution network. It first applies a 1D convolution to capture temporal features, uses average pooling to smooth the signal, and then applies a 1D spatial convolution across electrode channels.
  3. Plug-and-Play Spatial Modules: To better capture electrode channel correlations, the authors introduce Self-Attention (SA) and Graph Attention (GA) modules directly before the temporal-spatial convolutions.

During training, an InfoNCE loss function maximizes the cosine similarity between matched image-EEG pairs while minimizing it for unmatched pairs. For testing, the model performs zero-shot classification by matching test EEG signals against averaged image templates of completely unseen object concepts.

Datasets

The framework was evaluated on a large-scale, highly diverse EEG dataset collected by Gifford et al. (2022).

  • Data Size: 16,740 image stimuli spanning 1,854 distinct concepts presented via rapid serial visual presentation (RSVP).
  • Setup: 10 participants, 63 EEG channels sampled at 1000 Hz. Images were displayed for 100 ms, followed by a 100 ms blank screen.
  • Validation: The authors also cross-validated their findings on an independent MEG dataset (Hebart et al., 2023) containing 4 participants and 271 channels to corroborate their biological findings.

Key Insights and Ideas

The paper moves beyond simple classification to dissect the biological plausibility of the model's learned representations:

  • The 100-600 ms Sweet Spot: By testing different time windows, the authors found that the first 100 ms post-stimulus contains very little semantic information due to visual pathway latency (hysteresis). The prime window for decoding object recognition is between 100 ms and 600 ms.
  • Anatomical Alignment: Ablation studies showed that removing electrodes from the occipital lobe caused the sharpest performance drop (3.8%). Including attention modules (SA and GA) successfully shifted the model's focus away from noisy frontal lobe activity toward the occipital and temporal lobes, aligning perfectly with neuroscience's understanding of the ventral visual stream.
Temporal, spatial, and spectral analysis of the EEG signals.
  • Rhythm Relevance: When filtering the EEG data into specific frequency bands, the theta (~4 Hz) and beta (~14-18 Hz) bands yielded the highest decoding performance. Conversely, the high-frequency gamma band provided virtually no help, likely due to its low amplitude and susceptibility to muscle/eye artifacts.
  • True Semantics vs. Low-Level Features: Representational Similarity Analysis (RSA) proved that the model groups concepts by actual semantic categories (e.g., clustering different vehicles or tools together) rather than just low-level visual properties like color or brightness.

Key Results

In a highly demanding 200-way zero-shot classification task (where the chance level is a mere 0.5%):

  • The base NICE framework achieved a 13.8% top-1 accuracy and 39.5% top-5 accuracy, significantly outperforming the previous state-of-the-art model, BraVL (which scored 5.8% top-1).
  • Integrating the Graph Attention (NICE-GA) module pushed performance even further, reaching a 15.6% top-1 accuracy and 42.8% top-5 accuracy.
  • Upgrading the image encoder to EVA-CLIP yielded the highest overall performance, hitting 21.2% top-1 accuracy.

Limitations and Future Work

Despite these impressive steps forward, the authors note a couple of key limitations:

  1. Repetition Dependency: Because the visual stimuli were flashed so briefly (100 ms), the model currently requires averaging multiple EEG repetitions of the same image to achieve a stable, high-SNR signal. Finding an optimal stimulus window length remains future work.
  2. The Gamma Band Mystery: The model was unable to extract meaningful information from gamma-band oscillations, a frequency range often associated with high-level cognitive processing in invasive studies. Better artifact rejection or specialized architectures may be needed to unlock this band in non-invasive EEG.

Summary updated

BibTeX
@inproceedings{song2024decoding,
  author = {Yonghao Song and Bingchuan Liu and Xiang Li and Nanlin Shi and Yijun Wang and Xiaorong Gao},
  title = {{Decoding Natural Images from EEG for Object Recognition}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=dhLIno8FmH},
}
Figure