MarkTechPost@AI 2024年07月28日
Microsoft and Stanford University Researchers Introduce Trace: A Groundbreaking Python Framework Poised to Revolutionize the Automatic Optimization of AI Systems
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

微软研究院和斯坦福大学的研究人员提出了一种名为 Trace 的框架,用于自动设计和更新 AI 系统,例如编码助手和机器人。Trace 将计算工作流视为一个类似于神经网络的图形,并使用 Trace 优化器(OPTO)来优化异构参数。Trace 有效地将工作流转换为 OPTO 实例,允许通用优化器 OptoPrime 基于执行跟踪和反馈迭代地更新参数。这种方法提高了各种领域的优化效率,在提示优化、超参数调整和机器人控制器设计等任务中优于专门的优化器。

😊 **Trace 框架概述** Trace 是一种新颖的框架,用于自动设计和更新 AI 系统,例如编码助手和机器人。它将计算工作流视为一个图形,类似于神经网络,并使用 Trace 优化器(OPTO)来优化异构参数,例如提示和 ML 超参数。 Trace 有效地将工作流转换为 OPTO 实例,允许通用优化器 OptoPrime 基于执行跟踪和反馈迭代地更新参数。这种方法提高了各种领域的优化效率,在提示优化、超参数调整和机器人控制器设计等任务中优于专门的优化器。

😁 **OPTO 优化器** Trace 的核心是 OPTO 框架,它定义了用于迭代优化的基于图形的抽象。计算图是一个 DAG,其中节点表示对象,边表示输入-输出关系。在 OPTO 中,优化器选择参数,Trace 优化器返回包含计算图和输入输出的跟踪反馈。这种反馈可以包括分数、梯度或自然语言提示。优化器使用这种反馈迭代地更新参数。与黑盒设置不同,执行跟踪提供了通往输出的清晰路径,从而能够有效地更新参数。Trace 利用 OPTO 通过抽象设计和特定于域的组件来优化各种工作流。

😉 **OptoPrime 算法** 基于 LLM 的优化算法 OptoPrime 是为 OPTO 问题而设计的。它利用 LLM 的编码和调试能力来处理执行跟踪子图。Trace 反馈是一个伪算法,允许 LLM 建议参数更新。OptoPrime 包含一个内存模块,用于跟踪过去的参数-反馈对,从而提高鲁棒性。实验表明,OptoPrime 在数值优化、交通控制、提示优化和长期机器人控制任务中非常有效。OptoPrime 表现出优于其他优化器的性能,特别是在利用执行跟踪信息和内存时。

😎 **Trace 的未来方向** Trace 将计算工作流优化问题转换为 OPTO 问题,这在 OPTO 优化器 OptoPrime 中得到了有效地证明。这标志着迈向新的优化范式的第一步,并拥有各种未来的方向。LLM 推理方面的改进,例如思维链、少样本提示、工具使用和多代理工作流,可以改进或激发新的 OPTO 优化器。结合 LLM 和搜索算法以及专门工具的混合工作流可以导致通用的 OPTO 优化器。专门针对特定计算(尤其是大型图)的传播器以及开发能够进行反事实推理的优化器可以提高效率。非文本上下文和反馈也可以扩展 Trace 的适用性。

Designing computational workflows for AI applications, such as chatbots and coding assistants, is complex due to the need to manage numerous heterogeneous parameters, such as prompts and ML hyper-parameters. Post-deployment errors require manual updates, adding to the challenge. The study explores optimization problems aimed at automating the design and updating of these workflows. Given their intricate nature, involving interdependent steps and semi-black-box operations, traditional optimization techniques like Bayesian Optimization and Reinforcement Learning often need to be more efficient. LLM-based optimizers have been proposed to enhance efficiency, but most still rely on scalar feedback and handle workflows with only a single component.

Microsoft Research and Stanford University researchers propose a framework called Trace to automate the design and updating of AI systems like coding assistants and robots. Trace treats the computational workflow as a graph, similar to neural networks, and optimizes heterogeneous parameters using Optimization with Trace Oracle (OPTO). Trace efficiently converts workflows into OPTO instances, allowing a general-purpose optimizer, OptoPrime, to update parameters based on execution traces and feedback iteratively. This approach enhances optimization efficiency across various domains, outperforming specialized optimizers in tasks like prompt optimization, hyper-parameter tuning, and robot controller design.

Existing frameworks like LangChain, Semantic Kernels, AutoGen, and DSPy allow for composing and optimizing computational workflows, mainly using scalar feedback and black-box search techniques. Unlike these, Trace uses execution tracing for automatic optimization, generalizing the computational graph to suit various workflows. Trace’s OPTO framework supports joint optimization of prompts, hyperparameters, and codes with rich feedback and adapts dynamically to changes in the workflow structure. It extends AutoDiff principles to non-differentiable workflows, enabling efficient self-adapting agents and general-purpose optimization across diverse applications, outperforming specialized optimizers in several tasks.

OPTO forms the basis of Trace, defining a graph-based abstraction for iterative optimization. A computational graph is a DAG where nodes represent objects and edges denote input-output relationships. In OPTO, an optimizer selects parameters, and the Trace Oracle returns trace feedback consisting of a computational graph and input on the output. This feedback can include scores, gradients, or natural language hints. The optimizer uses this feedback to update parameters iteratively. Unlike black-box setups, the execution trace provides a clear path to the output, enabling efficient parameter updates. Trace leverages OPTO to optimize various workflows by abstracting design and domain-specific components.

The LLM-based optimization algorithm OptoPrime is designed for the OPTO problem. It leverages the LLMs’ coding and debugging capabilities to handle execution trace subgraphs. Trace feedback is a pseudo-algorithm, allowing the LLM to suggest parameter updates. OptoPrime includes a memory module for tracking past parameter-feedback pairs, enhancing robustness. Experiments show OptoPrime’s efficacy in numerical optimization, traffic control, prompt optimization, and long-horizon robot control tasks. OptoPrime demonstrates superior performance compared to other optimizers, particularly when leveraging execution trace information and memory.

Trace converts computational workflow optimization problems into OPTO problems, which is demonstrated effectively with the OPTO optimizer, OptoPrime. This marks an initial step towards a new optimization paradigm with various future directions. Enhancements in LLM reasoning, such as Chain-of-Thought, Few-Shot Prompting, Tool Use, and Multi-Agent Workflows, could improve or inspire new OPTO optimizers. A hybrid workflow combining LLM and search algorithms with specialized tools could lead to a general-purpose OPTO optimizer. Specializing the propagator for specific computations, particularly large graphs, and developing optimizers capable of counterfactual reasoning could improve efficiency. Non-textual contexts and feedback could also extend Trace’s applicability.


Check out the Details, Project, and GitHub. All credit for this research goes to the researchers of this project. Also, don’t forget to follow us on Twitter and join our Telegram Channel and LinkedIn Group. If you like our work, you will love our newsletter..

Don’t Forget to join our 47k+ ML SubReddit

Find Upcoming AI Webinars here

The post Microsoft and Stanford University Researchers Introduce Trace: A Groundbreaking Python Framework Poised to Revolutionize the Automatic Optimization of AI Systems appeared first on MarkTechPost.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Trace AI 优化 计算工作流 OPTO OptoPrime
相关文章