Afrah Nazar / Research / Decision circuit
Individual report · submitted to the 2027 Regeneron STSFrom Criterion to Verdict: How a Language Model Decides Eligibility for Clinical Trials
My Regeneron report: how a language model decides who is eligible for a clinical trial.
- 1,152attention heads searched
- 6heads in the 2026 fair circuit
- 68.9%report: probe macro-F1, vs 51–54% prompting
- 37.6%report: answers changed without the cited evidence, vs 10.5%
The problem
A language model can be handed a trial’s eligibility criteria and a patient’s record and asked for a verdict, and it will give one. In medicine an unexplained verdict cannot be trusted, and the explanation a model writes for itself is not guaranteed to be faithful to how it actually reached the answer. My question: which parts of the model make the decision, and what does each part do?
At the 2026 fair: a six-head circuit
I searched all 1,152 attention heads of Qwen3-8B (36 layers × 32 heads), the open-source model used across my clinical-trial work. Each head was scored on how selectively it attended to the tokens that should matter, in three separate scans: one with the eligibility criterion as the signal, one with the patient’s medications, and one looking only at what feeds the model’s final answer. The highest-scoring heads from each scan were then validated by hand on five patient records.
Six heads account for the decision. One, early in the network, reads the eligibility rule. Three retrieve the patient’s medications. One cross-checks the two, and one delivers the verdict. Ablating even one of the six sharply degrades accuracy across 100 test patients.
- Criterion reader: layer 6, head 12
- Fact retrieval: layer 19 heads 21 and 31; layer 20 head 8
- Cross-reference: layer 22, head 5
- Decision integrator: layer 24, head 16
The STS report: what does the model rely on?
For the report I rebuilt the test on clinician-labeled data: 1,015 eligibility criteria for 53 synthetic patients, released with TrialGPT, each labeled met, not met, insufficient information, or not applicable. A linear probe on Qwen3-8B’s internal states reached 68.9% macro-F1, against 50.9–53.7% for three prompting baselines on the same model. On a 27B model the gap held: 75.9% against 63.6%.
A second probe, trained to rank whole trials on 28,119 judged patient–trial pairs from TREC 2021 and 2022, did not beat prompting: NDCG@10 of 0.720 against 0.737.
Then three tests of what drives the probe’s answers. Removing the sentences clinicians had cited as evidence changed 37.6% of its answers, against 10.5% when the same number of uncited sentences was removed. Probe scores rose through the network, from 47.6% macro-F1 at layer 16 to 69.6% at layer 32. And an exploratory screen of all 1,152 heads selected two, layer 15 head 9 and layer 32 head 5; replacing both with their average activation changed 30.7% of answers, against 9.1% for control heads.
Limitations
What’s next
The report was submitted to the 2027 Regeneron Science Talent Search in November 2026. Since March 2026 I have also had a mentor in computer science, found by cold-messaging more than eight researchers across the country, who works with me on reading and writing papers. More on how that happened.
