Skip to content

Contrastive Projection: Reading Transformer Internals by Differencing Logit Lenses

Sep 2026 · 0 citations · 28 references
Computer Science

TL;DR

Subtracting two closely matched prompts'hidden states and projecting through the unembedding cancels the shared component and surfaces what separates them, an operation equivalent to reading a RepE/ActAdd steering vector through a logit lens.

Abstract

Reading a transformer's internal states in token space is easy to do and hard to trust: a logit lens on a single hidden state is dominated, at intermediate layers, by the generic tokens the model would predict for almost any input. We read the difference instead. Subtracting two closely matched prompts'hidden states and projecting through the unembedding cancels the shared component and surfaces what separates them, an operation equivalent to reading a RepE/ActAdd steering vector through a logit lens. Built into a training-free tracer that reads at every position, sub-layer, and head and averages over designed baselines, it traces a compound- noun MLP->attention chain in Phi-2, confirmed there by activation patching, with the same distinction recovered across three architectures by readout and probe rather than by patching; it reads what retrieval surfaces for real versus fictional entities, and reads metaphor as a set of domain-to-domain mappings rather than a single figurativity feature. A cross-seed control marks the boundary: across five networks differing only in initialization, the same distinction surfaces as almost entirely different tokens (top-10 overlap 0.08). What a computation looks like in token space is network-specific; the distinction it draws is not

View source

Similar papers

#artificial intelligence Preprint Sep 2026

Sparse Readout Prism: Explaining Logit-Lens Scores in Features Instead of Tokens

Sarse Readout Prism (SRP), which decomposes the readout using only its weights and expresses any token logit or logit difference as a sum of contributions from sparse readout features, reveals readout features as a new unit of analysis for lens readings, exposing structure that token identities can obscure and enabling...

Matteo He, William F. Shen, Xin-Chi Qiu et al. · 1 citation · ⚡1
#machine learning Preprint Oct 2026

One Block, Multiple Depths: Recurrent Vision Transformers with Depth-Programmed Experts

In this work, we show that a single Transformer block, applied recurrently, can match the accuracy of a full-depth vision encoder at comparable inference FLOPs without intermediate feature distillation. reViT restores depth-specific transformations by representing the FFN at each recurrent depth as a convex combination...

Adrian Bulat, Yassine Ouali, G. Tzimiropoulos · 1 citation
Preprint Oct 2026

Foreword: Pre-Generation Prediction and Characterisation of LLM Test Failures using the Jacobian Lens

This work presents Foreword, a framework built on two ideas: learn from both passing and failing references, and represent inputs through the Jacobian lens, an interpretability technique that reads intermediate activations out as scores over vocabulary tokens, which can support testers for prioritising inputs, checking...

Somin Kim, Robert Feldt, Yoo Shin · 0 citations
#artificial intelligence Preprint Oct 2026

JLD: Perceptual Distance Through A Jacobian Lens

Image compression, restoration, and generation all require a way to measure how different two images look to a person. Pixel error ignores how people see, while the most accurate perceptual distances are typically fitted to human judgments, tying them to a fixed data and resolution. For example, when image resolution i...

Shreshth Saini, Balu Adsumilli, Alan C. Bovik · 0 citations
Preprint Oct 2026

Present but Hard to Read: Probing Latent Reasoning with Minimal Pairs

A protocol, including a synthetic null for generic mixing, is given for testing computed values against copies and mixtures of the inputs, and in pre-registered studies of two-step problems it finds a small signal for the unwritten intermediate a+b just before Ouro writes the answer's last digit.

Aur Shalev Merin · 1 citation

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.