EEG-to-text Transformer decoder
An EEG-to-text decoder that maps word-level EEG features through a Transformer encoder into pretrained BART.
Neuroscience signals · 1,099 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Neuroscience signals
- Parameters
- 451.1M
- Operations
- 1,099
- Framework
- PyTorch
- Recurrent
- No
- Published
- AAAI 2022
- Paper
- Open Vocabulary Electroencephalography-To-Text Decoding and Zero-shot Sentiment Classification
- Cited by
- 73 (as of 26 October 2026)
- Authors
- Zhenhailong Wang, Heng Ji
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m16293
- Graph hash
- b67b1b48836bd9702e2a9b626231e77f56837a7c8cb53adaed2e43063a0a201b
- Skeleton hash
- 1cb644a6616dfa0f24419196a0ab2274a2dd3982e406622229725ad8b0d97465
- Architecture hash
- 2a18c72926c4e77129d6aad663180f17cc525d31acb32db93ab1ebe365f33bbe
- Diagram SHA-256
- 2d8f77d8196eddb29a4b0dff83a3a9c185c739c8562ad8194da69eb3090eafb7
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
This model decodes text from EEG recorded during natural reading, using an open vocabulary. Its input is a sequence of word-level EEG features, and its output is the corresponding text tokens. The paper enlarges the vocabulary more than 100 times over earlier work, which used several hundred words.
The model has two major components: a randomly initialized additional encoder and a pretrained encoder-decoder BART. The paper treats each EEG feature sequence as a sentence already encoded by the human brain. The additional encoder maps that brain embedding to the embedding of the pretrained BART. It is a multi-layer Transformer encoder with 6 layers and 8 attention heads. Each input vector has dimension 840, which is 8 × 105. The last hidden states of the BART decoder pass through a fully connected layer that generates English tokens.
The paper reports a 40.1% BLEU-1 score on EEG-To-Text decoding and a 55.6% F1 score on zero-shot EEG-based ternary sentiment classification. The authors later added a notice that the original evaluation code has an unintentional bug, which makes the results in the paper not as expected.
Key idea. The paper hypothesizes that the human brain functions as a special text encoder and builds an open vocabulary EEG-to-text decoder on a pretrained language model, BART.
- EEG-To-Text
- EEG-to-text Transformer decoder
- open vocabulary EEG-To-Text decoding
- EEG to text
- brain-to-text
- EEG decoding
- ZuCo
- zero-shot sentiment classification
- brain-computer interface
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{wang2024openvocabularyelectroencephalographytotextdecoding,
title={Open Vocabulary Electroencephalography-To-Text Decoding and Zero-shot Sentiment Classification},
author={Zhenhailong Wang and Heng Ji},
year={2024},
eprint={2112.02690},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2112.02690},
}