MERLIN-DDx dataset teaches clinical reasoning traces to language models
A four-stage generator-verifier pipeline turns hospital admission records into verified diagnostic reasoning traces, producing a 124,510-record dataset that improves long-tail ICD coding when used to fine-tune Qwen3 models.
In plain words
Language models often skip the step-by-step reasoning doctors use to work out a diagnosis, because hospital notes record conclusions, not the thinking behind them. The MERLIN-DDx project builds that missing training material by generating reasoning steps for real hospital admissions and checking each step against a clinical reference and the patient's recorded outcome. Models trained on it get better at predicting diagnosis codes, especially for rare conditions.
What was announced
The authors, writing on arXiv, note that large language models reason step by step in mathematics and code but tend to map clinical notes straight to answers in differential diagnosis, largely because supervision capturing clinical reasoning is missing. Their pipeline generates diagnostic reasoning traces over real hospital admissions, verifying each intermediate step's structured answer against WikiDoc and the recorded patient outcome in MIMIC-IV. The resulting dataset spans 10,400 admissions, with 117,580 of the records carrying a verifier score; clinicians confirmed the reference diagnosis in 77% of reviewed cases, with an inter-rater kappa of 0.91.
The team evaluated two admission-time tasks: differential diagnosis and ICD coding from information available when the patient arrived, which they describe as harder than coding finished discharge summaries and closer to real decision support. Fine-tuning Qwen3 models from 0.6B to 32B parameters improved long-tail ICD macro-F1 at every scale. Case-matched controls trained without traces showed the traces add 1.7 to 6.9 macro-F1 points, though gains were not consistent on micro-F1. An ablation at 8B found macro-F1 rising with stricter verifier filtering, which retains fewer traces. Error analysis showed improvements across all frequency strata, largest on low-frequency codes, which are improved but not solved. The dataset, pipeline, and prompts are released.
What it does not show
- The evidence is the paper's abstract only; full methods, data quality details, and external evaluation are not covered.
- Performance gains come from the authors' own benchmarks on MIMIC-IV admissions with WikiDoc-covered diagnoses; no independent confirmation is reported.
- Low-frequency ICD codes improved but were not solved, and micro-F1 gains were inconsistent.
For security and IT teams
- Scope
- The released dataset covers 10,400 hospital admissions whose discharge diagnoses WikiDoc covers, with tasks limited to admission-time differential diagnosis and ICD coding.
Sources
Source-support review completed 30 Nov 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.
Coverage: arXiv: abstract.
Updates and corrections
No corrections so far.
First published 30 Nov 2026
New to the subject? AI from the Ground Up starts from the beginning.