Similar patients make language models predict death less often, not better

Pengyu Zhan, Shansong Wang, Mojtaba Safari, Mingzhe Hu, Suyang Xi, Xiaofeng YangarXiv 2026

TL;DR

Showing a large language model (LLM) the medical notes of "similar" past patients seems like an intuitive way to help it predict cancer survival—just like a doctor recalling past cases. However, this controlled study reveals a surprising illusion: in-context patient examples actually hurt the model's ability to rank patients by mortality risk. Raw accuracy only goes up because the examples shift the model's baseline tendency away from over-predicting death—an adjustment you can beat simply by tuning a decision threshold on zero-shot predictions.

What Problem Does This Paper Address?

When oncology patients leave the hospital, doctors must gauge short-term survival to schedule follow-ups or initiate palliative care discussions. Crucial clues—like functional status and symptom burden—often live only in messy, free-text discharge summaries.

Recent research suggested that "dynamic few-shot prompting"—embedding a patient's note, retrieving the five most semantically similar patients from a database, and feeding their notes and outcomes into an LLM—substantially boosts prognostic predictions over zero-shot prompting (reading the target note alone).

The authors noticed a classic experimental trap: comparing zero-shot to dynamic few-shot changes three variables at once:

  1. The prompt's wording.
  2. The mere presence of labeled examples (which alters prompt length and label priors).
  3. The actual similarity of those examples to the target patient.

Without isolating these variables, it is impossible to tell if the LLM is genuinely learning clinical nuances from similar peers or just reacting to prompt mechanics.

Methods

The authors conducted a pre-specified, controlled conceptual replication predicting 90-day post-discharge mortality using open-weight LLMs (Qwen3-8B and quantized Qwen3-32B). Retaining the original method's embedding retriever (jina-embeddings-v2) and scoring logic, they introduced rigorous controls:

  • Wording-matched zero-shot (A2): Matched the exact phrasing of the few-shot prompt, removing only the examples.
  • Random examples (A3): Replaced the 5 nearest neighbors with 5 randomly chosen patients.
  • Shuffled labels (A5): Kept the 5 similar patients, but randomly scrambled their survival outcomes among them.
Overview of the study design, prompt structure, and mean test AUROC across prompting arms

To see how much signal existed in the text independently of prompting, they compared the LLM against standard supervised classifiers (TF-IDF and embedding-based logistic regressions) and trained a linear probe—a logistic regression reading the LLM's final-layer hidden state directly during zero-shot reading. They also evaluated both threshold-free risk ranking (AUROC, the probability that a patient who died gets a higher risk score than a survivor) and fixed-cutoff accuracy (at a 0.5 score threshold).

Datasets

The study evaluated MIMIC-IV (v3.1) and MIMIC-IV-Note (v2.2), comprising de-identified hospital admissions from a single academic medical center in Boston. They assembled 11 cancer cohorts totaling 14,164 records (13,351 unique adult patients) and 2,282 deaths (16.1% overall 90-day mortality, ranging from 6.5% in breast cancer to 27.4% in pancreatic cancer). Data were partitioned by patient into an example pool, a development set, and a blinded, held-out test set of 5,666 records.

Key Insights and Ideas

  • Similarity is a wash; examples actively hurt ranking: Selecting examples via the original retriever performed equivalently to picking random patients. Worse, both few-shot methods degraded risk ranking compared to just reading the patient's discharge summary alone.
  • The accuracy paradox: Why did accuracy improve if risk ranking got worse? Without examples, the zero-shot prompt wildly over-predicted death (flagging 36%–69% of patients to die, against a true 16% rate). Because most retrieved examples survived, showing them anchored the model toward predicting survival. Fewer false alarms boosted accuracy at the 0.5 cutoff, masking the drop in underlying discrimination.
  • Distraction by weaker signals: Retrieval didn't fail—the neighbors' outcomes alone predicted mortality with a respectable 0.72 AUROC. However, the target patient's own discharge summary was a much stronger signal (0.86 AUROC). Regression analysis showed that adding examples caused the LLM to cut the weight given to its own reading nearly in half, leaning instead on the raw count of deaths displayed in the prompt. Substituting a strong signal with a weaker one (or random noise) pulls performance down.
  • The knowledge is already in the hidden state: Reading the model's internal zero-shot representation via a linear probe barely beat its zero-shot text answer, while probing few-shot states recovered the lost performance—suggesting examples skew how the model outputs its answer rather than erasing its comprehension of the note.

Key Results

Per-cancer and pooled differences in AUROC showing equivalence between similar and random examples, and a drop compared to zero-shot

Per-cancer and pooled differences in AUROC showing equivalence between similar and random examples, and a drop compared to zero-shot
  • Risk Ranking (AUROC): Across the 11 test cohorts, wording-matched zero-shot hit a mean AUROC of 0.858, matching supervised classifiers trained on hundreds of labeled notes. Adding similar examples dropped AUROC to 0.818 (pooled difference: −0.034), and random examples dropped it to 0.809. The difference between similar and random examples was +0.006 (95% CI: −0.006 to +0.018), falling squarely inside the ±0.03 equivalence margin.
  • Stronger Retrievers & Larger Models: Upgrading to a stronger retriever (Qwen3-Embedding-8B), summarizing notes first, or scaling up to Qwen3-32B (0.871 zero-shot AUROC) shrank the few-shot penalty, but in no configuration did examples beat reading the target note alone.
  • Accuracy vs. Thresholding: Mean accuracy at the 0.5 cutoff jumped from 46.9% (original zero-shot) and 75.1% (matched zero-shot) to 82.8% (similar examples) and 82.7% (random examples). Yet simply fitting one decision threshold per cancer to zero-shot scores pushed accuracy to 86.5%—beating even the naive "everyone survives" baseline (83.6%).

Limitations and Future Work

All data came from a single hospital using single discharge summaries truncated at 3,000 tokens; these summaries often state prognosis or hospice disposition outright, leaving less room for peer examples to help than longitudinal clinic notes over multi-year horizons might. Additionally, only the Qwen3 model family was tested, and prompt length (~16,000 tokens for 5-shot vs. ~2,700 for zero-shot) was not varied independently of adding outcome-bearing examples.

For future clinical LLM studies, the authors propose four essential methodological guardrails: always include a random-example control, a wording-matched zero-shot baseline, threshold-free ranking metrics alongside majority-class baselines, and a threshold-tuned zero-shot comparator.

Summary updated

BibTeX
@misc{zhan2026similar,
  author = {Pengyu Zhan and Shansong Wang and Mojtaba Safari and Mingzhe Hu and Suyang Xi and Xiaofeng Yang},
  title = {{Similar patients make language models predict death less often, not better}},
  year = {2026},
  eprint = {2611.38231},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.38231},
}
Figure