Learning Diagnostic Reasoning for Decision Support in Toxicology

Nico Oberländer, David Bani-Harouni, Tobias Zellner, Nassir Navab, Florian Eyer, Matthias KeicherarXiv 2026

TL;DR

DeToxR introduces a reinforcement learning framework tailored for emergency toxicology, optimizing lightweight Large Language Models (LLMs) to diagnose complex poly-substance overdoses. By training with Group Relative Policy Optimization (GRPO) on a clinical F1-score reward, the model successfully fuses messy narrative text with structured vital signs, ultimately outperforming both standard machine learning baselines and an expert toxicologist.

What Problem Does This Paper Address?

Emergency toxicology is a high-stakes, chaotic environment. When a patient presents with an acute drug overdose, clinicians must make rapid, life-saving decisions under immense uncertainty. Patients may be unconscious, altered, or unreliable historians, and their symptoms are often nonspecific or masked by the co-ingestion of multiple substances (poly-intoxication). While definitive laboratory tox screens provide answers, their turnaround times usually fall far outside the critical therapeutic window.

To make a diagnosis, clinicians must synthesize heterogeneous data: structured clinical variables (vitals, demographics) and unstructured, non-medical narratives (paramedic scene descriptions, witness accounts, or patchy patient histories). While LLMs are naturally suited to handle mixed-modality text inputs, vanilla models struggle in this niche domain, frequently underperforming simple baselines like "just guess whatever drug is mentioned in the patient's history." This paper addresses the challenge of training LLMs to reliably reason through multi-label clinical data without relying on expensive, hard-to-obtain ground-truth reasoning chains.

Methods

The authors present DeToxR (Decision-support for Toxicology with Reasoning), which utilizes a multi-step pipeline to ingest patient data, reason through it, and output structured predictions.

Fig. 1. Overview of DeToxR. Heterogeneous emergency-department data is combined and used to prompt an LLM for diagnostic reasoning and multi-label toxin prediction. The model is trained with GRPO using an F1 and format reward.
  1. Heterogeneous Data Fusion: DeToxR serializes all available patient data into a single Markdown-formatted prompt. Structured variables (e.g., heart rate, blood pressure, age) are converted into key-value pairs, while unstructured text fields (e.g., physical exams, ECG findings, paramedic reports) are appended directly without preprocessing.
  2. Output Schema: The model is instructed to output a diagnostic reasoning trace enclosed in <reasoning> tags, followed by a machine-parseable JSON object containing binary predictions for 14 substance classes.
  3. Reinforcement Learning via GRPO: Instead of standard supervised finetuning (SFT), the authors use Group Relative Policy Optimization (GRPO)—the same RL algorithm behind reasoning models like DeepSeek-R1.
  4. Composite Reward Design: The model is optimized using a dual-reward function:
  5. Format Reward ($R_{format}$): Incentivizes the model to properly structure its reasoning block and output valid JSON.
  6. Clinical F1 Reward ($R_{F1}$): Uses a sample-level F1 score to symmetrically penalize the model for missing co-ingested substances (false negatives) and hallucinating absent poisons (false positives).

Datasets

The model was trained and evaluated on a real-world dataset from the toxicology department of a single hospital:

  • Size: 870 poly-intoxication cases.
  • Labels: 14 distinct toxin classes (including Opiates, Benzodiazepines, Cocaine, THC, Methadone, and Pregabalin), verified via retrospective laboratory confirmation.
  • Characteristics: Highly sparse and complex, with an average of 2.7 present toxins per case.
  • Splits: Divided into a 50:20:30 ratio (train/validation/test) using iterative stratification to preserve the distribution of rare labels and co-occurrence patterns across splits.

Key Insights and Ideas

  • Supervised Finetuning Struggles with Sparsity: Standard SFT models trained on this data suffered from high precision but terrible recall. Because positive drug labels are sparse, SFT models default to playing it safe, failing to predict positive poisonings. GRPO forces exploration, yielding a much healthier balance.
  • F1-Score as an RL Reward: Standard RL applications often rely on binary accuracy. In multi-label settings, however, optimizing directly for a sample-level F1 score prevents the model from ignoring secondary, co-ingested substances.
  • AI Overcomes Human Anchoring Bias: In clinical settings, human experts often suffer from "anchoring"—focusing heavily on the primary drug a patient admits to taking while missing hidden co-ingestants. DeToxR avoids this bias by systematically evaluating the holistic clinical picture.

Key Results

DeToxR (built on top of a Qwen3 4B Instruct base) achieved substantial performance gains over traditional classifiers and unadapted LLMs:

Table 1. Evaluation results for simple baselines, zero-shot inference on various base LLMs, and finetuned methods including DeToxR. Higher is better for all metrics. Best results are marked in bold. Second best are underlined.
  • Baseline Comparison: DeToxR achieved a Micro-F1 of 63.71%, significantly outperforming the supervised finetuning (SFT) baseline (58.89%) and classical machine learning models like XGBoost (57.12%).
  • Man vs. Machine Validation: In a clinical validation study involving 25 randomly selected test cases, DeToxR went head-to-head with an expert toxicologist. The model substantially outperformed the human expert on overall diagnostic accuracy (Micro-F1: 0.644 vs. 0.473). DeToxR successfully caught 19 correct toxin identifications that the toxicologist completely missed.

Limitations and Future Work

Despite its impressive predictive accuracy, qualitative analysis revealed a notable quirk in the model's reasoning behavior: post-hoc rationalization.

Fig. 3. Excerpts from an example reasoning trace. The patient of the underlying case is intoxicated with opiates, benzodiazepines/z-substances and pregabalin, which DeToxR correctly predicts. Claims in green are supported by the provided data or logically sound, while red ones are not supported or wrong.

As highlighted in Figure 3, while the model's final drug predictions are correct, it occasionally hallucinates non-existent clinical findings within its text reasoning block to justify its choices (marked in red).

Additionally, because the dataset originates from a single hospital, future work must focus on multi-center validation to ensure the model generalizes across different emergency departments and demographic distributions.

Summary updated

BibTeX
@misc{oberlander2026learning,
  author = {Nico Oberländer and David Bani-Harouni and Tobias Zellner and Nassir Navab and Florian Eyer and Matthias Keicher},
  title = {{Learning Diagnostic Reasoning for Decision Support in Toxicology}},
  year = {2026},
  eprint = {2603.29608},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.29608},
}
Figure