arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.05704cs.CRcs.AI
收藏

SafeHarbor:用于LLM智能体安全的分层记忆增强防护栏

SafeHarbor: Defining Precise Decision Boundaries via Hierarchical Memory-Augmented Guardrail for LLM Agent Safety

School of Cyber Science and Technology, Beihang University, Beijing, China(北京航空航天大学网络安全学院);Institute of Artificial Intelligence, Beihang University, Beijing, China(北京航空航天大学人工智能研究院);University of Chinese Academy of Sciences, Beijing, China(中国科学院大学);AI Security Lab, Beijing, China(360人工智能安全实验室)

Zhe Liu, Zonghao Ying, Wenxin Zhang, Quanchen Zou, Deyue Zhang, Dongdong Yang, Xiangzheng Zhang, Hao Peng

AI总结:

提出SafeHarbor框架,通过分层记忆系统和信息熵自进化机制,在保持高安全拒绝率的同时提升对良性请求的响应能力。

摘要:

基础模型的最新进展已将LLM从被动对话系统转变为能够推理和执行工具的自主智能体。虽然这些能力带来了巨大的实用价值,但也引入了新的安全风险,因为对手可以操纵智能体在现实环境中执行有害操作。现有的防御策略可以缓解此类威胁,但往往难以平衡安全性和实用性,导致对良性用户请求的过度拒绝。为了缓解这种权衡,我们提出了SafeHarbor,一种新颖的框架,旨在为LLM智能体建立精确的决策边界。与静态指南不同,SafeHarbor通过增强对抗生成提取上下文感知的防御规则。我们设计了一个本地分层记忆系统用于动态规则注入,提供了一种无需训练、高效且即插即用的解决方案。此外,我们引入了一种基于信息熵的自进化机制,通过动态节点分裂和合并持续优化记忆结构。大量实验表明,SafeHarbor在模糊的良性任务和明确的恶意攻击上都达到了最先进的性能,特别是在GPT-4o上实现了63.6%的峰值良性效用,同时保持对有害请求超过93%的稳健拒绝率。源代码已公开在https://github.com/ljj-cyber/SafeHarbor。

英文摘要:

Recent advances in foundation models have transformed LLMs from passive conversational systems into autonomous agents capable of reasoning and tool execution. While these capabilities unlock substantial practical value, they also introduce new security risks, as adversaries can manipulate agents into performing harmful actions in real-world environments. Existing defense strategies mitigate such threats but frequently struggle to balance safety and utility, resulting in over-refusal of benign user requests. To mitigate this trade-off, we propose SafeHarbor, a novel framework designed to establish precise decision boundaries for LLM agents. Unlike static guidelines, SafeHarbor extracts context-aware defense rules through enhanced adversarial generation. We design a local hierarchical memory system for dynamic rule injection, offering a training-free, efficient, and plug-and-play solution. Furthermore, we introduce an information entropy-based self-evolution mechanism that continuously optimizes the memory structure through dynamic node splitting and merging. Extensive experiments demonstrate that SafeHarbor achieves state-of-the-art performance on both ambiguous benign tasks and explicit malicious attacks, notably attaining a peak benign utility of 63.6\% on GPT-4o while maintaining a robust refusal rate exceeding 93\% against harmful requests. The source code is publicly available at https://github.com/ljj-cyber/SafeHarbor.

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

↑