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.
翻译:模型与超参数选择是机器学习中至关重要但极具挑战性的环节,通常需要依赖专家经验或昂贵的自动化搜索。本研究探讨大型语言模型(LLMs)能否作为该任务的上下文元学习器。通过将每个数据集转化为可解释的元数据,我们引导LLM同时推荐模型族系与超参数配置。我们研究了两种提示策略:(1)完全依赖预训练知识的零样本模式;(2)通过历史任务中模型及其性能示例增强的元信息模式。在合成与真实场景的基准测试中,我们证明LLMs能够利用数据集元数据,在无需搜索的情况下推荐具有竞争力的模型与超参数,且元信息提示带来的性能提升验证了其上下文元学习能力。这些结果表明,LLMs有望成为模型选择与超参数优化领域中轻量级、通用型的智能助手。