arXiv:2607.08395cs.CRcs.CL2026-07被引 1

为长期运行的AI代理设计语义防火墙,拦截危险文本流防止安全漏洞。

Token-Flow Firewall: Semantic Runtime Auditing for Persistent AI Agents

论文配图:Token-Flow Firewall: Semantic Runtime Auditing for Persistent AI Agents
图 1 · 摘自论文原文
  • 通过分析代理中的自然语言令牌流动,识别潜在风险路径。
  • 在恶意行为执行前拦截攻击,攻击成功率降至12.5%,正常任务通过率97.4%。
  • 低延迟(+0.69秒)实现全面防护,适合部署于真实场景的长期智能体。

持久化AI代理将大语言模型从单轮交互扩展为长期运行的软件系统。与传统聊天助手不同,此类代理中不安全内容可通过持久状态、可复用技能和工具交互传播,形成更大语义攻击面。我们观察到,多数关键安全交互均通过自然语言令牌流传递,包括记忆更新、工具参数、检索文件及组件间通信。基于此,我们提出TokenWall——一种运行时防御框架,作为代理令牌流上的语义防火墙。该框架对令牌流进行边界感知的语义审计,构建源-目标审计记录,执行轻量本地检查,并将模糊高危案例选择性升级至强仲裁模块。相比依赖稀疏审计或远程大模型监督的现有方法,TokenWall实现全覆盖前置干预,减少远程仲裁与延迟。CIK-Bench实验表明,其将攻击成功率降至12.5%,正常任务通过率达97.4%,且良性情况仅增加0.69秒延迟,证明语义运行时管控可在实用性与安全性间取得良好平衡。

原文摘要 · Abstract (English)

Persistent AI agents extend large language models (LLMs) beyond single-turn interaction into long-lived software systems. Unlike traditional chat assistants, unsafe content in these agents can propagate through persistent state, reusable skills, and tool-mediated interactions, creating a substantially larger semantic attack surface. We observe that most security-critical interactions in such agents are transmitted through natural-language token flows, including memory updates, tool arguments, retrieved files, and inter-component communications. This observation enables a new security formulation: unsafe behavior can be intercepted as risky semantic flows before reaching privileged runtime sinks. Based on this insight, we propose TokenWall, a runtime defense framework that acts as a semantic firewall over agent token flows. TokenWall performs boundary-aware semantic auditing over these flows, constructing structured source-sink audit records, applying lightweight local inspection before execution, and selectively escalating ambiguous high-risk cases to stronger arbitration modules. Unlike prior approaches that rely on sparse auditing or remote large-model oversight, TokenWall enables full-coverage pre-execution mediation while reducing remote arbitration and latency. Experiments on CIK-Bench show that TokenWall reduces attack success rate to 12.5% while maintaining a 97.4% benign executable pass rate without human confirmation. TokenWall further introduces only 0.69 seconds of additional latency on benign cases, demonstrating that semantic runtime containment can achieve a practical security-utility trade-off for persistent AI agents.

AI安全语义审计持久代理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。