GAMemoryStore: Universal Memory Framework
- GAMemoryStore is a universal memory substrate enabling lossless, flexible storage and retrieval through multi-index and iterative search methods.
- It underpins both general agentic memory for LLM agents and multi-core atomic memory models, ensuring dynamic context synthesis and precise memory operations.
- Its architecture supports just-in-time context compilation, scalable sequence modeling, and reinforcement learning for optimized downstream performance.
GAMemoryStore designates both (1) the universal page-store in General Agentic Memory systems for LLM agents (Yan et al., 23 Nov 2025), and (2) the store and retrieval mechanisms in General Atomic Memory models for multiprocessors (Zhang et al., 2018), as well as associative memory banks in parallel sequence models (Acharya, 30 Aug 2025). Across domains, GAMemoryStore refers to a substrate for lossless, effective storage and retrieval—enabling flexible, optimized access patterns and supporting scalable, high-performance memory behaviors.
1. Dual-Agent Architecture and Just-in-Time Compilation in General Agentic Memory
In General Agentic Memory (GAM), GAMemoryStore is a universal, offline-maintained page-store central to a two-agent workflow (Yan et al., 23 Nov 2025). The offline "Memorizer" ingests a session stream and emits both a lightweight summary memory and a sequence of indexed pages , where . The header summarizes salient indexing cues for contextual retrieval.
At runtime, the "Researcher" agent receives a query and performs dynamic research: retrieving, re-ranking, and integrating pages from (guided by ) to compile a customized, minimal, high-utility context . This realizes a "just-in-time compilation" paradigm: only simple summaries and page indices are built offline, and context assembly is deferred to query time—enabling context tailoring and preventing information loss.
2. Formal Framework, Data Structures, and Indexing
GAMemoryStore supports context generation , with the goal of minimizing while maximizing downstream agent performance. Pages are indexed by:
- Embedding index: (vector indices such as BGE-M3, cosine similarity search)
- BM25 inverted index on
- Direct ID-lookup
This multi-index construction enables layered search, combining semantic, keyword, and explicit recall for both broad and precise retrieval (Yan et al., 23 Nov 2025). Incremental memory accumulates concise session snapshots as search guidance.
3. Memorizer and Researcher Algorithms
The Memorizer conducts, per new session :
- Memorizing: , where is an LLM-generated summary of session-critical content.
- Paging: outputting , with capturing contextual and retrieval landmarks.
At query time, the Researcher orchestrates a reflection loop:
- Planning: , choosing among .
- Parallel Searching: Each tool retrieves , returning top- pages.
- Integration: Sequential LLM-based merging .
- Reflection: If the integrated context suffices, return; otherwise update the query and repeat.
Combining vector search, keyword ranking, and identification supports high recall and precision. The ability to reflect and iterate at query time leverages deeper runtime compute for improved context synthesis.
4. End-to-End Reinforcement Learning and Optimization
GAMemoryStore's dual-agent workflow supports end-to-end reinforcement learning, optimizing both Memorizer and Researcher policies by REINFORCE gradients (Yan et al., 23 Nov 2025). If , and , the downstream client's accuracy forms the reward. Expected total reward is:
Gradient estimates and update both agents, where baseline-subtracted rewards sharpen signal. Both Memorizer and Researcher are LLM-driven modules, whose architectures are updated via RL for end-task performance.
5. Empirical Performance, Test-Time Scalability, and Ablation
Experiments across four benchmarks (LoCoMo, HotpotQA up to 448K tokens, RULER 128K, NarrativeQA ~87K) demonstrate that GAMemoryStore substantially exceeds baselines in memory-grounded tasks. On HotpotQA (224K tokens), F1 rises from ~51 (best baseline) to ~64 (GPT-4o-mini). Performance decays only modestly with increased context length (56K–448K tokens). Index construction is linear in time (e.g., ~252s at 224K, ~557s at 448K), while online query remains efficient (15–20s). Test-time scaling—via deeper researcher reflection or more page retrieval—consistently boosts scores, with diminishing returns.
Ablation studies confirm that removing the page-store or researcher loop collapses performance (<30 F1 on HotpotQA), validating the necessity of lossless storage and dynamic, iterative integration (Yan et al., 23 Nov 2025).
6. GAMemoryStore in Weak Memory Models and Sequence Models
In General Atomic Memory (GAM) for multiprocessors, GAMemoryStore formalizes axiomatic and operational environments for stores (Zhang et al., 2018). Stores participate in preserved instruction ordering (ppo), SAMemSt (same-address memory-to-store), RegRAW (register read-after-write), and enforce atomic commit rules. GAM preserves uniprocessor optimizations: out-of-order execution, store buffering, and speculative loads. Stores commit atomically (Rule Execute-Store) when address and data are ready, and all ppo constraints are satisfied. Supported reorderings include store→load, load→store, and store→store (different addresses), matching high-performance CPU behavior. Performance impact is minimal: enforcing SALdLd (same-address load-load) cuts performance by <0.3% on average.
In sequence modeling architectures, Gated Associative Memory (GAM) networks instantiate a memory store as a static, learnable prototype bank (Acharya, 30 Aug 2025). Token embeddings query via learned projections; retrieval and fusion with local convolutions occur in parallel. No dynamic per-token write is used; is updated via global back-propagation. Associative retrieval is in sequence length, scaling well to long contexts. Experiments report faster training (117.2s/epoch for WikiText-2) and lower perplexity (882.57 vs. 918.99 for Transformer).
7. Broader Implications and Comparative Table
GAMemoryStore in all three domains shares the principle of decoupling write/storage from retrieval/use, enabling optimized, scalable access for both online inference and offline training. Lossless page-storage (agentic memory), relaxed commit atomicity (multi-core memory), and prototype-based associative recall (sequence models) all exemplify the power of general agentic memory substrates.
| Domain | Storage Structure | Retrieval Mechanism |
|---|---|---|
| Agentic Memory | Universal page-store (P) | Iterative, multi-tool search |
| Weak Memory Model | Monolithic memory (m[]) | Atomic commit, latest value |
| GAM Net (Seq) | Static memory bank (M) | Parallel content-based read |
Each instance of GAMemoryStore enables flexible, task-specific context compilation and supports efficient scaling to large context and dynamic retrieval requirements. Empirical, axiomatic, and operational evidence across cited works supports its effectiveness as a foundational memory substrate for modern intelligent systems.