Papers
Topics
Authors
Recent
Search
2000 character limit reached

GAMemoryStore: Universal Memory Framework

Updated 16 December 2025
  • 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 hist=(s1,s2,...,sT)\operatorname{hist} = (s_1, s_2, ..., s_T) and emits both a lightweight summary memory m={μ1,,μT}m = \{\mu_1, \ldots, \mu_T\} and a sequence of indexed pages P=(p1,...,pT)P = (p_1, ..., p_T), where pi=hi,sip_i = \langle h_i, s_i \rangle. The header hih_i summarizes salient indexing cues for contextual retrieval.

At runtime, the "Researcher" agent receives a query rr and performs dynamic research: retrieving, re-ranking, and integrating pages from PP (guided by mm) to compile a customized, minimal, high-utility context c(r)c^*(r). 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 cMemory(task,hist)c^* \leftarrow \text{Memory}(\text{task}, \text{hist}), with the goal of minimizing c|c^*| while maximizing downstream agent performance. Pages are indexed by:

  • Embedding index: e^(p)=Embed(hisi)Rd\hat{e}(p) = \operatorname{Embed}(h_i \| s_i) \in \mathbb{R}^d (vector indices such as BGE-M3, cosine similarity search)
  • BM25 inverted index on hisih_i \| s_i
  • 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 mi={μ1,...,μi}m_i = \{\mu_1, ..., \mu_i\} accumulates concise session snapshots as search guidance.

3. Memorizer and Researcher Algorithms

The Memorizer conducts, per new session sis_i:

  • Memorizing: mi=mi1{μi}m_i = m_{i-1} \cup \{\mu_i\}, where μi\mu_i is an LLM-generated summary of session-critical content.
  • Paging: outputting pi=hi,sip_i = \langle h_i, s_i \rangle, with hih_i capturing contextual and retrieval landmarks.

At query time, the Researcher orchestrates a reflection loop:

  1. Planning: (t,ρt:tT)plan(r,mT,T)({t, \rho_t} : t \in \mathcal{T}) \leftarrow \operatorname{plan}(r, m_T, \mathcal{T}), choosing among {EmbeddingSearch,BM25Search,IDLookup}\{\text{EmbeddingSearch}, \text{BM25Search}, \text{IDLookup}\}.
  2. Parallel Searching: Each tool tt retrieves pt=t(ρt)p_t = t(\rho_t), returning top-KtK_t pages.
  3. Integration: Sequential LLM-based merging Ij+1=Integrate(Ij,tpt,r)I_{j+1} = \operatorname{Integrate}(I_j, \bigcup_t p_t, r).
  4. 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 (M,P)Memorizer(hist)(M, P) \leftarrow \text{Memorizer}(\text{hist}), and cResearcher(task,M,P)c \leftarrow \text{Researcher}(\text{task}, M, P), the downstream client's accuracy Γ(ans)\Gamma(\text{ans}) forms the reward. Expected total reward is:

R=E(task,hist)DE(M,P)πm(hist)Ecπr(task,M,P)EansClient(c,task)[Γ(ans)]\mathcal{R} = \mathbb{E}_{(\text{task}, \text{hist}) \sim \mathcal{D}} \mathbb{E}_{(M,P) \sim \pi_m(\cdot|\text{hist})} \mathbb{E}_{c \sim \pi_r(\cdot|\text{task}, M, P)} \mathbb{E}_{\text{ans} \sim \text{Client}(c,\text{task})} [\Gamma(\text{ans})]

Gradient estimates θm\nabla_{\theta_m} and θr\nabla_{\theta_r} 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 MRS×dM \in \mathbb{R}^{S \times d} (Acharya, 30 Aug 2025). Token embeddings query MM via learned projections; retrieval and fusion with local convolutions occur in parallel. No dynamic per-token write is used; MM is updated via global back-propagation. Associative retrieval is O(N)O(N) 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.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (3)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to GAMemoryStore.