Paper: 2611.38231 — Similar patients make language models predict death less often, not better Authors: Pengyu Zhan, Shansong Wang, Mojtaba Safari, Mingzhe Hu, Suyang Xi, Xiaofeng Yang Categories: cs.AI Reading scope: Original arXiv HTML, main text, Methods, and Supplementary Notes 1–8 without text excerpting; Figure 1 visually inspected and reproduced below; Figures 2–4 were not visually inspected beyond their captions and underlying tables. This is a source-based reading, without independent peer review, a code/data audit, or experiment reproduction.
The Problem
Consider an illustrative clinical workflow grounded in the paper’s setting: an oncology team is discharging a patient with lung cancer and needs to decide how urgently to schedule follow-up or start supportive-care conversations. They hand the patient’s discharge summary to a language model and ask whether the patient is likely to survive beyond 90 days. Because free-text notes capture functional status and symptom burden that structured fields miss, prompting a general-purpose model looks attractive—and an intuitive upgrade, dynamic few-shot prompting, mirrors clinical reasoning by embedding past patients’ notes, retrieving the five most similar cases with their true outcomes, and placing them before the target note.
Prior work (Anil et al., 2026) reported gains from this strategy on private breast-cancer and glioma cohorts, including higher accuracy and, with a 70B Llama-3 model on glioma, an AUROC rise from 0.742 with full notes alone to 0.813 with five retrieved summaries. Yet comparing dynamic few-shot prompting directly against zero-shot prompting changes three things at once: the prompt wording (which differed between the original zero-shot and few-shot templates), the mere presence of labelled examples, and the clinical similarity of those examples to the target patient. Furthermore, threshold accuracy rises whenever a prompt nudges an over-cautious model to stop over-predicting the rare class—even if the model actually becomes worse at ranking who is sicker.
This paper runs a controlled conceptual replication across 11 public MIMIC-IV cancer cohorts (14,164 patient–cancer records; 2,282 deaths within 90 days, or 16.1%) to pull those three ingredients apart. By adding a random-example control, a wording-matched zero-shot baseline, and a shuffled-outcome control—and scoring risk ranking with threshold-free AUROC alongside default-threshold accuracy—the authors test whether “similar patients” actually sharpen clinical risk discrimination or merely shift how often the model predicts death.
The Explanation
Pull apart wording, examples, and similarity
The authors split each of 11 cancer cohorts from MIMIC-IV v3.1 and MIMIC-IV-Note v2.2 by patient into an example pool (4,816 records), a development set (3,682), and a held-out test set (5,666 records from 5,514 patients, 912 deaths, 16.1%), keeping test-set language-model metrics blinded until the analysis plan was frozen (Table 1, Methods, Figure 1). Every strategy runs paired on the same patients using Qwen3-8B (temperature 0, thinking disabled), scoring each patient by the renormalised next-token probability assigned to the death answer (NEGATIVE in the original template).

