arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.03228cs.CRcs.AIcs.CL
收藏

通过影子内存保护LLM智能体免受长期威胁

Safeguarding LLM Agents against Long-Horizon Threats via Shadow Memory

Stony Brook University(石溪大学);Cisco Systems(思科系统公司)

Yuhui Wang, Tanqiu Jiang, Jiacheng Liang, Charles Fleming, Ting Wang

AI总结:

本文提出ShadowMem防御框架,利用影子内存机制在智能体执行前评估风险,以检测和缓解长期威胁,显著提升检测准确性并实现早期检测。

摘要:

随着由大型语言模型(LLM)驱动的智能体越来越多地被部署来执行复杂的现实世界任务,它们面临着一类不断增长的攻击,这些攻击利用扩展的用户-智能体-环境交互来追求在单轮设置中不可能实现的恶意目标。此类长期威胁对LLM智能体在关键领域的安全部署构成了重大风险。在本文中,我们提出了ShadowMem,一种新颖的防御框架,旨在应对广泛的长期威胁。受系统安全中“影子栈”抽象的启发,ShadowMem维护一个专门的、以安全为中心的智能体内存,该内存提炼并保留智能体整个执行轨迹中的安全关键上下文,利用此影子内存在待执行操作执行之前主动评估其风险。大量评估表明,ShadowMem在检测准确性方面显著优于现有防御措施,能够对大多数攻击实现早期检测,并且仅对智能体效用引入可忽略的额外开销。据我们所知,ShadowMem是首个使用智能体内存方法检测和缓解长期威胁的框架,为这一关键挑战建立了新的范式,并为未来研究开辟了有前景的方向。相关工件可在https://github.com/ZJUWYH/ShadowMem获取。

英文摘要:

As large language model (LLM)-powered agents are increasingly deployed to perform complex, real-world tasks, they face a growing class of attacks that exploit extended user-agent-environment interactions to pursue malicious objectives improbable in single-turn settings. Such long-horizon threats pose significant risks to the safe deployment of LLM agents in critical domains. In this paper, we present ShadowMem, a novel defensive framework designed to counter a wide range of long-horizon threats. Inspired by the "shadow stack" abstraction in systems security, ShadowMem maintains a dedicated, safety-focused agentic memory that distills and retains safety-critical context across the agent's full execution trajectory, leveraging this shadow memory to proactively assess the risk of pending actions prior to their execution. Extensive evaluation demonstrates that ShadowMem substantially outperforms existing defenses across diverse long-horizon threats in detection accuracy, achieves early-stage detection for the majority of attacks, and introduces only negligible overhead to agent utility. To our best knowledge, ShadowMem represents the first framework to detect and mitigate long-horizon threats using an agentic memory approach, establishing a new paradigm for this critical challenge and opening promising directions for future research. The artifacts are available at https://github.com/ZJUWYH/ShadowMem

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