Where the Logit Lens Breaks Down
The logit lens applies the model's unembedding matrix directly to an intermediate residual stream and reads off a vocabulary distribution. It works in late layers, where the residual stream already lives in a basis close to the final layer. In early layers, it fails: the projections come out incoherent, not because the information is missing, but because the coordinates have not yet been rotated into the basis expects.
The tuned lens responds by learning a per-layer linear correction to match the final-layer output distribution. This works, but it changes the character of the tool: the correction is fitted to outputs on a training set, and it optimizes a correlational objective. When we want to know what the model itself would linearly do with a given activation, a fitted map introduces its own inductive bias.
The Jacobian lens takes a different path. Instead of learning a linear map, it derives one from the model's own weights, using nothing more than calculus. The result, introduced by Gurnee, Lindsey, and collaborators in 2026 [1]Verbalizable Representations Form a Global Workspace in Language Models
Gurnee, W., Lindsey, J., et al.
Anthropic (transformer-circuits.pub), 2026, is a principled refinement of the logit lens that recovers interpretable content at depths where the raw projection cannot.
Jacobian Lens (J-lens): A per-layer vocabulary readout obtained by (1) computing the Jacobian of the final residual stream with respect to an intermediate residual stream, (2) averaging that Jacobian over token positions and a corpus of prompts, and (3) composing the resulting matrix with the unembedding. It surfaces concepts the model is poised to verbalize, whether or not they appear in the next token.
The rest of this article is built for someone who has seen the logit lens but is not yet comfortable with the words Jacobian, first-order, or linearization. We will build each of those from scratch, then assemble them into the J-lens definition.
Warm-Up: Derivatives, Jacobians, and What "Linear" Means
To build the J-lens, we need one idea from single-variable calculus and its generalization to vectors.
From one dimension...
Suppose is a smooth function. Pick a linearization point . Near it, we can approximate by its tangent line:
The number is the derivative. The approximation is called first-order because it uses the first derivative; higher-order Taylor terms (, etc.) are dropped. It says: if you nudge the input by away from , the output moves by roughly times that nudge. The approximation is exact only when is a straight line; for curves, the error grows with .
Near , the curve looks linear. A first-order approximation uses that local straightening to predict small displacements.
...to many dimensions
Now let . The input is a vector ; the output is a vector . What replaces the derivative?
There is no single number that captures how changes with . There are numbers: for each output component and each input component , we can ask how changes when we nudge . Collecting them into a matrix gives the Jacobian:
Jacobian: For , the Jacobian at a point is the matrix whose entry is . Row is the gradient of the -th output; column tells you how every output responds to a nudge in the -th input.
The multivariate first-order approximation reads:
with evaluated at the linearization point . This is the same statement as the 1D case, with numbers upgraded to vectors and matrices. Locally, the potentially very non-linear function is approximated by a linear map: matrix multiplication by .This is the reason people say 'the derivative is a linear map.' In 1D the map is 'multiply by '; in higher dimensions it is 'multiply by the matrix .' Same idea, richer bookkeeping.
Pause and think: shapes
If and , what shape is ? What shape must be for to make sense, and what shape does the product have?
has shape . To multiply , we need to be an -vector, which it is (it lives in input space). The product is an -vector, matching output space. The rows count outputs; the columns count inputs. Getting these dimensions straight is the whole game when we apply the idea to transformers. Activations in this curriculum are row vectors, so the transformer sections below use the transposed Jacobian, which carries inputs along its rows and multiplies from the right.
The Model as a (Locally Linear) Function
A transformer is a deep, non-linear function. But it has a special structure we will exploit: at every layer, information sits in the residual stream, a vector of dimension , and each layer adds an update to it. Reading off the model's output means:
- Apply layers to the residual stream at layer , producing the final residual stream .
- Apply a layer norm and the unembedding matrix to , producing logits over the vocabulary.
Step 1 is complicated: attention, MLPs, non-linearities, residual connections. Step 2 is linear (up to layer norm). We cannot generally reduce Step 1 to matrix multiplication; the model would not need all those layers if we could. But we can locally approximate Step 1 by matrix multiplication, using the Jacobian.
Fix a prompt and a source position . Treat (the residual stream at layer , position ) as the input, and (the final residual stream at some position ) as the output. Both are vectors of size . The Jacobian
is a matrix, transposed so that it acts from the right: its rows index the input and its columns the output. It tells us: if we nudged by a small vector , the final residual stream at position would shift by approximately .Why ? Because a perturbation at position can only affect positions from onwards. Attention in an autoregressive transformer is causal: earlier positions cannot look at later ones.
The shape is worth staring at. Both dimensions equal because the residual stream has the same width at every layer; it is a shared bus that all layers read from and write to.
Why Average? A Single Jacobian Is Two Things at Once
The Jacobian computed on one prompt tells us the local linearization for that specific input. But that linearization mixes two very different kinds of structure:
- Distribution-averaged structure: how the downstream computation locally translates perturbations at layer over a chosen sample of contexts. This is the target of the averaged map.
- Context-specific structure: how the current prompt's attention patterns, activations, and gates route information through layers . This is transient; it changes with every input.
If we care about what a direction in layer- space generally means, we need to strip out the context-specific part. The J-lens does this by averaging Jacobians over many contexts:
The expectation averages over source positions, reachable destination positions, and prompts:
- Over source positions within each prompt. A concept encoded at layer should be readable regardless of where in the sequence it appears.
- Over subsequent positions . We do not care only about how shapes the immediate next-token logits; we care about how it shapes any downstream logit it can influence.
- Over a corpus of prompts (roughly a thousand, in the original paper). This is what turns context-specific into context-independent: averaging over diverse contexts cancels the parts of each Jacobian that depend on that context and leaves the parts that are stable across contexts.
The idea is exactly the same as computing an average gradient across a dataset: individual gradients point in noisy, context-driven directions; the average points in the direction the loss actually wants to move. Here the "loss" is not a scalar but a linear map, and averaging happens over context, position, and destination.
Pause and think: why not just use one prompt?
Suppose we computed the Jacobian on a single prompt about French cities. What would the top-ranked lens tokens look like, and why would that be misleading as a general readout of layer ?
They would over-represent tokens favored by that prompt because the local Jacobian depends on current attention patterns and MLP gates. Averaging over many prompts reduces prompt-specific variation and defines a map for that sampling distribution. Change the corpus, positions, or weighting and the average may change, so it is not an input-free property of the weights alone.
The final is a single matrix per layer. It is the "average linear translator" from layer to the final layer.
Reading Out: The Lens Formula
With in hand, applying the lens to an activation is a one-liner. Multiply by , apply the model's layer norm, apply the unembedding , softmax:
Applying the softmax turns these linearized logits into a probability distribution over the vocabulary, giving us a "top tokens" list to inspect.
The Anthropic paper describes this as equivalent to replacing all subsequent layers with the appropriate lens matrix. That sentence packs a lot into a few words, and it is worth unpacking with a picture.
What "replacing all subsequent layers" means
Normally the model computes from by running through everything downstream of layer : attention blocks, MLPs, residual connections, layer norms. That downstream computation is a complicated non-linear function; call it , so that .
The averaged Jacobian is the best single linear map that approximates across contexts. So replacing with means: pretend the model, from layer onward, is just this linear map. Then the final residual stream would be , and the model's readout would be .
This gives us the lens formula directly.
Why this is an approximation, not a fact
The equivalence is a first-order approximation, not an equality. Two things make it inexact:
- Non-linearity. Real transformer layers are non-linear. is a local linearization; the further is from the point around which we linearized, the worse the approximation.
- Averaging. The single we use is an average over contexts. On any particular prompt, the true local Jacobian would differ from .
In the reported evaluations, this approximation produces coherent vocabulary readouts at some depths where the raw logit lens is less informative. The examples support the J-lens as a useful diagnostic. They do not make every top token a faithful description of what the model is “holding in mind”; prompt, corpus, and first-order approximation errors remain possible.
The J-lens vectors
Look at the lens formula again, focusing on the pre-softmax logits and ignoring the normalization for a moment:
The composed matrix has one column per vocabulary token. Column is a direction in layer- residual-stream space; the logit for token is (approximately) the inner product of that column with .
J-lens Vector: For layer and vocabulary token , the J-lens vector is the -th column of , viewed as a direction in . The lens score for token at that layer is (up to layer-norm scaling) .
There are such vectors per layer, typically $\sim$100,000 vectors in a -dimensional space. That set is overcomplete: no unique decomposition of an activation as a sum of J-lens vectors exists. But sparse combinations turn out to be well-defined and empirically meaningful; the paper calls the set of activations expressible as sparse non-negative combinations of J-lens vectors the J-space.
Pause and think: J-lens vector vs. probing direction
A linear probe for concept learns a direction such that correlates with whether is present. A J-lens vector is also a direction whose inner product with gives a score. What is the difference, mechanistically?
A probe direction is learned to distinguish inputs on some external label. It is correlational: it may or may not align with anything the model itself uses. A J-lens vector is derived from the model's own weights: it is the column of , so its score is the model's own (first-order) push toward emitting token downstream. Same geometry (inner product), very different sources of information: labels vs. the model's causal structure.
Comparing the Three Lenses
The three lenses can be written in a common form:
differing only in what is.
| Lens | Source of | Character | |
|---|---|---|---|
| Logit lens | (identity) | Assumes layer- basis matches final layer | No calibration; fails in early layers |
| Tuned lens | (learned affine) | Trained to match final output distribution | Correlational; can "skip ahead" to outputs |
| Jacobian lens | Derived from the model's own weights, averaged | Causal, first-order; recovers content in early layers |
The three choices answer different questions. The logit lens sets , measuring direct alignment with the final unembedding. The tuned lens fits to forecast the final output distribution. The J-lens uses , a first-order summary of what layers do over the chosen contexts. It is derived rather than trained against output targets, but its quality still depends on the averaging distribution and on how nonlinear the relevant finite changes are.
The three coincide in one important edge case: at the final layer, is (approximately) the identity, and all three reduce to the model's own unembedding. Divergences appear as we go earlier.The J-lens paper reports that the logit lens agrees closely with the J-lens in the last several layers and diverges earlier: exactly the regime where the logit lens is known to fail.
The mean-Jacobian construction was used earlier by Hernandez et al. [2]Linearity of Relation Decoding in Transformer Language Models
Hernandez, E., Li, B. Z., Andreas, J.
ICLR 2024, 2023 to derive per-relation affine maps (e.g., a single "plays instrument" matrix that turns "Miles Davis" into "trumpet") and a companion attribute lens for tracking a fixed relation across layers. The J-lens generalizes the same first-order-plus-averaging trick from per-relation to per-layer, taking the expectation over a broad corpus rather than examples of one relation.
What Ends Up in the Lens
Because was built from the causal effect of on final outputs, the top tokens in the J-lens readout are the ones is disposed to push the model to say, averaged across contexts in which such an activation might arise. Those tokens are not always the next predicted token; often they are concepts the model is holding in mind that would surface only if asked. In the source paper, running the J-lens on the token before "the sport is:" while the model has been instructed to think of a sport reveals soccer as a top lens token several layers before the model actually emits it. Applying the lens while the model silently computes reveals nine and then seven at intermediate layers, exposing the intermediate step. See [3]Verbalizable Representations Form a Global Workspace in Language Models
Gurnee, W., Lindsey, J., et al.
Anthropic (transformer-circuits.pub), 2026 for many more examples.
Because J-lens readouts are causal by construction, one can also write along a J-lens vector: adding to tends to make the model more likely to verbalize token , and swapping projections along two J-lens vectors reliably swaps which of the two the model reports. This is a natural bridge to steering methods and to concept-level interventions like activation patching.
Limitations
- Single-token concepts. J-lens vectors are indexed by vocabulary tokens, so multi-token concepts (most named entities, most phrases) are not directly captured. Extensions to spans are discussed in the paper.
- First-order only. The Jacobian ignores higher-order effects. If a concept only exerts influence via a strongly non-linear interaction (say, gated on the value of another feature), the J-lens will miss it or misattribute it.
- Averaged, not per-prompt. The lens is a dispositional readout. For any single prompt, the true local Jacobian differs from . Using the average is what makes the readout reflect the model rather than the context, but it also means the tool cannot reveal purely context-specific mechanisms without further work.
- Small variance fraction. In practice, the J-space accounts for less than about 10% of activation variance at any layer. Most of what happens in the residual stream is not verbalizable in this sense. This is a feature, not a bug, if we take verbalizability as a meaningful selection criterion, but it also limits how much of the model's computation the lens sees.
Looking Ahead
The Jacobian lens sits at the boundary between observational and mechanistic tooling. Its readouts are observational (a translation of activations into vocabulary), but its construction is causal, and its vectors compose additively with the model's weights in a way that makes them natural handles for intervention. Two directions build directly on this.
First, decomposing an activation as a sparse combination of J-lens vectors gives an interpretation not unlike a sparse autoencoder, but with an interpretable, token-indexed dictionary built from the model's own weights rather than a learned decoder. The paper formalizes this as the J-space.
Second, once we can read a direction that means "the model is about to say ," we can also write it. Swapping and injecting along J-lens vectors is a lightweight form of concept-level steering, and gives a clean causal test that the direction really is doing what the lens says. This mirrors the shift from observation to causation covered under activation patching and its relatives.