TWS Lets One Brain Decoder Read Any Animal's Neurons Without Retraining
A new tokenizer segments neural recordings by behavioral events instead of neuron identity, letting one model transfer from mice to macaques with just a linear probe.
Takeaways
- TWS tokenizes neural recordings by population state between behavioral events, not by neuron identity.
- Fixes the core failure of per-neuron foundation models: new sessions have new neurons with no embedding.
- Pretrained on mouse IBL Neuropixels, transfers frozen to macaque Utah arrays with a linear probe.
- Beats a per-neuron foundation model that decodes at chance on held-out IBL sessions.
- Reach-direction MCC of 0.23 on macaques versus 0.01 from event-time baseline alone.
- Core claim: for cross-session transfer, the token matters more than the model on top.
Each neural recording typically samples a different set of neurons, which creates an out-of-vocabulary problem for models that assign learned embeddings to individual cells. The TWS preprint, Neural Data Needs Semantic Tokenization, proposes a session-independent representation built from population activity between task events. The approach aims to let one encoder process recordings from new animals, laboratories, and electrode systems without learning embeddings for every new neuron.
| Input | Trialized population activity and task-event timestamps |
|---|---|
| Segmentation | Three behavioral states defined by event boundaries and two shared, trainable time offsets |
| Output | Six 256-dimensional tokens per trial |
| Identity features | No neuron or session embeddings |
| Transfer test | Mouse Neuropixels pretraining followed by evaluation on held-out mice and macaque Utah arrays |
| Status | Preprint; no code repository linked in the submission |
Neuron IDs expire between sessions
Spike-level models such as POYO represent each spike with its timestamp and the identity of the neural unit that produced it. POYO demonstrated that this design can scale across 158 sessions, seven nonhuman primates, and more than 27,000 recorded units.
A learned unit embedding still binds the representation to neurons seen during training. New recordings introduce new unit IDs, so the model must initialize or fit additional embeddings before using them. That adaptation can work, but it requires session-specific data and prevents direct ingestion of an unseen recording.
States provide a shared coordinate system
Although a recording may contain hundreds of neurons, correlated firing patterns can often be summarized with fewer latent dimensions. As behavior unfolds, population activity traces a path through this reduced space, commonly called a neural manifold. The preprint builds on evidence that aspects of this population-level geometry can remain comparable across sessions and animals after alignment.
TWS treats the interval between two task events as a behavioral state. Stimulus onset and first movement, for example, divide a trial into segments with consistent task meaning. The tokenizer summarizes the population trajectory within each segment and omits neuron and session identities.
One trial becomes six tokens
For each event-structured trial, TWS creates a fixed-size representation through the following pipeline:
- Define the trial. Select one task repetition spanning the stimulus and behavioral response.
- Place the boundaries. Start with recorded event times, such as stimulus onset and first movement, then adjust them with two trainable temporal offsets shared across sessions.
- Create three states. Divide the trial into
K = 3behavioral regimes. - Encode each state. Map the population activity in each regime to two 256-dimensional tokens intended to preserve its trajectory geometry.
- Assemble the sequence. Concatenate the state representations into six tokens, producing a
6 × 256input for the downstream model.
The resulting sequence has the same shape regardless of which neurons were recorded. At the transformer input, mouse Neuropixels data and macaque Utah-array data therefore share an interface without session-specific unit embeddings.
Transfer tests isolate neural information
The authors pretrain TWS on mouse Neuropixels recordings from the International Brain Laboratory, then test the learned representation on held-out mouse sessions and macaque recordings. Neuropixels probes and Utah arrays differ in geometry, channel layout, and typical experimental use, making the macaque evaluation a transfer across species and recording hardware.
| Evaluation | Adaptation | Reported result |
|---|---|---|
| Movement decoding on held-out IBL mouse sessions | Evaluation on unseen recording identities | TWS decodes above chance when event timing alone does not reveal the target; a per-neuron baseline remains at chance. |
| Reach-direction decoding from macaque Utah arrays | Frozen mouse-pretrained encoder with a supervised linear probe fitted to macaque labels | TWS reaches a Matthews correlation coefficient of 0.23; an event-time-only baseline reaches 0.01. |
The held-out mouse test asks whether the representation retains movement information unavailable from the segment boundaries themselves. Its reported advantage over the unit-based baseline suggests that the population tokens carry information across sessions without relying on familiar neuron IDs.
Matthews correlation coefficient ranges from negative one to positive one, with zero indicating no association and one indicating perfect predictions. The macaque score of 0.23 indicates limited but measurable reach-direction information beyond the 0.01 timing baseline. Because the evaluation fits a supervised linear probe, it demonstrates transfer of the frozen representation rather than label-free decoding on a new species.
The deployment boundary
TWS fits datasets organized around repeated trials with reliable event annotations. Its current design has several practical constraints:
- Event timestamps are required. Continuous or freely moving recordings without stable behavioral boundaries do not match the proposed segmentation scheme.
- Temporal detail is compressed. Six tokens per trial discard fine-grained spike timing that unit-level models can preserve.
- Target labels remain necessary. The cross-species experiment trains a linear probe on labeled macaque examples, even though the encoder stays frozen.
- Reported accuracy is limited. An MCC of 0.23 supports representation transfer but falls short of a production decoder.
- Replication resources are incomplete. The submission does not link an implementation, pretrained weights, or a reproducible training pipeline.
The design is most applicable to cross-session neuroscience benchmarks, comparative studies, and brain-computer-interface research where a shared encoder could reduce session-specific adaptation. Tasks driven by millisecond-scale dynamics or unstructured continuous behavior will require a different tokenizer or an extension of TWS.
What the experiments support
The reported experiments support a focused design claim: event-defined population states can provide a shared token space across changing neurons, species, and recording hardware. They also separate two forms of adaptation that are often conflated. TWS removes the need to fit embeddings for new neuron identities, while downstream decoding can still require labeled examples and a task-specific readout.
The 10-page preprint contains three main figures and has not completed peer review. Its broader contribution is an input contract for neural models: trialized activity and meaningful event boundaries enter the tokenizer, and a fixed six-token sequence leaves it. Future evaluations will need to test continuous behavior, finer temporal targets, additional species, and comparisons under matched model capacity and adaptation budgets.