Investigating Linear Probe Robustness to Linguistic Register, Medical Specialty, and Corpus Shifts in Medical QA¶
Conference: EMNLP 2026
Paper: ACL Anthology
Code: https://github.com/mnishant2/MedProbe_release
Area: Medical NLP
Keywords: linear probe, linguistic register shift, geometry of truth, medical question answering, cross-corpus transfer
TL;DR¶
The paper isolates linguistic register, medical specialty, and corpus shifts in medical QA linear probing, demonstrating that the truth direction is robust to surface style (\(\Delta_{\text{register}} \approx -0.095\) AUROC) and specialty (\(\Delta_{\text{specialty}} \approx -0.031\)) but degrades sharply under corpus transfer (\(\Delta_{\text{dataset}} \approx -0.21\)).
Background & Motivation¶
In clinical decision support and patient-facing applications, large language models (LLMs) that confidently generate medically plausible yet factually incorrect prescriptions, contraindications, or differential diagnoses pose catastrophic safety risks. To intercept such fabrications before they reach clinicians or patients, a prominent line of interpretability research proposes linear classifier probes trained on a frozen model's hidden states to flag factual incorrectness from a single forward pass. Geometrically, this approach rests on the hypothesis that true and false statements inhabit distinct regions of the hidden representation space and separate along a stable, one-dimensional hyperplane normal known as the truth direction.
However, the existing literature harbors a sharp divide concerning whether this linear truth direction constitutes a genuine geometric property or a fragile artifact. Proponents such as Marks & Tegmark demonstrate that linear probes and parameter-free difference-of-means classifiers recover truth directions that survive causal interventions. Conversely, skeptics including Levinstein & Herrmann as well as Haller et al. argue that probes exploit superficial training-set artifacts and break under minor surface perturbations, paraphrasing, or syntactic negation. A major roadblock in resolving this dispute is that standard cross-dataset evaluations conflate multiple disparate factors at once: question phrasing style, medical specialty distribution, exam difficulty, and the idiosyncratic manner in which distractor options were authored. Consequently, when a probe fails across corpora, it remains impossible to attribute the breakdown to stylistic divergence or structural dataset artifacts.
The crucial angle of attack is to disentangle these intertwined input variations into controlled, isolated axes and measure probe transfer along each dimension independently. Medical question answering provides an ideal setting for this investigation, as the same underlying clinical fact can naturally appear as a formal textbook examination question, a telegraphic clinical note in an electronic health record, a patient inquiry on an online health forum, or an informal colloquial query. Core idea: orthogonally isolate probe transfer across linguistic register, clinical specialty, and dataset corpus by building a 4,000-variant controlled rewriting benchmark of 500 MedQA facts across four distinct styles, demonstrating across four open-weight LLMs (2Bโ8B) that the linear truth direction is highly robust to stylistic and specialty shifts but degrades severely under corpus shifts due to distractor construction artifacts.
Method¶
Overall Architecture¶
The experimental methodology comprises four core stages: controlled corpus rewriting, hidden representation extraction, linear probe training and geometric validation, and orthogonal multi-axis transfer evaluation. First, 500 clinical facts from MedQA are sampled and rewritten into four distinct linguistic registers (textbook, patient-facing, clinical note, colloquial) while preserving correct and distractor polarities, alongside S-MedQA clinical specialty annotations and two external exam corpora (MedMCQA and MMLU-medical). Next, each input is presented via a standardized Yes/No chat-templated prompt, extracting hidden state activations at the final question token across even transformer layers. Probes are then trained using \(L_2\)-regularized logistic regression, a parameter-free difference-of-means formulation, and a single-hidden-layer MLP to test for strict linearity. Finally, the probes are evaluated across register shifts (including real human-written Reddit queries from MedRedQA), clinical specialty splits, and zero-shot cross-corpus transfers with post-hoc probability calibration.
%%{init: {'flowchart': {'rankSpacing': 24, 'nodeSpacing': 28, 'padding': 6, 'wrappingWidth': 400}}}%%
flowchart TD
In["Medical QA Input Pair<br/>(Question, Candidate Answer)"] --> N1["Controlled Register Rewriting and Three-Axis Decoupling<br/>4 Registers ร 15 Specialties ร 3 Multiple-Choice Corpora"]
N1 --> P1["Frozen LLM Forward Pass & Representation Extraction<br/>Yes/No Prompt Last-Question-Token Hidden State Capture"]
P1 --> N2["Last-Question-Token Linear Probing and Linearity Verification<br/>L2 Logistic Regression vs Difference-of-Means vs MLP Probe"]
N2 --> N3["Multi-Dimensional Zero-Shot and Isolated Transfer Evaluation<br/>Register Robustness / Specialty Generalization / Cross-Corpus Transfer"]
N3 --> N4["Post-Hoc Probability Calibration and Failure Attribution<br/>Platt Scaling / Negation Rejection & Plausible Distractor Analysis"]
N4 --> Out["Diagnostic Factuality Alert<br/>Internal LLM Correctness Classification"]
Key Designs¶
1. Controlled Register Rewriting and Three-Axis Decoupling: Eliminating confounding factors across style, domain, and corpus
Prior probing evaluations conflate stylistic phrasing, domain topic, and distractor authorship, obscuring the root causes of transfer failure. To isolate these variables, the study samples 500 facts from the MedQA test set, each consisting of a clinical vignette, a gold correct answer \(a_i^+\), and a randomly sampled multiple-choice distractor \(a_i^-\). Using Claude Sonnet 4.5 guided by strict few-shot exemplars and explicit wrong-preserving rules (to prevent the generator from silently repairing medically incorrect statements), each pair is rewritten into four distinct registers: textbook (\(R_{\text{textbook}}\)), patient-facing (\(R_{\text{patient}}\)), clinical note (\(R_{\text{note}}\)), and colloquial (\(R_{\text{colloquial}}\)), generating \(500 \times 4 \times 2 = 4,000\) controlled variants. A rigorous multi-judge quality filter using cross-family models (Grok 4.1/4.3 and GPT-5 Nano) verifies factual fidelity, while an independent replication using Gemini 3 Flash confirms generator neutrality. Clinical specialty is isolated via S-MedQA annotations across 15 specialties (351 matched facts), and corpus shifts are tested using MedMCQA and MMLU-medical.
2. Last-Question-Token Linear Probing and Linearity Verification: Establishing the geometric truth direction in medical LLMs
Generative factuality evaluation is frequently distorted by decoding stochasticity, and whether internal states form a true linear hyperplane in domain-specific tasks remains debated. To eliminate prompt-format confounds, inputs are formatted as a binary yes/no chat query: "Is this answer medically correct? Respond with Yes or No.", concentrating the truth signal at the hidden state \(h_t^\ell \in \mathbb{R}^d\) of the final question token. Hidden states are captured across four open-weight LLMs (Gemma-2-2B-it, Gemma-3-4B-it, Qwen2.5-7B-Instruct, Llama-3-8B-Instruct) at every second layer. An \(L_2\)-regularized logistic regression probe (\(M_{\text{textbook}}\), \(C=1.0\)) is trained on the 80% textbook training split. To determine whether the signal represents an intrinsic geometric property rather than an artifact of supervised parameter fitting, a parameter-free difference-of-means probe (\(M_{\text{diff}}\)) is computed:
$\(w = \frac{\mu_+ - \mu_-}{\|\mu_+ - \mu_-\|}, \quad \mu_+ = \mathbb{E}[h \mid y = 1], \quad \mu_- = \mathbb{E}[h \mid y = 0]\)$
with the classification boundary set at the midpoint of projected class means. A one-hidden-layer MLP (\(M_{\text{MLP}}\), 128 ReLU units) is trained concurrently to test for non-linear signal gains.
3. Multi-Dimensional Zero-Shot and Isolated Transfer Evaluation: Quantifying performance divergence across stylistic and structural shifts
To measure truth-direction degradation under isolated perturbations, evaluations employ strict fact-level splits ensuring both polarities of any given fact move together. The evaluation protocol tracks: (1) register transfer gap \(\Delta_{\text{register}} = \text{AUROC}(D_{\text{test}}^r) - \text{AUROC}(D_{\text{test}}^{R_{\text{textbook}}})\), complemented by zero-shot evaluation on 84 genuine human-authored Reddit inquiries from MedRedQA; (2) specialty transfer gap \(\Delta_{\text{specialty}}\) over five random 7-train/8-test specialty partitions; and (3) cross-corpus transfer gap \(\Delta_{\text{dataset}}\) on 500 MedMCQA validation items and MMLU-medical. Crucially, a reformatted MedMCQA control set (re-encoding short question stems into verbose MedQA-style clinical vignettes with verbatim answers) isolates syntax length from corpus structure, while probes are compared against output-only baselines including token entropy (\(B_{\text{ent}}\)), self-consistency (\(B_{\text{sc}}\)), and self-evaluation confidence (\(P(\text{True})\)).
4. Post-Hoc Probability Calibration and Failure Attribution: Diagnosing confidence distortion and pathology-level error modes
High discriminative AUROC reflects ordinal ranking ability but does not guarantee that raw probe probabilities are safe for clinical deployment. The evaluation reserves a 10% calibration and 10% final test split to compute Expected Calibration Error (ECE) across 10 equal-width bins on raw probe outputs, comparing single-parameter Platt scaling against isotonic regression. Furthermore, a qualitative inspection of the highest-confidence false positives and false negatives on Llama-3-8B categorizes recurring failure modes: two-way maximal overconfidence on ambiguous problems, acceptance of plausible-but-incorrect distractors (concentrated in patient-facing prose where informal wording masks errors), and systematic rejection of valid statements featuring explicit negation phrases.
A Worked Example¶
Consider an illustrative clinical fact regarding right-sided heart failure etiology across the four registers, evaluated under the reference language model (Gemma-2-2B-it): - Textbook (\(R_{\text{textbook}}\)): "What is the most frequently encountered etiology of right-sided heart failure?" Reference perplexity is 8.6, yielding a baseline probe AUROC of 0.775. - Patient-facing (\(R_{\text{patient}}\)): "My dad was told he has right-sided heart failure, what usually causes it?" Perplexity shifts to 13.1, while mean AUROC drops by only 0.047 to 0.728. - Clinical note (\(R_{\text{note}}\)): "Most common etiology R-sided HF?" Perplexity surges to 62.0, with mean AUROC dropping by 0.144 to 0.631. - Colloquial (\(R_{\text{colloquial}}\)): "ok so what actually causes right side heart failure lol" Perplexity reaches 51.6, with mean AUROC dropping by 0.079 to 0.696.
Despite surface perplexity varying more than seven-fold between formal textbook phrasing and shorthand medical notes, the linear probe retains strong discriminative separation, illustrating that register divergence alone does not dismantle the underlying truth direction.
Loss & Training¶
The linear probe is trained via binary cross-entropy with an \(L_2\) weight penalty: $\(\mathcal{L}(w, b) = -\frac{1}{N} \sum_{i=1}^N \left[ y_i \log \sigma(w^T h_i + b) + (1 - y_i) \log (1 - \sigma(w^T h_i + b)) \right] + \frac{1}{2C} \|w\|_2^2\)$ with regularization strength fixed at \(C = 1.0\). All representations are extracted in bf16 precision with eager attention and zero parameter tuning. The primary evaluation layer is determined per model on held-out validation data, consistently locating the performance plateau within the upper 40%โ60% depth of each architecture.
Key Experimental Results¶
Main Results¶
The main benchmark evaluates in-distribution performance on textbook questions alongside transfer degradation across linguistic registers (\(\Delta_{\text{register}}\)), medical specialties (\(\Delta_{\text{specialty}}\)), and external corpora (\(\Delta_{\text{dataset}}\)), with comparison to the difference-of-means probe.
| LLM | Best Layer | In-dist AUROC [95% CI] | Acc @0.5 | F1 @0.5 | Acc @Youden | \(\Delta_{\text{register}}\) | \(\Delta_{\text{specialty}}\) | \(\Delta_{\text{dataset}}\) | \(\Delta_{\text{diff register}}\) |
|---|---|---|---|---|---|---|---|---|---|
| Gemma-2-2B-it | Layer 15 | 0.733 [0.67, 0.79] | 0.640 | 0.625 | 0.685 | -0.064 | -0.053 | -0.22 | -0.045 |
| Gemma-3-4B-it | Layer 25 | 0.768 [0.71, 0.83] | 0.695 | 0.684 | 0.715 | -0.085 | -0.010 | -0.21 | -0.079 |
| Qwen2.5-7B-Instruct | Layer 23 | 0.795 [0.74, 0.85] | 0.735 | 0.720 | 0.765 | -0.126 | -0.016 | -0.23 | -0.073 |
| Llama-3-8B-Instruct | Layer 29 | 0.802 [0.74, 0.86] | 0.740 | 0.740 | 0.765 | -0.104 | -0.045 | -0.20 | -0.101 |
| Mean | โ | 0.775 | 0.703 | 0.692 | 0.733 | -0.095 | -0.031 | -0.21 | -0.075 |
Ablation Study¶
Ablation experiments evaluate cross-corpus transfer ladders, formatting controls, alternative probe architectures, output baselines, and post-hoc calibration metrics.
Table 1: Cross-corpus ladder and question format control evaluation (AUROC with 95% bootstrap CIs)
| Evaluation Set | Gemma-2-2B-it | Gemma-3-4B-it | Qwen2.5-7B-Instruct | Llama-3-8B-Instruct | Mean |
|---|---|---|---|---|---|
| MedQA Textbook Benchmark (Held-out) | 0.737 [0.67, 0.80] | 0.770 [0.71, 0.83] | 0.795 [0.74, 0.85] | 0.801 [0.74, 0.86] | 0.776 |
| MMLU-medical (5 clinical subjects) | 0.585 [0.57, 0.60] | 0.614 [0.59, 0.64] | 0.690 [0.67, 0.71] | 0.721 [0.70, 0.75] | 0.653 |
| MedMCQA (Native Indian entrance exam) | 0.520 [0.50, 0.54] | 0.555 [0.53, 0.58] | 0.564 [0.54, 0.59] | 0.603 [0.58, 0.63] | 0.561 |
| MedMCQA Reformatted (MedQA-style vignettes) | 0.517 [0.47, 0.56] | 0.532 [0.47, 0.59] | 0.608 [0.54, 0.67] | 0.581 [0.51, 0.65] | 0.559 |
| MedRedQA (Real human Reddit inquiries) | 0.542 [0.49, 0.60] | 0.606 [0.55, 0.66] | 0.695 [0.65, 0.75] | 0.680 [0.62, 0.73] | 0.631 |
Table 2: Probe architecture, baseline, and calibration ablation (Mean across 4 LLMs)
| Probe Configuration / Baseline | Textbook \(R_{\text{textbook}}\) | Patient \(R_{\text{patient}}\) | Note \(R_{\text{note}}\) | Colloquial \(R_{\text{colloquial}}\) | Panel Mean | Note |
|---|---|---|---|---|---|---|
| Linear Logistic Probe (\(M_{\text{textbook}}\)) | 0.780 | 0.728 | 0.631 | 0.696 | 0.709 | Standard linear baseline |
| Difference-of-Means Probe (\(M_{\text{diff}}\)) | 0.754 | 0.723 | 0.731 | 0.715 | 0.731 | Unregularized geometric vector; +0.070 on \(R_{\text{note}}\) |
| Single-Hidden-Layer MLP (\(M_{\text{MLP}}\)) | 0.807 | 0.766 | 0.743 | 0.738 | 0.763 | Marginal gain (+0.037); 15/16 CIs overlap |
| Self-Evaluation Baseline \(P(\text{True})\) | 0.760 | 0.703 | 0.722 | 0.678 | 0.716 | Matches probe on 7B/8B; requires token decoding |
| Self-Consistency Baseline \(B_{\text{sc}}\) (\(\tau=0.7\)) | 0.671 | 0.635 | 0.667 | 0.631 | 0.651 | Outperformed by probe by 6โ11 AUROC points |
| Token Entropy Baseline \(B_{\text{ent}}\) | 0.584 | 0.501 | 0.566 | 0.470 | 0.530 | Near chance; drops to 0.46 on Llama-3-8B |
| Raw Probe Calibration Error (Raw ECE) | 0.231 | 0.377 | 0.356 | 0.400 | 0.341 | Severely miscalibrated (far above 0.05 safety bound) |
| Platt-Scaled Calibration Error (Platt ECE) | 0.086 | 0.151 | 0.135 | 0.166 | 0.135 | Cuts ECE by >50%, yet 15/16 conditions remain >0.05 |
Key Findings¶
- High register and specialty stability: The linear truth direction transfers smoothly across writing styles (\(\Delta_{\text{register}} = -0.095\)) and medical specialties (\(\Delta_{\text{specialty}} = -0.031\)). Counterintuitively, rare diseases yield AUROC parity or superiority over common diseases in all 16 conditions, as distinct, low-frequency clinical terminology activates isolated representations that separate more cleanly.
- Asymmetric cross-corpus breakdown: Zero-shot transfer to MedMCQA causes a severe drop of \(\Delta_{\text{dataset}} = -0.21\) AUROC (reaching near-chance performance of 0.52โ0.60), whereas transfer to MMLU-medical drops by 0.12. Re-encoding MedMCQA stems into verbose MedQA-style vignettes leaves AUROC unchanged (0.559 vs 0.561), ruling out question format and confirming that failure is driven by dataset-specific distractor authorship and item construction.
- Predominant linearity and regularization penalty: An MLP probe gains only +0.037 AUROC, remaining within bootstrap confidence intervals in 15 of 16 conditions. Moreover, the parameter-free difference-of-means probe beats the \(L_2\)-regularized logistic probe by +0.070 AUROC on the clinical note register, proving that \(L_2\) regularization overweights textbook surface statistics and harms transfer to distant registers.
- Severe probability miscalibration: Raw probe ECE averages 0.341, and optimal decision thresholds \(\tau_J\) swing wildly between 0.04 and 1.00 across registers. While relative factuality ranking is preserved, raw scores cannot serve as literal probabilities of correctness.
Highlights & Insights¶
- Orthogonal three-axis decomposition: Disentangling register, specialty, and corpus resolves the longstanding contradiction between "universal truth directions" and "probe brittleness" by pinpointing distractor construction rather than surface phrasing as the primary vulnerability.
- Unregularized difference-of-means superiority: Demonstrating that an unregularized geometric centroid difference outperforms \(L_2\) logistic regression on stylistically distant clinical notes reveals that supervised loss penalties can actively degrade out-of-distribution transfer.
- Validation on authentic patient writing: Replicating probe performance on unedited patient inquiries from MedRedQA confirms that register robustness is an intrinsic property of the model's representations, not an artifact of LLM-generated rewrites.
Limitations & Future Work¶
- Multiple-choice format constraints: All corpora utilize multiple-choice formats with expert-crafted distractors; whether linear truth directions behave similarly in free-form open-ended clinical generation remains unverified.
- Geographic and linguistic coupling: Datasets reflect US (MedQA) and Indian (MedMCQA) medical licensing exams in English; cross-lingual transfer and non-Anglocentric medical frameworks remain unstudied.
- One-dimensional truth projection limits: Systematic false-positive errors on explicitly negated true statements indicate that single-vector projections conflate syntactic polarity with factual falsity, pointing toward multi-dimensional truth subspaces.
Related Work & Insights¶
- vs Marks & Tegmark (COLM 2024): Validates their geometric truth hypothesis and difference-of-means formulation within the medical domain, showing that linear separability holds across clinical subfields and linguistic registers.
- vs Levinstein & Herrmann (2024) / Haller et al. (2025): Reconciles their surface-brittleness critique by demonstrating that stylistic paraphrasing does not dismantle the truth direction, whereas corpus-level distractor shifts do.
- vs Orgad et al. (ICLR 2025): Sharpens their task-family transfer boundary by showing that even within the exact same task family (medical multiple-choice QA), inter-dataset item construction artifacts cause severe transfer breakdown.
Rating¶
- Novelty: โญโญโญโญโญ Decouples register, specialty, and corpus shifts to resolve a fundamental interpretability debate.
- Experimental Thoroughness: โญโญโญโญโญ Evaluates 4 open LLMs, 4,000 controlled rewrites, 3 corpora, real patient text, and multi-judge cross-family validation.
- Writing Quality: โญโญโญโญโญ Highly coherent, rigorous statistical framing with complete confidence intervals and transparent negative results.
- Value: โญโญโญโญโญ Establishes definitive safety guidelines against zero-shot cross-corpus linear probe deployment in clinical settings.