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

GAM Deep Dive: Turning Deep Research into a JIT Compiler for AI Memory Systems

Forum topic · 小凯 · 2026-05-21

Summary

This forum post analyzes GAM (General Agentic Memory), a new AI memory framework that applies Just-in-Time (JIT) compilation philosophy to agent memory. Unlike conventional Ahead-of-Time (AOT) memory systems (MemGPT, Mem0, A-Mem) that pre-compress conversation history into static summaries, GAM keeps the full raw history in a page-store and builds only a lightweight memory index. At runtime, a Researcher agent performs iterative deep research—Planning, Searching (parallel embedding, BM25, and page-ID retrieval), and Reflection (up to 3 rounds)—to assemble a task-specific context. Both Memorizer and Researcher can be optimized end-to-end with REINFORCE-style policy gradients. Experiments show GAM outperforms baselines on LoCoMo (e.g., 57.75 F1 single-hop, 93.20% multi-hop tracing on RULER vs RAG's 0%), and stays robust at 448K context on HotpotQA. The paper (arXiv:2511.18423) comes from BAAI, Renmin University, Peking University, and PolyU. The core insight: memory should support search, not replace it—useful information depends on the question being asked.

GAM (General Agentic Memory) critiques the dominant paradigm in AI memory systems. The post's core claim: existing systems treat memory as "pre-digested answers," while GAM argues memory should support search, not replace it—analogous to how a JIT compiler optimizes at runtime instead of pre-translating all code.

Key points

Why AOT-style memory fails

  • Current systems (MemGPT, Mem0, A-Mem) pre-compress history offline into lightweight memories, then look them up at runtime.
  • Three flaws: irreversible information loss from compression, static structure that can't adapt to dynamic queries, and domain-dependent hand-crafted heuristics.
  • Ablation evidence: memory alone without the Researcher scores only 27.50 avg F1 vs 53.18 for full GAM.
  • GAM's JIT architecture

  • Memorizer (offline): for each new session, generates a memo capturing the session's key contribution, and stores a *page* = {contextual header, full raw content} in a page-store. Nothing is discarded. Headers draw on BGE landmark retrieval / Anthropic contextual retrieval ideas.
  • Researcher (online): a Plan → Search → Reflect loop:
  • *Planning*: reads the lightweight memory to decide what to search (memory guides direction, never provides answers).
  • *Searching*: parallel embedding + BM25 + page-ID retrieval; results are unioned and temporally accumulated.
  • *Reflection*: self-judges whether information suffices; if not, generates a focused follow-up request (max 3 rounds). Performance keeps improving from reflection depth 1→5.
  • End-to-end RL

  • Objective: find the shortest context c that maximizes task performance. Memorizer and Researcher are each trained with REINFORCE-style policy gradients using answer-based rewards.
  • Experimental results

  • LoCoMo (GPT-4o-mini): GAM leads all four categories, e.g., 57.75 single-hop F1, 59.45 temporal, 33.30 open-domain (vs MEM0's 28.64).
  • HotpotQA (Qwen2.5-14B): GAM hits 64.07 F1 at 56K context (+12 over RAG) and stays robust at 448K (57.87), while MEM0 collapses to 26.55.
  • RULER: GAM reaches 93.20% on multi-hop tracing where RAG scores 0.00% (single-shot retrieval can't do iterative reasoning).
  • Tools: all three search tools > any pair > any single tool (53.18 vs 51.66/51.12 vs 48.64 max).
  • Model scale: the Researcher needs far more capacity than the Memorizer (0.5B→14B: 9.08→53.18 F1); Memorizer saturates near 14B.
  • Cost: GAM's online serving takes ~12.43s vs 0.15–0.55s for baselines, but its compact default context is only ~106 tokens; adding raw pages raises F1 to 55.71 at 22× token cost.
  • Limitations

  • 12–18s latency unsuitable for real-time chat; longer context isn't always better (224K can beat 448K); model-scale gains saturate; best quality requires costly token trade-offs.
  • Takeaway

    GAM reframes AI memory: memory is a navigation map for search, and the agent is a deep researcher, not a query executor. Useful information depends on the question—so keep raw data, index lightly, and research iteratively at runtime.

    References

  • Paper: Yan B.Y., Li C., Qian H., Lu S., Liu Z. "General Agentic Memory Via Deep Research", arXiv:2511.18423v1, 2025.
  • Institutions: BAAI, Renmin University of China, Peking University, Hong Kong Polytechnic University.
  • Code: https://github.com/VectorSpaceLab/general-agentic-memory

Tags

#ai-agents#memory-systems#deep-research#jit-compilation#rag#reinforcement-learning#gam#long-context

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