Large language models streamline automated machine learning for clinical studies

Soroosh Tayebi Arasteh, Tianyu Han, Mahshad Lotfinia, Christiane Kühl, Jakob Nikolas Kather, Daniel Truhn, Sven Nebelung

Abstract A knowledge gap persists between machine learning (ML) developers (e.g., data scientists) and practitioners (e.g., clinicians), hampering the full utilization of ML for clinical data analysis. We investigated the potential of the ChatGPT Advanced Data Analysis (ADA), an extension of GPT-4, to bridge this gap and perform ML analyses efficiently. Real-world clinical datasets and study details from large trials across various medical specialties were presented to ChatGPT ADA without specific guidance. ChatGPT ADA autonomously developed state-of-the-art ML models based on the original study's training data to predict clinical outcomes such as cancer development, cancer progression, disease complications, or biomarkers such as pathogenic gene sequences. Following the re-implementation and optimization of the published models, the head-to-head comparison of the ChatGPT ADA-crafted ML models and their respective manually crafted counterparts revealed no significant differences in traditional performance metrics (p ≥ 0.072). Strikingly, the ChatGPT ADA-crafted ML models often outperformed their counterparts. In conclusion, ChatGPT ADA offers a promising avenue to democratize ML in medicine by simplifying complex data analyses, yet should enhance, not replace, specialized training and resources, to promote broader applications in medical research and practice.

Introduction

There is a persistent "knowledge gap" in medicine: clinicians possess the data and the vital research questions, but they often lack the specialized programming and data science skills required to build sophisticated machine learning (ML) models. While Automated Machine Learning (AutoML) tools exist, they typically require a degree of technical expertise to configure and interpret. This study, published in Nature Communications, investigates whether Large Language Models (LLMs)—specifically ChatGPT’s Advanced Data Analysis (ADA) feature—can act as an autonomous data scientist, taking raw datasets and simple English instructions to produce clinically valid predictive models.

Methodology

The researchers employed a "zero-guidance" approach to test ChatGPT ADA (based on GPT-4). The AI was provided with raw datasets from four major clinical trials and a straightforward natural language prompt, such as: "Analyze this patient data and build a machine-learning model predicting 12-month mortality rates."

Overview of the study workflow, from data collection across four medical specialties to automated processing and expert performance evaluation.

To evaluate the AI's performance, its results were compared against two benchmarks:

  1. The Original Study: Performance metrics from the peer-reviewed papers associated with the datasets.
  2. The "Seasoned Data Scientist": A human expert with five years of ML experience who manually re-implemented and optimized the models using standard Python libraries.

The AI was responsible for the entire pipeline: data cleaning, handling missing values, feature engineering, model selection (e.g., Gradient Boosting Machines or Random Forests), and explainability analysis using SHAP (Shapley Additive exPlanations).

Clinical Datasets

The study utilized real-world data from four distinct medical specialties:

  • Endocrinologic Oncology: Predicting metastatic disease in patients with rare tumors (pheochromocytoma and paraganglioma).
  • Gastrointestinal Oncology: Screening for esophageal cancer using cytology and epidemiologic data.
  • Otolaryngology: Identifying pathogenic genetic variants related to hereditary hearing loss.
  • Cardiology: Predicting cardiac amyloidosis from electronic health records.

Key Insights and Results

ChatGPT ADA demonstrated significant autonomy in its decision-making. For instance, it correctly identified appropriate imputation methods for missing values based on the biological context of the data. It also provided built-in explainability by generating SHAP plots, identifying which clinical features—such as age or specific biomarkers—were most influential in its predictions.

ChatGPT Advanced Data Analysis (ADA) autonomously outlining its multi-step machine learning pipeline.

Performance Metrics

  • Performance Parity: No significant differences were found in traditional performance metrics (like AUROC) between the AI-crafted models and human-crafted ones ($p \ge 0.072$).
  • Superior Accuracy: In the esophageal cancer trial, ChatGPT’s model achieved an AUROC of 0.979, outperforming the original study’s best model of 0.960.
  • Efficiency: While a human expert might spend days or weeks on data preparation and hyperparameter tuning, ChatGPT completed the entire analysis pipeline in less than five minutes per dataset.

Discussion and Limitations

While the results suggest a future where clinicians can conduct sophisticated data analysis independently, several hurdles remain. Data privacy is a primary concern, as ChatGPT ADA currently requires uploading data to OpenAI’s servers, which may conflict with HIPAA and GDPR regulations. Additionally, while the models are explainable, the reasoning the LLM uses to select specific algorithms remains somewhat opaque.

Furthermore, the study used structured data from clinical trials; "real-world" hospital data is often noisier and may present greater challenges. Despite these limitations, the study concludes that LLMs offer a promising avenue to democratize ML in medicine, acting as a powerful tool to enhance, rather than replace, specialized medical research resources.

Summary updated

BibTeX
@inproceedings{arasteh2024large,
  author = {Soroosh Tayebi Arasteh and Tianyu Han and Mahshad Lotfinia and Christiane Kühl and Jakob Nikolas Kather and Daniel Truhn and Sven Nebelung},
  title = {{Large language models streamline automated machine learning for clinical studies}},
  booktitle = {Nature Communications},
  year = {2024},
  doi = {10.1038/s41467-024-45879-8},
}
Figure