TL;DR
Rather than relying on complex reinforcement learning (RL) agents to mimic physician inquiry, DDxT frames medical differential diagnosis as an autoregressive sequence-generation and classification task. Using a standard encoder-decoder Transformer, DDxT generates candidate pathologies ranked by likelihood and classifies the underlying ground truth disease, beating prior RL baselines on the DDXPlus benchmark by over 10 points in DDx F1 score.
What Problem Does This Paper Address?
Differential Diagnosis (DDx) is the systematic clinical process of narrowing down a large space of possible diseases to a small set of likely candidates, ordered by probability, based on patient demographics, medical history, and presenting symptoms.
Prior automated diagnostic systems heavily favored Reinforcement Learning (RL), operating under the intuition that sequential physician questioning resembles an active Markov decision process. However, RL methods often struggle with sample efficiency, complex training dynamics, and skewed precision-recall trade-offs. The authors ask: Can a simpler, supervised sequence-to-sequence generative Transformer outperform RL-based systems at differential diagnosis?
Methods
The authors introduce DDxT, an encoder-decoder Transformer architecture:
- Input Representation: Demographic details (binned age, sex) and clinical evidence (initial symptom and subsequent symptoms) are tokenized into a structured sequence separated by special tokens:
"<bos> age <sep> sex <sep> initial evidence <sep> evidences <eos>" - Autoregressive DDx Generation (Decoder): The decoder receives the encoder context and autoregressively generates the set of differential diagnoses ordered from highest to lowest probability. Positional embeddings ensure the model learns relative disease likelihood ranking.
- Dual-Representation Pathology Classifier: To predict the single true pathology, Global Average Pooling (GAP) is applied to both the final encoder states (evidence context) and decoder states (candidate pathology context). These pooled representations are concatenated and fed into a 2-layer MLP classifier with GELU activations and LayerNorm.
- Training Objective: The system is trained end-to-end using the sum of categorical cross-entropy losses from the autoregressive DDx sequence generator and the final pathology classifier.
Datasets
- DDXPlus: A synthetic benchmark containing 1.3 million patient records across 49 distinct pathologies. Each entry includes demographic profiles (8 age brackets, sex), presenting symptoms, ground-truth differential diagnosis sets with associated probabilities, and the confirmed ground-truth pathology. No new benchmark datasets were introduced.
Key Insights and Ideas
- Generative modeling trumps RL for diagnostic reasoning: Standard supervised sequence generation provides stronger, denser training signals than RL reward formulations. Prior RL models tended to compromise precision heavily to achieve recall (or vice versa); DDxT maintains strong balance across both.
- Rank order as sequence: Ordering the target DDx tokens by descending probability distribution allows standard causal masking and positional encodings to naturally capture clinical diagnostic likelihoods without dedicated ranking loss functions.
- Combining "Symptom Space" and "Hypothesis Space": Passing both encoder representations (patient evidence) and decoder representations (generated candidate pathologies) to the classifier head ensures the final diagnosis is informed by both raw observations and generated clinical hypotheses.
Key Results
DDxT significantly outperformed existing RL baselines (AARLC and BASD) on the DDXPlus benchmark:
| Metric | AARLC (RL) | BASD (RL) | DDxT (Ours) |
|---|---|---|---|
| Top-1 Ground Truth Pathology Accuracy (GTPA@1) | 99.21% | 97.15% | 99.98% |
| DDx Precision (DDP) | 69.53% | 88.34% | 94.84% |
| DDx Recall (DDR) | 97.73% | 85.03% | 94.65% |
| DDx F1 Score (DDF1) | 0.7824 | 0.8369 | 0.9472 |
| Geometric Mean (GM) | 87.68 | 90.03 | 96.45 |
- DDx Sequence Generation: Achieved a mean accuracy of 99.82% across the 49 pathologies. Per-class DDx F1 ranged from 0.8643 (Pancreatic neoplasm) to 0.9946 (Myasthenia gravis).
- Final Pathology Classification: Achieved 99.98% mean accuracy, 99.61% mean precision, 99.44% mean recall, and 0.9949 mean F1 score.
Limitations and Future Work
- Assumes Complete Evidence Acquisition: Unlike conversational RL agents that dynamically decide which symptom question to ask next, DDxT assumes all patient information and evidence are already collected and provided as input.
- Synthetic Data Dependence: Experiments rely entirely on the synthetic DDXPlus dataset. Clinical applicability on messy, uncurated real-world Electronic Health Records (EHR) remains unproven.
- Difficulty with Symptomatically Overlapping Diseases: Certain conditions with ambiguous or shared symptom spaces (e.g., Acute rhinosinusitis vs. Chronic rhinosinusitis, or Unstable angina) exhibited lower classification precision (e.g., 76.49% recall and 0.8567 F1 on Acute rhinosinusitis).
Summary updated