arXiv:2603.25111cs.LGcs.PL2026-03被引 5

让自演化智能体在不犯错的前提下持续优化,通过形式化约束确保安全可靠。

SEVerA: Verified Synthesis of Self-Evolving Agents

  • 用一阶逻辑定义生成模型输出的正式合约,确保任何输入下结果都合规。
  • 零违规约束下性能超越现有方法,在多个任务中实现更高质量的自主决策。
  • 适合需要高可靠性与安全性验证的智能体应用,如程序修复、科学发现。

近期研究显示,自演化大模型智能体在程序修复和科学发现等任务中表现优异。该范式中,规划型大模型生成调用参数化模型(包括大模型)的智能体程序,并针对具体任务进行微调以提升性能。然而,现有自演化框架缺乏对安全性和正确性的形式化保证。由于此类程序常在未知输入下自主执行,可靠性与安全性面临风险。本文将智能体代码生成建模为带约束的学习问题,结合硬性形式规范与软性目标以捕捉任务效用。提出形式化防护生成模型(FGGM),使规划大模型可使用一阶逻辑为每次生成模型调用指定正式输出合约。每个FGGM调用均包裹于经过验证的拒绝采样器与回退机制中,确保任意输入与参数设置下返回结果均满足合约。基于FGGM,构建SEVerA(自演化验证智能体)三阶段框架:搜索阶段生成包含FGGM调用的候选参数化程序;验证阶段证明所有参数值下均满足硬约束,将问题转化为无约束学习;学习阶段采用可扩展梯度优化方法(包括类似GRPO的微调),在保持正确性的前提下提升软目标。在Dafny程序验证、符号数学合成及策略合规智能体工具使用(τ²-bench)任务上评估,SEVerA实现零约束违规,且性能优于无约束与当前最优基线,表明形式化行为约束不仅保障正确性,还能引导合成出更高质量的智能体。

原文摘要 · Abstract (English)

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.

智能体形式化验证自演化大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。