Yongzhong Xu

Studying the geometry of how neural networks learn.

My work brings geometric and dynamical-systems methods to how neural networks learn. It started with toy models — using the commutator defect to find what predicts grokking — and the same geometry reappeared at scale: training trajectories concentrate along a dominant backbone direction, and the gap between that backbone and the bulk turns out to be a usable signal. That signal is now an unsupervised tool for identifying attention circuits during training.

One object keeps recurring: a gap in the spectrum of a Gram matrix built from training dynamics. In parameter space it governs grokking — an early-warning, causally-implicated, theory-anchored signal. In activation space it pre-identifies the attention circuits that implement learned behavior. Two windows on what looks like one underlying object.

Mechanistic interpretability — spectral probe-circuits

4 papers

An unsupervised, training-time signal that pre-identifies causally-relevant attention circuits without labels or ablation runs — turning mechanistic interpretability from a snapshot into a film. Validated across ~20× scale (51M to OLMoE 1B-7B), two architectures (dense and 64-expert MoE), and three pretraining datasets.

Left: per-head spectral signal elevated at or before each attention head's formation event in Pythia 1B. Right: task circuits form within 0.3–2% of training across Pythia 1B, OLMo 1B, and OLMoE 1B-7B.

Capability Circuits Form Early — and the Signal Sees Them Coming

Left: the per-head spectral signal is elevated at or before each attention head’s formation event (Pythia 1B; induction, previous-token, BOS attractor). Right: induction and previous-token circuits form within 0.3–2% of training across three 1B-class models spanning two architectures and two datasets — circuit formation becomes a training-time observable rather than a post-hoc analysis.

Grokking — phase transitions in toy models

7 papers

One geometric object — the leading spectral edge / eigengap of the training-dynamics Gram — governs grokking: it gives early warning of the memorization→generalization transition, is causally implicated in it, encodes the structure of the learned algorithm, and pins down the lock-in stage of Tian’s Li2 framework (the σ2/σ3 eigengap fires at epoch 174 ± 1 in 15/15 grok seeds, 0/15 controls).

ModAdd+ModMul phase portrait showing grokking transition in spectral gap / non-commutativity phase space

Phase Portrait of Grokking

Left: Training trajectory in the (spectral gap, non-commutativity) plane, colored by training step. The system wanders in the competition zone (σ₁ ≈ σ₂) with near-zero accuracy, then the gap opens, non-commutativity peaks at step 15200, and the trajectory crosses into the alignment quadrant — at which point both grokking events occur (ModMul at step 16300, ModAdd at step 16400). Right: The same trajectory colored by test accuracy. Accuracy is essentially zero until the phase portrait dictates otherwise.

Training dynamics at scale — the backbone story

2 papers

How optimization trajectories concentrate as models scale, from TinyStories-51M to GPT2-124M. Under AdamW, transformer trajectories concentrate along a “backbone” direction capturing 60–80% of displacement from initialization; the effect vanishes under SGD — the structure is optimizer-induced, not gradient-induced. This is the bridge from the toy models to scale.

Backbone fraction over training: the share of the trajectory along a single backbone direction rises to ~0.9 and plateaus, near-identical for seeds 42 and 271.

The Backbone Dominates — and Reproduces Across Seeds

The share of the training trajectory captured by a single ‘backbone’ direction rises early and plateaus high — and two independent runs (seeds 42 and 271) track each other almost exactly. The concentration is a reproducible, optimizer-induced property of training, not a per-run accident.

Interpretability Closure-Validated Circuit Discovery in Attention Heads: Co-activation Proposes, Ablation Disposes
Interpretability Pattern Selectivity is Not Task-Causal Structure: A Cross-Architecture Mechanistic Study of Composed-Task Circuits in 1B-Class Language Models
Interpretability When Do Attention Circuits Form? Developmental Trajectories of Capability and Attention-Sink Emergence Across Three 1B-Class Architectures
Interpretability Spectral Probe-Circuits: A Three-Step Recipe for Identifying Attention-Head Circuits in Pretrained Transformers
Grokking Spectral Marker of Feature Interaction in Tian’s Li2 Grokking Framework
Grokking Gradient-Direction Sensitivity Reveals Linear-Centroid Coupling Hidden by Optimizer Trajectories
Grokking The Lifecycle of the Spectral Edge: From Gradient Learning to Weight-Decay Compression
Grokking Spectral Edge Dynamics Reveal Functional Modes of Learning
Scale Spectral Edge Dynamics of Training Trajectories: Signal–Noise Geometry Across Scales
Scale Optimizer-Induced Low-Dimensional Drift and Transverse Dynamics in Transformer Training
Grokking Global Low-Rank, Local Full-Rank: The Holographic Encoding of Learned Algorithms
Grokking The Geometry of Multi-Task Grokking: Transverse Instability, Superposition, and Weight Decay Phase Structure
Grokking Early-Warning Signals of Grokking via Loss-Landscape Geometry

I received my Ph.D. in Mathematics from Rutgers University, where I worked with Abbas Bahri in nonlinear PDE and contact geometry. I was subsequently a Courant Instructor at the Courant Institute of Mathematical Sciences (NYU) and a member of the Institute for Advanced Study. I later served as a Distinguished Research Fellow and Associate Professor at Shanghai Jiao Tong University.

Recent Progress in Conformal Geometry — book cover
Recent Progress in Conformal Geometry
Abbas Bahri and Yongzhong Xu
Imperial College Press · ICP Advanced Texts in Mathematics, Vol. 1 · 2007 · 524 pp.

Outside of work, I have been practicing meditation in the Nyingma tradition since sixteen. I enjoy hiking and cooking. I am a vegetarian.