LLMs能否超越经典超参数优化算法?对autoresearch的研究
Can LLMs Beat Classical Hyperparameter Optimization Algorithms? A Study on autoresearch
AI总结:
本文通过autoresearch平台比较经典HPO算法与LLM方法在优化小型语言模型超参数时的表现,发现经典方法在避免内存故障方面更优,而LLM在代码编辑能力上有所提升,但未完全超越经典方法,提出Centaur混合方法结合经典算法和LLM优势,取得最佳效果。
摘要:
autoresearch仓库使LLM代理能够通过直接编辑训练代码来优化超参数。我们利用它作为测试平台,比较经典HPO算法与基于LLM的方法在固定计算预算下优化小型语言模型超参数的表现。在定义固定搜索空间时,经典方法如CMA-ES和TPE始终优于LLM代理,其中避免内存故障比搜索多样性更重要。允许LLM直接编辑源代码缩小了与经典方法的差距,但未完全关闭。即使使用前沿模型如Claude Opus 4.6和Gemini 3.1 Pro Preview,LLM仍难以跟踪优化状态。相比之下,经典方法缺乏LLM的领域知识。为结合两者优势,我们引入Centaur,一种结合CMA-ES的可解释内部状态(包括均值向量、步长和协方差矩阵)与LLM的混合方法。Centaur在实验中取得最佳结果,0.8B LLM已足以超越所有经典和纯LLM方法。不受约束的代码编辑需要更大模型才能与经典方法竞争。我们进一步分析了搜索多样性、模型规模从0.8B到前沿模型以及Centaur中LLM提议试验的比例。总体而言,我们的结果表明,LLM最有效作为经典优化器的补充,而非替代品。
英文摘要:
The autoresearch repository enables an LLM agent to optimize hyperparameters by editing training code directly. We use it as a testbed to compare classical HPO algorithms against LLM-based methods on tuning the hyperparameters of a small language model under a fixed compute budget. When defining a fixed search space over autoresearch, classical methods such as CMA-ES and TPE consistently outperform LLM-based agents, where avoiding out-of-memory failures matters more than search diversity. Allowing the LLM to directly edit source code narrows the gap to the classical methods but does not close it, even with frontier models available at the time of writing such as Claude Opus 4.6 and Gemini 3.1 Pro Preview. We observe that LLMs struggle to track optimization state across trials. In contrast, classical methods lack the domain knowledge of LLMs. To combine the strengths of both, we introduce Centaur, a hybrid that shares CMA-ES's interpretable internal state, including mean vector, step-size, and covariance matrix, with an LLM. Centaur achieves the best result in our experiments, and a 0.8B LLM already suffices to outperform all classical and pure LLM methods. Unconstrained code editing requires larger models to be competitive with classical methods. We further analyze search diversity, model scaling from 0.8B to frontier models, and ablate the fraction of LLM-proposed trials in Centaur. All in all, our results suggest that LLMs are most effective as a complement to classical optimizers, not as a replacement. Code is available at https://github.com/ferreirafabio/autoresearch-automl & interactive demo at https://ferreirafabio.github.io/autoresearch-automl.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。