From Clinical Intent to Clinical Model: Autonomous Coding-Agents for Clinician-driven AI Development

Zihao Zhao, Frederik Hauke, Juliana De Castilhos, Mathis Bode, Jakob Nikolas Kather, Sven Nebelung, Daniel TruhnarXiv 2026

TL;DR

This paper introduces a prototype autonomous coding agent powered by a Large Language Model (LLM) that enables clinicians to develop and refine specialized medical AI models using plain natural language. By bypassing the traditional, communication-heavy intermediary AI engineering team, the agent successfully translates clinical intent into optimized code, automatically discovering complex machine learning strategies to mitigate data scarcity and shortcut learning.

What Problem Does This Paper Address?

Building AI models for clinical deployment typically requires close collaboration between medical domain experts and machine learning engineers. This multi-party workflow suffers from a significant translation gap: clinicians understand the nuances of disease and real-world failure modes, while engineers focus on optimizing aggregate statistical metrics (like overall AUC).

This misalignment often leads to models that perform well on paper but fail in practice due to shortcut learning—where a model exploits spurious correlations instead of learning true pathology. A classic example is a pneumothorax (collapsed lung) classifier that mistakenly learns to identify chest drains (a treatment inserted after diagnosis) rather than the actual radiographic signs of the condition. The authors aim to solve this by putting the clinician directly in the driver's seat, using an autonomous agent to bridge the gap between clinical intent and executable code.

Methods

The authors developed a clinician-driven framework powered by Claude Opus 4.6 operating within a structured execution harness. The system operates in three distinct phases:

  1. Semantic Parser: Translates the clinician's natural language request (e.g., "Many models simply detect chest drains... please take this issue seriously") into a structured JSON task specification detailing the clinical objective, risk preferences, and evaluation metrics.
  2. Task Initializer: Instantiates a minimally runnable deep learning codebase, setting up data loading, preprocessing, model architectures, and validation protocols based on the parsed intent.
  3. Iterative Code Tuning Loop: The agent autonomously executes a machine learning workflow over up to 30 iterations. In each loop, it proposes code modifications, runs a complete training/validation cycle (capped at 40 minutes), and evaluates the results. Crucially, modifications are only accepted if they strictly improve a predefined validation metric, and the agent is completely blinded to the test set to prevent data leakage.
Overview of the clinician-driven autonomous coding-agent framework.

Datasets

The framework was validated across five distinct clinical tasks using several public datasets:

  • ISIC 2019: 25,331 dermoscopic images used for 8-class skin lesion classification and binary melanoma vs. nevus discrimination.
  • GRAZPEDWRI-DX: Approximately 20,000 pediatric wrist radiographs used for fracture detection under both fully supervised and mixed-supervision (only 5% bounding-box annotations) settings.
  • SIIM-ACR Pneumothorax & NIH ChestX-ray14: Used to evaluate the agent's ability to mitigate shortcut learning on chest radiographs.
  • NEATX: A annotated subset of NIH ChestX-ray14 used specifically to train an auxiliary chest-drain predictor for the debiasing experiments.

Key Insights and Ideas

  • Autonomous Discovery of Advanced ML Paradigms: The most striking finding is that the agent wasn't just tuning hyperparameters; it independently implemented sophisticated machine learning architectures to satisfy clinical constraints. When faced with sparse bounding boxes (mixed supervision), it autonomously engineered a teacher-student pseudo-labeling strategy.
  • Algorithmic Debiasing from Natural Language: When told to avoid relying on chest drains, the agent successfully assembled a multi-component debiasing strategy. It combined group-balanced sampling, an adversarial gradient reversal layer (to force the network to unlearn chest drain features), and regularization techniques like Mixup and label smoothing.
  • Clinical Alignment Over Benchmark Optimization: The framework shifts the paradigm from maximizing raw benchmark performance to optimizing for asymmetric clinical risks (e.g., prioritizing sensitivity to ensure no melanomas are missed, even at the cost of slight precision drops).

Key Results

The autonomous agent consistently improved models from their initial baselines across all five tasks:

  • Skin Lesion Classification: Overall AUC increased from 0.8786 to 0.9153, and melanoma-specific sensitivity at 80% specificity surged from 60.21% to 90.89%.
  • Weakly Supervised Fracture Detection: By leveraging the unlabeled images via pseudo-labeling, the agent boosted mAP@50 from 0.7943 to 0.8517.
  • Shortcut Mitigation: The agent dramatically reduced the model's reliance on the chest drain confounder. The proportion of false positives directly attributable to chest drains dropped sharply from 60% to 31% on the SIIM-ACR dataset, and from 50% to 18% when evaluated cross-dataset on NIH ChestX-ray14.

Limitations and Future Work

Despite these promising results, the authors highlight several boundaries of the current prototype:

  • Integrator, Not Inventor: The agent excels at searching, combining, and refining established design choices present in current deep learning literature, but it cannot invent entirely new algorithmic principles.
  • Dependence on Explicit Prompts: The system relies on the clinician being aware of and explicitly stating potential confounders (like chest drains). It cannot autonomously detect or diagnose unknown or latent shortcuts hidden within the data.
  • Real-World Validation Needed: The study was confined to well-curated public benchmarks. Future iterations must be tested in heterogeneous, multi-center clinical environments to evaluate how well these agent-developed models handle real-world deployment noise.

Summary updated

BibTeX
@misc{zhao2026from,
  author = {Zihao Zhao and Frederik Hauke and Juliana De Castilhos and Mathis Bode and Jakob Nikolas Kather and Sven Nebelung and Daniel Truhn},
  title = {{From Clinical Intent to Clinical Model: Autonomous Coding-Agents for Clinician-driven AI Development}},
  year = {2026},
  eprint = {2604.17110},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.17110},
}
Figure