arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.16218cs.AIcs.LG
收藏

Trace是下一个自动微分:基于丰富反馈、执行轨迹与大语言模型的生成式优化

Trace is the Next AutoDiff: Generative Optimization with Rich Feedback, Execution Traces, and LLMs

Microsoft Research(微软研究院);Stanford(斯坦福大学);Netflix(网飞公司)

Ching-An Cheng, Allen Nie, Adith Swaminathan

AI总结:

针对通用不可微计算工作流的优化难题,研究团队提出带轨迹预言机的生成式优化框架OPTO,配套Trace库与OptoPrime优化器,可适配多类优化任务,性能媲美领域专用方案,为下一代交互式智能体研究提供平台。

摘要:

我们研究一类由编码助手、机器人、副驾驶等AI系统的自动化设计与更新所驱动的优化问题。PyTorch等AutoDiff(自动微分)框架可实现可微系统的高效端到端优化。然而,通用计算工作流可能是不可微的,且涉及丰富反馈(如控制台输出或用户响应)、异构参数(如提示词、代码)以及复杂目标(不止于最大化某个分数)。我们探究端到端生成式优化——在优化器内部使用LLM(大语言模型)等生成式模型,实现通用计算工作流的自动更新。我们发现,工作流执行轨迹类似于AutoDiff中的反向传播梯度,能够为解释反馈以实现高效优化提供关键信息。形式上,我们构建了一种新的数学框架:Optimization with Trace Oracle(带轨迹预言机的优化,简称OPTO)。在OPTO中,优化器接收执行轨迹以及关于计算输出的反馈,并迭代更新参数。我们提供了一个名为Trace的Python库,它使用类PyTorch语法,可将工作流优化问题高效转换为OPTO实例。借助Trace,我们开发了一种通用的基于LLM的生成式优化器OptoPrime。在实证研究中,我们发现OptoPrime可实现一阶数值优化、提示词优化、超参数调优、机器人控制器设计、代码调试等任务,且性能通常能与各领域的专用优化器相媲美。我们设想Trace可作为一个开放研究平台,用于设计新型生成式优化器,开发下一代交互式学习智能体。项目网站:https://microsoft.github.io/Trace/。

英文摘要:

We study a class of optimization problems motivated by automating the design and update of AI systems like coding assistants, robots, and copilots. AutoDiff frameworks, like PyTorch, enable efficient end-to-end optimization of differentiable systems. However, general computational workflows can be non-differentiable and involve rich feedback (e.g. console output or user's responses), heterogeneous parameters (e.g. prompts, codes), and intricate objectives (beyond maximizing a score). We investigate end-to-end generative optimization -- using generative models such as LLMs within the optimizer for automatic updating of general computational workflows. We discover that workflow execution traces are akin to back-propagated gradients in AutoDiff and can provide key information to interpret feedback for efficient optimization. Formally, we frame a new mathematical setup, Optimization with Trace Oracle (OPTO). In OPTO, an optimizer receives an execution trace along with feedback on the computed output and updates parameters iteratively. We provide a Python library, Trace, that efficiently converts a workflow optimization problem into an OPTO instance using PyTorch-like syntax. Using Trace, we develop a general LLM-based generative optimizer called OptoPrime. In empirical studies, we find that OptoPrime is capable of first-order numerical optimization, prompt optimization, hyper-parameter tuning, robot controller design, code debugging, etc., and is often competitive with specialized optimizers for each domain. We envision Trace as an open research platform for devising novel generative optimizers and developing the next generation of interactive learning agents. Website: https://microsoft.github.io/Trace/.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