MemLineage: Lineage-Guided Enforcement for LLM Agent Memory
About
We introduce MemLineage, a defense for LLM agent memory that attaches both cryptographic provenance and LLM-mediated derivation lineage to every entry. Recent and concurrent work shows that untrusted content can be written into persistent agent state and re-enter later sessions as an instruction; the remaining systems question is how to preserve useful memory recall while preventing such state from justifying sensitive actions. MemLineage treats this as a chain-of-custody problem rather than a filtering problem. It is a six-module design around an RFC-6962 Merkle log over per-principal Ed25519-signed entries: a weighted derivation DAG records which retrieved entries influenced each new memory, and a max-of-strong-edges propagation rule makes Untrusted-Path Persistence hold for any chain whose attribution edges remain above threshold. The sensitive-action gate then refuses dispatches whose active justification descends from an external ancestor, while still allowing benign recall. We evaluate three defense cells against three memory-poisoning workloads on a deterministic mechanism-isolation harness; MemLineage is the only configuration in that harness that drives all three columns to zero ASR, while sub-millisecond per-operation overhead keeps it well below the noise floor of any LLM call. A Codex-backed AgentDojo bridge further separates strong-model behavior from defense-layer behavior: under an intentionally vulnerable tool-output profile, no-defense and signature-only baselines fail on all six banking pairs, while all MemLineage rows reduce strict AgentDojo ASR to zero. The core deterministic artifacts are byte-equal CI-verified; hosted-model AgentDojo and live-model sweeps are recorded as auditable logs rather than byte-pinned artifacts.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| LLM Agent Security Evaluation | AgentDojo vulnerable-agent profile stress test (six banking pairs) | Attack Success Count (out of 6)0.00e+0 | 5 | |
| Consequential-Action Attack Success Rate | Pooled Cross-Model Evaluation Suite static split | ASR (%)24.4 | 5 | |
| Consequential-Action Attack Success Rate | Pooled Cross-Model Evaluation Suite (all split) | Attack Success Rate (ASR)11.2 | 5 | |
| Indirect Prompt Injection Defense | Unified Benchmark pooled over 8 models | Direct ASR0.00e+0 | 5 | |
| Consequential-Action Attack Success Rate | Pooled Cross-Model Evaluation Suite (adaptive split) | Attack Success Rate (ASR)9.3 | 5 | |
| Consequential-Action Attack Success Rate | Pooled Cross-Model Evaluation Suite whitebox | ASR0.00e+0 | 5 | |
| Memory-poisoning defense | MemMorph pooled over eight models reproduced | Consequential ASR0.00e+0 | 4 | |
| Memory-poisoning defense | MemoryGraft reproduced (pooled over eight models) | Consequential ASR0.00e+0 | 4 | |
| Memory-poisoning defense | Conv. Trojan reproduced (pooled over eight models) | Consequential ASR0.00e+0 | 4 | |
| Utility Evaluation | Pooled Cross-Model Evaluation Suite | Utility95.9 | 4 |