Ground Truth.
AI, checked against the source.

Learn · Intermediate

The Logit Lens: Reading a Model's Guesses Before It Finishes Thinking

The logit lens is an interpretability technique that decodes a language model's internal, mid-computation state into ordinary vocabulary words -- letting researchers watch, layer by layer, what the model's best guess is before it produces a final answer. It is one of the simplest tools for peering inside the black box, and a refined version of it is exactly what Anthropic used in its recent global-workspace discovery inside Claude, reading out silent concepts the model never spoke aloud.

To understand the logit lens you need the shape of a transformer. A model processes text through a stack of dozens of layers. At each layer, every token position holds a vector -- a long list of numbers called the residual stream -- that gets refined as it passes upward. Only at the very top does the model apply its final step, the unembedding, which converts that vector into scores (logits) over the whole vocabulary and picks the next word. The logit stream is the model's actual output machinery; every layer below it is hidden intermediate work.

The logit lens, introduced by the researcher nostalgebraist in 2020, is a beautifully cheap trick: take the vector from some middle layer and apply the final unembedding step to it early, as if the model had to answer using only what it had computed so far. Because that vector lives in the same residual stream the final layer will eventually read from, this produces a legible ranking of vocabulary words -- the model's provisional guess at that depth. Run it at every layer and you get a movie of the guess forming. Often you see the answer appear tentatively in the middle layers and sharpen toward the top; sometimes you see the model consider and discard a wrong answer partway up.

The analogy is a developing photograph. The final print is the model's output, but the logit lens lets you pull the photo out of the chemical bath early and look at it half-developed. In the later stages the image is close to final; in the early stages it is a blur that only vaguely resembles the picture. That blur is the technique's main weakness: the plain logit lens assumes every layer speaks the same language as the final layer -- uses the same coordinate system -- which is a decent approximation late in the network but breaks down early, where the readouts turn garbled or misleading. You cannot always trust what the half-developed photo appears to show.

That is exactly what the tuned lens fixes. Instead of applying the final unembedding directly, it learns a small per-layer translation -- a lightweight correction that maps each layer's coordinate system into the final one before decoding. This makes the mid-layer readouts far more faithful, so you can trust the earlier frames of the movie. Anthropic's newer J-lens goes further still: rather than assuming a fixed transformation, it measures a layer's average causal effect on the model's final output across roughly a thousand prompts, isolating the representations that are genuinely poised to be spoken about from ones that only influence output in a single specific context. That averaging is what let Anthropic separate a model's reportable 'workspace' concepts from the vast majority of internal activity that never surfaces.

Why this matters: the logit lens and its descendants are a foundational tool of mechanistic interpretability, the effort to reverse-engineer what models compute internally rather than treating them as opaque. Reading a model's intermediate guesses is how researchers catch it 'thinking' of a word it never outputs -- for instance, silently forming the concept 'spider' when asked about the animal that spins webs, before answering how many legs it has. That capability has real stakes for safety: if you can read the concepts forming inside a model before it acts, you can potentially audit deployed agents for deceptive or manipulative reasoning that never appears in their visible output. It connects directly to how models turn vectors into words in the first place -- see how AI picks its next word and embeddings.

The honest caveat: these lenses are approximate probes, not ground truth. They only surface concepts that correspond neatly to single vocabulary tokens, they can suggest a tidy layer-by-layer story where the real computation is messier and distributed, and a readout showing a word does not prove the model is 'using' that word in any strong sense. The plain logit lens in particular can mislead in early layers, which is why the tuned lens and J-lens exist. Used carefully -- and cross-checked with causal interventions that actually edit the representation and watch the output change -- they are among the most direct windows we have into a model's hidden thought.

Key papers
Eliciting Latent Predictions from Transformers with the Tuned Lens (Belrose et al., 2023)
interpreting GPT: the logit lens (nostalgebraist, 2020)

Key questions

What does the logit lens actually show?

It shows what word a language model would output if it had to answer using only the partial representation it has computed at a given internal layer, revealing how the model's best guess forms and changes as information flows deeper.

Why is the plain logit lens unreliable in early layers?

It assumes every layer uses the same coordinate system as the final layer, which is roughly true late in the network but breaks down early, producing garbled or misleading readouts -- which the tuned lens fixes by learning a per-layer translation.

How does the logit lens relate to Anthropic's J-lens?

The J-lens is a principled refinement of the logit lens that averages a layer's causal effect on the output across many prompts, and Anthropic used it to reveal a hidden 'workspace' of concepts inside Claude.
Cite this

APA

Ground Truth. (2026, July 12). The Logit Lens: Reading a Model's Guesses Before It Finishes Thinking. Ground Truth. https://groundtruth.day/learn/the-logit-lens.html

BibTeX

@misc{groundtruth:the-logit-lens,
  title  = {The Logit Lens: Reading a Model's Guesses Before It Finishes Thinking},
  author = {{Ground Truth}},
  year   = {2026},
  month  = {jul},
  url    = {https://groundtruth.day/learn/the-logit-lens.html}
}

Topics: interpretability · logit-lens · transformers · mechanistic-interpretability