我们研究一类由编码助手、机器人、副驾驶等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/.
From Agent Traces to Trust: A Survey of Evidence Tracing and Execution Provenance in LLM Agents
Griffith University(格里菲斯大学);Jiangsu University(江苏大学);University of Southern Queensland(南方昆士兰大学);Peking University(北京大学);Great Bay University(大湾大学);Nanjing University(南京大学);Macquarie University(麦觉瑞大学);Southern University of Science and Technology(南方科学与技术大学)
Chain of Execution Supervision Promotes General Reasoning in Large Language Models
Qwen Team, Alibaba(阿里巴巴通义实验室);Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));University of Science and Technology of China(中国科学技术大学)