TL;DR
Standard interpretability tools examine transformer tokens one at a time or trace paths across layers, leaving us blind to how tokens within the same layer statistically entangle with one another. By borrowing math from diffusion models, this paper introduces Score-Block Token Geometry (SBTG) to directly map these intra-layer relationships. Doing so reveals distinct, causally important geometric "fingerprints" left behind by different positional encoding mechanisms like RoPE, ALiBi, and Absolute embeddings.
What Problem Does This Paper Address?
As tokens move up through a transformer, their attention windows overlap. By the deeper layers, neighboring tokens have read much of the same upstream context, making their activations deeply entangled. How a model handles positional encoding (PE)—whether adding vectors at the input (Absolute), biasing attention by distance (ALiBi), or rotating queries and keys (RoPE)—shapes this shared relational geometry.
Surprisingly, our standard interpretability toolkit misses this lateral, within-layer coupling:
- Single-position probes and Sparse Autoencoders (SAEs) look at tokens in isolation, capturing marginal distributions while ignoring how adjacent positions co-vary.
- Circuit-tracing and attribution methods follow gradients along directed computational edges between layers. Because tokens in the same layer have no directed edge connecting them, autograd hits a dead end.
How, then, do we read the invisible statistical threads connecting tokens side-by-side in the same layer?
Methods
Instead of relying on the network's computational graph, the authors study the geometry of the joint probability distribution over a sliding window of $w$ consecutive token activations in a given layer.
Adapting a technique originally built to study neuron-to-neuron lag in C. elegans brains, they introduce Score-Block Token Geometry (SBTG):
- Dimensionality Reduction: Token activations (or output logits) are compressed via PCA (down to $m=32$ dimensions) and sliced into overlapping windows of width $w=16$.
- Score Matching: Standard denoising score matching trains a small MLP to estimate the score function ($\nabla \log p(Z)$)—the gradient showing how probability mass shifts across activation space. A custom null-contrast ratio tunes hyperparameters to emphasize cross-position structure over a shuffled baseline.
- The Positional Operator ($M_r^{(\ell)}(i)$): This is the core diagnostic. By taking the outer product of the learned score blocks for two tokens separated by a distance (lag) $r$, SBTG builds an $m \times m$ coupling matrix. (If activations were purely Gaussian, this matrix would equal the negative precision block, measuring conditional dependence).
From this operator, the authors extract summary metrics for coupling strength (amplitude), shape (spectral concentration—whether coupling aligns along one dominant direction or spreads out), and position dependence (how much coupling shifts as the window slides down the sequence).
Datasets
- Synthetic Task Suite: For controlled, matched-architecture training (4-layer GPT-2 style models differing only in PE), the authors use 100,000 length-64 sequences (plus 20,000 test sequences) across five synthetic task families—including variable-lag copy and absolute-anchor tasks—designed to require both relative and absolute positional reasoning.
- WikiText-103: Used to evaluate internal states and output logits of 13 pretrained LLMs across the Pythia (RoPE), BLOOM (ALiBi), GPT-2 (Absolute), and OPT families.
Key Insights and Ideas
- Invisible to probes, obvious to scores: Two representations can have identical single-token statistics (fooling linear probes) while harboring vastly different cross-token dependencies. In ALiBi models, single-position probes fail to find position information, yet SBTG reveals tightly concentrated cross-token coupling.
- Architectures leave geometric fingerprints: Each PE method leaves an intuitive signature in deep layers. ALiBi's single scalar slope per head funnels coupling into a concentrated, dominant direction. RoPE's multi-frequency rotations spread coupling across a broader spectrum. Absolute embeddings anchor to specific indices, causing coupling operators to shift sharply as the window moves.
- Low variance doesn't mean low importance: Standard methods like PCA gravitate toward high-variance directions. SBTG finds subtle, low-variance subspaces that nonetheless do the heavy lifting for relational tasks like copying tokens across variable lags.
Key Results
- Deep-Layer Fingerprints: At Layer 4 (lag 1) of the matched models, ALiBi packs 0.735 of its coupling energy into the top singular direction, compared to 0.232 for RoPE and 0.201 for Absolute. Meanwhile, Absolute PE exhibits the sharpest operator change when shifting the window by a single token.
- Causal Interventions: Reversing activation components along the top three SBTG directions ("score-SVD") hurts next-token prediction far more than perturbing linear probe or L1-SAE directions. At ALiBi Layer 4, a position probe performs near chance (~0.028 accuracy) and perturbing it adds just 0.002 nats to cross-entropy loss; perturbing SBTG directions adds 1.161 nats (a median per-seed ratio of 324$\times$ over the probe, and 4$\times$ over the SAE).
- Targeted Task Damage: Across extractors, score-SVD has a tiny activation-variance footprint (0.080 vs. Top-PCA's 0.306), yet 41.2% of its ablation damage hits the relational variable-lag copy task (vs. 14.6% for Top-PCA).
- Output Logits & Hyperparameters: Even in compressed output logits, ALiBi concentrates 0.872 of singular-value mass in its top 5 directions (vs. 0.485 for RoPE). Furthermore, in a RoPE base-frequency sweep ($B=300$ vs. $1000$), SBTG spectral concentration (0.60 vs. 0.78) successfully distinguishes a well-performing setup from one with nearly $2\times$ higher validation loss, even when coupling amplitudes look identical.
Limitations and Future Work
- Shallow-layer and estimator sensitivity: While Layer 4 orderings are rock-solid, results in Layers 1–3 fluctuate with PCA dimensions and score-network depth. Also, denoising score matching learns a noise-smoothed version of the true activation density, introducing approximation bias.
- Pretrained LLM confounders: When analyzing off-the-shelf models like Pythia, BLOOM, and GPT-2, logit coupling signatures overlap across families because tokenizers, architectures, and training data all vary alongside the PE mechanism.
- Compute and scale: Controlled experiments relied on small synthetic setups, and pretrained Pythia internal checks used single score fits per checkpoint. Future work aims to train controlled natural-language models at scale and explore whether SBTG can actively guide architectural hyperparameter tuning or anticipate circuit formation (like induction heads) live during training.
Summary updated