Figure 1. Panel (c) places every prompting strategy on the same mean test-set AUROC scale, isolating prompt wording (1), adding five examples (2), selecting nearest rather than random patients (3), and shuffling outcomes (4).
Keeping the original study’s retrieval encoder (jina-embeddings-v2-base-en) and sentence-for-sentence few-shot template, the primary pre-specified test asks whether the five most similar patients (A4) rank mortality risk better than five patients drawn at random (A3). They do not (Table 2). The inverse-variance pooled AUROC difference across the 11 cancers is +0.006 (95% CI -0.006 to 0.018; unweighted mean AUROC 0.818 vs. 0.809). That entire interval sits inside the pre-specified ±0.03 equivalence margin and includes zero. In the only cancer whose individual interval excluded zero—prostate cancer—similar examples actually scored worse (-0.036, -0.069 to -0.004).
Even more striking is what happens when either few-shot prompt is compared against reading the target patient’s discharge summary alone with matched wording (A2, mean AUROC 0.858):
Strategy on held-out test set (Qwen3-8B, full notes) | Mean AUROC | Pooled ΔAUROC vs. A2 (95% CI) | Default accuracy (%) | Predicted to die (%) |
|---|---|---|---|---|
Zero-shot, original wording (A1) | 0.828 | -0.025 (-0.033, -0.018) | 46.9 | 68.8 |
Zero-shot, matched wording (A2, ref.) | 0.858 | ref. | 75.1 | 35.7 |
Random 5 examples (A3) | 0.809 | -0.043 (-0.054, -0.032) | 82.7 | 18.4 |
Similar 5 examples, original retriever (A4) | 0.818 | -0.034 (-0.045, -0.024) | 82.8 | 18.1 |
Similar 5 examples, Qwen3-Embedding (R3) | 0.836 | -0.019 (-0.028, -0.009) | 83.5 | 18.0 |
Zero-shot (A2) + dev-fitted threshold | 0.858 | — | 86.5 | 8.9 |
Both few-shot strategies lowered risk discrimination relative to the note alone (-0.034 for similar and -0.043 for random; both Holm-adjusted p < 0.001). Random examples dropped AUROC in all 11 cancers; similar examples dropped it in 10 and tied (0.000) in colorectal cancer. Simply rewriting the zero-shot prompt from the original code’s wording (A1) to match the few-shot template (A2) already gained +0.025 AUROC (0.828 to 0.858, exploratory) without showing a single example. Permuting the outcomes among the five retrieved neighbours (A5, mean AUROC 0.825) did not measurably hurt discrimination (-0.006, -0.015 to 0.003, p = 0.50), though this check is diluted because for 48% of test records (2,738 of 5,666) all five neighbours shared the same outcome—almost always survival—so shuffling left the prompt unchanged.
Better retrievers, shorter summaries, and larger models shrink the loss—never reverse it
To check whether the loss came only from a weak encoder, noisy full notes, or an 8B model, the authors tested three upgrades (Table 3, Supplementary Notes 3–4):
- Stronger retriever (
R3,Qwen3-Embedding-8B): Retrieving neighbours with a stronger encoder improved on both the original retriever (+0.017) and random examples (+0.021,0.010to0.033, exploratory), showing that the equivalence of similar and random cases is specific to the original encoder. Even so,R3still trailed the matched zero-shot note alone (-0.019,-0.028to-0.009). - Short summaries (
S0,S3,S4): Replacing ~2,700-token notes (16,000-token five-shot prompts) with 250-word six-heading summaries written byQwen3-8B(~2,500-token five-shot prompts) lifted similar-example AUROC by+0.028(to0.847), yet still left it marginally below the target summary alone (0.854,-0.007,-0.014to0.000) and within the±0.03equivalence band of random summaries (0.839). - Larger model (AWQ-quantised
Qwen3-32B, 5,665 test records): Scaling up raised every arm, pushing matched zero-shot to0.871, yet five full-note examples still lowered AUROC (-0.022for similar at0.848,-0.013for random at0.855, both Holm-adjustedp ≤ 0.001). Excluding the176test patients (3.1%) discharged to hospice—where149died within 90 days—lowered all AUROCs slightly (A2to0.840) without changing a single conclusion (Supplementary Table 6).
Put on the same scale as supervised classifiers trained on 264 to 1,733 labelled library records per cancer (Table 2, Table 3), the zero-shot prompt (0.858) matched Qwen3-Embedding logistic regression (0.855) and beat TF-IDF logistic regression numerically (0.831, adjusted p = 0.059), while dynamic prompting (0.818) lost to both (p ≤ 0.013). A pooled linear probe trained on 8,126 zero-shot final-layer hidden states reached 0.868 (+0.011 above A2, p = 0.004).
The counterintuitive twist: why accuracy jumped while ranking fell
Here is the finding that resolves the paradox (Table 4, Supplementary Table 5). At the default 0.5 cut-off, accuracy rose sharply with examples—reproducing the headline benefit of dynamic prompting—from 46.9% (A1) and 75.1% (A2) up to 82.8% with similar examples and 82.7% with random examples, while Brier score fell from 0.227 to 0.144–0.145.
The reason had nothing to do with clinical similarity. Actual 90-day mortality across the cohorts averaged 16.1%, yet the original zero-shot prompt (A1) predicted death for 68.8% of patients and the matched zero-shot prompt (A2) still predicted death for 35.7%. Showing five labelled examples—mostly survivors, matching the cohort base rate—pulled the predicted death rate down to 18.1% (similar) and 18.4% (random), slashing false alarms and lifting accuracy even as patient ranking got worse.
Confirming this diagnosis, fitting one accuracy-maximising threshold per cancer to A2’s zero-shot scores on the development set raised held-out accuracy to 86.5%, beating similar examples in all 11 cancers (+2.4 percentage points, 1.6 to 3.1, p < 0.001). Crucially, the authors also warn that accuracy itself is a trap at a 16% event rate: blindly predicting survival for every patient yields 83.6% accuracy (beating similar examples in 8 of 11 cancers), and the extreme accuracy-maximising thresholds (0.998 or higher) predicted death for only 8.9% of patients, dragging balanced accuracy down from 0.748 (A2 at 0.5) to 0.648 (0.687 for A4).
Why examples hurt: anchoring to displayed death counts
Did retrieval simply pull irrelevant patients? No (Table 5). Compared with random draws, the five retrieved neighbours more often shared the target’s admission type (43% vs. 24%) and discharge location (39% vs. 27%), even though the encoder saw only raw text. A bare “neighbour vote”—the fraction of deaths among the five neighbours, with no LLM at all—reached an AUROC of 0.722 (0.752 with Qwen3-Embedding, vs. 0.515 random).
The trouble is that 0.722 is far weaker than the 0.858 signal the model already extracts from the target patient’s own discharge summary. When the authors regressed each few-shot log-odds score on the model’s zero-shot log-odds and the number of deaths displayed among the five examples (standardized, test set; Supplementary Table 11), the weight on the model’s own reading fell from 1 to 0.55 (0.53–0.56) under similar examples while the displayed death count took a weight of 0.43 (0.41–0.45). Crucially, even under random examples (A3)—where the displayed death count is independent of the target by construction—the death count still carried a positive weight of 0.17 (0.16–0.19), cleanly demonstrating that showing more deaths shifts the model toward predicting death regardless of the target patient. On the development set, random patients matched to the neighbours’ death count (R1) even beat similar examples in all 11 cancers (+0.019, 0.003 to 0.034).
Hidden states from the development set sharpen the picture (Supplementary Table 12). Without examples, the model’s zero-shot answer closely tracks a fixed linear readout (r = 0.988, mean AUROC 0.846, vs. 0.860 for a trained probe). With five similar examples, the model’s answer drops to 0.795, while a linear probe trained on those same few-shot hidden states still reaches 0.845—consistent with examples shifting the readout direction rather than erasing prognostic signal (though few-shot hidden states also encode the examples’ outcomes, so representation and readout are not fully decoupled).
Core Concepts
Discrimination versus decision tendency. Returning to the discharging lung-cancer patient: ranking sicker patients above healthier ones (AUROC) is a separate property from how often the model triggers a “high-risk” alarm at a fixed 0.5 cut-off. Because zero-shot prompts carry strong implicit priors (68.8% or 35.7% predicted death against 16.1% observed), any intervention that lowers death calls—including five random patients—inflates default accuracy while masking a drop in ranking quality.
Matched-component controls (wording, random, shuffled). Comparing dynamic few-shot prompting directly to a differently worded zero-shot prompt bundles three interventions into one score. Adding A2 (matched wording), A3 (random examples), and A5 (shuffled labels) showed that prompt wording alone explained +0.025 AUROC and nearly 28 percentage points of accuracy (46.9% to 75.1%), whereas adding examples lowered AUROC and similarity added nothing with the original retriever.
Signal displacement by label anchoring. When five retrieved cases precede a target note, the model blends its reading of the target note (β = 0.55) with the count of deaths shown (β = 0.43). When the target note itself is already rich (0.858) and the neighbour vote is weaker (0.722), blending pulls discrimination down—a mechanism reinforced by context stretching from ~2,700 tokens to ~16,000 tokens.
The Insight
In-context examples retrieved by similarity do not automatically teach a language model how to evaluate a hard case; they also inject a base-rate prior and compete with the target document for the model’s attention. Whenever a zero-shot prompt over-calls a rare outcome, few-shot examples can look like a major accuracy win simply by dragging predictions back toward the cohort’s majority class—even while degrading the model’s ability to rank who is actually at highest risk.
A Critical Reading
This is an unusually disciplined replication: paired testing across 11 cohorts (5,666 held-out records), Holm multiplicity adjustment, joint bootstrapping for multi-cohort patients, explicit hospice sensitivity analysis, and transparent disclosure of what was pre-specified versus exploratory (Methods). I have not independently audited the private code repository or underlying MIMIC-IV extracts.
Important boundaries limit how far the findings generalize (Discussion and Supplementary Note 8):
- Different clinical regime from the original study: MIMIC-IV is a single academic medical center in Boston, the input is one discharge summary (often stating prognosis or disposition directly), and the outcome is short-horizon 90-day mortality (
6.5%–27.4%), where48%of test targets had five retrieved neighbours sharing one outcome. By contrast, Anil et al. (2026) used longitudinal notes from the first 180 days after diagnosis, long horizons near median survival (14 months for glioma, 5 years for breast cancer), balanced outcomes (39%survival in glioma), clinician-reviewed GPT-4 Turbo summaries, and Llama-3 70B. The authors explicitly note their findings do not contradict that report and list four conditions where retrieved examples might still help. - Length versus anchoring remains partly coupled: Five full-note examples stretched prompts from ~2,700 to ~16,000 tokens, and shrinking inputs to summaries cut the AUROC loss from
-0.034to-0.007. Because the study did not run a zero-shot control padded with outcome-free text, long-context degradation and death-count anchoring remain co-existing explanations. - Procedural and modeling limits: The
±0.03equivalence margin was chosen after seeing development results for three cancers,R3was added after development results were seen, and the train/dev/test split was random rather than temporal (not external validation). All runs used one model family (Qwen3-8Band AWQ-quantisedQwen3-32B, confounding size with quantisation), temperature0with one random draw per patient, notes truncated to3,000tokens (37–66%affected), ~6% of 8B summaries truncated at420tokens, and no clinician review of cohorts, prompts, or summaries. Structured-variable models (age, stage, disposition) were not compared.
What You Can Use
If you evaluate retrieval-augmented or dynamic few-shot prompting for any imbalanced classification or risk-scoring task—clinical or otherwise—adopt the paper’s four diagnostic checks before crediting similarity:
- Include a random-example control with the exact same prompt template and example count.
- Match the zero-shot wording to the few-shot target prompt so template edits aren’t misattributed to examples.
- Always report threshold-free ranking metrics (AUROC, AUPRC) alongside accuracy, the positive-prediction rate, and the majority-class accuracy—never celebrate an accuracy jump that merely predicts the rare class less often.
- Benchmark against zero-shot plus a calibrated operating threshold (chosen for the actual decision cost, not raw accuracy, since accuracy-maximising cut-offs crushed balanced accuracy from
0.748to0.648).
In settings where the target document already carries strong direct evidence, a cleanly worded zero-shot prompt (using one-sixth the tokens of five-shot full notes) can be both cheaper and better at ranking than retrieving similar cases—provided you calibrate its operating point on local data instead of trusting raw 0.5 cut-offs. These are practical evaluation transfers from the paper’s evidence, not a validated clinical deployment protocol.
论文: 2611.38231 — Similar patients make language models predict death less often, not better 作者: Pengyu Zhan、Shansong Wang、Mojtaba Safari、Mingzhe Hu、Suyang Xi、Xiaofeng Yang 分类: cs.AI 阅读范围: 原始 arXiv HTML,正文、Methods及补充说明1—8,未截取文字;已查看原图1并原样附于下文;原图2—4未查看图像本体,仅据图注与对应数据表解读。 本文据原文解读,没有独立同行评审、代码与数据审计或实验复现。
问题
先按论文的临床场景设一个教学例子:肿瘤科团队准备让一位肺癌患者出院,需要决定多快安排复诊,以及是否尽早开启支持治疗沟通。 医生把出院小结交给语言模型,请它判断患者出院后90天内能否存活。 相比结构化字段,自由文本往往记着体能状态和症状负担,因此直接提示通用大模型很具吸引力。 更顺理成章的升级叫动态少样本提示(dynamic few-shot prompting):模仿医生参考既往相似病例的思路,先把病历转成向量,从历史库里挑出最像的5位患者,把他们的出院小结和真实结局垫在目标病历前面。
前作(Anil等,2026)在私有乳腺癌与胶质瘤队列上报告了这类收益,例如70B版Llama-3在胶质瘤上配5份检索摘要后,AUROC从纯全文零样本的0.742升到0.813,准确率也同步提高。 但把“动态少样本”直接拿去跟“零样本”比,其实同时改动了三件事:提示词措辞(原代码中零样本与少样本模板写法不同)、是否附带带标签范例,以及这些范例究竟跟当前患者像不像。 更隐蔽的是,只要模型在零样本下原本过度预警“死亡”,哪怕新提示词只是让它少报一点死亡、排序能力反而变差,固定阈值下的准确率照样会大涨。
这篇论文在公开数据库MIMIC-IV的11个癌症队列(14,164条患者—癌症记录,90天全因死亡2,282例,占比16.1%)上做了严格对照的概念复现。 作者补齐了三项对照——随机抽5份病历、把零样本措辞改成与少样本一致、打乱相似病历的结局标签——并同时看无阈值排序指标AUROC与默认阈值准确率,要查清“相似病历”究竟让模型更会分辨高危患者,还是仅仅让它少报了死亡。
翻译
把措辞、范例和相似度拆开算账
作者将MIMIC-IV v3.1与MIMIC-IV-Note v2.2里的11个癌症队列按患者分层划分为范例池(4,816条)、开发集(3,682条)和留出测试集(5,666条记录、5,514位患者、912例死亡、占比16.1%),并在分析计划冻结前对测试集模型指标全程设盲(表1、Methods、图1)。
所有策略都在同一批患者上配对运行,主模型为关闭思考模式的 Qwen3-8B(温度0),风险分取模型对代表死亡的答案词(沿用原模板的 NEGATIVE)给出的重归一化概率。

