SMSR: Certified Defence Against Runtime Memory Poisoning in Persistent LLM Agent Systems
About
Retrieval-augmented generation (RAG) agents increasingly run with persistent memory that accumulates across user sessions. This creates a new attack surface: an adversary interacting only through normal channels can inject crafted memories that, once retrieved, steer the agent's responses for future users, without touching model weights or code. We call this Multi-Session Memory Poisoning (MSMP) and show that no existing defence certifies against it; static-corpus defences (RobustRAG, ReliabilityRAG) assume a fixed knowledge base, and heuristic filters are bypassed by fluent enterprise-style text. We present Signed Memory with Smoothed Retrieval (SMSR), the first defence with a certified robustness bound for this setting. Component 1 adds HMAC-SHA256 provenance at write time, blocking unsigned injection. Component 2 applies randomised memory ablation with verdict-based majority voting at query time, bounding the influence of authenticated adversaries. We prove that no provenance-free retrieval-time filter can certify against adaptive injection, derive a hypergeometric certificate for Component 2, and formalise the Consistent Minority Effect, whereby a consistent adversarial answer wins string-based voting as a numerical minority while verdict-based voting removes it. Across 15 enterprise scenarios (3,150 repeated trials), Component 1 cuts attack success from 93-100% to 0% for all unsigned variants. For an authenticated adversary with a single injection, Component 2 holds success to 8.0% (95% CI [5.8, 10.9], n=450), below the certified worst case. In an end-to-end query-only attack where the agent itself writes the poison rather than it being pre-seeded, SMSR reduces success from 65.3% to 5.3% (n=150, non-overlapping CIs) on a live agent stack. Clean-query utility is 90% (Component 1) and 85% (combined).
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Indirect Prompt Injection Defense | LLM-as-judge evaluation store 15-scenario (test) | ASR0.00e+0 | 40 | |
| Utility Measurement | Clean queries | Utility Score90 | 4 | |
| Indirect Prompt Injection | 15 scenarios Query-only injection (E10) | ASR5.3 | 3 | |
| Authenticated Direct Injection (t=1) | Enterprise Scenarios (10-seed store) | ASR37.8 | 2 | |
| Authenticated Direct Injection (t=1) | Enterprise Scenarios 20-seed store | Attack Success Rate (t=1)8 | 2 |