Skip to main content
QUICK REVIEW

[论文解读] Tracking Capabilities for Safer Agents

Martin Odersky, Yaoyu Zhao|arXiv (Cornell University)|Mar 1, 2026
Security and Verification in Computing被引用 0
一句话总结

该论文提出 tacit,一种基于 Scala 3 的安全护栏,利用跟踪的能力来限制 AI 代理的工具使用,在保持表达能力的同时防止信息泄露和不安全副作用。

ABSTRACT

AI agents that interact with the real world through tool calls pose fundamental safety challenges: agents might leak private information, cause unintended side effects, or be manipulated through prompt injection. To address these challenges, we propose to put the agent in a programming-language-based "safety harness": instead of calling tools directly, agents express their intentions as code in a capability-safe language: Scala 3 with capture checking. Capabilities are program variables that regulate access to effects and resources of interest. Scala's type system tracks capabilities statically, providing fine-grained control over what an agent can do. In particular, it enables local purity, the ability to enforce that sub-computations are side-effect-free, preventing information leakage when agents process classified data. We demonstrate that extensible agent safety harnesses can be built by leveraging a strong type system with tracked capabilities. Our experiments show that agents can generate capability-safe code with no significant loss in task performance, while the type system reliably prevents unsafe behaviors such as information leakage and malicious side effects.

研究动机与目标

  • 在现实世界中,动机化代理与工具及数据交互时的安全风险。
  • 提出一个基于能力的安全护栏,通过类型系统跟踪访问与影响。
  • 展示能力跟踪可对信息泄露和不安全副作用提供静态保证。
  • 展示实际实现(tacit)并用由大模型生成的代码评估安全性和表达能力。

提出的方法

  • 在 Scala 3 中引入跟踪能力,其类型编码一个值可能捕获的能力集合。
  • 定义 Classified 容器,封装敏感数据并通过能力感知的 map 操作强制纯变换。
  • 使用带能力安全接口的安全护栏(tacit)和安全模式编译器,确保跨回合的能力跟踪。
  • 提供运行时和 API 设计,使所有与文件、进程和网络的交互都通过具备作用域生命周期的能力库进行。
  • 实现双通道输出模型:普通通道用于代理反馈,安全通道供人类用户使用,确保机密内容无法泄漏到代理上下文。
  • 通过端到端安全基准测试评估对提示注入攻击的防护能力,并在代理性基准上评估表达能力。

实验结果

研究问题

  • RQ1RQ1:在对抗条件下,类型系统是否能够可靠地防止 unsafe 的代理行为,如信息泄露和未授权的副作用?
  • RQ2RQ2:代理是否能生成能力安全的代码且任务性能不低于使用传统工具调用接口的情况?

主要发现

  • 在机密模式下,类型系统阻止了所有注入与外泄尝试,覆盖测试的模型与任务(100% 安全)。
  • 在机密模式下,任务效用仍然较高(Claude Sonnet 4.6 ≈ 99.2%,MiniMax M2.5 ≈ 90.0%)。
  • 在未加密模式下,安全性取决于模型对齐程度,对不太对齐的模型观察到一定信息泄露(如 MiniMax M2.5 27.3% 的恶意任务泄露)。
  • 该方法可推广到 Stock AgentDojo 领域,在各领域的安全性与 CaMeL 基线相近的效用水平。
  • 实验表明经过类型化、能力安全的代码在若干基准测试(τ2-bench)中可匹配或超越传统 tool-ccalling 的性能,在 SWE-bench Lite 中也具有竞争力。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。