图1:图(c)把五种主提示策略与隐藏层探针排在同一条测试集平均AUROC数轴上,括号分别标出措辞改动(1)、加入5份范例(2)、选最相似而非随机患者(3)以及打乱范例结局(4)的影响。
沿用原研究的检索编码器(jina-embeddings-v2-base-en)与逐句一致的少样本模板,预先设定的核心检验只问一件事:挑最像的5位患者(A4),风险排序能不能胜过随机抽5位患者(A3)?
答案是不能(表2)。
跨11种癌症逆方差合并后,两者AUROC差值仅为 +0.006(95%置信区间 -0.006 到 0.018;平均AUROC为0.818对比0.809)。
整段区间完全落在预先设定的 ±0.03 等价边界内且跨零。
在唯一一个单癌种区间不跨零的前列腺癌里,相似病历反而更差(-0.036,-0.069 到 -0.004)。
更扎眼的结果出现在把两种少样本拿去跟“措辞对齐的纯目标病历零样本”(A2,平均AUROC 0.858)对比时:
留出测试集策略(Qwen3-8B,全文病历) | 平均AUROC | 相对 A2 合并差值(95% CI) | 默认阈值准确率(%) | 预测死亡比例(%) |
|---|---|---|---|---|
零样本,原版措辞(A1) | 0.828 | -0.025 (-0.033, -0.018) | 46.9 | 68.8 |
零样本,对齐措辞(A2,基准) | 0.858 | 基准 | 75.1 | 35.7 |
随机5份病历(A3) | 0.809 | -0.043 (-0.054, -0.032) | 82.7 | 18.4 |
相似5份病历,原检索器(A4) | 0.818 | -0.034 (-0.045, -0.024) | 82.8 | 18.1 |
相似5份病历,Qwen3-Embedding(R3) | 0.836 | -0.019 (-0.028, -0.009) | 83.5 | 18.0 |
零样本(A2)+ 开发集拟合阈值 | 0.858 | — | 86.5 | 8.9 |
无论相似还是随机,只要塞进5份带标签病历,风险排序能力反而双双下降(相似 -0.034、随机 -0.043,Holm校正后均 p < 0.001)。
随机病历在全部11种癌症上都输给纯病历,相似病历输了10种,只在结直肠癌打平(0.000)。
反倒是把零样本措辞从原代码(A1)改得跟少样本一致(A2),一份范例没加就先把AUROC抬高了 +0.025(0.828升到0.858,探索性分析)。
把5位相似患者的结局在内部随机互换(A5,平均AUROC 0.825),相对真实结局没有检出明显下跌(-0.006,-0.015 到 0.003,p = 0.50)——不过这项对照存在结构稀释,因为48%的测试记录(5,666条中的2,738条)招来的5位邻居结局完全相同(几乎全是存活),互换后提示词一字未变。
换强检索器、写短摘要、上大模型,只能减损、无法翻盘
为了排除“只是检索器太弱、全文太长或8B模型太小”的可能,作者连做三组稳健性检验(表3,补充说明3—4):
- 换强检索器(
R3,Qwen3-Embedding-8B): 相比原检索器提升+0.017,也胜过随机病历(+0.021,0.010到0.033,探索性),说明“相似与随机等价”只针对原版检索器成立。但R3平均AUROC(0.836)依然输给纯病历零样本(-0.019,-0.028到-0.009)。 - 压缩成结构化摘要(
S0、S3、S4): 把每份约2,700词元的出院小结(5样本提示总长约16,000词元)交由Qwen3-8B压成250词以内、六段固定标题的摘要(5样本总长约2,500词元),相似病历的AUROC回升+0.028(到0.847),却仍略低于纯摘要零样本(0.854,差值-0.007,区间-0.014到0.000),且与随机摘要(0.839)继续落在±0.03等价区内。 - 换更大模型(AWQ量化
Qwen3-32B,5,665条测试记录): 模型变大后各组全面抬升,纯病历零样本达0.871,但加范例依然拖低AUROC(相似-0.022到0.848,随机-0.013到0.855,Holm校正均p ≤ 0.001)。剔除176条(3.1%)转入安宁疗护的记录(其中149人90天内死亡)后,各组AUROC略降(A2降至0.840),全部结论纹丝不动(补充表6)。
放到同一把尺子上与有监督分类器(每癌种用264到1,733条标注病历训练)相比(表2、表3),不看一条标签的纯病历零样本(0.858)与 Qwen3-Embedding 逻辑回归(0.855)打成平手,数值上高于 TF-IDF 逻辑回归(0.831,校正 p = 0.059);而动态少样本(0.818)同时输给两者(p ≤ 0.013)。
用8,126条跨癌种标注记录在 A2 末层隐藏状态上训出的线性探针达到0.868,仅比零样本自身回答高 +0.011(p = 0.004)。
最反直觉的转折:为什么排序变差,准确率反而大涨
解开表面矛盾的关键在表4与补充表5。
按默认0.5阈值切分,加范例确实复现了原研究最亮眼的“准确率跃升”:A1 只有46.9%,A2 为75.1%,加上5份病历后,相似病历跳到 82.8%,随机病历也跳到 82.7%,Brier分从0.227降到0.144—0.145。
但推高准确率的不是“学懂了相似病历”。
队列真实的90天死亡率只有16.1%,可原版零样本(A1)把 68.8% 的患者判成会死,对齐措辞后的 A2 仍把 35.7% 判成会死。
前面垫上5位历史患者——大多数都活过了90天——立刻把模型判死的比例压低到 18.1%(相似)和 18.4%(随机),大量误报消失,于是固定阈值准确率一路走高。
验证这个解释很简单:不加任何范例,只在开发集上给 A2 的零样本分数为每种癌症配一个阈值,测试集准确率直接冲到 86.5%,在全部11种癌症上全面超过相似病历(高出 +2.4 个百分点,1.6 到 3.1,p < 0.001)。
作者同时补了一记冷水:在16%死亡率的失衡数据里,准确率本身就是陷阱——闭着眼把所有人都判成存活,平均准确率就有 83.6%,比相似病历在8种癌症上还高。
而且追求最高准确率拟合出的阈值极端到 0.998 以上,只把8.9%的患者判成死亡,平衡准确率反而从 A2 在0.5处的0.748跌到0.648(相似病历为0.687)。
机制拆解:不是没检索到,而是被范例里的死亡人数带偏了
难道是检索器压根没找到像的病人?不是(表5)。
相比随机抽取,原版检索器挑出的5位邻居明显更常与目标患者拥有相同的入院类型(43%对24%)和出院去向(39%对27%),尽管编码器从未拿到这些结构化字段。
光数这5位邻居里死了几个人、完全不用语言模型做“邻居投票”,AUROC就已经有 0.722(Qwen3-Embedding 达0.752,随机仅0.515)。
问题在于,0.722远不如模型直接读目标出院小结自己得出的0.858。
作者把每个患者在少样本下的死亡对数几率,对“零样本对数几率”与“5份范例里展示的死亡人数”做标准化回归(测试集,补充表11)。
如果范例不干扰模型读病历,零样本权重应为1、死亡人数权重应为0。
实测却显示:配相似病历(A4)时,模型对自己读病历的权重掉到 0.55(0.53—0.56),范例死亡人数的权重升到 0.43(0.41—0.45)。
最干净的因果证据来自随机病历(A3)——由于随机抽出的死亡人数与当前患者完全独立,它的回归权重依然高达 0.17(0.16—0.19),说明只要前面多摆几位死亡病例,模型就不管目标患者是谁而往“会死”偏移。
开发集里,拿“死亡人数与相似邻居刻意配平的随机病历”(R1)去跑,AUROC甚至在全部11种癌症上压过真正的相似病历(+0.019,0.003 到 0.034)。
开发集的隐藏层分析把损失位置指得更细(补充表12)。 不放范例时,模型零样本回答与末层隐藏状态在答案方向上的投影高度一致(相关系数0.988,平均AUROC 0.846,训练探针为0.860)。 放进5份相似病历后,模型口头回答的AUROC跌到0.795,但在同一批少样本隐藏状态上重新训练线性探针仍能读出0.845——更像是范例掰偏了模型的读出方向,而非彻底擦掉了风险信息(不过少样本隐藏状态本身也编码了范例结局,因此还不能完全切分表征与读出的各自份额)。
核心概念
排序分辨力与判定倾向是两回事。 回到开头那位出院的肺癌患者:能不能把更高危的病人排在更前面(AUROC),和默认0.5切点下模型爱不爱喊“高危”,是两个独立维度。 因为零样本提示自带偏高的死亡先验(68.8%或35.7%对比实际16.1%),任何把判死比例往下拽的操作——哪怕塞5份随机病历——都能让默认准确率大涨,同时掩盖排序退化。
拆变量的对照设计(措辞对齐、随机范例、打乱结局)。 直接拿动态少样本跟措辞不同的零样本比,会把三种改动混成一笔糊涂账。
补上 A2(对齐措辞)、A3(随机病历)和 A5(打乱标签)后才看得清:光是改措辞就贡献了 +0.025 的AUROC和近28个百分点的准确率(46.9%到75.1%),而加范例拉低了排序,原检索器的相似度几乎没添增量。
标签人数锚定引发的信号挤出。 当5份病例排在目标病历之前,模型会把“自己读目标病历”(权重0.55)和“范例里死了几个人”(权重0.43)混在一起。 当目标病历本身信息极强(0.858)而邻居投票偏弱(0.722)时,强行混入弱信号或噪声就会拉低整体排序,同时上下文从约2,700词元拉长到16,000词元也会放大损耗。
洞见
往大模型提示词里检索“相似案例”,并不会自动教会它更精准地权衡眼前的个案;它同时带进了一个类别先验,并挤占了模型对目标文档本身的权重。 只要零样本原本过度预测少数类,少样本范例就极易靠“把预测比例拉回多数类”制造出准确率暴涨的假象,暗中却把真正分辨高危对象的排序能力做差了。
博导审稿
这篇复现的方法纪律非常扎实:11个癌症队列配对评测(5,666条留出测试记录)、Holm多重检验校正、跨队列重复患者的联合自助抽样、剔除安宁疗护的敏感性分析,以及哪些分析提前冻结、哪些属探索性或事后补充,全都交代得清清楚楚(Methods)。 本文未独立审计其私有代码库或MIMIC-IV原始提取脚本。
几处关键边界决定了结论不能一刀切外推(Discussion与补充说明8):
- 临床设定与原研究并不相同: MIMIC-IV来自波士顿单一医学中心,输入只有单份出院小结(常直接写明预后或出院去向),结局是短期90天死亡(各癌种6.5%—27.4%),导致48%的测试记录招来的5位邻居全是同一结局。而Anil等(2026)用的是确诊后180天内的纵向多份病历、接近中位生存期的长期结局(胶质瘤14个月、乳腺癌5年)、更均衡的类别比例(胶质瘤存活率约39%)、经医生抽检修正的GPT-4 Turbo摘要和Llama-3 70B。作者明确强调本文不构成对原报告的推翻,并归纳了检索范例可能真正起效的四个条件。
- 上下文变长与标签锚定尚未完全解耦: 5份全文病历把提示词从约2,700词元拉到约16,000词元,换成摘要后AUROC损失从
-0.034缩小到-0.007。因为实验没有补做“往零样本里塞等长无结局文本”的对照,长上下文衰减和死亡人数锚定目前仍是并存解释。 - 流程与模型限制:
±0.03等价边界是在看过前3个癌种开发集结果后定下的,R3也是看了开发集后才加入测试;数据按随机而非时间划分,不构成外部验证。模型只测了Qwen3一个家族(Qwen3-32B还是AWQ量化版,规模与量化混在一起),每组在温度0下只跑1次随机抽样;37%—66%的病历被截断至3,000词元,约6%的8B摘要在420词元处被截断,且队列定义、提示词和摘要均未由临床医生审阅。研究也未与基于年龄、分期、出院去向等结构化变量的传统模型对比。
启发
如果你在医疗或其他类别极度不平衡的风险预测任务里评测“检索相似案例 / 动态少样本”,在把收益归功于“相似度”之前,直接套用论文给的四项核查:
- 补一组同模板、同数量的随机范例对照,确认“相似”真的胜过“随便抽”。
- 把零样本提示词措辞与少样本对齐,别把改写指令的功劳算到检索头上。
- 评测报表里必须把无阈值排序指标(AUROC、AUPRC)与准确率、阳性预测比例以及全猜多数类的基准准确率并排列出,绝不把“少报少数类换来的准确率上涨”当成模型变聪明。
- 与零样本加本地校准阈值作对比,并按真实业务漏报/误报代价定切点——不要按最高准确率定阈值(那样会把平衡准确率从0.748压垮到0.648)。
当目标文档本身已包含充分直接证据时,一条措辞清楚的纯零样本提示(词元只有5样本全文的六分之一)在风险排序上往往既更省算力又更准,前提是用本地数据校准切点,而不是生搬0.5阈值。 以上是从论文证据提炼的评测与工程迁移做法,并非经过验证的临床部署方案。