Knowledge Base / Glossary

Logit lens

The free mid-layer readout that skips any fitted transport: unembed the residual as if it were already final-layer coordinates.

The logit lens (also called the identity transport in our notes) takes one mid-layer residual-stream vector and applies the model’s final readout as if that vector were already in final-layer coordinates. A typical implementation is

\[ z_{\ell,t} = W_U\,N_f(h_{\ell,t}) + b_U, \]

where \(N_f\) is the model’s final normalization and \(W_U\) and \(b_U\) are its unembedding parameters. Architectural details differ: the correct normalization, bias, and tied-weight convention must match the model being inspected. Skipping the final normalization can materially change the ranking.

# Schematic only: use the target model's actual final norm and output head.
h = residual[layer, position]
scores = output_head(final_norm(h))
ranking = scores.argsort(descending=True)

The softmax of scores is a convenient display distribution, but at an intermediate layer it is not necessarily calibrated as that layer’s true next-token probability distribution. The rest of the network has not run yet.

The logit lens sends the same selected middle-layer state directly through the final normalization and output head, while Jacobian and Random-J lanes change only the transport for a matched comparison.

Scroll horizontally to inspect the diagram. The caption below provides a full text explanation.

Figure structure: one selected residual state branches into three transports. The logit lens uses identity, the Jacobian lens uses a corpus-derived map, and Random-J uses a named randomized map with stated preserved properties. Each lane then uses the same final normalization, output head, probe tokens, search rule, and summary statistic. This makes the logit lens the no-fitted-transport baseline; a difference between lanes is not by itself a causal result.

How to read the result

If Paris ranks first at a middle layer, the careful claim is: “under the model’s final vocabulary readout, this selected normalized state gives Paris a very high score.” It is not yet a claim that the model will emit Paris, that a dedicated “Paris feature” exists, or that this score causally drives the answer. Later blocks can strengthen, erase, or redirect it.

It is a mandatory control. If the logit lens reproduces the same prespecified, control-relative result to a comparable degree, the fitted Jacobian transport has not shown distinctive value on that task. If the Jacobian lens is stronger, quantify that incremental contrast under the matched analysis rather than treating any logit-lens signal as disqualifying.

Conversely, a difference between the identity readout and a Jacobian lens shows sensitivity to the transport. It does not, without matched prompts and interventions, establish that either lens has recovered the model’s mechanism.

See also: base-rate bias, Jacobian lens, random-J, best-rank.