← Lab /AI/ML

Semantic anomaly detection blocks all continuous memory poisoning attacks but misses synonym substitutions

MEMSAD achieves perfect detection of continuous memory poisoning attacks while synonym-based attacks evade it

AI/ML arXiv 5 May 2026 Defense Prototype evidence

Published as “MEMSAD: Gradient-Coupled Anomaly Detection for Memory Poisoning in Retrieval-Augmented Agents”

Why it matters

Provides a formally guaranteed, low-latency detection layer for memory-poisoning in retrieval-augmented agents, enabling safer deployment of persistent LLM memory systems.

Summary

MEMSAD (Semantic Anomaly Detection) achieves perfect detection (TPR = 1.00, FPR = 0.00) across all evaluated memory-poisoning attacks when used in a composite portfolio, and the paper provides a certified detection radius based on a gradient-coupling theorem. However, synonym-substitution attacks evade detection (∆ASR-R ≈ 0) and MEMSAD alone has low true-positive rates on MINJA (0.40) and INJECMEM (0.20).

What they found 1

  1. Composite defenses achieve perfect detection with zero false positives across all attacks.

    “composite defenses achieve TPR = 1.00, FPR = 0.00 across all attacks”

Caveats 6

  • Synonym substitution attacks evade detection (∆ASR-R ≈ 0).
  • MEMSAD alone detects MINJA with TPR = 0.40 and INJECMEM with TPR = 0.20.
  • Watermarking fails when auto-storage bypasses ingestion control.
  • (i) Corpus scale and composition: |M| = 1,000 with synthetic entries; poison passages contain explicit adversarial language that inflates text-baseline detection.
  • (ii) Regret bound assumes slow drift; abrupt distribution shifts degrade calibration.
  • (iii) Hardness result applies to piecewise-linear encoders; transformer extension is conjectured.

What’s new here 4

  • Formal Stackelberg game threat model unifying three memory-poisoning attack classes.
  • Gradient-coupling theorem proving anomaly-score gradient equals retrieval-objective gradient.
  • Certified per-entry detection radius with minimax optimality guarantees.
  • Online regret bounds for rolling calibration and analysis of a discrete synonym-invariance loophole.