SAFE-Mem: Secure Agentic Memory with Fine-Grained Authority and Governance-Aware Retrieval
Haoming Li, Dingyi Kang, Xu Hu, Jinxin Yang, Zhu Xu, Chenru Wang, Yi Ge, Miao Yin, Guanpeng Li, Feng Chen, Bingzhe Li
Abstract
Large language model (LLM) agents increasingly rely on persistent memory to support long-term reasoning and personalized interactions. However, information collected from external sources can introduce security risks when untrusted claims (i.e., atomic statements) are later treated as authorized preferences, policies, or permissions. Existing defenses typically rely on content-based filtering or coarse-grained provenance tracking, which either fail to prevent unauthorized memory use or block legitimate information, sacrificing memory utility. To address these limitations, we propose SAFE-Mem, a fine-grained memory governance framework that improves security while preserving legitimate memory use. First, SAFE-Mem annotates each claim with three governance labels (i.e., kind, authority, and scope) to capture its provenance and permitted use. Second, governance-aware retrieval matches query requirements with claim permissions to block unauthorized influence while retaining legitimate information. Third, a governance-enabled memory graph connects source sentences, claims, and entities to support provenance tracking and efficient retrieval. Across four LLM backbones on MPBench and LoCoMo, SAFE-Mem attains the lowest attack success among defenses that retain legitimate memory, at least 77% below the strongest of them, and the highest answer accuracy of all evaluated defenses, improving it by up to 15 points. The code is available at https://github.com/LVenum/SAFE-Mem.
Create a lesson
Metadata
- Categories
- cs.CR, cs.CL
Related papers
CAT-RAG: Improving Secure Code Generation with Category-Aware Agentic Retrieval
Shared title terminologycs.CRMahdieh Abazar, Lorenzo De Carli, Benjamin Tan
Prompt-Segmentation Meets ROI Encryption: Fine-Grained Video Protection Based on Diffusion Isolation
Shared title terminologycs.CRXiang Zhang, Haoyan Lu, Ziqiang Li et al.
ParseGap: Testing What Coding Agents Authorize and What Shells Execute
Shared title terminologycs.CRJieyu Li
Privacy Protection in Self-Evolving Personal Agents: Persistent Memory and Cross-Carrier Transfer
Shared title terminologycs.CRZibin Lin, Taotao Wang, Shengli Zhang
Replication of Agentic Security Events: Audit and Investigation (ROGUE-AI)
Shared title terminologycs.CRMengxiao Wang, Mahbub Alam, Kalyan Nakka et al.
Backtracking Agent Applications Security Incidents
Shared title terminologycs.CRYicheng Cai, Taegyu Kim, Peng Liu