What Is Linear Probing?

A linear probe is about as simple as interpretability tools get. Freeze a trained network, pull out its hidden activations at some layer, and train a small linear classifier on top to predict a property you care about. If the classifier does well, that property is, in some statistical sense, "in there." If it does badly, either the model doesn't represent the property, or it represents it in a way a straight line can't read off. Alain and Bengio introduced the idea in 2016 to study how representations evolve across the layers of a CNN, and it has since become one of the most widely used tools in the field.

The idea

The setup is always the same three pieces: a frozen base model, a chosen layer to tap, and a tiny classifier trained only on that layer's output.

frozen pretrained model L1 L2 L3 L4 L5 model output reads activations, doesn't change them linear probe predicted label only this box trains
The base model never sees a gradient from the probe. Only the small linear classifier on the lower path is trained.

That last point matters. The base network's weights stay frozen throughout, so the probe can only succeed by reading out information that was already there, not by quietly teaching the model something new.

What it looks like in practice

One of the cleanest demonstrations is Tenney, Das, and Pavlick's 2019 study of BERT. They trained probes for a whole stack of classic NLP tasks, part-of-speech tagging, parsing, semantic role labeling, coreference, at every layer of the model, and found that the tasks became easy for a linear probe in roughly the order you'd expect from a traditional NLP pipeline: surface-level tags first, then syntax, then increasingly semantic properties, as you move deeper into the network.

probe accuracy earlier layers later layers surface (e.g. part-of-speech) syntax semantics / coreference
Illustrative sketch of the general pattern, not a reproduction of any paper's actual numbers. Tenney et al. found surface properties become linearly decodable earlier in the network, with more semantic ones emerging deeper in.

It's a satisfying picture: the network seems to rediscover a pipeline that NLP researchers built by hand for decades. It's also a picture that later work pushed back on, more on that below.

A clean example: Othello-GPT

Probing gets more interesting once the property you're looking for isn't a linguistic label but a piece of the world the model was never explicitly told about. Othello-GPT is a transformer trained on nothing but sequences of legal Othello moves, with no notion of a board built in. Nanda, Lee, and Wattenberg found that a linear probe can recover the entire board state from the model's activations, as long as the probe is asked to predict "mine" versus "theirs" rather than "black" versus "white," since the model tracks the game from the current player's perspective rather than by color.

mine theirs
A simplified sketch of the idea: probing each square for mine / theirs / empty rather than black / white. Not the model's actual board state, just the concept.

What makes this example stand out is that the result didn't stop at correlation. The same researchers used the probe's own direction in activation space to edit the model's internal board, and the model's subsequent moves changed to match the edited board. That's the part probing alone can't give you: knowing a direction correlates with a property is different from knowing the model relies on that direction. More on how that's tested in my activation patching post.

The catch

A probe's accuracy is a property of the probe as much as the representation. Give a sufficiently flexible classifier enough hidden units and enough training data, and it can learn to predict almost anything from almost any input, including pure noise. Hewitt and Liang's 2019 control tasks made this concrete: they paired each real linguistic task with a control task where the labels were randomly reassigned per word type, something a probe could only solve by memorization, and proposed selectivity, the gap between accuracy on the real task and the control task, as a better measure of whether a probe is reading the representation or just being a flexible learner sitting on top of it.

This kind of scrutiny has also been turned on the pipeline finding from the section above. A 2022 follow-up, Niu, Lu, and Penn, re-examined Tenney et al.'s layer-ordering result with a new probe design and concluded that the clean pipeline story doesn't hold up as a precise empirical claim, even if BERT's representations are linguistically structured in some form. None of this makes linear probing useless. It means a probe answers a narrower question than it looks like it answers: not "does the model represent X," but "can a linear function recover X from this layer, given everything else held fixed." (Belinkov's 2022 survey is a good overview of this literature.)

Probing without training a probe

A related family of tools skips the training step entirely. The logit lens, introduced by the researcher nostalgebraist in 2020, takes a GPT-style model's own unembedding matrix, normally used only at the very last layer, and applies it to every intermediate layer instead, treating the residual stream as a running draft of the final answer. The tuned lens, from Belrose and colleagues in 2023, improves on this by learning a small per-layer correction, since intermediate layers aren't always in quite the same coordinate system as the final one.

These tools are sometimes described as a kind of free probe: a read-out of intermediate computation without fitting anything to labeled data. They share probing's central limitation, though. Showing that information is decodable, whether by a trained classifier or a fixed projection, is still not the same as showing the model uses it.

Where this leaves us

Linear probing is a measurement tool, and a genuinely useful one. It's cheap, it's simple enough to reason about, and the linear representation hypothesis it leans on has held up surprisingly well across very different settings. But it answers a "what's in here" question, not a "what does the model do with it" question. This kind of probe is also the simplest tool in a larger toolbox; some of my own work pushes past measuring decodability into asking what shape that information takes, more on that in my post on ordinal representations. For the causal question, the tool of choice in mechanistic interpretability is activation patching, which I write about here.

← Back to all posts