SEVerA: 验证合成自进化代理
SEVerA: Verified Synthesis of Self-Evolving Agents
AI总结:
SEVerA通过引入形式化guarded生成模型,结合搜索、验证和学习三阶段框架,在程序验证、符号数学合成等任务中实现零约束违规,提升自进化代理的正确性和性能。
摘要:
最近的进展表明,自进化大语言模型代理在程序修复和科学发现等任务中表现出色。在这一范式中,规划LLM合成一个调用参数模型的代理程序,包括LLM,然后根据任务进行微调以提高性能。然而,现有自进化代理框架没有提供安全性和正确性的正式保证。因为此类程序通常在未见过的输入上自主执行,这种缺乏保证引发了可靠性与安全性的担忧。我们把代理代码生成视为一个约束学习问题,结合硬形式规范与软目标以捕捉任务效用。我们引入了形式化guarded生成模型(FGGM),允许规划LLM使用一阶逻辑为每个生成模型调用指定形式化输出合同。每个FGGM调用用经过验证的回退拒绝采样器包裹底层模型,确保返回的输出在任何输入和参数设置下都满足合同。基于FGGM,我们提出了SEVerA(Self-Evolving Verified Agents),一个三阶段框架:搜索合成包含FGGM调用的候选参数程序;验证证明所有参数值下的正确性,将问题转化为无约束学习;学习应用可扩展的梯度优化方法,包括GRPO式微调,以提高软目标同时保持正确性。我们在Dafny程序验证、符号数学合成和符合政策的代理工具使用(τ²-bench)上评估SEVerA。在所有任务中,SEVerA实现零约束违规,同时在无约束和SOTA基线之上提升性能,表明形式化行为约束不仅保证正确性,还引导合成向更高质量的代理发展。
英文摘要:
Recent advances have shown the effectiveness of self-evolving LLM agents on tasks such as program repair and scientific discovery. In this paradigm, a planner LLM synthesizes an agent program that invokes parametric models, including LLMs, which are then tuned per task to improve performance. However, existing self-evolving agent frameworks provide no formal guarantees of safety or correctness. Because such programs are often executed autonomously on unseen inputs, this lack of guarantees raises reliability and security concerns. We formulate agentic code generation as a constrained learning problem, combining hard formal specifications with soft objectives capturing task utility. We introduce Formally Guarded Generative Models (FGGM), which allow the planner LLM to specify a formal output contract for each generative model call using first-order logic. Each FGGM call wraps the underlying model in a rejection sampler with a verified fallback, ensuring every returned output satisfies the contract for any input and parameter setting. Building on FGGM, we present SEVerA (Self-Evolving Verified Agents), a three-stage framework: Search synthesizes candidate parametric programs containing FGGM calls; Verification proves correctness with respect to hard constraints for all parameter values, reducing the problem to unconstrained learning; and Learning applies scalable gradient-based optimization, including GRPO-style fine-tuning, to improve the soft objective while preserving correctness. We evaluate SEVerA on Dafny program verification, symbolic math synthesis, and policy-compliant agentic tool use ($τ^2$-bench). Across tasks, SEVerA achieves zero constraint violations while improving performance over unconstrained and SOTA baselines, showing that formal behavioral constraints not only guarantee correctness but also steer synthesis toward higher-quality agents.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。