A transformer can carry useful information about its eventual next-token distribution several blocks before the final layer. Reading that information is not as simple as applying the model’s output projection to every intermediate hidden state. The final output head is calibrated for representations at the end of the network, while residual representations can shift across depth.
A tuned lens addresses that mismatch with a separate affine translator for each inspected layer. The translator maps an intermediate residual state into a representation that the frozen final normalization and output projection can decode. This produces a token distribution that can be compared across layers without assuming that every layer already uses the final representation basis.
Direct unembedding assumes a shared representation basis
For a decoder-only transformer, let h_l denote the residual state after layer l. A simple intermediate readout can pass h_l through the same final normalization and vocabulary projection used at the end of the model:
z_l = W_U norm(h_l)
p_l = softmax(z_l)Here W_U is the model’s output projection. This direct readout is often called a logit lens.
The operation is easy to compute, but its interpretation carries a strong assumption: an intermediate residual state must already be arranged so that the final normalization and output projection form a suitable decoder. Transformer blocks are not required to preserve that arrangement. Features useful to later blocks can be represented in forms that the final head decodes poorly.
A strange token distribution at an early layer can therefore reflect a readout mismatch rather than an absence of relevant information. Comparing raw intermediate logits across depth mixes two effects: changes in the model’s internal state and changes in how compatible that state is with the final output head.
Tuned lenses add a translator at each layer
A tuned lens inserts a layer-specific affine map before the frozen final readout:
h'_l = A_l h_l + b_l
z_l = W_U norm(h'_l)
p_l = softmax(z_l)The transformer itself remains frozen. Only the translator parameters A_l and b_l are fitted for each layer. The fitting objective asks the translated intermediate state to reproduce the final model distribution, commonly through a divergence between the lens distribution and the transformer’s final distribution.
This changes the question being asked. Direct unembedding asks what the final output head produces from the intermediate state as-is. A tuned lens asks what final prediction can be decoded after a fitted affine correction for the representation at that depth.
The correction matters because an affine map can compensate for systematic rotations, shifts, and rescaling of residual representations. It cannot reconstruct arbitrary information that is absent from h_l. If a token distinction has not been encoded in the inspected state, a layer-local affine translator has no later transformer blocks from which to recover it.
Prediction trajectories expose refinement across depth
Once every selected layer has a compatible decoder, the resulting distributions form a trajectory over model depth. Developers can inspect the probability assigned to a target token, the rank of candidate tokens, entropy, or divergence from the final distribution.
Suppose a prompt eventually produces a high probability for token Paris. A tuned-lens trace might show that Paris becomes decodable in middle layers and remains competitive afterward. Another prompt might show several candidate locations exchanging rank until late blocks. Those patterns describe how decodable output information changes with depth; they do not establish a unique internal reasoning sequence.
That distinction is useful when debugging model behavior. If an expected token becomes strongly decodable and then loses probability near the end, investigation can focus on later transformations. If the token never becomes decodable under the lens, the failure has a different shape. The trace narrows where to inspect, but it does not identify the responsible attention head, MLP feature, or causal pathway on its own.
A fitted probe changes the evidence
A tuned lens is a probe with trainable parameters. Its output should not be treated as a literal transcript of the transformer’s internal computation.
The translator is optimized to extract final-prediction information from an intermediate state. As a result, it can make information easier to read than the transformer’s own final head would at that layer. This is the intended correction for representation mismatch, but it also means the decoded distribution is partly defined by the probe.
Probe capacity sets an important boundary. An affine translator is constrained compared with a deep nonlinear decoder, which limits how much new computation it can introduce. Even so, successful decoding demonstrates that relevant information is linearly recoverable after the fitted transformation; it does not demonstrate that later transformer blocks use exactly the same mapping.
Comparisons also depend on how the translators were fitted. A lens trained on one text distribution can face a different hidden-state distribution on another domain. The transformer may still behave normally while the probe becomes less calibrated. Evaluation of the lens and evaluation of the underlying model are therefore separate concerns.
Final normalization belongs in the readout definition
Implementation details around normalization can materially change intermediate logits. Many decoder-only architectures apply a final normalization before the vocabulary projection. A lens intended to approximate the model’s final readout should preserve the relevant frozen normalization in the decoding path.
The exact computation is architecture-dependent. Residual placement, normalization type, tied embeddings, output-head structure, and block boundaries differ across model families. A generic formula is useful for reasoning, but code should derive the readout from the actual model architecture rather than assume that every transformer exposes identical components.
The layer boundary also needs a stable definition. Reading the residual state before a block, after attention, after the MLP, or after the complete block yields different objects. Mixing these positions across experiments can create apparent changes that come from instrumentation rather than model behavior.
Lens outputs are observational evidence
Intermediate token distributions are most useful as a diagnostic surface. They can reveal where candidate predictions become decodable, where distributions shift sharply, and where two prompts begin to diverge across depth. Those observations can motivate more targeted tests.
Causal claims require interventions. Activation patching, ablation, or other controlled modifications can test whether a component or representation actually affects the final output under specified conditions. A tuned lens alone reads information from hidden states; it does not prove that the decoded feature caused the prediction.
That boundary keeps the method useful without asking it to answer a stronger question than its design supports. Tuned lenses improve the comparability of intermediate readouts by correcting layer-specific representation mismatch, while causal analysis remains a separate operation.