All models

NDT1

A BERT-style Transformer that infers firing rates from spike trains without recurrence, fast enough for real-time use.

Neuroscience signals · 244 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 (34 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
175.6K
Operations
244
Framework
PyTorch
Recurrent
No
Published
Neurons, Behavior, Data analysis, and Theory (arXiv 2021)
Cited by
26 (as of 17 October 2026)
Authors
Joel Ye, Chethan Pandarinath
License
Unlicense
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
m1831
Graph hash
fcded4a036edba344808abe699c01ea618d311aa1a799f43365659e84f2cb660
Skeleton hash
098c0bf7cda0d4375a36870caff80d70c02d54051dbab3396517c255140cbfc9
Architecture hash
f579a02d1ad18519bb0ac0f8372a7d3f0b5e991e0ba789c5bc2017647e5b8a76
Diagram SHA-256
5bf31bf1ed32d350d59e11d9b98d2d88f8512facce8ed02ce0779cb187141612
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

The Neural Data Transformer, or NDT, is an architecture for modeling neural population spiking activity. It was introduced as a non-recurrent alternative to the recurrent state space models that usually capture such dynamics. The motivation is speed: using recurrence to explicitly model dynamics necessitates sequential processing of data, slowing real-time applications such as brain-computer interfaces.

The NDT is based on the BERT encoder with modifications for application to neuroscientific datasets, specifically multi-electrode spiking activity. The body of the model is a Transformer encoder with 6 layers in most of the experiments. The authors do not find multi-headed attention useful in their experiments, so they keep to small values of h = 1, 2. Instead of the cross-entropy loss used in language modeling, the log-firing rates it outputs are passed into a Poisson likelihood loss. To train the model in an unsupervised manner, the authors adapt the masked modeling methodology used in BERT. Rather than a special mask token, they simply zero out the spike inputs of a masked timestep.

On synthetic datasets with known dynamics and on monkey motor cortex data from a reaching task, the NDT models the data as well as state-of-the-art recurrent models. Its non-recurrence enables 3.9ms inference, more than 6 times faster than recurrent baselines on the monkey reaching dataset. The ablations show that the use of logrates, zero masks, and heavy regularization are all critical to the NDT's performance. The authors name the model's most critical limitation themselves: its inability to model nonautonomous dynamics, meaning systems with unpredictable external perturbations.

The captured member follows the official repository, where the original NDT paper configurations live under configs/arxiv, separate from the later NLB configuration files. A 1-layer NDT with around the same number of parameters as the LFADS model trains under 30 minutes and infers in under 1ms.

Key idea. A non-recurrent, BERT-style Transformer encoder that infers firing rates from binned spiking activity by masked modeling with a Poisson likelihood, matching recurrent models while inferring far faster.

  • neural data transformer
  • ndt
  • ndt1
  • neural population activity
  • spiking activity
  • firing rate inference
  • brain-computer interface
  • masked modeling
  • lfads alternative
  • motor cortex
  • neural data transformers

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

Cite the paper

@misc{ye2021representationlearningneuralpopulation,
      title={Representation learning for neural population activity with Neural Data Transformers}, 
      author={Joel Ye and Chethan Pandarinath},
      year={2021},
      eprint={2108.01210},
      archivePrefix={arXiv},
      primaryClass={q-bio.NC},
      doi={https://doi.org/10.51628/001c.27358},
      url={https://arxiv.org/abs/2108.01210}, 
}