Language models now extract diagnoses, medications and billing codes from hospital notes with impressive reported accuracy. Almost all of those numbers come from MIMIC, a de-identified intensive-care database that has circulated among researchers for years and may well sit inside model training data. A model that has seen a discharge summary before can "extract" a code it remembers rather than one it reads. A second, separate failure pulls the other way. Models also prefer information at certain positions in a long input, such as the start or the end of a note, regardless of what the text says. Today both effects are mixed together in a single F1 score, so nobody knows how much of a clinical extraction result reflects reading the note.
This proposal builds a measurement protocol that separates the two. It applies three edits to the same note. The first rearranges whole note sections, which changes where facts appear but not what they mean. The second paraphrases the text while keeping the facts and the clinical shorthand, which breaks verbatim memory. The third deletes the sentence that supports an answer, which tests whether the answer survives without its evidence. Comparing how each edit hurts accuracy on public MIMIC notes against matched control notes the model cannot have memorized yields two separate estimates: how much accuracy comes from memorization, and how much changes with position alone.
Core Claim
Clinical notes are unusually well suited to this kind of controlled editing. Discharge summaries are built from labeled sections such as history, hospital course, medications and diagnoses. A corpus such as MedSecId, which annotates section boundaries in clinical notes, makes those sections easy to locate. Rearranging sections keeps the content intact but changes positions and breaks the exact token sequence a memorizing model would have stored.
The central claim is that a difference-in-differences comparison isolates memorization-driven accuracy from position-driven accuracy on clinical extraction benchmarks. It compares the drop caused by rearrangement on public notes with the drop caused by the same rearrangement on paraphrased or private controls. We expect this split to show that part of the reported MIMIC performance is inflated, and that a different part is lost to position effects that existing pipelines never measure.
The estimate is
$$\Delta_{\text{mem}} = \big[A_{\text{pub}}(\text{orig}) - A_{\text{pub}}(\text{perm})\big] - \big[A_{\text{ctl}}(\text{orig}) - A_{\text{ctl}}(\text{perm})\big],$$
where $A$ is extraction accuracy, "pub" is the original MIMIC note, "ctl" is a control version of the same content, "orig" keeps the published section order and "perm" rearranges it. The second bracket alone measures the pure position effect, $\Delta_{\text{pos}}$, because the control cannot have been memorized. The estimate relies on one assumption: rearrangement costs a model as much on control text as it would on unmemorized public text. We test that assumption directly, as described below.
Where the idea comes from, and what it borrows
Two papers supply the method. ABCD: All Biases Come Disguised showed that models have lower perplexity on MMLU-Pro questions in their published option order than in shuffled orders, and took this as evidence that the benchmark had leaked into training. The same paper reports that residual position bias survives even after option labels are removed. We carry its order-relative perplexity test from four-option questions over to multi-section clinical documents. The difference is that ABCD measures familiarity, whereas we tie familiarity to the downstream extraction score. DyVal generates reasoning tasks fresh from graphs to avoid contamination, and shows that reversing presentation order costs GPT-4 13.6% accuracy on reachability. DyVal works only in formal domains. Our paraphrased controls are a weak clinical analogue of its fresh generation, and they keep real shorthand instead of inventing text from rules.
The motivating gap comes from extraction work that never controls for either effect. Self-Verification runs extraction, omission recovery, quote grounding and pruning, and reports MIMIC-IV ICD-10 F1 rising from 0.487 to 0.533. Its repeated long-context passes are exactly where position effects should grow, but it does not audit for memorization or position. EHR-ReasonCon checks consistency between MIMIC-III notes and 14 relational tables. It reports F1 in the 50s and uses an LLM judge that agrees with physicians more than 95% of the time under its lenient rubric, but it does not ask whether those scores are inflated by contamination.
mCodeGPT constrains the design. It avoided contamination by generating synthetic cancer notes, but its accuracy fell 11–20% on abbreviated text. Fully synthetic notes are therefore a poor control, because they remove the shorthand that makes real notes hard. This is why our paraphrase control must keep abbreviations, and why a private-site control is still needed.
The maternal-to-zygotic transition is the period after fertilization when the embryo still runs on molecules supplied by the mother before its own genes switch on. It supplies one modeling idea, which we treat as an analogy and nothing more. Zhang et al. found that ongoing translation alone predicts mouse embryo protein levels poorly (median R = 0.23). Adding the inherited maternal protein stockpile, which persists after its messenger RNA is gone, raised the correlation to a median R of 0.62. The analogue in extraction is an answer that persists after its evidence has been removed from the note. We therefore score each prediction as the sum of two parts: an inherited prior, measured as accuracy when the evidence span is deleted, and a dependence on the evidence actually present. The analogy earns its place only if the two-term split predicts held-out accuracy better than intact-note accuracy alone. If it does not, we drop it.
Research Program
The work builds a perturbation suite over three task families. The first is ICD-10 coding on MIMIC-IV discharge summaries, using the Self-Verification setup. The second is note-to-table consistency on EHR-ReasonCon. The third is mCODE extraction on the mCodeGPT synthetic notes, which serve as a third reference point because their contamination status differs between model families.
For every note we produce five versions. The first keeps the original section order. The second rearranges the sections. The third moves the section containing the evidence to the beginning, middle or end, which traces a position curve. The fourth paraphrases the note while preserving facts and shorthand; a clinician audits a sample to confirm that labels are unchanged. The fifth deletes only the evidence span.
The paraphrase is the within-site control, because it keeps hospital, writing style and label distribution fixed. A smaller private set of discharge summaries from a partner hospital, which has never been public, is the cross-site control. This set depends on securing a data agreement, and the paraphrase arm does not.
Beyond the perturbation suite, the work computes order-relative perplexity in the style of ABCD for each note. This tests whether models find the published section order more familiar than rearranged orders, and whether that familiarity predicts each note's contribution to $\Delta_{\text{mem}}$.
Baselines
The naive reference point is the reported single-pass score on the original notes, with no perturbation. It is the number the field currently publishes. Every other result is read as a correction to it.
The strongest existing extraction method is the four-stage Self-Verification pipeline from Gero et al., which reports ICD-10 F1 of 0.533 on MIMIC-IV and 0.530 on EBM-NLP trial-arm extraction with GPT-4. It is the strongest competitor because evidence grounding should in principle protect against both failures: a model that must quote its source should neither recite memorized answers nor ignore the middle of a note. We run it with the same backbone models, the same notes and the same prompt budget as single-pass extraction, across all five versions of each note.
Beating it does not mean a higher F1. It means showing that its gain over single-pass extraction is either smaller on paraphrased controls than on original notes, or does not hold when evidence sits in the middle of the note. Either result would show that grounding does not remove the confound. For EHR-ReasonCon the reference is its reported F1 in the 50s with the Gemini 2.5 Pro judge. For CASI, no reported result was found on Lacuna.
The strongest existing contamination detector is ABCD's order-relative perplexity, applied to whole notes. The comparison is fair because it uses the same open-weight models and the same rearrangements. Our protocol beats it if difference-in-differences tracks known planted contamination more closely than perplexity does. Perplexity on clinical text can also be low because a model is fluent in the medical domain, without having memorized any particular note.
The strongest existing position mitigation is circular or permutation-averaged evaluation, as used by CMMU and MathBench. In our setting this means averaging extraction over $K$ section orders, matched in total tokens against Self-Verification.
The key ablation removes the paraphrase control and computes the estimate against the private site only. This shows whether the within-site control matters or whether a cross-site comparison would suffice.
Why not just…?
Why not just evaluate on private or post-cutoff notes and skip the perturbations? This is the most serious alternative, and it is part of the design. On its own, though, a lower score at another hospital mixes contamination with genuine distribution shift: different templates, abbreviations and coding habits. mCodeGPT's 11–20% abbreviation drop shows how large style effects can be. The paraphrase arm keeps the site fixed and changes only surface form, and difference-in-differences removes the position effect that both settings share. If paraphrase and private-site estimates of $\Delta_{\text{mem}}$ agree, we will report that the cheaper paraphrase control is enough.
Why not just run a perplexity or membership test? ABCD shows that order-relative perplexity can detect leakage. It is still a statement about familiarity, not about how much a score is inflated, and closed models such as GPT-4 or Gemini do not expose it. Our protocol needs only outputs, and the planted-contamination experiment tests directly which signal tracks contamination better.
Why not just average over shuffled section orders and call position bias solved? Averaging lowers variance, but it multiplies cost by the number of orders. It also hides the fact that a memorized order may score higher than every rearranged one, so the average blends contamination into what looks like robustness. DyVal's 13.6% reversal drop shows that order changes reasoning outcomes rather than adding harmless noise. We include averaging as a baseline, and our position curves will show whether a single evidence-first ordering recovers most of its benefit at a fraction of the cost.
Proposed Experiments
The decisive check is a positive control with planted contamination. We continue pretraining an open 7–8B model on a known random subset of MIMIC-IV discharge summaries, varying how many times each note is repeated, while held-out notes stay unseen. The protocol passes if $\Delta_{\text{mem}}$ is near zero on held-out notes and rises steadily with exposure on planted ones. It must also hold that $\Delta_{\text{pos}}$ stays flat across exposure levels, since position bias should not depend on memorization. The evidence-deletion persistence rate should rise with exposure as well.
This experiment also tests the parallel-trends assumption behind the estimate. On held-out notes, the rearrangement cost on originals should equal the rearrangement cost on paraphrases.
We then apply the validated protocol to the same open model before any added training, to other open-weight models, and to GPT-4-class and Gemini models through their APIs. For each, we report single-pass and Self-Verification F1 on ICD-10, EHR-ReasonCon consistency F1 and mCODE accuracy, each split into $\Delta_{\text{mem}}$, $\Delta_{\text{pos}}$, a beginning/middle/end position curve and the evidence-deletion persistence rate.
The two-term "stockpile" model is tested by fitting per-note accuracy as persistence plus evidence dependence on half the notes, then predicting the other half. It is compared against intact-note accuracy alone.
The proposal is wrong if $\Delta_{\text{mem}}$ is indistinguishable from zero for every frontier model on MIMIC. That would be a useful negative result, partly reassuring for published clinical extraction numbers. It is also wrong if rearrangement costs differ between originals and paraphrases on planted-held-out notes, because then the estimate cannot be trusted.
References
- A New Public Corpus for Clinical Section Identification: MedSecId
- ABCD: All Biases Come Disguised
- DyVal: Dynamic Evaluation of Large Language Models for Reasoning Tasks
- Self-verification improves few-shot clinical information extraction
- Towards Error-Free EHRs: Reasoning-Intensive Consistency Verification Between Clinical Notes and Structured Tables in Electronic Health Records
- mCodeGPT: Bridging the Gap between Unstructured Medical Text and Structured Cancer Ontologies
- Stable maternal proteins underlie distinct transcriptome, translatome, and proteome reprogramming during mouse oocyte-to-embryo transition