Archived This paper is outside Paper Radar's one-year feed. More archived papers
A-MemGuard: A Proactive Defense Framework for LLM-Based Agent Memory
Reading guide · Based on sections of the original paper
Why read this
Read this if you build memory-augmented agents and want to weigh an LLM-judge consensus defense against isolated per-record filters, given its token overhead and its residual end-to-end attack rates.
What the authors found
- Against direct AgentPoison injection, the authors report that retrieval-stage ASR on EHRAgent fell from 100% to about 0–2.13% across GPT-4o-mini and LLaMA-3-8B with DPR and REALM retrievers. The LLM Auditor, Distil Classifier and perplexity baselines mostly stayed far higher. End-to-end task ASR was less complete: 6.38–36.17% on EHRAgent, and 42.85% versus 48.14% with no defense for LLaMA-3-8B+DPR on StrategyQA. 5.2 Effectiveness at defending against direct injection methods
- Against indirect, interaction-based injection on MMLU, average final ASR fell from 0.667 (GPT-4o-mini) and 0.663 (LLaMA-3.1-8B, as given in Table 2) with no defense to 0.256 and 0.233. The best baseline, LLM Auditor, reached 0.567 and 0.600. The Distil Classifier and perplexity filter sometimes raised ASR. 5.3 Effectiveness at defending against indirect injection methods
- On benign tasks, the authors claim the highest accuracy among the defenses tested. That ranking is only relative to other defenses. Compared with no defense, accuracy still fell in some settings, for example EHRAgent GPT-4o-mini+DPR from 83.0 to 71.3 and LLaMA-3-8B+REALM from 48.9 to 39.2. 5.4 Utility cost of A-MemGuard on benign tasks
Main limitation
The headline reductions of over 95–97% describe the retrieval stage. In the ablation setting (EHRAgent, LLaMA-3-8B+DPR), the full system still allowed 36.17% end-to-end attack success. Per the appendix, token use also roughly doubled versus no defense (about 7.8K vs 3.6K tokens). 5.6 Ablation Study
Where to start
5.2 Effectiveness at defending against direct injection methods · Compare ASR-r, ASR-a and ASR-t in Table 1 for each backbone and retriever, to see where attacks still succeed end to end.
Abstract
Large Language Model (LLM) agents use memory to learn from past interactions, enabling autonomous planning and decision-making in complex environments. However, this reliance on memory introduces a critical security risk: an adversary can inject seemingly harmless records into an agent's memory to manipulate its future behavior. This vulnerability is characterized by two core aspects: First, the malicious effect of injected records is only activated within a specific context, making them hard to detect when individual memory entries are audited in isolation. Second, once triggered, the manipulation can initiate a self-reinforcing error cycle: the corrupted outcome is stored as precedent, which not only amplifies the initial error but also progressively lowers the threshold for similar attacks in the future. To address these challenges, we introduce A-MemGuard (Agent-Memory Guard), the first proactive defense framework for LLM agent memory. The core idea of our work is the insight that memory itself must become both self-checking and self-correcting. Without modifying the agent's core architecture, A-MemGuard combines two mechanisms: (1) consensus-based validation, which detects anomalies by comparing reasoning paths derived from multiple related memories and (2) a dual-memory structure, where detected failures are distilled into ``lessons''stored separately and consulted before future actions, breaking error cycles and enabling adaptation. Comprehensive evaluations on multiple benchmarks show that A-MemGuard effectively cuts attack success rates by over 95% while incurring a minimal utility cost. This work shifts LLM memory security from static filtering to a proactive, experience-driven model where defenses strengthen over time. Our code is available in https://github.com/TangciuYueng/AMemGuard