cs.CLNov 27, 2026

MERLIN-DDx: Learning Clinical Diagnostic Reasoning from Reference-Filtered Traces

Authors: Jan Frick, Dennis Fast, Conor Fallon, Konstantin Schlüter, Roseli Neuschäfer, Jonas Antonio Cittadino, Felix Gers, Alexander Löser

Organizations: Berliner Hochschule für Technik · Charité – Universitätsmedizin Berlin · Justus Liebig Universität Gießen

Abstract

Large language models reason step by step in mathematics and code, but in clinical differential diagnosis (DDx) they still map notes straight to answers. One reason is that the supervision needed to teach clinical reasoning is largely missing, because clinical notes record conclusions rather than the reasoning traces behind them. We present a four-stage generator-verifier pipeline that builds this supervision. It generates diagnostic reasoning traces over real hospital admissions and checks the structured answer of every intermediate step against an external clinical reference (WikiDoc) and the recorded patient outcome (MIMIC-IV). The result is MERLIN-DDx, a dataset of 124,510 stage records over 10,400 admissions whose discharge diagnosis WikiDoc covers, of which 117,580 carry a verifier score; clinicians confirm the reference diagnosis in 77% of reviewed cases (inter-rater kappa = 0.91). We evaluate two admission-time tasks, differential diagnosis and ICD coding, predicting discharge codes from what was known on arrival. This is harder than coding finished discharge summaries, and closer to real decision support. Fine-tuning Qwen3 models (0.6B-32B) on MERLIN-DDx improves long-tail ICD performance (macro-F1) over the untuned base at every scale. Case-matched label-only controls, trained on the same cases and gold codes without traces, isolate what the traces add: 1.7 to 6.9 macro-F1 points at every scale, though not consistently on micro-F1. A data ablation at 8B shows macro-F1 rising with verifier-filter strictness, although stricter filtering retains fewer traces. An error analysis shows the gain reaches every frequency stratum and is especially large on low-frequency codes, which are improved but not solved. We release the dataset, pipeline, and prompts.

Figures & tables

Appendix figures & tables17 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Sep 12, 2026

VeriDx: Earning the Right to Diagnose with Disease-Centric Verification

A correct diagnosis can still be reached for the wrong reasons. In clinical reasoning, every disease hypothesis creates obligations: key evidence must be checked, alternatives must be ruled out, contradictions must be resolved, useful tests must be considered, and closure must be justified. Current evaluations of medical LLMs mostly focus on final answers, local steps, or isolated facts, and therefore miss these hypothesis-induced commitments. We introduce VeriDx, a disease-centric verification framework that links free-form diagnostic reasoning to structured disease profiles. VeriDx tracks whether each hypothesis is satisfied, unresolved, or violated its clinical obligations, exposing failures such as missing critical tests, unresolved differentials, ignored contradictions, unsupported claims, and premature closure. We instantiate VeriDx for complex respiratory diagnosis using guideline-derived disease profiles and expert-annotated longitudinal cases. Our results show that many diagnostic errors are not isolated mistakes, but broken commitments made earlier in the reasoning process.
Aug 25, 2026

MTDiag: A Multi-Turn Diagnostic Dataset Towards Clinically Meaningful LLM Evaluation

Clinical diagnosis is fundamentally interactive and incremental, yet the dominant paradigm for evaluating Large Language Models (LLMs) in medicine remains static QA benchmarks or template-based dialogues. These benchmarks say little about whether a model can serve as a diagnostic agent in a dynamic clinical encounter, with LLMs showing significant accuracy and reliability degradation in multi-turn settings. To address this issue, we present MTDiag, a large multi-turn diagnostic dialogue dataset constructed from three heterogeneous sources: DDXPlus, MIMIC-IV, and published case reports (AJCR), covering common ED presentations as well as long-tail rare and atypical conditions. All cases are normalized into a canonical schema anchored in the most comprehensive and widely-adopted medical knowledge bases (UMLS concept identifiers, with ICD-10 diagnosis codes). We release the schema, a UserLM-8B-based utterance-generation pipeline, and the physician-validated dataset that converts structured clinical evidence into natural-language utterances. Importantly, we introduce and motivate clinical knowledge-grounded metrics for evaluating LLMs as diagnostic agents, beyond diagnostic accuracy, for the task of multi-turn differential diagnosis.
Jul 30, 2026

EarlyDx: An Admission-Anchored Benchmark for Open-Ended Generation of Evidence-Supported ED-Encounter Diagnoses

Clinical diagnosis at hospital admission must be made rapidly from limited, incomplete evidence. Existing diagnosis-prediction benchmarks are poorly suited to this setting: they restrict prediction to closed code sets, exclude free-text notes, and supervise with discharge diagnoses that incorporate the full inpatient course. We introduce EarlyDx, a large-scale benchmark for open-ended early diagnosis, built from 154,834 emergency department encounters in MIMIC-IV. Each encounter is restricted to records available at admission time t0t_0 and supervised by the diagnoses recorded during the ED encounter rather than at discharge. An LLM auditor further verifies every free-text label as supported, partially supported, or unsupported by that evidence; the primary evaluation scores only fully supported labels. Under a semantic LLM-as-judge protocol, no evaluated system --- frontier general, medical-specialized, or in-domain post-trained --- synthesizes admission-time evidence reliably. Zero-shot models score largely by extraction, recovering only 3-31% of diagnoses that must be inferred rather than read from the record; post-training raises inference-dependent recall to 56%, but a sizeable margin remains, and on time-critical conditions no system attains a clinician's balance of sensitivity and precision. We release the full construction and evaluation pipeline at here.