NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Is It Memory or Transport? Separating Contamination from Site Shift in LLM Clinical Prediction

When a large language model (LLM) does well on a prediction task built from a famous public hospital database and then does worse at another hospital, two different stories fit the same numbers. The first is the familiar clinical one: hospitals differ in patients, equipment and coding habits, so the model fails to transport. The second comes from LLM evaluation. The famous database, or text derived from it, may have leaked into the model's web-scale training data, so the "internal" score was partly recall and the drop is the memory running out. Clinical machine learning reads every cross-site drop as the first story. LLM evaluation reads every post-cutoff drop as the second. This proposal builds a measurement design that assigns each part of the drop to its cause.

The idea in two sentences: run the LLM and a small model trained from scratch on each hospital through the same harmonized multi-hospital ICU pipeline, and treat the scratch model's performance as the yardstick for how hard each hospital's task is, since it cannot have memorized anything. Any extra advantage the LLM shows on the heavily published database, beyond what that yardstick predicts and beyond what per-patient memorization probes can explain, is an estimate of contamination inflation. We validate the estimator by deliberately contaminating an open model with a known dose and checking that it recovers that dose.

Core Claim

External cohort validation means testing a locked model on data from institutions it was never built on. Its whole logic is a comparison between a derivation site and a validation site. Benchmark contamination means test material appearing in pre-training data. Its best detection logic is also a comparison: the cutoff natural experiment in To the Cutoff... and Beyond?, which models pass rates against problem release dates, found that web popularity raised GPT-4's odds of passing only for pre-cutoff problems. We claim the two comparisons can be combined into one difference-in-differences design, a standard causal tool that compares how a gap changes between a "treated" and a "control" condition. Here the treated condition is how publicly exposed a hospital's data is, and the control is a model with zero pre-training exposure. The output is an exposure-adjusted transport gap: the part of an LLM's cross-hospital drop that remains after removing contamination inflation. The central falsifiable prediction is this. If LLM results on public ICU data are inflated, the LLM's advantage over the scratch-trained yardstick should be larger on the more-published database. It should also be concentrated in individual patient stays that memorization probes flag. Neither pattern should appear in an open model whose training data provably excludes those stays.

Positioning Against Prior Work

The closest work only half-occupies this ground. LiveClin avoids leakage by sourcing case reports published after model cutoffs and reports a recency gap of nearly 10 percentage points for GPT-5. That shows contamination matters in medicine. But LiveClin uses published case reports, which skew toward rare presentations, and it involves no hospital cohorts or site transport. Its costly regeneration (over $42,000 and 1,700 physician hours per iteration) also prevents an existing public cohort from being audited after the fact. The meta-audit in Beyond the Leaderboard finds that 92% of 53 medical LLM benchmarks report no contamination check. That motivates the work, but MedCheck is a checklist, not an experiment, and it does not separate leakage from site shift.

On the transport side, Yet Another ICU Benchmark (YAIB) harmonizes MIMIC-III, MIMIC-IV, eICU, HiRID and AUMCdb. It shows that preprocessing choices move results more than architecture. It supplies our pipeline and our yardstick models, but it evaluates no LLMs and treats all cross-site drops as transport. The OHDSI stroke study and the Epic Sepsis collapse documented in All models are local constrain the design. They show that transport failure alone can be severe (AUC 0.50 on a German outpatient database lacking inpatient variables). Our estimator must therefore never attribute a drop to contamination when a missing-variable explanation is available.

On the contamination side, Generalization or Memorization introduces CDD, which flags contamination when many sampled outputs are nearly identical. We reuse it as a per-stay exposure probe. DCR calibrates contamination by controlled injection into open models, and we borrow that injection protocol for validation. RADAR reads internal activations. We treat it as an optional secondary probe because its classifier was trained on 30 examples and reaches 76.7% on ambiguous cases. That is too fragile to anchor a clinical claim.

Research Program

The substrate is YAIB's harmonized cohorts and tasks, principally in-hospital mortality, with acute kidney injury as a second task. Each ICU stay's early-window vitals and labs are serialized into text in a fixed, documented template. LLMs predict the outcome zero-shot and few-shot as a probability, using verbalized confidence or label-token likelihood for open models. We give the main analysis to open-weight models run locally. Credentialed clinical data use agreements commonly restrict sending records to external services. Any commercial-model arm will run only through a route compliant with those agreements, or it will be dropped.

The design has three measured quantities. The first is the per-site difficulty anchor. A gradient-boosted model and YAIB's recurrent baseline are trained and evaluated within each site, giving an internal discrimination ceiling. A model trained only on MIMIC and tested elsewhere gives the classical transport curve. The second is exposure, measured at two levels. Site-level exposure is the public footprint of each database, operationalized as counts of public repositories and papers that reproduce cohort code or derived examples, in the spirit of the GitHub Presence Metric. Stay-level exposure is a CDD-style probe. We give the model the first part of a serialized stay and sample continuations. Abnormally peaked continuations that reproduce the actual subsequent values flag possible memorization of that specific patient. The third is the estimator. With $A^{LLM}_s$ and $A^{ref}_s$ the LLM's and the within-site yardstick's AUROC at site $s$, the contamination excess between the most-published site $p$ and a less-published site $q$ is

$$\Delta = \big(A^{LLM}_p - A^{ref}_p\big) - \big(A^{LLM}_q - A^{ref}_q\big),$$

