From sequences to schemas: low-rank recurrent dynamics underlie abstract relational representations

Vezha Boboeva, Alberto Pezzotta, George Dimitriadis, Athena AkramiNeurIPS 2026

TL;DR

How do brains recognize that aab, ccd, and eef are essentially the "same" pattern, even though they share zero letters? Using Recurrent Neural Networks (RNNs) as mechanistic models of brain circuits, the authors show that classifying abstract patterns drives networks to build low-rank internal wiring that acts like a conveyor belt for relational transitions ("same" vs. "different"). Crucially, networks trained merely to predict the next letter completely fail to learn these abstract schemas—suggesting that global temporal integration, rather than local prediction, is the secret sauce behind cognitive abstraction.

What Problem Does This Paper Address?

Across the animal kingdom—from human infants to songbirds and rodents—brains effortlessly extract abstract rules from sequences. Psychologists call these compressed internal models schemas: mental scaffolds that capture the relationships between things rather than the things themselves, allowing rapid generalization to brand-new experiences.

While we know brain regions like the hippocampus and prefrontal cortex are heavily involved in schema formation, we have lacked a circuit-level explanation of how a tangle of recurrently connected neurons actually computes identity-independent rules from raw sequential inputs. How does a neural network strip away sensory specifics ("this is the letter c") to preserve pure relational structure ("this item is the same as the last one")?

Methods

The authors trained standard discrete-time ReLU RNNs using backpropagation through time (BPTT) on two distinct objectives:

  1. Sequence Classification: Reading a sequence one-hot letter by letter and outputting its abstract algebraic class (e.g., ABBA) only at the final timestep.
  2. Next-Letter Prediction: Predicting upcoming letters step-by-step from an initial cue.

While the RNN architecture is standard, the mechanistic analysis is novel:

  • Ensemble Alignment for Rank Estimation: Because random weight initialization masks low-rank structure, the authors trained multiple networks from scratch, rotated their weight matrices into a common coordinate frame, and averaged them. Random noise cancels out, cleanly revealing the universal low-rank "skeleton" underneath.
  • Ultrametric Content (UC): Borrowed from physics and taxonomy, this metric quantifies how closely the geometry of neural population states resembles a hierarchical branching tree.
  • Causal Singular Vector Ablation & Transfer: They surgically deleted individual singular vectors from the recurrent weight matrix ($W_h$) to test their exact functional roles, and transplanted learned recurrent weights from classification networks into prediction networks to test schema reusability.
Figure 1: Emergence of abstract sequence representations in recurrent networks. A. We generated sequences from a binary branching tree (example shown for sequence length L = 4, and m = 2 unique letters, corresponding to the number of branches from the root), yielding C = 7 abstract classes. Each class is instantiated by replacing the m unique letters with symbols drawn from an alphabet (here of length α = 5). B. An RNN processes sequences one letter at a time and is trained to classify them according to their abstract structure, receiving a class label at the end. C. Training loss (left) and accuracy (right) across epochs (mean ± s.d. across simulations). D. PCA of the hidden activities of the trained network. Left: activities at the final time step for all sequences, color-coded by class. Right: activities at all time steps t = 1 to 4 for one example sequence per class.

Datasets

The authors use synthetic algebraic sequence datasets constructed from deterministic binary branching trees:

  • Classification sequences: Generated by branching at each step based on whether the next symbol is the same or different (e.g., length $L=4$ with $m=2$ unique letters yields $C=7$ abstract classes like AAAB, ABBA). Concrete sequences (aaab, cccd) are instantiated by sampling letters from an alphabet of size $\alpha$, holding out specific combinations to test out-of-distribution generalization.
  • Unambiguous prediction sequences: Because standard cues like aa could validly continue to aaab or aabb (encouraging memorization), the authors introduced an "extreme pruning" benchmark ($L=8$) that retains only a single valid continuation path per cue, ensuring identical input statistics when comparing classification and prediction models.

Key Insights and Ideas

  • A neural "shift register" for relations: How does the network remember transition history without caring about letter identity? Through a clever copying mechanism in its singular vectors (SVs). The top singular vector (SV1) detects whether the latest transition was "same" or "different" (encoding them with opposite signs). At the next tick of the clock, recurrent dynamics copy SV1's state into SV2, acting as a memory buffer while SV1 processes the new transition.
  • Task objective dictates circuit architecture: Feeding the exact same sequences into the exact same RNN architecture yields wildly different brains depending on the loss function. Classification forces global integration across time, sculpting low-rank, tree-like representations. Next-letter prediction allows the network to get by with high-dimensional memorization, completely failing to build low-rank schemas.
  • Schemas live in the recurrent weights—and they are reusable: When recurrent weights from a classification network are transferred to initialize a prediction network, prediction learning speeds up dramatically and generalizes to unseen sequences. Scrambling the singular vectors (while keeping the eigenvalue spectrum identical) ruins this effect, proving the geometric structure of the recurrent scaffold is doing the heavy lifting.
