Skip to content
The Daily Triptych238 / 365
Where probes find structure in BERT

Relative decodability by layer band on edge-probing style tasks. Darker cells mark stronger typical probe signal. Values are schematic summaries of the reported early-to-late shift, not exact accuracies from a single run.

II · THE IDEA · ARTIFICIAL INTELLIGENCE

Probing for Linguistic Knowledge

interpretability · edge probing and control tasks · 1905.05950; 1909.03368 · frozen BERT representations

▶ Listen · narrated

A language model learns only one skill: guessing hidden words. Nobody teaches it grammar. Probing asks whether grammar turns up inside it anyway, readable in the lists of numbers it builds for each sentence.

At a glance

What it is
Training a lightweight classifier on fixed model activations to test encoded structure
Core finding
BERT layers roughly track the classical NLP pipeline, basic syntax earlier than semantics
Control tasks
Randomised labels that measure how much a probe can memorise rather than read out
Selectivity
Gap between linguistic-task accuracy and control-task accuracy
Probe design
Simpler probes tend to be more selective than heavy ones

Think of the trained model as a sealed library. You may not move a single book. You are let in with a notepad and one job: tick boxes. Is this word a noun? Does this phrase point at the same person as that one? If your ticks keep coming out right, the shelves must already be arranged in a way that made them possible. That is probing. The big model stays frozen, and a tiny second program — the notepad — does the ticking.

Researchers did this to BERT, one layer at a time. BERT had only ever been trained to fill in missing words, nothing more. Yet ticks about local grammar, such as which words are nouns, came out right in the early layers. Ticks about meaning, such as who did what to whom, came out right in the later layers. That order looked like the old step-by-step language software people once built by hand — and nobody had put it there on purpose.

There is a catch. A clever enough notepad can memorise the answer key and never look at the shelves at all. So researchers run every test twice, the second time with the answers scrambled at random. With scrambled answers there is nothing real to find, so a good score can only come from memory. If the notepad still scores well, its first score means nothing. Good evidence is a wide gap: high marks on the real test, low marks on the scrambled one.

Look closer

  1. The model weights stay frozen

    A probe is a small supervised classifier, often linear or a shallow MLP, fitted only on activations taken from a pretrained network. The network itself is never updated. That separation is the point: any success is attributed to structure already present in the representation, not to new learning inside the model under study.

  2. Layers line up with a classical order

    On edge-probing tasks, lower layers of BERT favour local syntactic signals such as part-of-speech and constituents. Middle layers carry more dependency structure. Higher layers are stronger on semantic roles, coreference and relation-like distinctions. The ordering is approximate and task-dependent, yet it echoes the old staged NLP pipeline without having been trained to reproduce it.

  3. Control tasks police the probe

    A powerful probe can fit almost any labelling of a finite training set, even when the representation holds little of the intended structure. Control tasks assign random outputs while keeping the same input tokens, so high control accuracy means the probe is memorising rather than reading linguistic features out. Selectivity—the gap between real and control performance—is what makes a probe result interpretable.

The story

A modern language model does not store words as words. It turns each word of a sentence into a vector — a long list of numbers — and it revises that list at every layer, which means at every stage of processing between the sentence going in and the prediction coming out. Whatever the model knows about a word at a given stage is carried in those numbers and nowhere else. Probing asks a question that is easy to state and hard to answer well: is grammatical information written into those numbers plainly enough to be read straight off?

The test works like this. Take a sentence, run it through a trained model, and record the vectors at one chosen layer. Do not change the model at all — every one of its weights stays frozen. Then train a second, much smaller program on the recorded vectors: a classifier, a routine that learns to sort inputs into categories from examples with known answers. Feed it vectors for words whose part of speech is already known, and see whether it learns to tell the nouns from the verbs. Because the big model is frozen, it cannot learn anything new during the test. If the small classifier succeeds, the credit must belong to the vectors themselves. The information was already sitting there; the probe merely read it out.

The model most famously put through this procedure is BERT, a widely used encoder trained on a fill-in-the-blank exercise: hide some words in a sentence and make the model guess them from the words around them. That is the entire training signal. No one ever shows BERT a grammar rule, a parse tree — a diagram of how a sentence's phrases fit together — or a label saying which noun a pronoun points back to.

The edge-probing suite then puts a battery of grammatical questions to each of BERT's layers in turn. Every question concerns one or two marked stretches of a sentence, called spans. What part of speech is this span? Do these words form a single grammatical phrase? How does this word depend grammatically on that one? In the event the sentence describes, which span names the doer and which the thing done to? And do two spans — say, "the doctor" and a later "she" — refer to the same person? One design decision matters more than any other: the same kind of probe is used at every layer. That keeps the comparison fair. If the probe reads part of speech more accurately from an early layer than from a late one, the difference must lie in the layers, not in the test.

