ECoG/sEEG Neural Decoding Transformer
Swin-style transformer that decodes speech features from ECoG and sEEG electrodes at arbitrary positions.
Neuroscience signals · 704 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
- 12.3M
- Operations
- 704
- Framework
- PyTorch
- Recurrent
- No
- Published
- Journal of Neural Engineering (2025)
- Paper
- Subject-Agnostic Transformer-Based Neural Speech Decoding from Surface and Depth Electrode Signals
- Cited by
- 8 (as of 28 October 2026)
- Authors
- Junbo Chen, Xupeng Chen, Ran Wang and others
- 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
- m16272
- Graph hash
- ae9f716124eb346c38a8c5cdb49beec23b279c598dfe96f752e886e3ed2342cd
- Skeleton hash
- 63a874c0c550f1b15e7a428f9e185b7507726c86c2c6bb8b9e2aa1c60a066701
- Architecture hash
- 70f4e17095ac4417717d66940fc5abbef681ad84ee6b4d960d69c106fabd6b57
- Diagram SHA-256
- fa343bb9fd428766001f0afe022b96d248bc8e2b6b664bb8b876858049aeba37
- 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
SwinTW is a transformer for decoding speech from intracranial recordings, and it works with arbitrarily positioned electrodes by using their 3D locations on the cortex rather than their positions on a 2D grid. The authors wanted one architecture for both surface (ECoG) and depth (stereotactic EEG or sEEG) electrodes.
The name stands for Swin transformer with temporal windowing. The model generates tokens from each electrode individually and partitions only the temporal dimension. Attention windows are also local only in time, with spatial attention across all electrodes. In place of a grid-index positional bias, a 2-layer MLP maps the MNI brain coordinates and time-frame indices of each token pair to a bias. The dot product of learned embeddings for the electrodes' brain regions is added as a second term. SwinTW has three stages with 2, 2, and 6 layers. After the last transformer block, spatial max pooling across the electrodes leaves a single feature per time step.
In the full pipeline the latent output of SwinTW goes through a prediction head that predicts 18 speech parameters at every frame, and a trained speech synthesizer turns those parameters into a spectrogram. The paper reports a Pearson correlation of 0.817 with the ground truth spectrogram for subject-specific models using only low-density 8x8 ECoG data, over 43 participants. For multi-subject models tested on unseen participants it reports an average of 0.765 in leave-one-out cross-validation.
Key idea. SwinTW decodes speech from arbitrarily positioned intracranial electrodes by computing attention from their 3D cortical locations instead of their positions on a 2D grid.
- SwinTW
- Swin transformer with temporal windowing
- ECoG speech decoding
- sEEG speech decoding
- neural speech decoding
- speech neuroprosthesis
- intracranial electrodes
- subject-agnostic decoder
- 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
@article{Chen_2024, title={Subject-Agnostic Transformer-Based Neural Speech Decoding from Surface and Depth Electrode Signals}, url={http://dx.doi.org/10.1101/2024.03.11.584533}, DOI={10.1101/2024.03.11.584533}, publisher={openRxiv}, author={Chen, Junbo and Chen, Xupeng and Wang, Ran and Le, Chenqian and Khalilian-Gourtani, Amirhossein and Jensen, Erika and Dugan, Patricia and Doyle, Werner and Devinsky, Orrin and Friedman, Daniel and Flinker, Adeen and Wang, Yao}, year={2024}, month=Mar }