Dynamics of the Transformer Residual Stream: Coupling Spectral Geometry to Network Topology

Jesseba Fernando, Grigori GuitchountsNeurIPS 2026

TL;DR

Think of a Transformer’s residual stream not as a static highway, but as a river flowing through discrete steps of time—one layer after another. By mapping the exact mathematical currents (Jacobians) of production-scale LLMs, the authors discover that training carves a dramatic, low-dimensional "funnel" that squeezes thousands of input directions down to just a handful that actually steer next-token predictions. Even wilder: this funnel isn’t driven by standard eigenvalues, but by hidden non-normal geometry that preferentially amplifies the exact "bridge" coordinates connecting different functional communities in the network.

What Problem Does This Paper Address?

Mechanistic interpretability has gotten pretty good at taking snapshots of what individual neurons, attention heads, or sparse autoencoders represent at a given layer. What we still don’t really understand is the movie: how perturbations get amplified, compressed, or rotated as computation flows through depth.

Dynamical systems theory is the natural language for this—treating layers as time steps and per-layer Jacobians ($J_\ell = \partial \mathbf{h}_{\ell+1}/\partial \mathbf{h}_\ell$) as local linear rules of motion. However, prior theory mostly looked at randomly initialized networks or toy models, while recent empirical work on trained LLMs relied on approximations (like frozen nonlinearities or averaged states) and singular values. Singular values throw away phase and rotational information, leaving the true spectral geometry of trained, production-scale LLMs—and how those dynamics connect to the network's modular topology—completely uncharted.

Methods

The authors analyze three open-weight LLMs: Llama 3.1 8B, OLMo 3 7B, and Gemma 4 E4B. Crucially, for OLMo, they examine three checkpoints: step 0 (random initialization), step 471k, and step 1.41M (fully trained). Because step 0 has the exact same wiring and depth as the trained model, it acts as a clean "architectural null"—separating what comes free from Transformer wiring versus what training actually learns.

