MedRAX: Medical Reasoning Agent for Chest X-ray

Adibvafa Fallahpour, Jun Ma, Alif Munim, Hongwei Lyu, Bo Wang

Abstract

MedRAX is a first-of-its-kind medical AI agent that uses a "Reasoning and Acting" (ReAct) framework to interpret chest X-rays. By orchestrating a suite of specialized diagnostic tools—ranging from lung segmenters to pathology classifiers—MedRAX outperforms standalone foundation models like GPT-4o, providing more accurate, transparent, and multi-step clinical reasoning.

Introduction: The Fragmentation vs. Hallucination Gap

While Large Multimodal Models (LMMs) like GPT-4 have shown impressive general medical knowledge, they often fail in high-stakes clinical settings due to "hallucinations" and a lack of systematic reasoning. Conversely, specialized medical AI tools are highly accurate but fragmented; a model that segments a lung cannot typically diagnose a disease or answer a complex comparative question (e.g., "How has this effusion changed since the last scan?").

The authors address this "fragmentation vs. hallucination" gap by creating a unified agent that can dynamically plan and execute complex workflows, mimicking the step-by-step analytical process of a radiologist.

Methods: The ReAct Framework

MedRAX is built on a ReAct framework, which operates in a cyclical loop of Observe → Reason → Act.

MedRAX Architecture: A ReAct-based agent orchestrating specialized medical tools.
  1. Core Reasoning Engine: It uses a high-level LLM (the reference implementation uses GPT-4o) as the "brain" to decompose a user's query into logical steps.
  2. Specialized Toolbox: Instead of relying solely on the LLM's internal vision, the agent has access to a "toolbox" of state-of-the-art specialized models:
  3. Visual QA: CheXagent and LLaVA-Med for answering free-form questions.
  4. Segmentation: MedSAM and ChestX-Det for identifying anatomical boundaries.
  5. Grounding: Maira-2 for localizing specific findings.
  6. Classification: TorchXRayVision for pathology detection.
  7. Generation: RoentGen for synthesizing images.
  8. Workflow Orchestrator: Built using LangGraph, this component manages the memory of the conversation and ensures the agent "remembers" findings from one tool to inform the next step.

Evaluation Benchmarks

The researchers evaluated MedRAX using several key benchmarks:

  • ChestAgentBench (New): A comprehensive new benchmark introduced in this paper. It contains 2,500 complex medical queries derived from 675 expert-curated clinical cases from the Eurorad database. It covers seven categories, including localization, comparison, and characterization.
  • CheXbench: Evaluates visual QA and image-text reasoning.
  • MIMIC-CXR: Used to test clinical accuracy in radiology report generation.
  • SLAKE VQA: A standard medical visual question-answering dataset.

Key Insights: Reasoning Over Raw Vision

  • Generalists vs. Specialists: A major finding is that general-purpose models (like GPT-4o or Llama-3) often outperform specialized medical LLMs on reasoning tasks. MedRAX exploits this by using the generalist's "logic" to drive the specialist's "vision."
  • Explicit Decomposition: By forcing the AI to "think" before it "acts" (calling a tool), the system produces a clear decision trace. This transparency is vital for clinical trust, as a doctor can see exactly which tool provided which piece of evidence.
Example of MedRAX's multi-step reasoning and tool use for disease grounding and lung segmentation.
  • Resolving Conflicts: In case studies, MedRAX demonstrated the ability to resolve contradictory information. For example, if one tool misidentified a chest tube as a nasogastric tube, MedRAX could use findings from other tools (like a segmenter or a different classifier) to correct the error through systematic reasoning.

Key Results

  • State-of-the-Art Performance: MedRAX achieved an overall accuracy of 63.1% on the new ChestAgentBench, significantly higher than standalone GPT-4o (56.4%) and specialized models like CheXagent (39.5%).
  • Superior VQA: On the SLAKE benchmark, MedRAX reached 90.35% accuracy, outperforming the previous best model, M4CXR (85.1%).
  • Clinical Accuracy: In report generation on the MIMIC-CXR dataset, MedRAX achieved a micro-averaged F1 score of 79.1, a substantial lead over the next best model, M4CXR (60.6).

Limitations and Future Work

Despite its strengths, MedRAX faces computational overhead; running multiple specialized models in a loop is slower than a single end-to-end model. Additionally, while the agent is good at resolving conflicts, it can still struggle when multiple specialized tools provide highly confident but opposing interpretations of fine-grained visual features.

Future directions include incorporating reinforcement learning (similar to DeepSeek-R1) to further enhance reasoning and exploring more efficient ways to balance tool utilization with computational cost.

Summary updated

BibTeX
@inproceedings{fallahpour2025medrax,
  author = {Adibvafa Fallahpour and Jun Ma and Alif Munim and Hongwei Lyu and BO WANG},
  title = {{MedRAX: Medical Reasoning Agent for Chest X-ray}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=JiFfij5iv0},
}
Figure