English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

D-MEM Explained: Dopamine-Gated Memory Routing for AI Agents

Forum topic · 小凯 · 2026-04-07

Summary

D-MEM is a biologically inspired memory architecture for LLM agents that solves the O(N²) bottleneck of agentic memory systems like A-MEM. Borrowing from the mammalian VTA dopamine system, it computes an Agentic Reward Prediction Error (RPE) for every input, combining semantic surprise (Z-score normalized similarity) and long-term utility (transient/short-term/persistent classification). A Critic Router then gates each input into three tiers: SKIP (RPE < 0.3, zero cost), CONSTRUCT_ONLY (O(1) note construction into short-term cache), or FULL_EVOLUTION (sparse O(N) deep memory restructuring for contradictions and preference shifts). To handle skipped content, D-MEM adds a Shadow Buffer FIFO fallback plus hybrid BM25 + RRF retrieval to counter entity dilution. The paper also introduces LoCoMo-Noise, a benchmark where 75% of conversation turns are injected noise. On this benchmark with GPT-4o-mini, D-MEM cut token consumption by 80% (1.64M → 319K) versus A-MEM while improving multi-hop F1 by 15.7 points on clean LoCoMo and winning even adversarial scenarios. The core insight: memory should not store everything, but intelligently gate what changes the agent's cognitive structure.

Overview

D-MEM: Dopamine-Gated Agentic Memory via Reward Prediction Error Routing addresses the O(N²) complexity problem in A-MEM-style agent memory, where every input triggers full linking and evolution of the memory graph. In long conversations, most turns are noise (fillers, status updates, tangents — roughly 75%), yet traditional systems process all of them equally.

Key Points

1. Biological inspiration: VTA dopamine gating

  • Mammalian brains encode only inputs that violate internal prediction models (high Reward Prediction Error) or have high survival value, triggering LTP and structural neural updates.
  • D-MEM ports this as an Agentic RPE computed by a lightweight Critic Router.
  • 2. The RPE formula

  • Not a naive weighted sum, but bounded multiplicative gating:
  • RPE = min(1.0, I(Utility ≥ τ) × [Utility × (Surprise + β)])
  • Surprise: Z-score normalized (sliding window μ, σ) max cosine similarity against history — avoids embedding anisotropy issues at zero extra LLM cost.
  • Utility: lightweight LLM classification into Transient (forced 0), Short-Term, or Persistent.
  • 3. Three-tier Fast/Slow routing

    | Tier | Condition | Cost | |------|-----------|------| | SKIP | RPE < 0.3 | zero tokens | | CONSTRUCT_ONLY | 0.3 ≤ RPE < 0.7 | O(1), node into STM cache | | FULL_EVOLUTION | RPE ≥ 0.7 | O(N), sparse — contradictions, preference shifts, paradigm changes |
  • Cold-start protection forces first ~20 turns into CONSTRUCT_ONLY.
  • 4. Zero-cost retrieval augmentation

  • Hybrid retrieval: BM25 sparse + dense vectors fused via Reciprocal Rank Fusion, fixing proper-noun dilution.
  • Shadow Buffer: O(1) FIFO of all skipped inputs; two-stage fallback answers adversarial queries ("did I mention the weather?") without hallucination.
  • 5. LoCoMo-Noise benchmark

  • First benchmark with ρ=0.75 noise injection: 40% fillers, 30% status updates, 30% tangents added to LoCoMo conversations.
  • Results (LoCoMo-Noise, ρ=0.75, GPT-4o-mini)

    | Metric | A-MEM | D-MEM | |--------|-------|-------| | Token consumption | 1.64M | 319K (-80%) | | Single-hop F1 | 0.208 | 0.246 (+18%) | | Multi-hop F1 | 0.365 | 0.412 (+13%) | | Adversarial F1 | 0.388 | 0.412 (+6%) |

  • Multi-hop leads by +15.7 points (0.427 vs 0.270) on clean LoCoMo — a purer knowledge graph yields cleaner retrieval chains.
  • Counterintuitive finding: real dialogue is skipped more (53.9%) than injected noise (43.2%), because LLM-generated noise occasionally looks plausibly useful — a principled accuracy-efficiency tradeoff, not a failure.
  • Lowering θ_low or adding an adaptive controller can tune the balance.
  • Core insight

    > Memory is not about storing everything, but intelligently choosing what deserves to change your cognitive structure.

    Future directions include distilling the utility classifier into a small task-specific model for near-zero per-turn cost, enabling on-device assistants.

    References

  • Paper: D-MEM: Dopamine-Gated Agentic Memory via Reward Prediction Error Routing
  • arXiv: 2603.14597
  • Authors: Yuru Song (UC San Diego), Qi Xin (Carnegie Mellon)
  • GitHub: https://github.com/london-and-tequila/dmem
  • Baselines: A-MEM, MemGPT, MemoryBank

Tags

#ai-memory#llm-agents#biologically-inspired#dopamine-gating#token-optimization#paper-review#rpe-routing#benchmark

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177169658