SCOPE:将自然语言策略编译为神经符号谓词程序
SCOPE: Compiling Natural-Language Policies into Neurosymbolic Predicate Programs
AI总结:
提出SCOPE将自然语言策略编译为神经谓词程序,联合优化程序与训练数据,在策略任务基准上准确率最高,预测更稳定且可解释,可部署于低成本模型实现高效策略执行。
摘要:
针对大语言模型(LLM)智能体的策略执行已从单轮内容审核转向针对多轮对话记录和工具调用轨迹评估的复合、特定应用策略。微调后的防护模型效率高,但在复合策略上性能下降;而以LLM作为评判者的方法虽准确率更高,但推理成本高且预测不稳定。神经符号方法提供了自然替代方案,将策略分解为在显式逻辑下组合的窄域神经决策。然而现有符号层缺乏所需的表达能力,且针对固定数据而非策略本身优化。为解决此问题,我们提出SCOPE,它将策略编译为可执行的神经谓词程序,该程序由小型模型、确定性提取器及组合其输出的代码执行。该程序与训练数据联合优化,通过生成针对程序偏离策略之处的反例实现。我们在真实世界策略任务基准上,将SCOPE与提示优化、任务分解和工作流生成方法对比评估,在任务和模型上实现最高平均准确率。用最弱执行器优化的程序可无需进一步优化迁移至其他模型,使其能部署在生产环境的低成本模型上,且准确率可与前沿推理模型相当。与这些整体模型不同,SCOPE的预测更稳定,且每个裁决可通过产生它的谓词输出解释。此外,我们通过 ablation study( ablation研究)验证了方法的关键组件。因此,SCOPE可在生产规模实现可靠、可解释且高效的策略执行。
英文摘要:
Policy enforcement for LLM agents has shifted from single-turn content moderation to compound, application-specific policies evaluated over multi-turn transcripts and tool-call trajectories. Fine-tuned guardrail models are efficient but degrade on compound policies, and while LLM-as-a-judge approaches achieve higher accuracy, they incur high inference cost and tend to produce unstable predictions. Neurosymbolic methods offer a natural alternative, decomposing the policy into narrow neural decisions composed under explicit logic. However, existing symbolic layers lack the required expressiveness and are optimized against fixed data rather than the policy itself. To address this, we introduce SCOPE, which compiles a policy into an executable program of neural predicates executed by small models, deterministic extractors, and code that composes their outputs. The program is optimized jointly with its training data, using adversarial generation of counterexamples that target where the program deviates from the policy. We evaluate SCOPE on a benchmark of real-world policy tasks against prompt optimization, task decomposition, and workflow generation methods, achieving the highest average accuracy across tasks and models. Programs optimized with the weakest executor transfer to other models without further optimization. This allows them to be deployed in production on inexpensive models, where they reach accuracy comparable to frontier reasoning models. Unlike these monolithic models, SCOPE produces substantially more stable predictions, and each verdict is interpretable through the predicate outputs that produced it. Additionally, we validate the key components of our method through an ablation study. SCOPE thus enables reliable, interpretable, and efficient policy enforcement at production scale.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。