K-文化的一切——从回归到 K-美妆,发送到您的邮箱订阅邮件

METAL MEDIA

Agent Safety Should Be a Runtime Contract

arXiv:2608.112742026-08-10

AI智能体的安全应该由运行时的监管系统(harness)以契约方式强制执行,而不是仅靠模型训练来内置

本文认为,RLHF、DPO等模型训练手段本身无法保证会执行代码、修改文件、发送消息的自主智能体的安全性。作者主张应由连接模型与外部世界的非模型基础设施(harness)在运行时强制执行一种双面契约:预防面在危险动作发生前加以阻止,证据面则要求提供可验证的证据证明良好行为确实发生,才允许任务提交完成。文章用四条公开证据支撑这一立场:52起安全事件调查、32起虚假完成案例审计、12个公开智能体系统的轨迹审计,以及对28,560篇会议论文标题的分析。

METAL MEDIA 解读图

双面运行时安全契约

证据状态已报告实测结果

  1. 智能体执行自主智能体运行任务,产生包含工具调用、文件写入、命令输出等的轨迹
  2. 预防面沙箱、权限门、输出过滤器和行为监视器在危险动作发生前或执行过程中加以阻止或遏制
  3. 证据面只有轨迹中包含测试重跑、提交哈希、文件差异、引用核查等硬证据时,提交才被接受
  4. 组合门控将预防监视器与证据门形式化为有限状态检查器并组合,独立性假设下验证成本保持多项式级别
  5. 四条证据线52起事件、32起虚假完成案例、12个被审计系统、28,560篇论文标题共同指向同一结构性缺口
这是 METAL MEDIA 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 调查了2016年3月至2026年1月期间公开记录的52起AI智能体与LLM安全事件,并按反事实协议判断哪些若有harness层可被阻止或缓解
  2. 审计了32起虚假完成案例(31起无争议核心案例加1起有争议的示例案例),即智能体或模型声称任务成功但实际产出破损、幻觉、部分完成或奖励作弊的结果
  3. 对12个公开智能体系统与harness(包括GitHub Copilot和OSWorld)按六个证据门控维度进行轨迹模式审计
  4. 对2023至2025年NeurIPS、ICML、ICLR共28,560篇被接收论文的标题进行关键词分级审计,比较训练阶段与部署阶段安全研究的数量占比
  5. 正式定义了智能体轨迹模式(Agent Trajectory Schema)与带哈希链的证据链,区分硬证据与软证据,并提出一个组合门控命题,证明在独立性假设下组合多个预防监视器与证据门的验证成本仍是多项式级别
Figure 1: Two-faced harness for AI agents. Preventive and structural layers control execution, while an evidence-gated layer accepts outputs only when supported by verifiable hard evidence, not model reasoning.
Figure 1: Two-faced harness for AI agents. Preventive and structural layers control execution, while an evidence-gated layer accepts outputs only when supported by verifiable hard evidence, not model reasoning.
Table 1: Empirical evidence summary across four lines of public documentation. Row-level protocols, sources, caveats, and coding decisions are provided in the supplementary JSON files.
Source of evidenceCasesHeadline number
Incident Survey52 cases40 fully preventable, 11 mitigable, 1 primarily alignment/internal-goal case; one disputed public-report row is in the supplement
False Completion Audit31+1 casesAll-32 breakdown is 8 citation grounding, 8 log capture, 7 test run, 5 human approval, 3 external state, 1 screenshot
Trajectory Audit12 systems2 of 12 document submission-like evidence gates: GitHub Copilot via PR/CI artifacts and OSWorld as a benchmark harness
Proceedings Audit28,560 papersPooled 8–12× training/deployment imbalance across NeurIPS, ICML, and ICLR from 2023 to 2025; per-cell ratios vary
Table 2: Trajectory schema audit: 12 public agent systems and harnesses on six evidence-gating dimensions. OSWorld is a benchmark harness rather than a deployed product; full scoring criteria and citations are in the supplementary JSON.
SystemStruct. logTest runsFile diffsTool outScreensSubmit gate
Claude Codeyespartialyesyesnono
Cursor (CLI agent)yespartialyesyesnono
Devinyesyesyesyesyespartial
Aiderpartialyesyespartialnopartial
OpenHandsyesyesyesyespartialno
OpenAI Codex CLIyespartialyesyesnono
OpenAI Operatorpartialnonoyesyesno
Anthropic computer usepartialnonoyesyespartial
GitHub Copilot agentyesyesyesyesnoyes
Continue.devpartialpartialyesyesnopartial
Auto-GPTpartialnopartialyesnono
OSWorld baselineyesyesyesyesyesyes
Yes count (out of 12)7591142

