← Latest papers
🤖 AI

DoctorAgents: an agentic framework to iteratively refine AutoML pipeline for small clinical temporal data

DoctorAgents is an agentic AI framework that leverages specialized large language models to iteratively refine clinical machine learning pipelines through reasoning-driven updates and natural-language feedback, outperforming traditional AutoML systems on small, heterogeneous temporal data.

Original authors: Ruilin Wang, Bo-Hong Wang, Elizabeth Kourbatski, Jun Bai, Hegang Chen, Ziyang Song, Gilles Boire, Marie Hudson, Yue Li

Published 2026-08-07
📖 5 min read🧠 Deep dive

Original authors: Ruilin Wang, Bo-Hong Wang, Elizabeth Kourbatski, Jun Bai, Hegang Chen, Ziyang Song, Gilles Boire, Marie Hudson, Yue Li

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a computer to be a doctor. You give it a stack of patient records, hoping it can spot patterns that predict who might get sick or who needs a specific treatment. This is the world of Clinical Machine Learning. But here's the catch: real patient records are messy. They aren't neat spreadsheets where every row is a perfect snapshot in time. Instead, they are like a chaotic diary where a patient might visit the doctor once a year, then three times a week, then disappear for months. Some notes are missing, some are vague, and the timing of a measurement often matters just as much as the number itself.

To make sense of this chaos, scientists usually build Machine Learning Pipelines. Think of a pipeline as a custom-built factory assembly line. One part cleans the data, another part organizes the messy notes into a format the computer understands, and a final part builds the prediction model. Traditionally, building these factories has been a slow, manual job requiring a team of experts: a statistician to check the math, a computer scientist to write the code, and a doctor to make sure the logic makes medical sense. Recently, Artificial Intelligence (AI) has tried to automate this. Some systems, called AutoML, act like a frantic chef trying every possible recipe in the world to see which one tastes best. They throw thousands of combinations at the problem, hoping one sticks. But for small, messy medical datasets, this "brute force" approach often wastes time, misses the subtle clues, and produces results that are hard to understand.

Enter DoctorAgents, a new approach described in a paper by researchers at McGill University and the Quebec AI Institute. Instead of a frantic chef throwing ingredients at a wall, the researchers propose a team of specialized AI "doctors" who work together like a collaborative medical board. This system, called DoctorAgents, doesn't just guess; it reasons. It uses a team of Large Language Model (LLM) agents—specialized AI assistants—to analyze the data, build a pipeline, test it, and then think about why it failed before making a tiny, targeted fix.

The core idea is Iterative Agentic Refinement. Imagine you are solving a complex puzzle. A traditional computer might try to swap out the entire puzzle board every time a piece doesn't fit. DoctorAgents, however, acts like a detective. If a piece doesn't fit, it asks, "Why?" and then gently nudges just that one piece or changes the angle of the board slightly, rather than starting over. It uses a technique called Textual Gradient Descent, which is like translating a doctor's natural language feedback ("This feature is too noisy") into a precise code update without rewriting the whole program.

The researchers tested this system on four different clinical challenges using real patient data. These included predicting who would die in the ICU, who would be readmitted within a week, how long a patient would stay in the hospital, and whether a rheumatoid arthritis patient would respond to a specific drug treatment. The data was "small" in the grand scheme of AI (often just a few hundred to a few thousand patients) and "temporal," meaning the timing of every measurement was crucial and irregular.

The results suggest that DoctorAgents is a strong contender. In these experiments, the AI team consistently outperformed other automated systems, including the current state-of-the-art "brute force" methods and other AI agents. For instance, in predicting ICU mortality, DoctorAgents-DS (a specialized version of the system) achieved a score of 0.520, beating the next best method which scored 0.476. In predicting rheumatoid arthritis treatment response, it reached 0.577, surpassing the previous best of 0.564.

But the paper suggests something even more important than just a higher score: interpretability. Because the AI agents reason through their steps and keep a "memory log" of what worked and what didn't, the features they create make sense to humans. For the arthritis prediction, the system didn't just find a random number; it constructed features that a human doctor would recognize as meaningful, such as the variability in a patient's fatigue levels over a year or the specific type of drug they were prescribed. The system explicitly ruled out the idea that simply regenerating entire pipelines from scratch is the best way to go; instead, it found that targeted, memory-aware refinement leads to more stable and reliable results.

The authors are careful to note that while the system is robust and efficient, it is not a magic wand. In the rheumatoid arthritis task, the performance was modest across all methods, suggesting that the data itself might lack strong predictive signals, a limitation the AI cannot magically overcome. However, the study strongly suggests that for small, messy, time-based medical data, a team of reasoning AI agents that learn from their mistakes is a more effective strategy than a system that just tries everything and hopes for the best. It turns the process of building a medical prediction model from a game of chance into a thoughtful, iterative conversation between a machine and the data it is trying to understand.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →