Neural Data Needs Semantic Tokenization: Behavioral Events as Boundaries of Session-Transferable Tokens

Sangyoon Bae, Jiook ChaarXiv 2026

TL;DR

Neural foundation models often fail to generalize across experimental sessions because they rely on specific neuron identities that change every time a probe is inserted. This paper introduces Tokenization with States (TWS), which segments neural activity by behavioral events and tokenizes the underlying population manifold, enabling zero-shot generalization across sessions, species, and recording technologies.

What Problem Does This Paper Address?

In systems neuroscience, every extracellular electrophysiology session is essentially a new "language." Because electrode positions shift and unit isolation varies, each session records a different set of neurons. Current "neural foundation models" typically learn embeddings for specific neurons or sessions. Consequently, when presented with a new session—containing neurons the model has never seen—these models often collapse and fail to generalize.

The authors argue that neural data needs semantic tokenization. Just as NLP moved from character-level models to subword tokens that carry reusable meaning, neural models need a unit of representation that is shared across sessions and carries behavioral relevance.

Methods

The authors propose Tokenization with States (TWS), a method that moves away from per-neuron tokens toward tokens representing population-level "states."

  1. Regime Segmentation: Instead of fixed time bins, TWS segments each trial into behavioral regimes based on task events (e.g., stimulus onset, movement onset). These boundaries are defined by soft sigmoid gates with learnable offsets, allowing the model to capture the delay between an event and the resulting shift in neural population dynamics.
  2. Manifold Tokenization: Within each regime, the model summarizes the joint activity of all recorded neurons. It computes a low-dimensional subspace—a point on a Grassmannian manifold—that describes the geometry of the population activity without needing to know which neuron is which.
  3. Permutation Invariance: The aggregation step uses cross-attention without positional encoding over neurons. This ensures that the resulting tokens are identical regardless of the order in which neurons are indexed, effectively removing neuron identity from the representation.
  4. Backbone & Decode: A token-mixing backbone (like a CNN or Transformer) processes these state tokens to predict behavioral variables.
Figure 1: Overview of Tokenization with States (TWS). Each session records a different set of neurons. TWS segments every trial into behavioral states at task events and converts each state into tokens without neuron identity, so all sessions share one token space. States S0 to S2 are the states k=1, 2, 3 of Algorithm 1, and τ1 and τ2 are the event times shifted by two trainable offsets shared by all sessions.

Datasets

The model was trained and evaluated on a diverse array of large-scale electrophysiology datasets:

  • IBL Brain Wide Map: 243 Neuropixels sessions from 109 mice performing a visual decision task.
  • Steinmetz 2019: 39 Neuropixels sessions from 10 mice.
  • Gallego et al. (2020): 111 Utah array sessions from 4 macaques performing reaching tasks.
  • NLB MC_Maze: 23 Utah array pseudo-sessions from 1 macaque.

Key Insights and Ideas

  • The Token Matters More Than the Model: The authors show that for cross-session generalization, the choice of tokenizer is far more critical than the specific architecture (CNN vs. Transformer) used as the backbone.
  • Manifold Persistence: The low-dimensional manifold of population activity is a "universal" unit. It persists across months of neuronal turnover and even across different animals performing the same task.
  • Type A vs. Type B Variables: The paper distinguishes between variables encoded across the whole population (Type A, like movement) and those requiring specific neuron selectivity (Type B, like choice). TWS is specifically designed to preserve Type A variables across sessions.
  • Semantic Boundaries: Using behavioral events as boundaries provides a "semantic" anchor. Even if the neural activity itself is noisy, the fact that a token represents the "pre-movement state" gives the model a stable starting point across sessions.

Key Results

  • Zero-Shot Generalization: On held-out IBL sessions, TWS achieved a movement decoding Matthews correlation (MCC) of ~0.56. In contrast, per-neuron foundation models like POYO, even when pretrained on those same sessions, decoded at chance (MCC 0.00).
  • Cross-Species Transfer: A TWS model trained exclusively on mice was "frozen" and tested on macaques. With only a simple linear probe, it outperformed every baseline, including models trained directly on the macaque data itself.
Table 4: Transfer of the frozen representation with a linear probe; POYO trains on each dataset (protocol in Section 4.1). MCC, mean ± SD over 5 seeds. Rows without ± are deterministic features. Event-time information uses the first-movement bin and no neural data.
  • Data Efficiency: TWS is remarkably efficient. A decoder fit on just five sessions outperformed baselines trained on the entire dataset.
  • Session Invariance: TWS embeddings naturally cluster by behavioral state rather than session identity, unlike standard models where session ID often dominates the embedding variance.
Figure 2: Training organizes TWS embeddings around behavior (movement) rather than session identity.

Limitations and Future Work

  • Dependency on Event Times: Currently, TWS requires the timestamps of behavioral events to set its regime boundaries. This makes it less applicable to "free behavior" settings where task events aren't strictly defined. The authors suggest that future work could involve data-driven segmentation of neural states.
  • Temporal Averaging: By summarizing a whole regime into a few tokens, TWS gives up the fine-grained temporal dynamics within a state. While this helps with invariance, it might limit performance on tasks where sub-state timing is critical.
  • Type B Challenges: While TWS excels at Type A variables, Type B variables (like specific choices) remain difficult to decode without some form of session-specific alignment or neuron-tracking.

Summary updated

BibTeX
@misc{bae2026neural,
  author = {Sangyoon Bae and Jiook Cha},
  title = {{Neural Data Needs Semantic Tokenization: Behavioral Events as Boundaries of Session-Transferable Tokens}},
  year = {2026},
  eprint = {2610.03001},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.03001},
}
Figure