Learning a skill generally relies on both practical experience by doer and insightful high-level guidance by instructor. Will this strategy also work well for solving complex non-convex optimization problems? Here, a common gradient-based optimizer acts like a disciplined doer, making locally optimal update at each step. Recent methods utilize large language models (LLMs) to optimize solutions for concrete problems by inferring from natural language instructions, akin to a high-level instructor. In this paper, we show that these two optimizers are complementary to each other, suggesting a collaborative optimization approach. The gradient-based optimizer and LLM-based optimizer are combined in an interleaved manner. We instruct LLMs using task descriptions and timely optimization trajectories recorded during gradient-based optimization. Inferred results from LLMs are used as restarting points for the next stage of gradient optimization. By leveraging both the locally rigorous gradient-based optimizer and the high-level deductive LLM-based optimizer, our combined optimization method consistently yields improvements over competitive baseline prompt tuning methods. Our results demonstrate the synergistic effect of conventional gradient-based optimization and the inference ability of LLMs. The code is released at https://github.com/guozix/LLM-catalyst.
翻译:技能学习通常依赖于实践者的直接经验与指导者的高层指引。这一策略是否同样适用于求解复杂的非凸优化问题?传统的基于梯度的优化器如同严谨的实践者,在每一步进行局部最优更新;而近期研究利用大语言模型(LLMs)通过自然语言指令推理来优化具体问题的解,其作用类似于高层指导者。本文论证了这两种优化器具有互补性,并提出一种协同优化框架。该框架以交错方式结合基于梯度的优化器与基于LLM的优化器:我们使用任务描述及梯度优化过程中记录的实时优化轨迹来指导LLM,并将其推理结果作为下一阶段梯度优化的重启点。通过同时利用局部严谨的梯度优化器与具备高层演绎能力的LLM优化器,本方法在多种具有竞争力的提示调优基线方法上均取得稳定提升。实验结果验证了传统梯度优化与LLM推理能力之间的协同效应。代码已发布于 https://github.com/guozix/LLM-catalyst。