Multiple Token Divergence: Measuring and Steering In-Context Computation Density
Vincent Herrmann, Eric Alcaide, Michael Wand, Jürgen Schmidhuber
TL;DR
This work introduces Multiple Token Divergence (MTD), a practical measure of in-context computational effort for language models defined as the KL divergence between the full model's next-token distribution and a shallow, auxiliary MTP predictor. Unlike latent-space bottleneck methods, MTD operates directly on output distributions and can be computed from pre-trained models without further training. The authors additionally propose Divergence Steering, a decoding technique that interpolates between the full-model and MTP distributions (with optional fixed-entropy projection) to bias generation toward more or less computationally dense tokens. Empirically, MTD correlates with problem difficulty and lower MTD aligns with higher reasoning accuracy on math benchmarks, while Divergence Steering can enhance creativity in algorithmic and writing tasks. The approach offers a lightweight, non-invasive tool for analyzing and shaping the computational dynamics of language models, with potential use in dynamic compute allocation, solution convergence signaling, and intrinsic motivation for open-ended learning.
Abstract
Measuring the in-context computational effort of language models is a key challenge, as metrics like next-token loss fail to capture reasoning complexity. Prior methods based on latent state compressibility can be invasive and unstable. We propose Multiple Token Divergence (MTD), a simple measure of computational effort defined as the KL divergence between a model's full output distribution and that of a shallow, auxiliary prediction head. MTD can be computed directly from pre-trained models with multiple prediction heads, requiring no additional training. Building on this, we introduce Divergence Steering, a novel decoding method to control the computational character of generated text. We empirically show that MTD is more effective than prior methods at distinguishing complex tasks from simple ones. On mathematical reasoning benchmarks, MTD correlates positively with problem difficulty. Lower MTD is associated with more accurate reasoning. MTD provides a practical, lightweight tool for analyzing and steering the computational dynamics of language models.
