How Language Models Compress and Compare: Understanding Selection with Token Covariance Maps
Moshe Eliasof
Abstract
Many language-model tasks reduce to selecting among structured alternatives, yet we still lack a simple picture of how a decoder-only transformer organizes an entire selection prompt across depth. We introduce token covariance maps, a prompt-level geometric view that tracks how token positions co-vary in hidden-state space at each layer. This turns a structured prompt into a depth-indexed sequence of maps whose spectral and block structure can be aligned with instructions, context, and candidate answers. Across 14 decoder-only models from 4 families and 12 structured-selection benchmarks, token covariance maps reveal a robust compress-then-compare organization. Early layers represent prompts diffusely, middle layers compress them into a shared low-rank bottleneck, and late layers re-expand into context-option and option-option geometry. This organization recurs across larger fixed-template samples, deterministic prompt rewrites, pairwise reranking reformulations, and controlled answer-set manipulations, while also emerging during training from an initially flat depth profile. Its timing aligns with behavior: useful answer discrimination appears well after the bottleneck, and low-rank intervention around the bottleneck preferentially disrupts late comparison geometry. We additionally show that the same geometric profile appears in instruction-tuned models, across several languages, and during open-ended generation. We further show that changing the internal representation of one candidate around the compressed region can shift which candidate the model later prefers. These results show that token covariance maps are a diagnostic tool for comparing how models organize information across prompts, model families, and stages of training.
Create a lesson
Related papers
Alignment without Transfer: Tokenization Impacts Cross-lingual Representations during Multilingual Language Model Pretraining
Shared title terminology · Jonathan von Rad, Pontus Stenetorp, Yao Lu
Enhancing Understanding of Language Models with Varied Explanations
Shared title terminology · Jingyi Sun
Auditing Post-Training Unlearning in Diffusion Language Models using Sparse Autoencoders
Shared title terminology · Yunha Seo, Changhoon Kim
Tasklets: A Unit-Test Benchmark for Language Model Architectures
Shared title terminology · Zayd Muhammad Kawakibi Zuhri, Munachiso Samuel Nwadike, Kentaro Inui et al.
Open CDLM: A Benchmark and Library for Continuous Diffusion Language Models
Shared title terminology · Hao Jiang, Ruixi Chen, Jiayi Han et al.
How Many Bytes Has a BPE Model Seen? Estimating Byte-Token Exposure in Pretraining from Corpus Statistics and Embedding Norms
Shared title terminology · Liwei Zhang, ZhiMing Tong, Mochen Guan et al.