Run layer by layer, the scores form an orderly map. Local grammatical facts, such as part of speech, are easiest to read off the early layers. Grammatical links between words — which word depends on which — firm up in the middle. Questions that need meaning gathered across a longer stretch of the sentence, such as who did what to whom and which pronoun matches which name, are easiest to read off the later layers. Nobody built this order in. Earlier language software was assembled by hand as a pipeline: first tag parts of speech, then group words into phrases, then work out grammatical links, then meaning. BERT was trained only to fill in blanks, yet a similar order appeared inside it on its own — hence the paper's title, that BERT "rediscovers" the classical NLP pipeline.

The order is a tendency, not a law. It is an average across tasks and datasets, and it shifts with the task; no single sentence marches through a rigid sequence of stages. The honest reading is that different kinds of information become easiest to read at different depths, on average.

Here the second paper enters, because a high probe score can mean 3 different things. The feature may genuinely be written into the vectors. The probe may be powerful enough to reconstruct the feature from weaker hints that are present. Or the probe may have learned nothing from the vectors at all. That last case is worth spelling out. A probe with many adjustable parts can build what amounts to a lookup table: this exact word carried this label in training, so answer the same way again. A probe passing by lookup tells you about the probe's memory, not about the model.

Control tasks were invented to separate these cases. A control task keeps the same words and the same kind of probe, but throws away the real grammatical labels and assigns each word a random label instead. Now there is no structure left to read; the only route to a good score is memory. So the probe's score on the random labels measures exactly how well it can cheat. The number that matters is therefore not the raw score but the gap: accuracy on the real task minus accuracy on the random one. That gap is called selectivity.

Seen this way, restraint pays. A linear probe — one that can only separate categories with a straight dividing line through the space of numbers — is a poor memoriser. When it scores well on the real task and badly on the random one, that wide gap is hard to explain unless the structure sits plainly in the vectors. A deep probe that scores well on both has proved only that it can pass from memory, so its real-task score settles nothing. The choice of probe is part of the scientific claim, not a technical footnote.

Two limits remain. Showing that information can be read out of a layer does not show that the model consults that information when it predicts the next word; presence and use are different claims. And how much power a probe may have before its results stop being about the model is still argued over — control tasks narrow that argument without ending it. What the two papers leave behind is a procedure rather than a headline. Freeze the model. Attach a small classifier. Compare layers. Then check, every time, against random labels. It turns a stack of opaque numbers into something that can be scored against grammatical categories linguists already agree on.

Why it mattered then

When BERT and models like it first swept the benchmark tables, nobody could say what they had actually learned, beyond noticing which words tend to occur together. Scores rose; explanations did not. Edge probing supplied a shared set of grammar and meaning tests that could be run on a frozen model one layer at a time, producing a map of where each kind of information becomes readable, rather than a scattering of anecdotes. Those rising probe scores then raised a second worry. If the probe itself is powerful enough, a high number may describe the probe rather than the model. Control tasks and the selectivity measure answered that worry directly: run the same probe on random labels, and trust only the gap between the 2 scores. Between them, the 2 papers turned probing from a loose diagnostic into a method with stated ways of going wrong.

Why it matters now

Open-weight models are now far too large to inspect part by part, yet anyone about to fine-tune or deploy one still needs grounded claims about what a checkpoint already encodes. Probing remains among the cheapest ways to ask whether part-of-speech, grammatical-dependency or pronoun-reference structure is readable at a given layer, and control-style baselines are still the standard guard against a probe that is merely memorising. The same discipline applies whenever someone announces that a new architecture "knows" syntax or semantics. That claim is worth exactly as much as the probe's selectivity, and it holds only if the speaker keeps 2 things apart: information being present in a representation, and the model actually using it. As evaluation moves past leaderboard totals, that distinction is what separates careful description from wishful reading.

The surprising detail

BERT never saw a parse tree or a role label during training, yet probes recover an order across its layers that mirrors the hand-built pipeline of earlier language software, with grammar tending to become readable before meaning. The surprise comes with a caution attached. The identical experiment can look decisive or empty depending on whether the probe still fails when the labels are randomised — the mark of a probe that reads rather than memorises. The method carries its own corrective, which makes the sceptical paper as important as the striking one.

What is disputed

Probe accuracy shows that information is present in a representation under a chosen architecture; it does not show that the model uses that information when predicting tokens. Layer orderings are also averages across tasks and datasets, not a rigid pipeline inside every sentence. Control tasks reduce, but do not eliminate, debates about how expressive a probe may be before results stop being attributable to the model.

Remember this

A probe shows what a frozen model's numbers make readable, not what the model relies on — and only a probe that fails on random labels makes even that claim trustworthy.

Test yourself

A deep probe scores 90% on a part-of-speech task taken from layer embeddings, and 88% on a control task with shuffled labels over the same tokens. A linear probe scores 82% on the real task and 40% on the control. Which result is stronger evidence that part-of-speech information is encoded in the representation, and why?

Go deeper

Image: Original diagram, The Daily Triptych. Licence: Original work. Source.

← Back to day 238