Reading Positional Coupling in Transformers with Diffusion Scores

Savik Kinger, Johannes Bertram, Luciano Dyballa, T. Anderson Keller, Steven W. ZuckerNeurIPS 2026

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.
Overview of how Positional Encodings create within-layer dependencies where autograd fails, and how SBTG captures them.

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):

  1. 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$.
  2. 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.
  3. 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

Abstract

Understanding how transformers encode position and context is central to interpreting their behavior because it determines how information flows across tokens and shapes the model's predictions. Common approaches, such as single-position linear probes and circuit tracing methods, do not directly return the same-layer dependency structure across token positions. We introduce Score-Block Token Geometry (SBTG), a score-based diagnostic that recovers this dependency structure from activations and reveals distinct signatures of positional encoding mechanisms. SBTG trains a denoising score model on windows of activations and constructs operators that quantify coupling between positions within a layer. In controlled experiments on transformers with different positional encodings, SBTG recovers distinct coupling signatures consistent with their architectures: ALiBi exhibits higher spectral concentration than RoPE and Absolute at the deepest layer of our matched four-layer transformers, while Absolute embeddings show the strongest position-specific variation there. Subspace intervention experiments show that SBTG directions carry a larger share of variable-lag copy damage than variance-aligned alternatives despite a lower activation-variance footprint. Experiments on pretrained models provide additional cross-family associations between positional encoding methods and dependency structures of adjacent output logit positions. Together, these results show that joint activation structure distinguishes positional encoding mechanisms by how models use cross-position dependencies, and that single-position probes do not reveal these differences.
BibTeX
@inproceedings{kinger2026reading,
  author = {Savik Kinger and Johannes Bertram and Luciano Dyballa and T. Anderson Keller and Steven W. Zucker},
  title = {{Reading Positional Coupling in Transformers with Diffusion Scores}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=1M7mberl5b},
}
Figure