All models

Brain2Qwerty

A convolutional and transformer network that decodes typed characters from MEG or EEG around each keystroke.

Neuroscience signals · 537 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (21 KB)

Open in a new tab

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

Parameters
623.5M
Operations
537
Framework
PyTorch
Recurrent
No
Published
Nature Neuroscience 2026, as 'Non-invasive decoding of typed sentences from human brain activity' (doi 10.1038/s41593-026-02303-2)
Cited by
4 (as of 29 October 2026)
Authors
Jarod Lévy, Mingfang Zhang, Svetlana Pinet and others
License
CC-BY-NC-4.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m14975
Graph hash
6c8266a46225bb254bd928300e4abf3b25197b6e7c0455186168d346d926e58b
Skeleton hash
c4402e06b35c1aaf4177e1598f8671a89dfd00647e5a9470ce294b7590a71aee
Architecture hash
c2659faf3c9f1087184a0dbaf6ea00620557333548ea7e7367aac0712dd09d7f
Diagram SHA-256
d8739e9a46cca5260312410e83b5f1323231ae6b10393c608a6013f318ec02c4
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

Brain2Qwerty decodes sentences from non-invasive recordings of brain activity, either EEG or MEG, made while participants typed briefly memorized sentences on a QWERTY keyboard. The motivation is that the invasive devices which can restore communication carry the risks inherent to neurosurgery.

The model predicts each keystroke from a 0.5 s window of signals. There are 29 classes: the letters of the Latin alphabet and three special classes. Its first module is a modified version of a convolutional model introduced in earlier work by Défossez and colleagues. After a spatial attention step over the sensor positions and a subject-specific linear layer, it applies 8 sequential convolutional blocks. The temporal dimension is then pooled with a single-head self-attention layer. A transformer of 4 layers with 2 attention heads per layer refines the keystroke predictions using context from the sentence.

This model covers the convolutional and transformer modules, which are trained jointly with a cross-entropy loss. In the paper, a 9-gram character-level language model pretrained on the Spanish Wikipedia Corpus then corrects their output. With MEG the paper reports an average character-error-rate of 32%, against 67% with EEG. The authors note that the model does not operate in real time.

Key idea. Brain2Qwerty decodes typed sentences from MEG or EEG with a convolutional module, a sentence-level transformer and a pretrained character-level language model.

  • brain2qwerty
  • brain2qwerty v1
  • brain-to-text decoding
  • meg decoding
  • eeg decoding
  • typing decoding
  • non-invasive brain-computer interface
  • keystroke decoding
  • sentence decoding from brain activity

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{lévy2025braintotextdecodingnoninvasiveapproach,
      title={Brain-to-Text Decoding: A Non-invasive Approach via Typing}, 
      author={Jarod Lévy and Mingfang Zhang and Svetlana Pinet and Jérémy Rapin and Hubert Banville and Stéphane d'Ascoli and Jean-Rémi King},
      year={2025},
      eprint={2502.17480},
      archivePrefix={arXiv},
      primaryClass={eess.SP},
      url={https://arxiv.org/abs/2502.17480}, 
}