Probing classifier

Also known as: linear probe · probing

On this page 7

A probing classifier is a small supervised model trained on the internal activations of a neural network to test whether those activations encode a specific property, such as part of speech, sentiment, syntactic depth or the truth of a statement. In Explainable AI, probing is a diagnostic technique: the network under study stays frozen, and only the probe learns, so its accuracy indicates how decodable the property is from a given layer.

The method is also called a linear probe when the probe is a linear model, or simply probing. It became a standard tool in Artificial intelligence research on language and vision models because it offers a cheap, layer-by-layer map of what information a representation contains.

How a probing classifier works

Probing follows a fixed recipe. The researcher runs a labeled dataset through the frozen model, records the hidden state at one layer for each input or token, and then trains a separate classifier to predict the label from those vectors. The probe is evaluated on held-out data, exactly like any other classifier.

Repeating the procedure at every layer produces a probing profile, a curve of probe accuracy against depth. In transformer language models, such profiles commonly show that surface features peak in early layers while syntactic and semantic properties peak in middle or later layers, although the exact pattern depends on the model and task.

The table below lists the components of a typical probing experiment.

ComponentRoleTypical choice
Frozen modelProvides the representations under studyPretrained transformer or CNN
Layer and positionDefines which activations are readOne layer, one token or mean pooling
Probe datasetSupplies labels for the propertyAnnotated corpus or synthetic set
Probe architectureMaps activations to labelsLogistic regression or small MLP
BaselinesShow what accuracy meansRandom model, control task, majority class
Components of a probing experiment

Linear and nonlinear probes

The capacity of the probe determines what a positive result proves. A linear probe can only find information that is linearly separable, which matches the linear representation hypothesis that many concepts correspond to directions in activation space. A nonlinear probe, such as a multilayer perceptron, can extract more information but may also learn the task itself rather than reveal what the model encodes.

Probe typeCapacityStrengthRisk
Linear probeLowEasy to interpret; direction is reusableMisses nonlinearly encoded information
Small MLP probeMediumDetects richer structureMay memorize the task
Structural probeLow, task-specificRecovers geometry such as parse treesNarrow scope
Minimum description length probeVariableMeasures effort needed to decodeMore complex to run
Probe types and what their results mean

Because of this trade-off, careful studies report probe accuracy together with probe complexity. Information-theoretic variants, such as minimum description length probing, measure how much data the probe needs to reach a given accuracy, which separates easily decodable information from information that only a powerful probe can extract.

Probing compared with other interpretability methods

Probing answers the question whether information is present, while causal methods answer whether the model uses it. That distinction places probing between descriptive tools such as feature visualization and interventional tools such as activation patching.

MethodQuestion answeredCausal evidence
Probing classifierIs the property decodable at this layer?No
Logit lensWhat output does an intermediate layer predict?No
TCAVHow sensitive is a class to a human concept?Partial, gradient-based
Activation patchingDoes this activation change the output?Yes
Feature attributionWhich inputs drove this prediction?Partial, input-level
Probing within the interpretability toolkit

In practice, researchers often combine methods: a probe first locates a candidate direction, and an intervention along that direction then tests whether editing it changes model behavior. Representation engineering builds directly on this pattern.

Pitfalls and how to control them

The central pitfall is confusing decodability with use. High probe accuracy shows that a property can be recovered, not that the model relies on it for its predictions. A second pitfall is probe expressivity: a strong probe may reach high accuracy even on representations from a randomly initialized network.

Experienced researchers apply several controls to make results credible.

  • Control tasks assign random but consistent labels to word types; the gap between real and control accuracy, called selectivity, shows how much the result depends on the representation.
  • Random-weight baselines reveal how much accuracy comes from the input embedding alone.
  • Lexical overlap checks ensure the probe is not solved by memorizing specific words.
  • Causal follow-up, such as amnesic probing or ablation, removes the property and measures the effect on the model output.

Dataset quality also matters. Probes inherit annotation errors and spurious correlations from their labels, so a probe for sentiment may in fact detect topic or length. Reporting several seeds and confidence intervals avoids reading noise as a layer effect.

Where probing is used

Probing appears in model analysis, safety research and model development. Linguists use it to study how language models represent grammar; safety researchers train probes on activations to detect whether a model internally represents a statement as true, or to flag harmful intent before an output is produced; and engineers use linear probes to evaluate self-supervised vision encoders without fine-tuning.

In the last case, linear probe accuracy serves as a standard benchmark: a frozen encoder is judged by how well a linear classifier on its features performs on a dataset such as ImageNet. This use treats probing as an evaluation protocol rather than an explanation, but the underlying mechanism is the same.

In simple terms

A neural network turns each input into long lists of numbers inside its layers. Nobody can read those numbers directly. A probing classifier is a small helper model that tries to read one specific fact from those numbers, such as whether a word is a noun.

If the helper succeeds, the fact is stored there in some form. It is a bit like holding a thermometer to different rooms of a house. The reading shows where heat is present. It does not show who turned on the heater. A probe finds information, but it does not prove the model uses it.

A practical example

A research team studies a 24-layer language model and wants to know where it represents whether a sentence is true or false. The team collects 5,000 simple factual statements, half true and half false, runs them through the frozen model and stores the hidden state of the final token at every layer.

A logistic regression probe trained on each layer reaches about chance level in the first layers and climbs to roughly 85% accuracy around layers 12 to 16, while a control probe on a randomly initialized copy of the model stays near 55%. The team then shifts activations along the learned probe direction and observes that the model more often affirms false statements. The combined result, a strong probe plus a causal effect, gives far more convincing evidence than the probe accuracy alone.