The Doctor’s Casebook: When LLMs Reason by Patient Analogy via Information Gain–Guided Graph Search
Abstract
Clinical reasoning over electronic health records (EHRs) remains challenging for large language models (LLMs). Inspired by clinicians who combine internal medical knowledge with experience from prior patients, we investigate Reasoning by Patient Analogy, where a frozen LLM dynamically consults a clinical casebook to ground its reasoning in prior patient experience. Our pilot study reveals three core challenges. (1) Perspective Limitation: data-side similarity does not necessarily align with the target LLM’s reasoning needs, while model-side signals are bounded by what the model itself can recognize. (2) Cohort Awareness: instance-level retrieval overlooks the population structure that organizes prior patient experience. (3) Information Aggregation: patient utility changes with the working context, causing overlapping cases to yield diminishing marginal gains as evidence accumulates. To address these challenges, we propose GraphWalker, a graph-guided framework for dynamic clinical casebook consultation. GraphWalker organizes historical patients into a clinically structured graph, uses cohort prototypes to localize relevant patient groups, and performs Context-Conditioned Greedy Search with Frontier Expansion to continually re-evaluate candidate patients by their marginal utility under the current working context, using the reduction in target-input cross-entropy as an information-gain proxy. Extensive experiments on real-world EHR benchmarks show that GraphWalker consistently outperforms strong patient-selection baselines, remains competitive with the evaluated supervised EHR predictors in-domain, and achieves stronger performance under cross-version and cross-institution transfer with only seconds-level additional inference overhead. GraphWalker further generalizes to black-box LLMs and remains compatible with downstream reasoning scaffolds. Our code is available at https://anonymous.4open.science/r/GraphWalker-4473.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.