TL;DR
A language model can be wrong in what it says while holding a better internal sense of what is true. This paper proposes Contrast-Consistent Search (CCS), a way to find that internal sense from the model's hidden activations alone, with no labels and no model outputs. The method learns a small probe that gives each yes-no answer a probability, and it asks that a statement and its negation get opposite probabilities. Across 6 models and 10 question-answering datasets, the probe beats zero-shot accuracy by 4 points on average.
Builds on: Language Model, Transformer, Logistic Regression, Mean Squared Error · Leads to: Mechanistic Interpretability, Representation Learning
Why it mattered
Language models are trained to imitate text or to score well on human ratings, and both objectives can reward output that is false. The paper gave a concrete method for asking what a model "believes" separately from what it says. Its central claim is that the internal representation of truth is salient enough to be found with a short unsupervised procedure, and that the probe can outperform the model's own answers, which is important when the model is misled. It is an early example of unsupervised knowledge elicitation, a line of work aimed at models that may be harder to check than their evaluators can manage.
The problem
Suppose you want to know whether a model answers "Are cats mammals?" correctly. The obvious approach is to read its output, and that works only when the output is trustworthy. Two situations break it. First, the model may have learned to repeat common misconceptions, because imitation rewards matching human text. Second, human raters may be unable to check a claim, so the training signal rewards text that looks true. In both cases the output and the internal state can disagree.
To study the internal state, the paper needs an input it can use without labels. The feature is , a vector of hidden activations the model produces for an input . The goal is a method that answers each question using only the unlabeled , where the probe is trained without any correct answers.
How it works
Take one yes-no question, "Are cats mammals?", and the tiny case of a single question. The method runs in four steps.
- Make two statements. Turn the question into two sentences by answering it "Yes" and "No" with a prompt, giving ("Are cats mammals? Yes") and ("Are cats mammals? No"). Exactly one of them is true.
- Read the activations. Feed each sentence through the model and keep the hidden vector at the last token of a chosen layer. This gives and .
- Remove the obvious difference. The two sentences differ in their final word, and that difference is not the question of truth. The method subtracts the mean of all "Yes" vectors from each "Yes" vector and the mean of all "No" vectors from each "No" vector. After this, the two groups no longer sit in separate clusters.
- Fit a probe. Learn a linear map and bias that turns each normalized vector into a probability that the statement is true. Train and so that and agree and both values are far from one half.
A two-line check after step 4: if the probe gives and , the statement "Yes" is judged true, the two numbers are consistent, and both are confident, so the answer is "Yes". If the probe gives for both, it has learned nothing, and the loss should reject it.
flowchart LR Q["Question"] --> P["Yes and No statements"] P --> H["Hidden activations phi"] H --> N["Subtract group means"] N --> R["Linear probe then sigmoid"] R --> L["Consistency and confidence loss"] L -->|"update theta, b"| R
Once the probe is trained, a new question is answered by averaging the two readings, , and checking whether it is above one half.
The math
Definition (CCS probe). For a pair of statements and , a CCS probe is a function that maps a normalized activation vector to a number in , here , where is the sigmoid. The probe is fitted without labels, using only the consistency and confidence losses below.
Step 3 in symbols: normalization
The two groups of activations are centred separately. Let be the mean of and the mean of . Then
Centring removes the shared "ends with Yes" or "ends with No" offset, which is the feature the method does not want.
Step 4 in symbols: the two losses
Consistency asks that a statement and its negation have probabilities that sum to one:
Consistency alone has a trivial solution, where every statement gets probability one half. Confidence rules that out by penalizing the smaller of the two probabilities:
The paper notes that the confidence loss by itself also has a degenerate solution, so both losses are needed. The total loss averages both over the questions:
Worked by hand: with and , the consistency term is and the confidence term is . With both at , the consistency term is , but the confidence term is , so the loss prefers the first probe.
Prediction in symbols
The two readings of a question are averaged:
The answer is "Yes" when is greater than . The loss does not say which cluster means "Yes", so the paper takes the better of the two labelings on a test set, which is a choice made in evaluation. The appendix sketches how the clusters can be named without labels, by using conjunctions of statements, if the model can handle them.
Results
Setup. The paper tests six models: T5, UnifiedQA and T0 (encoder-decoder), GPT-J (autoregressive), and RoBERTa and DeBERTa (encoder-only). The ten datasets cover sentiment, topic, natural language inference, story completion, question answering and common-sense reasoning. Each dataset is subsampled to 1000 examples (COPA has only 500), split 60 percent for unsupervised training and 40 percent for testing, and tested with about nine prompts each.
Main result (Table 1). Averaged over models with T0 excluded, CCS reaches 71.2 percent accuracy, against 67.2 percent for calibrated zero-shot and 62.8 percent for plain zero-shot. Its accuracy also varies less across prompts: the average standard deviation is 3.2, against 6.9 for plain zero-shot. Logistic regression, which uses labels, reaches 83.7 percent and is the ceiling. CCS beats calibrated zero-shot on every model except RoBERTa, where it is 2 points worse. T0 was trained on nine of the ten datasets, so its zero-shot number is inflated, and it is excluded from the mean.
Misleading prompts. When a prefix of wrong answers is added to the prompt, calibrated zero-shot on UnifiedQA drops from 80.4 to 70.9 percent, a fall of 9.5 points. CCS moves from 82.1 to 83.8 percent on the same prompts. The paper notes that the prefix may be out of distribution, so this is evidence and not proof.
Limits. The authors state that CCS needs a direction that separates true from false inputs, and that it is not clear when a model both can evaluate truth and actively does so. They did not test deceptive models, because they knew of no evaluation setup for active lying. CCS also remains below the logistic regression ceiling, and the paper lists the gap as open.
Reading guide
- Section 1, Introduction. Read after Language Model and Self-Supervised Learning. It explains the motivation: imitation and rating-based training can reward false text.
- Section 2.1 and 2.2, Problem and Method. Needs Transformer for the idea of a hidden state at a token, and Logistic Regression for the sigmoid probe. Work through the four steps above before reading the equations.
- Section 3.1, Setup. Needs Zero-Shot Learning for the baselines and calibration, and Language Model for log-probabilities. The prompt design is in the appendix.
- Section 3.2, Evaluation. Needs the averages and standard deviations in Table 1. Read it alongside the loss definitions, to see that the probe is judged only against held-out labels.
- Section 3.3, Analysis. Needs Principal Component Analysis for the top-component method in Table 2 and Residual Stream for why middle layers can be better than the last.
- Section 5, Discussion. Reads most clearly after Mechanistic Interpretability, since the open questions concern what the probe actually finds.