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

SimpleMem: An Efficient Lifelong Memory System for LLM Agents

Forum topic · ✨步子哥 · 2026-02-21

Summary

SimpleMem is a three-stage memory architecture designed to give LLM agents efficient, lifelong conversation memory under fixed context-window budgets. It draws on the Complementary Learning Systems theory to model a dual active/archival store and a write-time semantic compression stage that splits dialogue into 512-token overlapping windows, computes an entropy-style information score H(W_t) combining entity novelty and semantic divergence, and atomizes utterances via coreference resolution and ISO-8601 time anchoring. A recursive consolidation stage runs asynchronously, using an affinity score that fuses cosine similarity with exponential temporal proximity to cluster related memories and synthesize abstract units (e.g., 30 morning-coffee records compressed into a single habit summary). An adaptive retrieval stage estimates query complexity C_q and computes k_dyn = floor(k_base·(1+δ·C_q)) to dynamically scale hybrid dense/BM25/constraint scoring. On the LoCoMo benchmark with GPT-4.1-mini, SimpleMem reaches an average F1 of 43.24, surpassing Mem0's 34.20 (+26.4%), while using 531 tokens per query versus 973 for Mem0 and 16,910 for full-context baselines, achieving roughly 30x compression without sacrificing accuracy.

Key points

  • Biological grounding: SimpleMem maps the Complementary Learning Systems (CLS) theory onto a three-stage pipeline. Pattern separation corresponds to entropy-aware filtering of novel entities; pattern completion maps to affinity scoring; and soft forgetting is implemented through hierarchical archiving of raw records beneath abstract summaries.
  • Dual-store design: An active memory buffer (fast hippocampus-like encoding) and an integrated memory store (slow neocortex-like consolidation) interact via an asynchronous pipeline. When affinity exceeds threshold τ_cluster, the system triggers offline abstraction, while raw records move to archival storage and remain reachable through index links, mitigating catastrophic forgetting.
  • Write-time semantic compression: Continuous dialogue is segmented into 512-token windows with 50% overlap. Each window is scored by H(W_t) = α·(|E_new|/|W_t|) + (1−α)·(1−cos(E(W_t), E(H_prev))). Windows below τ_redundant=0.35 (empirically optimal on LoCoMo) are dropped. Surviving text is atomized through coreference resolution and absolute time anchoring, raising temporal-reasoning F1 from 25.40 to 58.62 (+130.8%).
  • Multi-view indexing: Three complementary indexes share the same memory units: dense 1024-dim text-embedding-3-small vectors for semantic matching, BM25 sparse indexes for keyword precision, and symbolic metadata (timestamps, entity types, confidence) for deterministic filtering. A cascade (symbol → lexical → semantic) focuses computation on high-value candidates.
  • Recursive consolidation: Affinity ω_ij = γ·sim(m_i, m_j) + (1−γ)·temporal_proximity(m_i, m_j) with γ=0.5 merges semantic and exponential-temporal similarity. Dense subgraphs above τ_cluster are summarized via a synthesis function G_syn, e.g., 30 distinct "8 AM coffee" entries compress into one habit abstraction (~97% storage reduction) while originals are archived.
  • Adaptive query-aware retrieval: A lightweight complexity estimator C_q ∈ [0,1] drives dynamic depth k_dyn = floor(k_base·(1+δ·C_q)) with k_base=3, δ≈5.67, ranging from k≈3 for greetings up to k≈20 for multi-hop reasoning. Final score S(q, m_k) = λ_1·semantic_sim + λ_2·BM25 + λ_3·constraint with default weights (0.5, 0.3, 0.2).
  • Trade-off tunability: Parameter guides are provided—α and γ vary with domain (fact-dense vs. expression-dense, episodic vs. semantic); λ weights adapt to query character (entity-heavy vs. descriptive vs. technical).
  • Benchmark findings (LoCoMo with GPT-4.1-mini)

  • Average F1: SimpleMem 43.24 vs. Mem0 34.20 (+26.4%), A-Mem 32.58, MemoryBank 24.95, LightMem 24.63, ReadAgent 22.97, MemGPT 20.91, full-context 18.70.
  • Per-task F1 (SimpleMem): single-hop 42.56, multi-hop 38.92, temporal reasoning 48.67 (+31.1% over Mem0), open-domain 42.81.
  • Tokens/query: 531 (SimpleMem) vs. 973 (Mem0, −45%) vs. 16,910 (full-context, ~30× compression).
  • Latency: end-to-end 480.9 s vs. Mem0 1,934.3 s (~4× faster) and A-Mem 5,937.2 s (~12.5× faster); memory-build time 92.6 s vs. 1,350.9 s (Mem0) and 5,140.5 s (A-Mem).
  • Comparison snapshot

    | Dimension | Traditional RAG | SimpleMem | |:---|:---|:---| | Processing time | At retrieval | Write-time disambiguation | | Storage shape | Flat chunks | Hierarchical abstractions | | Retrieval strategy | Fixed Top-K | Dynamic depth by C_q | | Token trajectory | Linear growth | ~30× compression at fixed accuracy |

    Graph-database approaches surface explicit relational queries but struggle with open-domain relation extraction, brittle schema evolution, and higher integration overhead; SimpleMem instead relies on vector + lexical + symbolic views with asynchronous consolidation.

    Application scenarios

  • Personal assistants: retention of preferences across sessions, evolutionary preference tracking (e.g., shifts toward plant-based milks), cross-session topic continuity via persistent IDs and ISO timestamps.
  • Long-term companion AI: emotional annotation during atomization, relationship timelines, dynamic style adaptation (verbosity, formality, humor), and LTV-oriented engagement signals.
  • Cost projection: at ~1M queries/day with GPT-4-class pricing, the ~30× token reduction translates to six-figure annual API savings versus full-context baselines.

Tags

#llm-agents#long-term-memory#retrieval-augmented-generation#semantic-compression#memory-consolidation#locomo-benchmark#context-window-optimization#agent-architecture

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/176922871