Memory poisoning attacks create a detectable tool-call sequence signature in LLM agents
LLM agents exhibit a behavioral invariant that allows memory poisoning attacks to be detected with high accuracy using tool-call trajectories
AI/ML arXiv 29 Jun 2026 Method Simulation evidence
Published as “Forensic Trajectory Signatures for Agent Memory Poisoning Detection”
Why it matters
Operators can deploy a low-overhead IDS that flags memory-channel poisoning attacks using only tool-call logs, enabling both real-time blocking and forensic audit without modifying the LLM or its memory store.
Summary
The paper shows that persistent memory poisoning attacks in LLM agents always trigger a "recall before send" transition, a mechanistic invariant that alone yields AUC = 0.9563 and, when combined with a 19-feature Random Forest, reaches AUC = 0.9904. The invariant holds across 9 open-source models (7B-120B) and frontier models (GPT-4.1, GPT-4o) without retraining, and a prefix-only variant still attains AUC = 0.934 for real-time blocking. Evidence is strong: the classifier’s performance is stable across cross-validation folds, feature-group ablations, and hold-out models, though false positives rise to 23% on some frontier models and the detector fails on memory-sandboxed or implicit-bypass attacks.
What they found 3
- A simple rule exploiting the recall-before-send invariant alone achieves high detection performance.
“A simple rule exploiting this invariant alone achieves AUC = 0.9563.”
- A full 19-feature Random Forest classifier refines detection to near-perfect discrimination.
“The full 19-feature Random Forest (Section 3.2) refines this to AUC = 0.9904 (+3.4 pp).”
- Cross-model hold-out validation shows perfect AUC on six of nine models, confirming model-agnosticity.
“Cross-model hold-out on 9 models (7B-120B parameters) confirms AUC = 1.000 on 6/9 hold-out splits, with all three exceptions mechanistically explained.”
Caveats 7
- False positives rise to 23.0% on frontier models (GPT-4.1, GPT-4o, o3-mini, o4-mini).
- AUC collapses to 0.083 for qwen2.5:14b and to 0.000 for qwq:32b, indicating model-specific failure modes.
- All 31 false negatives occur under the Memory Sandbox defense, where the attack’s recall step is blocked.
- False negative rate. FN = 31 out of 1,919 attack-success sessions (1.6%). These concentrate in qwq:32b’s implicit-bypass runs and qwen2.5:14b’s distributional edge cases.
- No true-benign baseline. The reported false-positive rate is measured against poisoned-but-defended non-exfiltration executions, not against ordinary unpoisoned benign agent traffic.
- Frontier false positive rate. On frontier models the detector achieves Recall = 0.901 but FPR = 23.0% on 560 non-attack sessions.
- Implicit-bypass attacks. The classifier correctly misses qwq:32b’s Memory Sandbox bypass (goal-directed RAG fallback, no recall fact).
What’s new here 4
- Detects memory-channel poisoning using only tool-call logs, avoiding memory or model internals.
- Identifies a mechanistic, overdetermined behavioral invariant (recall before send) that is provably required for the attack.
- Demonstrates cross-model generalization to both open-source and frontier LLM agents without retraining.
- Provides a prefix-only classifier that can block attacks inline with only a modest drop in AUC.