Their toolkit combines three main techniques:

  1. Exact Per-Sample Jacobians: They compute exact token-local Jacobians (isolating each block's read–write path on the last token, validated against full-context Jacobians) and perform full eigendecomposition alongside singular value analysis.
  2. Schur Surgery: A non-normal matrix is one whose eigenvectors aren't orthogonal, allowing it to transiently amplify signals even when its eigenvalues suggest decay. Using Schur decomposition, the authors surgically separate each Jacobian’s eigenvalues from its strictly upper-triangular "feedforward" (non-normal) coupling, scaling the non-normal part up or down to test what breaks.
  3. Activation-Graph Topology: They build signed correlation graphs of residual-stream activations and run signed Leiden community detection to see if "boundary units" (coordinates bridging multiple communities) get treated differently by the Jacobian.

Datasets

The authors evaluate all models and checkpoints on 1,000 passages from WikiText-2, extracting last-token residual-stream activations. No new benchmarks are introduced.

Key Insights and Ideas

  • Training builds a massive low-rank funnel—and hides it in non-normality: Composing Jacobians from layer 0 to the end squeezes perturbations into a tiny subspace. When the authors perform Schur surgery—wiping out the non-normal feedforward coupling while keeping every single eigenvalue intact—the funnel largely dissolves! Replacing that structure with random matrices of the same magnitude reverses the effect, proving training installs a very specific non-normal geometry.
  • Transformers are secretly spinning: Roughly 98% of per-layer Jacobian eigenvalues are complex conjugate pairs. Every pair represents a 2D plane where the layer rotates activations while stretching or shrinking them—a rich rotational structure completely invisible to singular-value analyses, and systematically organized by training.
  • Three dynamical regimes across depth: Trained layers sweep from strongly non-normal, highly uneven stretchers in early layers, through a compressed middle regime, to near-normal operators in late layers where input sensitivity and output amplification finally align.
Per-layer condition number and fraction of expanding modes in Llama 3.1 8B
  • Architecture vs. Learning: Adjacent layers don't hand off matched subspaces like a factory assembly line; their leading input/output directions are decoupled right at random initialization, confirming the residual stream is natively wired as a "shared workspace." Meanwhile, macro-level community alignment with the Jacobian is also present at step 0! What is learned is a fine-grained coupling: training teaches the Jacobian to preferentially amplify (or in strongly non-normal layers, suppress) the exact boundary units that bridge different activation communities.

Key Results

  • The End-to-End Bottleneck: Out of 4,096 residual-stream dimensions in Llama 3.1 8B, cumulative effective rank drops to just 7.3 across all 32 layers (5.9 across 42 layers in Gemma). In OLMo, random initialization retains ~645 effective directions (~15%), whereas training crushes this 10× down to ~64 (~1.5%).
  • Behavioral Relevance: Injecting perturbations into the live forward pass along these surviving funnel directions shifts next-token loss 2.4–5.2× more than matched random directions in Llama ($p < 10^{-11}$).
  • Schur Surgery Recovery: Removing non-normality ($c=0$) expands the cumulative effective rank by 6.2× in Llama (from 7.3 to 45.4), 5.4× in trained OLMo, and 6.8× in Gemma, compared to just 2.0× in untrained OLMo.
  • Topology-Dynamics Coupling: Boundary-node amplification is completely absent at OLMo step 0 (0/32 layers significant), emerges at step 471k (14/32 layers), and locks in at step 1.41M (24/32 layers, median Cohen's $d = +0.248$). Across models, whether boundary units are amplified or suppressed tracks the layer's input-output self-alignment (Spearman $\rho = +0.45$ in OLMo, $\rho = +0.54$ in Gemma).

Limitations and Future Work

  • Single-Dataset Scope: All experiments rely on WikiText-2; while qualitative patterns should generalize, exact numbers will likely shift on code, math, or multimodal inputs.
  • Token-Local Main Analysis: The primary sweep uses a single-position (QK-ablated) Jacobian, omitting cross-token attention routing derivatives (though smaller-scale full-context checks reproduced every major trend, accounting for ~11% norm difference).
  • Confounded Checkpoints in Gemma: Gemma 4 E4B was only analyzed at its instruction-tuned checkpoint (unlike base Llama and OLMo), making it impossible to tell if its unique early-layer suppression of boundary units comes from architecture or post-training.
  • Methodological Advice for Future Work: Because activation communities explain Jacobian variance even at step 0, the authors urge future interpretability and network-topology studies to always run a random-initialization baseline so architectural priors aren't mistaken for learned features.

Summary updated

Abstract

Large language models are remarkably capable, yet how computation propagates through their layers remains poorly understood. A growing line of work treats depth as discrete time and the residual stream as a dynamical system, where each layer's nonlinear update has a local linear description. However, previous analyses have relied on scalar summaries or approximate linearizations, leaving the full spectral geometry of trained LLMs unknown. We perform full Jacobian eigendecomposition across three production-scale LLMs and show that training installs a cumulative low-rank bottleneck that funnels perturbations into a small fraction of the residual stream's effective dimensions. The Jacobians are non-normal—their eigenvalues alone do not predict how they amplify perturbations—and training extends non-normality from the first few layers deep into the network. Removing structured non-normality while preserving the eigenspectrum largely dissolves the dimensional funneling. We further show that residual-stream units bridging activation-graph communities are preferentially amplified by the Jacobian, a coupling that is absent at initialization and whose sign tracks each layer's self-alignment. These results reveal a learned spectral geometry in LLMs, in which training installs non-normal structure that funnels perturbations through depth and is coupled to the network's functional topology.
BibTeX
@inproceedings{fernando2026dynamics,
  author = {Jesseba Fernando and Grigori Guitchounts},
  title = {{Dynamics of the Transformer Residual Stream: Coupling Spectral Geometry to Network Topology}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=Ke57r4zEB4},
}
Figure