MGMem Replaces Generative Agent Memory Indexing with Deterministic Parsing
Summary:Long-horizon LLM agents often build memory by asking generative models to rewrite raw interactions into summaries, facts, or knowledge graphs. MGMem removes those generative indexing calls. It organizes recurring mentions across sessions in an incidence graph, resolves question mentions through a subject-conditioned three-stage resolver, and returns raw dialogue episodes to the reader, making indexing deterministic while preserving source evidence. The paper reports gains over matched-protocol
Core idea
MGMem replaces generative rewriting with discriminative parsing that makes no generative calls while constructing agent memory. The contribution is not a larger memory model; it moves summary generation, fact extraction, and graph writing out of the indexing path and replaces them with repeatable mention parsing, incidence-graph organization, and retrieval of original episodes. This makes the index easier to reproduce and gives the reader access to evidence that has not been irreversibly synthesized.
The design targets three practical problems in long-horizon agents: indexing cost as history grows, output drift between runs, and broken evidence chains after summaries overwrite the original dialogue.
Pipeline and cost model
Conventional generative indexing asks an LLM to transform history into summaries, facts, or knowledge graphs. For N turns with c model calls per turn, the indexing workload can be approximated as C_index ≈ cN. Batching may reduce the constant, but prompt tokens, output tokens, and model-service latency still grow with history. Sampling, model upgrades, and serving-stack changes can also produce different indexes from the same history. Once only synthesized text reaches the reader, it becomes difficult to trace a conclusion back to the turn that supports it.
MGMem uses a three-part pipeline:
- Cross-session mention association: recurring mentions across separate sessions are organized into an incidence graph. The abstract does not disclose the graph's node, edge, or aggregation schema, so its exact internals must be verified in the repository rather than inferred from the summary.
- Subject-conditioned resolution: a subject-conditioned three-stage resolver identifies the mention targeted by a question. The intent is to avoid assigning a shared name, alias, or pronoun to the wrong entity across sessions, although the three stages are not described in the available material.
- Original-episode retrieval: the system returns raw dialogue episodes to the reader instead of only a consolidated summary. The answer can still be generated by an LLM, but its evidence can map back to a specific session, turn, and source text.
Let M denote graph size, k the number of retrieved episodes, and L the average token count per episode. The cost can be decomposed as:
C_build ≈ C_parse(N) + C_graph(M): parsing interactions and updating the incidence graph, with no generative indexing call; andC_query ≈ C_resolve(q) + C_search(q, G) + C_reader(kL): question resolution, graph retrieval, and reader inference remain separate costs.
MGMem therefore removes the generative component of indexing, not all LLM expenditure. Final answer latency and token billing still depend on the reader model, the number of retrieved episodes, and their length.
Engineering trade-offs
Semantic abstraction is the primary trade-off. LLM-generated summaries are effective at paraphrasing, inferring implicit facts, and aggregating across different surface forms. A deterministic parser is generally easier to audit and reproduce, but may lose recall on aliases, long-range coreference, implicit intent, and cross-phrasing matches. The paper's claim that discriminative parsing outperforms generative indexing does not imply universal superiority across every memory workload.
Original evidence increases storage and context overhead. Keeping raw dialogue supports auditability but sacrifices the compactness of a summary-only system. With k returned passages, reader input grows roughly with kL; more complete evidence normally means higher input-token cost and inference latency. Production systems need hard limits on both episode count and token budget.
Graph design determines long-term scalability. An incidence graph avoids rescanning all history for every query, but its edge count grows with repeated mentions. If every co-occurrence in a high-frequency entity cluster is fully connected, that cluster can approach quadratic edge growth. Incremental updates, edge deduplication, and bounded expansion are necessary to keep rebuild cost under control. The abstract does not disclose these implementation details.
Determinism requires a fixed execution boundary. Identical input produces reproducible output only when model weights, parser versions, graph schemas, dependencies, and numerical configurations are fixed. Neural encoders, parallel floating-point kernels, or third-party services can still introduce drift across hardware and runs. “No generative indexing calls” does not automatically imply bitwise identity.
Time, conflicts, and privacy require separate controls. Co-occurrence can show that two mentions are related, but it does not establish that either statement is true, current, or free of contradiction. A deployable system also needs timestamps, fact versions, conflict priorities, access control, deletion policies, and audit logs for retained raw conversations.
What the benchmarks establish
On the English multi-session dialogue QA benchmark LoCoMo, the paper reports that MGMem outperforms matched-protocol baselines while avoiding generative calls during indexing. On the full LongMemEval-S, it remains competitive overall and leads or ties on some single-session categories among local-retrieval comparisons. These results support two narrow conclusions: deterministic indexing need not cause a large overall accuracy penalty, and original-episode retrieval may help on some local-memory questions.
The abstract does not provide absolute scores, baseline names, variance, significance tests, reader configuration, retrieval budgets, equal-token or equal-wall-clock controls, or index-build time. “Outperforms matched-protocol baselines” therefore cannot be interpreted as superiority under every resource constraint. The single-session observation is also restricted to local-retrieval comparisons and should not be generalized to every long-horizon, multi-entity, or multilingual setting.
The most useful follow-up experiments would report absolute accuracy on LoCoMo and LongMemEval-S, run-to-run variance, index-build time, peak storage, query p50/p95 latency, reader-token cost, evidence recall, and quality-cost curves across different retrieval budgets. A code link is provided, but its license, dependency versions, and reproducibility scripts still require verification.
Deployment guidance
MGMem is best treated as a memory-retrieval layer, not as a replacement for the final answer model. A practical integration should:
- Assign stable IDs to turns, episodes, and mentions, while retaining timestamps, subjects, source sessions, and versions so graph edges can be traced to original evidence.
- Pin parser weights, rules or prompts, graph schemas, and dependencies, and store a manifest plus content hash for every index build to support replay.
- Run the system in shadow mode against the existing summary-based memory. Compare answer accuracy, evidence recall, wrong-subject rate, indexing cost, query latency, and storage growth before switching production traffic.
- Enforce token and episode limits, retrieve high-confidence evidence first, and expand only when necessary. Require key answer claims to map to stable source IDs.
- Build targeted tests for aliases, negation, temporal reversal, subject conflicts, and multi-hop questions to establish the resolver's actual failure boundary.
MGMem is attractive when auditability, reproducibility, and access to original evidence are primary requirements. When a workload depends on strong abstraction, open-domain semantic synthesis, or minimal storage, a hybrid design may work better: maintain candidate memories with the deterministic pipeline, apply controlled generative abstraction only to a small number of difficult cases, and preserve a mapping back to the source text.
— END —Source: ArXiv NLP/LLM (cs.CL) (2026-11-26)
Tags: #MGMem #Long-Horizon Agent Memory #Deterministic Indexing #Incidence Graph Retrieval #Provenance-Preserving Memory
Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.
Community Comments