Afrah Nazar / Research / Linear probes
2nd Place (Software) · Hitachi Science & Engineering Fair · March 2026Blackbox to Glassbox: Interpretable Clinical Trial Matching
I trained probes to check an AI model’s clinical trial decisions.
- 89.9%probe accuracy, mean of 5 trials
- 96.8%GPT-4o, direct
- 84.0%Claude Haiku, direct
- 70.4%GPT-4o-mini, direct
The problem
Clinical-trial matching pairs patients with eligibility criteria. Trials that cannot recruit are delayed or abandoned, and language models can screen candidates quickly, but they are unreliable and opaque, and a screening decision no one can check is hard to use in a clinical setting.
Approach
I reframed matching as a verification problem: given a trial’s criteria, a patient’s record, and a proposed assessment, is that assessment consistent with the evidence? Each patient appears twice in the data, once paired with the correct assessment and once with the incorrect one, so a probe has to read the reasoning rather than memorize the patient. The dataset covers five trials from ClinicalTrials.gov (iron deficiency, osteoporosis, kidney disease, coagulation, and lupus), with 50 training and 100 held-out test rows per trial.
I ran each example through Qwen3-8B, extracted the residual-stream activation at every one of its 36 layers, and trained a lightweight linear probe per layer, keeping the best layer for each trial. The model itself was never fine-tuned.
Results
The best probes verified decisions at a mean of 89.9% across the five trials on unseen patients (iron 95.5%, coagulation 93.0%, lupus 88.0%, osteoporosis 87.0%, kidney 86.0%), and they consistently came from layers 21–24, in the upper middle of the network. For comparison, direct classification by frontier models scored 70.4% (GPT-4o-mini), 84.0% (Claude Haiku), and 96.8% (GPT-4o). A small open model with a probe did better than two of the three larger models.
Two failure tests, kept separate
I ran two more tests to see where the probes fail. First, a probe trained on one trial and transferred to a different, unseen trial fell to 55%. Second, a single probe trained on 500 pooled trials from the TREC 2021 benchmark fell to 50%, which is chance. Accuracy degraded step by step with diversity: three trials combined gave 87.5%, five gave 72.0%. I think the probes learned each trial’s rules, not eligibility in general, so each trial needs its own probe.
Limitations
Where it led
Falling to chance on an unseen trial suggested the probes had learned a shortcut. Asking why the model decides what it decides became the six-head decision circuit, first shown at the same fair, and then my Regeneron STS report.
