TL;DR
A machine learning model can be 100% free of future-data leakage and still cheat—by noticing that a patient's doctors already suspect cancer and have started ordering tests. This paper audits EHRSHOT, a popular electronic health record (EHR) benchmark, and shows that when you push the prediction window earlier to simulate genuine early detection, pancreatic cancer prediction performance drops sharply across linear models, LSTMs, and pretrained foundation models alike.
What Problem Does This Paper Address?
If you want an AI model to catch pancreatic cancer early enough to save a life, it has to flag high-risk patients before clinicians already suspect something is wrong. In retrospective EHR benchmarks, however, it is surprisingly easy to build a model that is "temporally valid"—meaning it never peeks at events after the prediction timestamp—yet still relies on diagnostic-process leakage.
In EHRSHOT's canonical pancreatic-cancer task (predicting a new diagnosis within 12 months of hospital discharge), 75% of positive cases are diagnosed within 6 months, with a median gap of just 2.4 months. When the authors inspected the top-weighted features of a simple logistic regression model on this task, they found codes for pancreatic CT scans, endoscopic ultrasounds, CA 19–9 blood tests, and even pancreatic or gallbladder resections. The model wasn't predicting unsuspected early disease; it was recognizing an active diagnostic work-up already underway.
Methods
To separate genuine early risk signals from late-stage diagnostic clues, the authors designed a temporal-estimand audit with three key ingredients:
- Risk-set landmarking & monotonic lead sweeps: Instead of anchoring control patients at their final recorded visit (which creates artificial recency biases), they assigned controls "pseudo-index" dates matched to actual case diagnosis dates. They then shifted a fixed 24-month observation window backward across four lead times—3, 6, 9, and 12 months before the index date—while holding patient identities and train/validation/test splits fixed. Any drop in performance is therefore due to information visibility, not changing cohort composition.
- Complementary model probes: They compared sparse $L_2$-penalised logistic regression (LR), a newly trained value-aware LSTM (with order-permuted and no-time ablations), and CLMBR-T-base (both frozen and conservatively fine-tuned).
- Known-oracle synthetic teachers: To test whether the LSTM failed to use event order because there was no signal or simply too few labels, they built synthetic "count" and "order-only" worlds with known oracle AUROCs (0.60 to 0.90) and measured how many positive cases the LSTM needed to recover the rule.
Datasets
All experiments use EHRSHOT, a public few-shot benchmark containing longitudinal records for 6,739 Stanford Medicine patients (~41.7 million irregularly timed events in MEDS format). The audit focuses on pancreatic cancer alongside five comparator cancers: breast, haematological, lung/respiratory, prostate, and non-melanoma skin cancer. The pretrained probe, CLMBR-T-base, is a 141M-parameter transformer pretrained on 2.57 million Stanford Medicine patient records.
Key Insights and Ideas
- Timestamp validity $\neq$ early detection: Even without future-data leakage, models trained close to diagnosis heavily exploit clinical suspicion and work-up codes. At a 3-month lead, diagnostic procedures like surgical pathology and abdominal CT are far more prevalent in cases than controls; by 12 months, those gaps roughly halve.
- Pretraining helps, but doesn't cure lead dependence: Frozen and fine-tuned CLMBR representations outperformed LR and LSTMs at every lead time, showing that large-scale pretraining extracts stronger signals from limited labels. However, CLMBR's performance still decayed substantially as the window moved earlier.
- Simple counts beat deep sequence models at small sample sizes: At a 6-month lead, sparse logistic regression beat the median ordered LSTM across all six cancers. Order-permutation ablations barely changed LSTM performance.
- The LSTM isn't broken—it's label-starved: In the synthetic order-only world, the ordered LSTM successfully learned pure temporal motifs while count LR stayed at chance. However, recovering 80% of oracle performance required ~232 positive cases at oracle AUROC 0.90, and 1,088 cases at 0.70—far more than the 66–157 training cases available in the real 6-month cohorts.
Key Results
- Pancreatic AUPRC attenuation (3-month $\rightarrow$ 12-month lead, ~0.043 prevalence):
- Matched-window LR: $0.145 \rightarrow 0.068$
- Value-aware LSTM: $0.153 \rightarrow 0.092$
- Frozen CLMBR: $0.249 \rightarrow 0.100$
- Fine-tuned CLMBR: $0.266 \rightarrow 0.103$
- 6-month architecture comparison (full eligible cohort): LR achieved 0.186 AUPRC on pancreas versus 0.074 for the median LSTM, and outperformed LSTM on breast (0.144 vs. 0.088), haematological (0.143 vs. 0.113), lung (0.096 vs. 0.074), prostate (0.201 vs. 0.166), and skin cancer (0.244 vs. 0.125).
Limitations and Future Work
The authors note several limitations: EHRSHOT is a single-site cohort (and shares its Stanford Medicine origin with CLMBR's pretraining data), first recorded diagnosis is an imperfect proxy for biological onset, and landmarking does not eliminate baseline differences in healthcare utilisation between cases and controls. Sequence truncation also differs across models (2,048 events for the LSTM vs. 496 tokens for CLMBR). Most importantly, EHRSHOT's case-enriched prevalence means AUPRC values cannot be directly translated to population-level screening. Future benchmarks should release explicit temporal estimands—index-date rules, visibility windows, and executable cohort code—alongside model weights.
Summary updated