and at the stay level we fit a logistic model of LLM correctness on yardstick difficulty, site, stay-level exposure, and their interaction. The interaction coefficient is the clinical analogue of the cutoff study's popularity-by-cutoff effect. The key identifying assumption is that, absent contamination, the LLM's gap to the yardstick would be similar across sites. That is the difference-in-differences "parallel trends" assumption, and we test it directly rather than assume it.

The test is a controlled injection. We take an open model and continue pre-training two copies. One copy sees a known random subset of serialized MIMIC stays mixed into generic text at several doses; the other sees the same volume of generic text only. Because we know exactly which stays were injected, the estimator must recover a near-zero $\Delta$ for the clean copy, a $\Delta$ that grows with dose for the injected copy, and a stay-level interaction concentrated on injected stays. Only once it passes this calibration do we apply it to off-the-shelf models.

Baselines

The naive reference point is what the clinical literature does now. It reports the LLM's AUROC per site and reads the MIMIC-to-external drop as pure transport, attributing zero to contamination. Beating it means showing that a statistically reliable fraction of that drop is assigned to exposure and that the fraction is validated by injection. For anchoring, YAIB reports mortality AUROC of 0.84 to 0.87 across datasets for its trained baselines. Our reproduction of the yardstick must land in that range before it can serve as a difficulty anchor. The OHDSI study reports internal AUC 0.75 against a mean external AUC of 0.71, a typical scale of pure transport loss against which LLM drops can be read.

The strongest existing contamination method is CDD from Generalization or Memorization. It reports 21.8% to 30.2% relative improvement over n-gram and LLM baselines in detection accuracy and AUC, and up to 66.9% reduction in inflation via TED. We run CDD unchanged, with the same sampling budget, on the same serialized stays, and use its flags to filter items, as TED does. On injected models it is beaten if our estimator recovers the known inflation in AUROC points with lower error than CDD-filtered accuracy does. The second strongest competitor is DCR-style adjustment, $Acc \times (1 - \text{DCR Factor})$, which reports adjusted accuracies within 4% of uncontaminated baselines on SST-2, LIAR2 and GSM8K. We implement its multi-level scores where computable for our items and compare adjusted AUROC to the clean-copy truth.

The key ablation removes the external-cohort leg. We compute exposure-adjusted performance from stay-level probes alone, without the cross-site yardstick contrast. If this ablation matches the full estimator on injection recovery, the multi-hospital design adds nothing and we will say so. A second ablation replaces the within-site yardstick with the MIMIC-trained transport model, to test whether the anchor choice matters. All arms use identical cohorts, preprocessing, serialization templates and sampling budgets, and hyperparameters are tuned only on the clean copy.

Why not just…?

Why not just run CDD on the clinical items and skip the multi-hospital machinery? CDD answers whether the model has seen something. It does not answer how much accuracy that exposure bought, and the latter is the quantity a clinician needs. CDD was also built for generative outputs like code, where edit distance between samples is meaningful. A risk prediction is a short label, so we can only apply CDD to an auxiliary continuation task, and peaked continuations need not translate into better labels. This is a real threat, and the probe-only ablation tests it directly on injected models. If probes alone recover the dose, the cross-site leg is unnecessary.

Why not just evaluate on private external hospitals, which cannot be contaminated? For a deployment decision at one hospital, this is the right answer, and All models are local argues for exactly that kind of local validation. But it gives one clean number that still mixes capability with that hospital's transport difficulty. It also says nothing about how inflated the many published LLM results on public ICU databases are. Our claim targets the audit question, not the deployment question, and we will state that boundary plainly.

Why not just use a post-cutoff temporal split? Public ICU databases are released in versions that cover historical admissions, so newer patients are not reliably available after a model's cutoff. Cutoffs of closed models are themselves estimates, as the cutoff study notes. A temporal split also folds clinical drift into the contrast, which is the confound we are trying to remove. Where a post-cutoff release does exist, we will use it as an additional natural experiment rather than a replacement.

Why not just compare the LLM's drop to a classical model's drop, as YAIB-style transport studies already do? That comparison is our reference arm, not the whole method. Without injection calibration and stay-level exposure, a larger LLM drop could equally mean that generic clinical knowledge transports worse than site-trained features. The parallel-trends test on the clean injected copy is what turns the comparison into an estimate.

Proposed Experiments and Decisive Checks

The first experiment is calibration. Inject serialized MIMIC-IV stays into an open model at three doses alongside a clean copy, then report $\Delta$ and stay-level interaction estimates against the known truth, for the full estimator, the probe-only ablation, CDD with TED filtering, and DCR adjustment. The decisive check is that the clean copy yields a $\Delta$ whose confidence interval covers zero, while injected copies yield a monotone dose response. If the clean copy shows a large $\Delta$, the parallel-trends assumption fails, and the method is not usable as designed.

The second experiment applies the calibrated estimator to off-the-shelf open models of several sizes and training dates across all five YAIB databases for mortality and kidney injury. We report per-site AUROC, the exposure-adjusted transport gap, and the share of the MIMIC-to-external drop attributed to exposure. Sites where variables are missing, the failure mode that produced AUC 0.50 in OHDSI, are flagged and excluded from attribution.

The third experiment is a stay-level negative control. We perturb flagged stays by small value jitter and time shifts that leave clinical meaning intact. Accuracy that rests on recall should fall on these perturbed stays, while accuracy that rests on reasoning should be unaffected; unflagged stays should be insensitive.

The project succeeds if injection recovery beats CDD and DCR, and the probe-only ablation is clearly worse. It is informative even if off-the-shelf models show near-zero contamination excess. That outcome would license the clinical community's transport reading of LLM results on these databases, a reading that is currently assumed rather than checked.