Large Language Models for Constructing and Optimizing Machine Learning Workflows: A Survey

Yang Gu, Hengyu You, Jian Cao, Muran YuACM Transactions on Software Engineering and Methodology 2024 · DOI

TL;DR

This survey provides a comprehensive overview of how Large Language Models (LLMs) are revolutionizing the construction and optimization of Machine Learning (ML) workflows. It details how LLMs are being applied across all stages of the ML pipeline, from data preparation to model evaluation, offering significant potential for automation and enhanced efficiency, while also highlighting critical challenges that need to be addressed for their reliable adoption.

What Problem Does This Paper Address?

Building effective Machine Learning (ML) workflows is a complex and time-consuming process that requires significant ML expertise and domain knowledge. While Automated ML (AutoML) has made strides in automating parts of this process, traditional AutoML frameworks often struggle with limited adaptability, constrained search spaces, and a lack of interpretability. The advent of Large Language Models (LLMs) presents a promising new avenue to address these limitations by leveraging their natural language understanding, reasoning, and code generation capabilities to automate and enhance various stages of the ML workflow. This paper aims to survey the current landscape of LLM applications in this domain, identify trends, and outline future research directions.

Methods

The paper surveys existing research by categorizing LLM applications based on the stages of an ML workflow:

  • Data and Feature Engineering: LLMs are used for data acquisition (recommendation and summarization), data cleaning (imputation, preparation, and transformation), and data augmentation (modifying existing data and generating synthetic datasets). They also assist in feature selection (identifying relevant features), feature extraction (transforming raw features into more informative ones), and feature synthesis (generating new, complementary features).
  • Model Selection and Hyperparameter Optimization (HPO): LLMs are employed for model selection through retrieval-based methods (selecting from a repository of models) and generation-based methods (synthesizing new models or configurations). For HPO, LLMs are used in execution-based methods (testing recommended hyperparameters) and prediction-based methods (recommending hyperparameters based on predicted performance).
  • Workflow Evaluation: LLMs are used to predict key performance metrics, estimate workflow performance, and provide more granular evaluations, often by simulating training processes to reduce computational costs.

Datasets

The paper does not explicitly list specific datasets used for training or evaluation of the LLM-based methods discussed. However, it refers to common ML datasets like the HousingPrice dataset and mentions the use of "vast textual datasets" for pre-training LLMs. It also highlights the need for new benchmarks like MLE-Bench and MLAgentBench for evaluating LLM performance across ML workflow stages.

Key Insights and Ideas

  • LLMs as a unifying force: LLMs are proving to be versatile tools that can bridge the gap between human intent and complex ML operations, enabling more intuitive and accessible ML workflow development.
  • Beyond traditional AutoML: LLMs offer a more flexible and adaptive approach compared to traditional AutoML, which often relies on predefined search spaces and heuristics. LLMs can interpret natural language instructions and generate code, making the process more interactive and human-centric.
  • Interpretability boost: LLMs have the potential to improve the interpretability of ML workflows by generating explanations for their decisions and recommendations, which is a significant challenge in current AutoML systems.
  • Challenges remain significant: Despite the promise, issues like "hallucinations" (generating incorrect or nonsensical outputs), data leakage, context length limitations, and high computational costs are major hurdles to widespread adoption.
  • Human-in-the-loop is crucial: For critical applications, a human-in-the-loop approach is essential to validate LLM outputs, mitigate risks, and ensure the reliability and fairness of ML workflows.

Key Results

The paper is a survey and does not present novel experimental results. Instead, it synthesizes findings from numerous existing research papers. The key "results" are the identification and categorization of various LLM applications across ML workflow stages, demonstrating their potential to:

  • Automate data acquisition, cleaning, and augmentation.
  • Streamline feature selection, extraction, and synthesis.
  • Improve model selection and hyperparameter optimization through retrieval and generation.
  • Accelerate workflow evaluation by predicting performance metrics.

Limitations and Future Work

Limitations Acknowledged:

  • Hallucinations: LLMs can generate factually incorrect or unfaithful content, leading to unreliable ML workflows.
  • Data Leakage: LLMs pre-trained on common datasets can lead to inflated performance estimates and biased outputs.
  • Context Length Limitations: LLMs have constraints on the amount of information they can process in a single prompt, limiting their ability to handle large datasets and complex tasks.
  • Computational Cost: Training and deploying LLMs are computationally expensive.
  • Interpretability: While LLMs can provide explanations, their opaque nature can still make it difficult to fully understand their reasoning.
  • Bias: LLMs can inherit biases from their training data, leading to unfair outcomes.

Future Work Directions:

  • End-to-End Automation: Developing LLM systems that can autonomously handle all stages of the ML pipeline.
  • Hybrid Approaches: Integrating LLMs with specialized models to leverage the strengths of both for specific tasks.
  • Robust Verification and Quality Management: Developing mechanisms to ensure the reliability and correctness of LLM-generated workflows.
  • Context-Aware Deployment: Tailoring LLM deployment strategies to specific ML tasks and environments.
  • Risk Mitigation: Implementing strategies to address data leakage, bias, and hallucinations.
  • Adaptation of Development Models: Rethinking lifecycle boundaries and formalizing uncertainty handling for LLM-assisted workflow generation.
  • Explainable AI (XAI) Integration: Combining LLMs with XAI techniques for deeper insights into model behavior.
  • Resource Efficiency: Developing lightweight LLM architectures and optimizing orchestration for reduced computational demands.

Summary updated

BibTeX
@article{gu2024large,
  author = {Yang Gu and Hengyu You and Jian Cao and Muran Yu},
  title = {{Large Language Models for Constructing and Optimizing Machine Learning Workflows: A Survey}},
  journal = {ACM Transactions on Software Engineering and Methodology},
  year = {2024},
  doi = {10.1145/3773084},
}
Figure