Empowering Clinicians and Democratizing Data Science: Large Language Models Automate Machine Learning for Clinical Studies

Soroosh Tayebi Arasteh, Tianyu Han, Mahshad Lotfinia, Christiane Kuhl, Jakob Nikolas Kather, Daniel Truhn, Sven Nebelung · DOI

Executive Summary

ChatGPT’s Advanced Data Analysis (ADA) can autonomously develop state-of-the-art machine learning models for complex clinical datasets using only natural language prompts. In a head-to-head comparison across four major medical studies, these AI-crafted models matched or even outperformed manually tuned counterparts developed by expert data scientists.

The Challenge: Bridging the Medical Data Science Gap

A persistent "knowledge gap" exists in modern medicine: while clinicians possess valuable datasets and critical research questions, they often lack the deep programming and statistical expertise required to build sophisticated machine learning (ML) models. While Automated Machine Learning (AutoML) tools have been developed to address this, they frequently require specialized interfaces and technical configurations that remain a barrier to entry.

This research investigates whether Large Language Models (LLMs)—specifically ChatGPT’s Advanced Data Analysis (ADA) feature—can bridge this gap. The objective was to determine if a clinician could simply provide a raw dataset and a plain-English goal to an AI and receive a high-performing, validated, and explainable model in return.

Methodology: An Automated Pipeline

The researchers tested ChatGPT ADA (based on GPT-4) using a "zero-guidance" approach. Raw, tabular clinical datasets were provided along with brief descriptions of study goals, such as "Analyze this patient data and build a model predicting 12-month mortality."

The complete workflow from data collection across four clinical domains to automated processing, expert validation, and performance evaluation.

To validate the AI's outputs, the study employed a three-way comparison:

  1. Benchmark Publication: Results originally reported in peer-reviewed literature.
  2. ChatGPT ADA-crafted: Models built autonomously by the LLM, which wrote and executed its own Python code.
  3. Validatory Re-implementation: Models manually built and optimized by a seasoned data scientist with five years of experience to ensure a fair, modern comparison.

Clinical Datasets and Study Design

The study utilized real-world data from four large clinical trials across diverse medical specialties:

  • Metastatic Disease (Endocrinologic Oncology): Predicting metastasis in patients with rare tumors (pheochromocytoma/paraganglioma) using blood biomarkers (n=788).
  • Oesophageal Cancer (Gastrointestinal Oncology): Screening for cancer using sponge cytology and epidemiological risk factors (n=14,597).
  • Hereditary Hearing Loss (Otolaryngology): Genetic diagnosis based on sequence variants in three specific genes (n=1,778).
  • Cardiac Amyloidosis (Cardiology): Identifying at-risk patients using electronic health records (n=2,142).
Detailed view of the four clinical datasets and the data collection process.

Key Insights: Domain-Aware Reasoning

One of the most striking findings was the LLM's ability to apply domain-specific logic. For instance, in the genetic dataset, ChatGPT ADA chose a zero-imputation strategy. It correctly deduced that in genetic studies, a missing variant often implies the variant is absent (0). In contrast, a human data scientist might initially default to standard median-imputation, which is less semantically accurate for that specific domain.

Furthermore, the LLM autonomously implemented standard data science best practices without explicit prompting, including handling class imbalances, standardizing numerical features, and performing cross-validation to prevent overfitting.

Results: AI vs. Human Experts

The quantitative results demonstrated that ChatGPT ADA is a formidable "data scientist." Across all four trials, the AI-selected models (typically Gradient Boosting Machines or Random Forests) proved robust, with AUROC values ranging from 0.773 to 0.979.

  • Performance Parity: There were no significant differences in performance metrics (AUROC, Accuracy, F1-score) between the AI-crafted models and the expert-crafted counterparts (P ≥ 0.072).
  • Outperforming Benchmarks: In several cases, the AI-crafted models outperformed the original published results. For example, in the Oesophageal Cancer study, ChatGPT achieved an AUROC of 0.979, surpassing the original study’s 0.960.
  • Efficiency: While a human expert might spend days or weeks cleaning data and tuning models, ChatGPT ADA completed the entire pipeline in less than five minutes per dataset.

Discussion and Limitations

While the results are promising, several critical caveats remain:

  • Data Privacy: Uploading sensitive clinical data to cloud-based LLMs poses significant security and HIPAA-related risks. Future applications should focus on local, "on-premise" LLM deployments.
  • Proprietary Nature: Because ChatGPT is proprietary, the exact reasons for its internal choices remain opaque, and its performance could fluctuate with software updates.
  • Data Quality: This study used well-curated trial data; the tool's performance on "dirty" real-world data with inconsistent formatting remains to be tested.
  • Training Leakage: The authors acknowledge the possibility that the LLM may have encountered study summaries during its initial training, though they mitigated this by using raw, unpublished data splits for testing.

In conclusion, LLMs represent a significant step toward democratizing data science in medicine, potentially allowing clinicians to lead sophisticated analytical projects with minimal technical overhead.

Summary updated

BibTeX
@inproceedings{arasteh2024empowering,
  author = {Soroosh Tayebi Arasteh and Tianyu Han and Mahshad Lotfinia and Christiane Kuhl and Jakob Nikolas Kather and Daniel Truhn and Sven Nebelung},
  title = {{Empowering Clinicians and Democratizing Data Science: Large Language Models Automate Machine Learning for Clinical Studies}},
  booktitle = {Nature Communications},
  year = {2024},
  doi = {10.1038/s41467-024-45879-8},
}
Figure