arxiv.org·2026/10/23
针对LLM智能体复合策略执行中细调模型能力不足、LLM-as-a-judge昂贵且不稳定,SCOPE将自然语言策略编译为神经符号程序:弱模型回答谓词、确定性提取器精确计算、Python代码组合,并用局部与系统性对抗生成针对程序偏离点的反例,与程序联合优化。在Coaching、Escalation、Plan、Tile-match任务上,作者报告以gpt-5.4-nano执行时SCOPE准确率最高0.87、最低0.78,优于GEPA、MIPROv2、AFlow、CheckEval、RLIE等提示优化、工作流生成与任务分解基线,弱执行器上增益最大。用nano编译的程序转移到开放权重模型无需再优化,准确率接近gpt-5.5和gemini-3.1-pro等前沿推理模型;重复运行时Tile-match仅**5–7%**样本改判,后者分别为37%和26%。消融显示移除对抗生成使Coaching、Plan、Tile-match准确率显著下降,Escalation无变化。SCOPE把策略从交给前沿模型解释转为可检查、可部署的程序,但正确性依赖强教师而非形式化验证,验证仍是开放问题,并可扩展到基于rubric的评估和奖励建模。
为什么重要 用编译替代每次调用前沿模型做政策裁决,推理期可部署在弱模型上,降本且稳定可审计。适合 做 agent 安全护栏、政策执行或高吞吐内容审核的工程师与研究者。
LLM Agent 的策略执行已经从单轮内容审核转向针对多轮转录和工具调用轨迹评估的复合、应用特定策略。微调的护栏模型很高效,但在复合策略上会退化;而 LLM-as-a-judge 方法虽然准确率更高,却带来较高推理成本,并且往往产生不稳定预测。
神经符号方法提供了一个自然替代方案,它将策略分解为在显式逻辑下组合的窄神经决策。然而,现有符号层缺乏所需表达力,并且是针对固定数据而非策略本身进行优化。
为了解决这个问题,我们引入了 SCOPE,它将策略编译为由小型模型、确定性提取器以及组合其输出的代码执行的可执行神经谓词程序。该程序与其训练数据联合优化,并使用针对程序偏离策略之处生成反例的对抗生成。
我们在一个真实世界策略任务基准上评估 SCOPE,并将其与提示优化、任务分解和工作流生成方法进行比较,跨任务和模型取得了最高平均准确率。使用最弱执行器优化的程序无需进一步优化即可迁移到其他模型。
这使它们能够部署在生产环境中的低成本模型上,并在那里达到与前沿推理模型相当的准确率。与这些单体模型不同,SCOPE 产生明显更稳定的预测,并且每个裁决都可以通过产生它的谓词输出进行解释。
此外,我们通过消融研究验证了方法的关键组件。因此,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.
最优单元
12 个任务-执行器单元中最高或并列
平均迁移增益
五个开放权重模型 per-model 平均
Tile 稳定性
DeepSeek/Qwen vs gpt-5.5 37%
消融 Plan p
Welch's t 检验,移除对抗样本
注释 · 数据分别来自结果小节、迁移小节和消融表。出自 §5/表4
注释 · 同一执行器 gpt-5.4-nano 下,各任务最优结果。出自 表2

EVIDENCE / METHODS
表格
SCOPE 在四个任务上高于所有提示优化与分解基线;Plan 达 0.87。
| 方法 | Coaching | Escalation | Plan | Tile-match |
|---|---|---|---|---|
| Direct prompting | 0.60±0.03 | 0.56±0.03 | 0.59±0.03 | 0.38±0.03 |
| GEPA | 0.58±0.01 | 0.61±0.01 | 0.66±0.02 | 0.55±0.06 |
| MIPROv2 | 0.69±0.01 | 0.57±0.02 | 0.58±0.03 | 0.56±0.05 |
| AFlow | 0.83±0.02 | 0.86±0.03 | 0.75±0.08 | 0.68±0.09 |
| CheckEval | N/A | 0.58±0.08 | 0.54±0.04 | N/A |
| RLIE | N/A | 0.58±0.04 | 0.73±0.05 | N/A |
| SCOPE (ours) | 0.85±0.03 | 0.82±0.02 | 0.87±0.02 | 0.78±0.03 |
注释 · CheckEval 与 RLIE 仅支持二分类,只评估 Escalation 和 Plan。出自 表2
原版排版与图表 · 手机无法内嵌时可在浏览器打开。PDF 插件内选文不能传给网页助手。