LLMs as In-Context Meta-Learners for Model and Hyperparameter Selection
Youssef Attia El Hili, Albert Thomas, Malik Tiomoko, Abdelhakim Benechehab, Corentin Léger, Corinne Ancourt, Balázs Kégl
TL;DR
The paper tackles the $CASH$ problem by exploring whether large language models can act as in-context meta-learners to recommend model families and hyperparameters from dataset metadata, with and without prior task examples. It formalizes the problem, introduces zero-shot and meta-informed prompting strategies, and validates them on synthetic and real-world tabular tasks, including 22 Kaggle challenges. In synthetic experiments, a 72B LLM demonstrates robust in-context adaptation as context grows; in real tasks, the Meta-Informed prompt achieves the best average performance, approaching expert-driven selections while drastically reducing search costs. The results suggest LLMs can serve as lightweight, general-purpose assistants that complement AutoML pipelines, offering strong task-dependent defaults and cross-task generalization for model selection and hyperparameter optimization.
Abstract
Model and hyperparameter selection are critical but challenging in machine learning, typically requiring expert intuition or expensive automated search. We investigate whether large language models (LLMs) can act as in-context meta-learners for this task. By converting each dataset into interpretable metadata, we prompt an LLM to recommend both model families and hyperparameters. We study two prompting strategies: (1) a zero-shot mode relying solely on pretrained knowledge, and (2) a meta-informed mode augmented with examples of models and their performance on past tasks. Across synthetic and real-world benchmarks, we show that LLMs can exploit dataset metadata to recommend competitive models and hyperparameters without search, and that improvements from meta-informed prompting demonstrate their capacity for in-context meta-learning. These results highlight a promising new role for LLMs as lightweight, general-purpose assistants for model selection and hyperparameter optimization.