Figure 2: Low-dimensional dynamics and low-rank connectivity in trained recurrent networks. A. Dimensionality of hidden activity over time, measured as number of singular vectors capturing 90% of the mean squared activity (medians ± 5–95% percentiles). B. Recurrent connectivity matrix shown as a sum of a structured low-rank component (colored) and a random component (gray). C. Input, recurrent and output weight matrices from multiple simulations shown in common rotated coordinates (see Methods, Eqs. 8). Each row corresponds to one simulation; matrices are flattened by concatenating rows (input/recurrent) or columns (output transpose). Only the dominant modes are shown (dashed lines), 3 for input (left), 5 by 5 for recurrent (middle) and 5 for output (right) weights. D. Low-rank structure extracted by averaging aligned weight matrices across simulations, for the input (left), recurrent (middle) and output (right) weights. Dashed blue line: mean of the singular values (SVs) of the weight matrices from individual simulations ± 5–95% percentile bands. Dotted blue: SVs of the average of the weights before change of basis. Red: SVs of the average of the weights after change of basis. Shaded region: structured component (estimated rank).

Key Results

  • Extreme Compression: For $L=4$ sequences across $C=7$ classes, the top 3 principal components capture ~90% of the hidden activity variance at the end of the sequence, organizing into a clean binary tree.
  • Minimal Rank Threshold: Explicitly constraining recurrent weight rank during training shows that rank $R \le 2$ fails systematically (confusing classes that differ only in their earliest transitions, like ABBA vs. AAAB), whereas $R \ge 3$ matches full-rank generalization accuracy (reaching 100% test accuracy).
  • Copy Mechanism Consistency: Across 100 independent simulations, the output direction of SV1 ($u_1$) strongly aligns with the input direction of SV2 ($v_2$) in ~60% of networks (and with $v_3$ in most others), confirming a universal shift-register motif.
  • Causal Ablation: Surgically removing SV1 collapses the hierarchical tree geometry; the network retains single-step sensitivity (distinguishing **AB from **AA) but suffers total amnesia regarding earlier transitions.

Limitations and Future Work

  • Toy Inputs: The experiments rely on deterministic binary trees, fixed sequence lengths, and discrete one-hot letters. Real-world sensory streams are noisy, probabilistic, variable-length, and continuous. Moving to continuous inputs, for instance, would require circuits to track the sign of derivatives rather than simple categorical equality.
  • Biological Plausibility of the Objective: While the paper shows that global classification beats local prediction for building schemas, biological brains aren't trained with supervised end-of-sequence cross-entropy labels. Uncovering what neuromodulatory signals or feedback loops create an equivalent "global integration" objective in real brains—and tracking whether these low-rank scaffolds emerge gradually or abruptly during learning—remains an open frontier.

Summary updated

Abstract

A hallmark of intelligent behavior is the ability to extract abstract relational structure from temporal sequences -- recognizing, for instance, that \seq{aab}, \seq{ccd}, and \seq{eef} all follow the same underlying pattern, regardless of the specific elements involved. This capacity, observed across species and sensory modalities, is thought to underlie the formation of cognitive schemas: compressed internal models that support rapid generalization to novel experiences. Yet the neural circuit mechanisms by which such abstract, identity-independent representations emerge from sequential experience remain largely unknown. Here, we investigate this question using Recurrent Neural Networks (RNNs) as mechanistic models of neural circuits, trained to classify sequences based on their latent algebraic patterns (e.g., \seq{aab}, \seq{aad} $\to$ \seq{AAB}; \seq{aba}, \seq{aca} $\to$ \seq{ABA}) without supervision on intermediate transitions. We demonstrate that RNNs learn low-dimensional representations that mirror the hierarchical generative structure of the sequences, and that this abstraction is mechanistically supported by the emergence of low-rank recurrent connectivity. The leading singular components of the recurrent weights integrate relational transition information -- whether consecutive letters are the same or different -- across time, driving the formation of a structured, tree-like geometry in the population activity space. Through singular vector ablation, we establish a causal role for the leading component: removing it selectively erases memory for earlier transitions while leaving local, single-step sensitivity intact. Finally, while RNNs trained on next-letter prediction do not acquire these abstract representations, transferring the low-rank scaffold learned from classification significantly accelerates learning and improves generalization -- an effect specific to the abstract structure of the scaffold rather than generic statistical pretraining. These findings offer a computational account of how task demands shape recurrent connectivity to support temporal abstraction, with implications for schema formation in biological brains.
BibTeX
@inproceedings{boboeva2026from,
  author = {Vezha Boboeva and Alberto Pezzotta and George Dimitriadis and Athena Akrami},
  title = {{From sequences to schemas: low-rank recurrent dynamics underlie abstract relational representations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=3XO2JXx10F},
}
Figure