Multiple Token Divergence: Measuring and Steering In-Context Computation Density
Vincent Herrmann ∗1,2 Eric Alcaide ∗1 Michael Wand 1 Jürgen Schmidhuber 1,2 ∗ Equal contribution 1 The Swiss AI Lab IDSIA/USI/SUPSI, Lugano, Switzerland 2 King Abdullah University of Science and Technology, Thuwal, Saudi Arabia Correspondence to [email protected] · 2025
Read Multiple Token Divergence: Measuring and Steering In-Context Computation Density by Vincent Herrmann ∗1,2 Eric Alcaide ∗1 Michael Wand 1 Jürgen Schmidhuber 1,2 ∗ Equal contribution 1 The Swiss AI Lab IDSIA/USI/SUPSI, Lugano, Switzerland 2 King Abdullah University of Science and Technology, Thuwal, Saudi Arabia Correspondence to [email protected] (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2512-22944.txt.
Introduction
Vincent Herrmann, Eric Alcaide, Michael Wand, and Jürgen Schmidhuber propose a simple gauge for how hard a language model is working. Standard loss scores say how surprised the model is by the next token, not how much reasoning a task demands. Earlier effort measures based on compressing hidden states are invasive and unstable. Their measure, Multiple Token Divergence, compares the model's full output distribution with the one from a shallow auxiliary prediction head.
The gap between the two distributions, a KL divergence, can be read off pretrained models that already carry several prediction heads, with no extra training. The team also turns the measure into a control knob called Divergence Steering, which steers generation toward higher or lower computational character. On benchmarks, the measure separated complex tasks from simple ones better than prior methods, rose with problem difficulty on math reasoning, and ran lower on runs that reasoned accurately.
Catalog record
| CREATOR | Vincent Herrmann ∗1,2 Eric Alcaide ∗1 Michael Wand 1 Jürgen Schmidhuber 1,2 ∗ Equal contribution 1 The Swiss AI Lab IDSIA/USI/SUPSI, Lugano, Switzerland 2 King Abdullah University of Science and Technology, Thuwal, Saudi Arabia Correspondence to [email protected] |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 53 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2512-22944
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Multiple Token Divergence: Measuring and Steering In-Context Computation Density Vincent Herrmann ∗1,2 Eric Alcaide ∗1 Michael Wand 1 Jürgen Schmidhuber 1,2 ∗ Equal contribution 1 The Swiss AI Lab IDSIA/USI/SUPSI, Lugano, Switzerland 2 King Abdullah University of Science and Technology, Thuwal, Saudi Arabia Correspondence to [email protected] 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. 1 Introduction To solve unfamiliar and challenging problems, language models must perform sophisticated in-context computation ( 3 ; 15 ) . Can we tell whether, and to what extent, a model is making use of its computational capacity at any given moment? It is well-established that the next-token prediction loss offers little insight ( 27 ; 4 ) , as any particular reduction in loss can, in principle, be arbitrarily difficult to achieve ( 2 ) . A more promising approach is to quantify meaningful computation by measuring the entropy, or incompressibility, of a model’s latent representations ( 28 ; 11 ) . This concept is rooted in the minimum description length (MDL) principle ( 33 ; 24 ; 29 ; 32 ; 8 ) : if the most compact description of a sequence’s structure, given the training data, is still long, then predicting that sequence is demanding due to a large search space. In other words, a task is “difficult” or “complex” if the shortest description of the solution program, given the training data, is long. If it is short, on the other hand, we consider the task “easy” and hence “boring”. Unfortunately, in general, the length of the shortest description is uncomputable ( 16 ) . To make it tractable, the Prediction of Hidden States (PHi) loss was proposed as a measure of in-context computational complexity, quantifying the per-token information gain in a model’s latent space ( 11 ) . This work itself is based on the earlier ideas of neural history compression ( 26 ) . While promising, the PHi framework introduces significant practical challenges: it requires inserting a noisy information bottleneck that can degrade model performance, needs further model training which can be unstable, and is highly sensitive to the precise location of its placement within the model, and the weighting of multiple loss terms. In this work, we propose a simplified and more direct measure, Multiple Token Divergence (MTD), which quantifies information gain in the model’s output distribution. The core insight is simple: if a shallow computational shortcut (e.g., a single Transformer block) can approximate the full model’s prediction, then the model is not performing particularly complex computation. If, however, there is a significant divergence between these two predictions, we can conclude that the model is leveraging its deeper computational capacity. MTD is straightforward to implement and can even be computed directly using the Multiple Token Prediction (MTP) modules that some modern pre-trained models already possess, requiring no additional fine-tuning. In addition to this measure, we present Divergence Steering, a novel decoding method that uses the MTD signal to control the computational character of the generated output. It biases the decoding distribution towards or away from computationally dense tokens—i.e., tokens that are likely under the full prediction but unlikely under shallow approximation by the MTP module. We empirically demonstrate that MTD is more effective than prior methods at distinguishing complex difficult tasks from simple ones. We also investigate the properties of MTD and Divergence Steering in reasoning and creative generation tasks. Our implementation is public ( github.com/vincentherrmann/multiple-token-divergence ). 2 Background 2.1 Prediction of Hidden States (PHi) Figure 1: Comparison between the architecture of a PHi model (left) and of a MTP model (right). The Prediction of Hidden states (PHi) method, introduced by 11 , creates an information bottleneck ( 31 ) within a sequence model in order to measure the complexity of its in-context computation. A PHi layer is inserted between a model’s “bottom” and “top” layers. The model consists of the following modules: The Bottom Layers ( B_{\beta} ) are the initial Transformer blocks that process the input sequence embeddings. The PHi Layer contains three key components: (1) An encoder ( q_{\psi} ) that, at time step t , maps the hidden state g_{t} from the bottom layers to a posterior distribution over a latent variable z_{t} . This distribution is typically a diagonal Gaussian, similar to variational auto-encoders ( 14 ; 23 ) . (2) A decoder ( a_{\xi} ) that reconstructs the hidden state, creating g^{\prime}_{t} from a sample of the latent variable z_{t} . (3) An autoregressive prior that predicts the distribution of the current latent z_{t} using only the history of previous latents, z_{<t} . This can be implemented with a single Transformer block ( M_{\mu} ) and two additional linear transforms: b_{\kappa} , which maps the inputs to M_{\mu} to the right dimensionality, and p_{\chi} , which maps the output of the Transformer to a prior distribution. The Top Layers ( T_{\tau} ) are the remaining Transformer blocks that process the sequence of reconstructed hidden states g^{\prime} . Finally, we have the standard token Embedding ( E_{\epsilon} ) and the Output Layer ( O_{\omega} ). Here and in the remainder of the paper, Greek subscript letters indicate learnable neural network parameters. The forward pass processing tokens x_{1},x_{2},\dots is described by these equations: \displaystyle e_{t} \displaystyle=E_{\epsilon}(x_{t}) Token embedding \displaystyle g_{t} \displaystyle=B_{\beta}(e_{1},\dots,e_{t}) Output from bottom layers \displaystyle z_{t} \displaystyle\sim q_{\psi}(\;\cdot\;|g_{t}) Latent sample from posterior \displaystyle g^{\prime}_{t} \displaystyle=a_{\xi}(z_{t}) Reconstruction of hidden state \displaystyle h_{t} \displaystyle=T_{\tau}(g^{\prime}_{1},\dots,g^{\prime}_{t}) Output from top layers \displaystyle\pi(\;\cdot\;|x_{<t}) \displaystyle=O_{\omega}(h_{t-1}) Next token prediction from output head \displaystyle L_{\text{NLL}}(t) \displaystyle=-\log\pi(x_{t}|x_{<t}) Negative Log Likelihood (NLL) loss The PHi loss ( L_{\text{PHi}} ) is the KL divergence between the posterior q_{\psi} , which has access to the current input x_{t} via g_{t} , and the prior p_{\chi} , which only has access to past latents z_{<t} . We assume an initial latent z_{0} is given. \displaystyle c_{t} \displaystyle=b_{\kappa}(z_{t-1}) Linear projection of last latent (1) \displaystyle d_{t} \displaystyle=M_{\mu}(c_{1},\dots,c_{t}) Output from PHi Transformer block \displaystyle L_{\text{PHi}}(t) \displaystyle=D_{\text{KL}}\Big(q_{\psi}(\;\cdot\;|g_{t})\;||\;p_{\chi}(\;\cdot\;|d_{t})\Big) PHi Loss (2) \displaystyle=D_{\text{KL}}\Big(q_{\psi}(\;\cdot\;|x_{1},\dots,x_{t})\;||\;\hbox to0.0pt{$p_{\chi}(\;\cdot\;|z_{0},z_{1},\dots,z_{t-1})\Big)$\hss} The model is trained to jointly minimize both L_{\text{NLL}} and L_{\text{PHi}} . The PHi loss quantifies the information gain at each timestep—the amount of new useful information present in the current input token x_{t} that was not predictable from the history of latent states. It has been shown ( 11 ) that this value correlates well with the complexity and “interestingness” of tasks. 2.2 Multiple