研究结果

  • 在52起事件中,40起被判定为若有可运作的harness层(输入过滤、权限门、输出过滤、沙箱、轨迹监视器)即可完全预防,11起可部分缓解,仅1起(Meta的CICERO)主要归因于内部目标对齐问题
  • 在32起虚假完成案例中,失败类型分布为幻觉13起、破损8起、副作用5起、部分完成4起、奖励作弊2起
  • 在12个被审计的公开智能体系统中,只有GitHub Copilot编码代理(通过PR/CI产物)和OSWorld(通过基准执行检查)记录了类似提交门控的证据机制;9/12能捕获文件变更、11/12能捕获工具输出、7/12能捕获结构化日志,但很少真正据此门控提交
  • 在对2023至2025年NeurIPS/ICML/ICLR共28,560篇论文标题的汇总审计中,训练阶段的干预措施占对齐相关论文的约58%至64%,而部署阶段的harness机制仅占约5%至8%,汇总后训练/部署比例失衡达8至12倍,但各会议/年份的具体比例有所不同

可应用场景

  • 在编码智能体中设计证据门,要求补丁提交前必须通过开发者测试套件重跑、提供提交哈希以及非空的文件差异
  • 为高风险工具调用(如rm、git push、curl)设置人工审批门,而对读取、写入、测试等操作自动放行
  • 在部署智能体的组织中,将预防、检测、纠正、结构性四类harness层级纳入事件响应清单
  • 为监管或采购要求提供防篡改日志记录和标准化轨迹模式方面的参考设计

局限与待验证事项

  • 该契约只约束行为与提交,不涉及智能体的内在目标;论文明确将mesa优化问题排除在讨论范围之外
  • 组合门控命题只有在各监视器观测字母表互不重叠(独立)时才是多项式级别,若存在重叠则需退回到指数级的假设-保证推理
  • 论文承认基于分类器的预防组件在较窄的可监控领域内,与模型训练对齐存在类似的脆弱性
  • 事件调查与虚假完成审计都存在英语资料过度代表的问题,且任务专属证据模式(ℰT)目前只适用于已有明确正确性标准的任务
  • 文中提出的研究议程(标准化轨迹模式、发布任务级证据模式、系统级基准测试、失败报告协调机制等)仍是尚未完成的未来工作

为什么重要

目前大部分AI安全研究和经费都集中在模型训练阶段,但本文记录的事故(生产数据库被删除、虚构法律引用、零点击数据泄露)追根溯源都是运行时缺乏检查造成的,而非训练失败。对于构建或部署智能体的团队而言,这意味着不能仅凭模型自称任务完成就采信,而应要求测试重跑、提交哈希、引用核查等可验证的硬证据作为提交条件。

本文术语

  • Harness(监管系统) · 在推理阶段连接基础模型与外部世界的非模型基础设施,包括输入过滤、权限系统、沙箱和执行追踪
  • 轨迹(Trajectory) · 智能体运行过程中所有可观测事件的序列,如工具调用、文件写入、命令输出等
  • 证据门控提交(Evidence-gated submission) · 只有当轨迹中包含特定且可验证的证据artifact时,harness才接受任务为完成的契约
  • 硬证据与软证据 · 硬证据可由不依赖智能体内部状态的外部验证器核实(如测试重跑);软证据则依赖对模型自我报告的信任
  • 组合门控(Compositional gating) · 将预防层与证据门建模为有限状态监视器并加以组合,在观测独立的前提下验证成本保持多项式级别的命题

论文原文摘要(英文)

The dominant paradigm treats AI safety as a property to be instilled during model training via RLHF, DPO, or Constitutional AI. We argue this is structurally insufficient for autonomous agents that execute code, mutate files, send messages, and modify databases. Agent safety should be a runtime contract enforced by the harness, and the contract has two complementary faces. The preventive face blocks dangerous actions before they happen via sandboxes, permission gates, output filters, and trajectory monitors. The evidential face requires verifiable proof that good actions actually happened, gating task submission on hard evidence such as test runs, log captures, file diffs, and citation grounding. We ground the position in four lines of public evidence, with row-level protocols and data released in the supplementary JSON files: a survey of 52 documented AI-agent and LLM safety incidents, a false-completion audit with 31 non-contested core cases plus one disputed illustrative case, a trajectory-schema audit of 12 public agent systems and harnesses, and a title-level audit of all 28,560 papers accepted at NeurIPS, ICML, and ICLR 2023-2025 showing a pooled 8-12x imbalance between training-time and deployment-time publication. Two prior communities that needed to enforce safety, computer security and the experimental sciences, converged on runtime contracts with both preventive and evidential elements; agentic AI is now under the same pressure. We formalize an Agent Trajectory Schema and Evidence Chain, state a compositional gating proposition based on standard monitor composition, and outline a research agenda. The right unit of safety in agentic AI is the trajectory-with-checkable-evidence, not the model.

作者 · Albus W. Ng

在 arXiv 阅读

最新论文

全部论文 →

METAL MEDIA 最新报道

图片来源: Albus W. Ng et al., arXiv:2608.11274, CC BY 4.0