跳到正文
HuggingFace Daily Papers·· 2 天前

LeanGuard:用 Lean4 验证的工具调用智能体运行时护栏

LEANGUARD: Lean-Verified Guardrails for Tool-Using Agents

AI 导读

LeanGuard 是一个运行时护栏,在工具调用到达环境前用 Lean4 编写的策略逐条校验,评估采用 fail-closed 方式,并证明其判定过程与 LeanLTL 语义等价。在 Tau-Bench 上测试五个 Qwen 模型(0.8B-27B),无护栏智能体至少执行 33 次策略禁止的调用,LeanGuard 为零;在 DTap 上把直接提示词注入成功率从 57.9% 降至 5.9%。

正文 · 原文

Authors:Sreehari Sankar, Debargha Ganguly, Vikash Singh, Mohsen Hariri, Weicong Chen, Yanyan Zhang, Shouren Wang, Wang Yang, Chaoda Song, Alexander Nemecek, Osama Zafar, Idan Davidovich, Yuting Shao, Kai Ye, Biyao Zhang, Xinpeng Li, Joe Stubbs, Erman Ayday, Jing Ma, Vipin Chaudhary

View PDF HTML (experimental)

Abstract:Tool-using language-model agents often execute actions that their domain policies forbid. We present LeanGuard, a runtime that checks every proposed tool call against a policy written in Lean4 before the call reaches the environment. Policies combine state predicates with scoped past-time temporal operators over the execution history, evaluation is fail-closed, and the decision procedure is proved equivalent to a LeanLTL semantics. A denied call can be corrected in two ways. With feedback, the agent receives the violated rule and a hint; with proof-guided repair, Lean metaprogramming searches for a nearby call that preserves the user's intent and proves that the policy admits it, without the model. On Tau-Bench with five Qwen models (0.8B-27B), unguarded agents execute at least 33 calls that the Lean policy forbids, while LeanGuard executes none; with feedback, task success does not change significantly. On DTap, LeanGuard reduces direct prompt-injection success from 57.9% to 5.9%, and in telecom, where benign tasks need no writes, benign success is unchanged. Feedback reduces repeated blocked calls and raises task success for four of five models over a bare denial. On replayed denials, repair proves an admissible edit for 88 of 252 denials caused by argument values, in a median of 2,ms.
Subjects: Artificial Intelligence (cs.AI); Computation and Language (cs.CL)
Cite as: arXiv:2611.02332 [cs.AI]
  (or arXiv:2611.02332v1 [cs.AI] for this version)
  https://doi.org/10.48550/arXiv.2611.02332

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Vikash Singh [view email]
[v1] Mon, 2 Nov 2026 00:26:48 UTC (302 KB)

来源:HuggingFace Daily Papers · arxiv.org