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 lifelong memory system for LLM agents built on a three-stage pipeline inspired by the Complementary Learning Systems (CLS) theory from cognitive neuroscience: semantic structured compression at write time, asynchronous recursive memory consolidation, and adaptive query-aware retrieval. Write-time processing uses entropy-aware filtering (a scoring function combining entity novelty and semantic divergence), coreference resolution, and temporal anchoring to turn raw dialogue into self-contained, atomized memory units. A background consolidation process clusters related memories via an affinity score blending semantic similarity and temporal proximity, abstracting e.g. 30 coffee-order records into a single 'morning coffee habit' insight while archiving originals. Retrieval dynamically scales depth with estimated query complexity and fuses dense-vector, BM25, and constraint-satisfaction scores. On the LoCoMo benchmark with GPT-4.1-mini, SimpleMem achieves an average F1 of 43.24 versus 34.20 for Mem0 (+26.4%), consumes only 531 tokens per query versus 973 (Mem0) and 16,910 (full context), and cuts end-to-end processing time to 480.9 seconds, roughly 4x faster than Mem0. The system demonstrates that signal-to-noise ratio, not larger context windows, is the key to effective agent memory.

SimpleMem: An Efficient Lifelong Memory System for LLM Agents

SimpleMem is a memory architecture for LLM agents that maximizes information density within a fixed token budget, replacing the passive "store everything" paradigm of traditional RAG with an active, metabolism-like process of ingestion, consolidation, and archival. Its design is grounded in the Complementary Learning Systems (CLS) theory, mapping a fast "hippocampal" active memory buffer and a slow "neocortical" consolidated memory store onto a layered storage architecture.

Key points

  • Three-stage pipeline:
  • 1. Semantic structured compression (write-time): sliding-window segmentation (512 tokens, 50% overlap), entropy-aware filtering, and memory atomization (coreference resolution + temporal anchoring to ISO 8601 timestamps) produce self-contained memory units. Atomization alone raised time-reasoning F1 from 25.40 to 58.62 (+130.8%). 2. Recursive memory consolidation (asynchronous background): an affinity score ω_ij = γ·sim(m_i, m_j) + (1−γ)·temporal_proximity(m_i, m_j) clusters related memories; when density exceeds a threshold τ_cluster, a synthesis function generates abstract memories (e.g., 30 "8 AM coffee" records become one "morning coffee habit" insight, ~97% compression). Originals are soft-archived, not deleted, enabling abstraction-to-detail backtracking. 3. Adaptive query-aware retrieval (read-time): query complexity C_q drives dynamic retrieval depth k_dyn = ⌊k_base·(1+δ·C_q)⌋ with k_base = 3, δ ≈ 5.67; scoring fuses semantic similarity, BM25, and constraint satisfaction with default weights λ = (0.5, 0.3, 0.2). Simple greetings trigger near-zero retrieval; complex multi-hop queries expand to ~20 retrieved units.
  • Information scoring function:
  • H(W_t) = α·|E_new|/|W_t| + (1−α)·(1 − cos(E(W_t), E(H_prev))) combining entity novelty and semantic divergence; redundancy threshold τ_redundant = 0.35 was optimal on LoCoMo.
  • Multi-view indexing: dense vectors (OpenAI text-embedding-3-small, 1024-dim) for semantic matching, BM25 sparse index for exact keyword hits, and symbolic metadata (timestamps, entity types) for deterministic filtering.
  • Benchmark results (LoCoMo, GPT-4.1-mini backend)

    | Method | Avg F1 | Tokens/query | |---|---|---| | Full context | 18.70 | 16,910 | | MemGPT | 20.91 | 16,910 | | A-Mem | 32.58 | 1,200+ | | Mem0 | 34.20 | 973 | | SimpleMem | 43.24 | 531 |

  • SimpleMem outperforms Mem0 by +26.4% relative F1, with the largest gain in temporal reasoning (48.67 vs 37.12, +31.1%).
  • Token consumption: 531 vs 973 (Mem0, −45%) and vs 16,910 (full context, ~30× compression).
  • Latency: 480.9s end-to-end vs 1,934.3s for Mem0 (~4× faster) and 5,937.2s for A-Mem (~12.5× faster); memory construction 92.6s/sample vs 1,350.9s (Mem0).
  • Comparison with existing approaches

  • vs. traditional RAG: SimpleMem performs disambiguation at write time (schema-on-write style) instead of at retrieval time, builds hierarchical abstractions instead of flat chunks, and uses dynamic retrieval depth instead of fixed Top-K.
  • vs. graph databases: graph approaches (e.g., Neo4j) face relation-extraction bottlenecks; SimpleMem relies on lightweight clustering and LLM-based abstraction instead of explicit knowledge-graph construction.
  • Key design insight: the experiments argue that signal-to-noise ratio — not ever-larger context windows — determines long-term memory performance. Loss of detail is mitigated by a "soft forgetting" mechanism: originals are archived and remain retrievable for evidence-backed deep queries.
  • Application scenarios

  • Personal assistants: accurate answers to specific historical questions after thousands of turns; implicit, continuous learning of user preferences; cross-session coherence via persistent identifiers, temporal anchoring, and summary inheritance.
  • Long-term companion AI: extensions for emotional annotation, relationship timelines, and adaptive interaction styles (verbosity, formality, proactivity, humor).
  • Economics: at roughly one million queries per day with GPT-4-class pricing, the token savings translate to hundreds of thousands of dollars in annual API cost reduction.

Tunable parameters

| Parameter | Default | Role | |---|---|---| | α | 0.5 | Balance entity novelty vs semantic divergence | | τ_redundant | 0.35 | Filtering decision threshold | | γ | 0.5 | Semantic vs temporal weighting in affinity score | | τ_cluster | 0.7 → 0.3 (hierarchical) | Cluster density threshold | | k_base, δ | 3, 5.67 | Base and sensitivity of dynamic retrieval depth | | λ_1, λ_2, λ_3 | 0.5, 0.3, 0.2 | Fusion weights for semantic, BM25, constraint scores |

Tags

#llm-agents#memory-systems#rag#simplemem#long-term-memory#retrieval#locomo-benchmark#cognitive-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