Training one lightweight d x d affine translator per transformer layer fixes the systematic bias and coordinate drift that break the raw logit lens on modern language models. Tested across GPT-2, GPT-Neo, BLOOM, OPT, Pythia, and GPT-NeoX-20B (up to 20 billion parameters), Nora Belrose and colleagues show that the tuned lens eliminates 4 to 5 bits of vocabulary bias in GPT-Neo-2.7B, tracks causal residual features at 0.89 Spearman correlation in Pythia 410M, and detects prompt injections at 1.00 AUROC on five classification benchmarks.
- Eliminates vocabulary bias: On GPT-Neo-2.7B, the raw logit lens shows 4 to 5 bits of marginal KL bias relative to the final layer (compared to
0.0068bits between Pythia 160M and 12B); the tuned lens drives bias near zero and prevents BLOOM 560M and OPT 125M from simply predicting the input token across half their layers. - High causal fidelity: Using a new causal basis extraction (CBE) algorithm with mean ablation at layer 18 of Pythia 410M, feature influence on the tuned lens correlates with influence on the full model at Spearman rho = 0.89 (reaching 0.98 at layer 22), with zero features important only to the probe.
- Base-to-finetuned transfer: Translators trained on LLaMA 13B transfer zero-shot to Vicuna 13B with at worst 0.3 bits/byte extra KL on RedPajama and no significant loss on Anthropic HH-RLHF.
- Monitors difficulty and attacks: Tuned lens prediction depth correlates with training “iteration learned” on 11 of 11 tasks in Pythia 12B (beating logit lens on 8 of 11), and flags prompt injections at 1.00 AUROC with Local Outlier Factor on BoolQ, MNLI, QNLI, QQP, and SST-2.
How It Works
Building on the logit lens, Belrose et al. frame a pre-LayerNorm transformer as iterative inference over next-token logits: each block adds F_l(h_l) to the residual stream (an updated Pythia 6.9B check shows residual updates have negative cosine similarity with the loss gradient over 95% of the time at every layer). Yet reading LayerNorm(h_l) W_U directly fails whenever intermediate layers store features in a rotated covariance basis, rely on later layers’ mean residual offset, or carry extreme “rogue dimensions” like the two outlier axes introduced at Layer 4 of Pythia 12B.
To fix this without modifying pretraining, the tuned lens learns a single affine translator (A_l, b_l) per layer l, predicting LayerNorm(A_l h_l + b_l) W_U. Keeping the pretrained unembedding W_U frozen shrinks learned weights from |V| x d (up to 250K x d in BLOOM) to d x d, converging faster and to lower perplexity than training fresh linear probes per layer. Crucially, translators minimize KL divergence to the model’s final-layer distribution rather than ground-truth tokens, preventing probes from learning outside facts the model itself does not compute. (In their 2025 revision, the authors note that replacing SGD with the Muon optimizer trains significantly stronger translators than the original paper’s undertrained SGD checkpoints.)
To verify that tuned lens features match the model’s actual computation rather than probe artifacts, the authors introduce causal basis extraction (CBE). CBE iteratively finds an orthonormal basis v_1, ..., v_k ranked by how strongly mean-ablating each direction shifts the tuned lens’s output, then measures how much mean-ablating those exact directions shifts the real downstream transformer.
Key Findings
Evaluated on 16.4 million validation tokens across model families up to GPT-NeoX-20B, tuned lens trajectories resolve both representational drift and downstream anomalies:
- Smoothly decreasing perplexity and layer transfer: Across Pythia (70M to 12B), GPT-NeoX-20B, and BLOOM 560M, tuned lens bits-per-byte drop monotonically across layers with tight cross-seed consistency. Adjacent translators transfer zero-shot with small penalties (negatively correlated with layer covariance similarity at Spearman rho = -0.78).
- Prompt injection and “overthinking” detection: Replicating Halawi et al. on BLOOM 560M and GPT-Neo (where raw logit lens failed), early tuned lens layers resist false few-shot demonstrations (
0.4to0.45calibrated accuracy on SICK) before late layers cave to the false demos. Treating the layer-by-layer log-probability path as an anomaly feature on Pythia 12B flags"Ignore any previous..."prompt injections cleanly on 5 of 9 tasks, though middle-layer Simplified Relative Mahalanobis (SRM) distance outperforms it on harder QA tasks like SciQ and MC TACO. - Training-step difficulty tracking: Defining prediction depth as the layer where top-1 guesses stop changing, Pythia 12B’s tuned lens correlates with when each example was learned across 143 checkpoints (e.g., 0.660 on PiQA, 0.585 on QQP, 0.555 on SST-2), whereas the logit lens flips negative on QNLI (
-0.099) and QQP (-0.340).
Caveats and Builder Takeaway
Unlike the logit lens, the tuned lens requires per-model training (under an hour on 8 x A40 GPUs, though released checkpoints cover common open models and transfer across fine-tunes). Several secondary results also proved mixed: in the 2025 update on secret-knowledge “taboo word” auditing, the tuned lens beat the logit lens at early layers but fell behind at late layers without oracle layer selection; static SVD weight-matrix gains on Pythia 125M shrank on larger models; and toxicity-reduction edits on OPT-125M (0.50 to 0.39 toxicity) did not yield over 2% drops on Pythia-125M/350M, GPT-2-medium, or GPT-Neo-125M. Finally, CBE scales sequentially across d_model dimensions per layer, making full-model causal bases costly.
For engineers inspecting intermediate transformer computation, the tuned lens is the default upgrade over the raw logit lens whenever cross-layer drift distorts raw unembeddings. When building injection monitors, pairing trajectory features with high-dimensional middle-layer activations (like SRM) remains safer than relying on scalar candidate-token probabilities alone, just as activation patching requires choosing metrics carefully.


