mlsanityData to 7 Oct 2026

MEMSAD: Gradient-Coupled Anomaly Detection for Memory Poisoning in Retrieval-Augmented Agents

arXiv 2605.03482 ↗First posted 5 May 2026cs.CR cs.AI cs.LGcited by 3

On the map: Retrieval-augmented generation → Privacy and security of RAG

also in 1 more
Abstract (arXiv)

Persistent external memory enables LLM agents to maintain context across sessions, yet its security properties remain formally uncharacterized. We formalize memory poisoning attacks on retrieval-augmented agents as a Stackelberg game with a unified evaluation framework spanning three attack classes with escalating access assumptions. Correcting an evaluation protocol inconsistency in the triggered-query specification of Chen et al. (2024), we show faithful evaluation increases measured attack success by 4× (ASR-R: 0.25 → 1.00). Our primary contribution is MEMSAD (Semantic Anomaly Detection), a calibration-based defense grounded in a gradient coupling theorem: under encoder regularity, the anomaly score gradient and the retrieval objective gradient are provably identical, so any continuous perturbation that reduces detection risk necessarily degrades retrieval rank. This coupling yields a certified detection radius guaranteeing correct classification regardless of adversary strategy. We prove minimax optimality via Le Cam's method, showing any threshold detector requires Omega(1/ρ2) calibration samples and MEMSAD achieves this up to log(1/δ) factors. We further derive online regret bounds for rolling calibration at rate O(σ2/3Delta1/3), and formally characterize a discrete synonym-invariance loophole that marks the boundary of what continuous-space defenses can guarantee. Experiments on a 3 × 5 attack-defense matrix with bootstrap confidence intervals, Bonferroni-corrected hypothesis tests, and Clopper-Pearson validation (n=1,000) confirm: composite defenses achieve TPR = 1.00, FPR = 0.00 across all attacks, while synonym substitution evades detection at Delta ASR-R ≈ 0, exposing a gap existing embedding-based defenses cannot close.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Privacy and security of RAG, one of 15 directions in Retrieval-augmented generation. Builds on 24 of its 44 references that are in the map. First posted on arXiv 5 May 2026.

Builds on

24 of 44 references.

Closest ancestors · 7

Same direction, newest first

  1. 2025MemoryGraft: Persistent Compromise of LLM Agents via Poisoned Experience Retrieval18 Dec
  2. 2024RevPRAG: Revealing Poisoning Attacks in Retrieval-Augmented Generation through LLM Activation Analysis28 Nov
  3. 2024Machine Against the RAG: Jamming Retrieval-Augmented Generation with Blocker Documents9 Jun
  4. 2024BadRAG: Identifying Vulnerabilities in Retrieval Augmented Generation of Large Language Models3 Jun
  5. 2024Certifiably Robust RAG against Retrieval Corruption24 May
  6. 2024TrojanRAG: Retrieval-Augmented Generation Can Be Backdoor Driver in Large Language Models22 May
  7. 2024PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models12 Feb

Other references · 17

  1. 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
  2. 2016Towards Evaluating the Robustness of Neural Networkscited by 2,976
  3. 2019Certified Adversarial Robustness via Randomized Smoothingcited by 1,324
  4. 2020Energy-based Out-of-distribution Detectioncited by 1,296
  5. 2023MemGPT: Towards LLMs as Operating Systemscited by 1,295
  6. 2023A Watermark for Large Language Modelscited by 667
  7. 2020On Adaptive Attacks to Adversarial Example Defensescited by 547
  8. 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attackscited by 434
  9. 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agentscited by 406
  10. 2024AgentPoison: Red-teaming LLM Agents via Poisoning Memory or Knowledge Basescited by 402
  11. 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agentscited by 341
  12. 2023Provable Robust Watermarking for AI-Generated Textcited by 259
5 more
  1. 2025Memory Injection Attacks on LLM Agents via Query-Only Interactioncited by 127
  2. 2021SPECTRE: Defending Against Backdoor Attacks Using Robust Statisticscited by 123
  3. 2024BadAgent: Inserting and Activating Backdoor Attacks in LLM Agentscited by 106
  4. 2025A-MemGuard: A Proactive Defense Framework for LLM-Based Agent Memorycited by 61
  5. 2026From Storage to Steering: Memory Control Flow Attacks on LLM Agentscited by 17

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026SMSR: Certified Defence Against Runtime Memory Poisoning in Persistent LLM Agent Systems
  2. 2026MemAudit: Post-hoc Auditing of Poisoned Agent Memory via Causal Attribution and Structural Anomaly Detection
  3. 2026MemSentry: A Framework for Detecting Persistent Memory Poisoning in Agentic AI
  4. 2026From Attack Success to Attack Severity: Counterfactual Memory Attacks on LLM Agents
  5. 2026MAFIA: Query-Only Memory Attacks via Probing and Factual Injection against Audited LLM Agents
  6. 2026The Price of Safety: Benign-Case Utility and Token Overhead of Memory-Poisoning Defenses in LLM Agents
  7. 2026MemVenom: Triggered Poisoning of Multimodal Memories in Web Agents
  8. 2026From Untrusted Input to Trusted Memory: A Systematic Study of Memory Poisoning Attacks in LLM Agents