Papers
Topics
Authors
Recent
Search
2000 character limit reached

MOOM: Dual-Branch Memory for Long Dialogues

Updated 11 July 2026
  • MOOM is a dual-branch memory mechanism that extracts and organizes narrative plots and user personas in ultra-long role-playing dialogues.
  • It employs a Narrative Summarization Branch (NSB) and a Persona Construction Branch (PCB) to create hierarchical summaries and structured persona profiles.
  • The system uses a forgetting mechanism inspired by competition-inhibition theory to maintain coherent context and reduce GPU load.

Searching arXiv for the papers relevant to “MOOM” to ground the article in the cited literature. Searching arXiv for “MOOM memory ultra-long role-playing dialogues” and related terms. MOOM denotes a dual-branch memory plugin for ultra-long human–robot role-playing dialogues that treats such dialogues as stories co-created by users and LLM agents. It models plot development and character portrayal as the core storytelling elements, implements them as a Narrative Summarization Branch (NSB) and a Persona Construction Branch (PCB), and couples both branches to a forgetting mechanism inspired by competition-inhibition memory theory in order to maintain coherent long-horizon interaction with controllable memory capacity (Chen et al., 15 Sep 2025).

1. Task formulation and conceptual basis

MOOM addresses long-term memory extraction for ultra-long human–robot role-playing dialogues. A dialogue dataset is written as D=(d1,d2,,dt)D = (d_1, d_2, \dots, d_t), where each turn dt={ct,ut}d_t = \{c_t, u_t\} contains the chatbot’s response ctc_t and the user’s utterance utu_t. The memory extraction task is to use the full dialogue history DD up to time tt to extract a memory set M={m1,m2,,mt1}M = \{m_1, m_2, \dots, m_{t-1}\}, where each mim_i captures user-related information, including plot developments and persona traits, that is needed for coherent role-playing in future turns.

The framework is designed around three simultaneous requirements: content completeness, low latency, and controllable capacity. The underlying motivation is that naïve memory handling becomes problematic in ultra-long settings. Feeding the entire history into the context window each turn is infeasible for dialogues that exceed 600 turns, while appending arbitrary extracted memories without deletion or compression causes uncontrolled memory growth. The reported consequences are context window overflow, increased GPU memory and latency, and degraded retrieval quality due to large, noisy memory pools. The paper gives the concrete example that vanilla Qwen1.5-7B needs approximately 32GB for an 8k window, whereas MOOM works with approximately 16GB.

The system’s conceptual framing is explicitly literary. Drawing on classical literary theory, the design treats plot and characters as the core elements of stories. In this formulation, role-playing dialogue generates a plot consisting of conflicts, resolutions, and turning points, while the participants enact characters, including the user persona and the LLM’s role persona. This leads to a structured decomposition of memory into narrative and persona components, rather than topic segmentation or purely similarity-based clustering. A common misconception is that long-context capability alone solves long-horizon dialogue coherence; the reported comparisons instead indicate that prompt-time access to more text does not by itself guarantee better memory organization, retrieval precision, or bounded memory growth (Chen et al., 15 Sep 2025).

2. Dual-branch architecture

MOOM is positioned as a memory plugin between dialogue history and response generation. As conversation proceeds, each new turn is logged as raw history and passed to NSB and PCB. NSB periodically packages and summarizes dialogue segments into multi-level plot summaries; PCB periodically extracts persona snapshots and merges them into a persistent persona sketch. A retrieval module together with the forgetting mechanism maintains a bounded memory pool MM. For each new query, MOOM retrieves relevant memories using a BGE reranker and supplies those snippets to the main LLM without including full dialogue history.

Component Primary function Output form
NSB Hierarchical plot summarization across multiple time scales I(1)I^{(1)}, dt={ct,ut}d_t = \{c_t, u_t\}0, dt={ct,ut}d_t = \{c_t, u_t\}1
PCB Dynamic persona extraction and fusion Structured key–value persona sketch
Retrieval + forgetting Bounded memory maintenance Relevant memory subset for prompting

The Narrative Summarization Branch operates by packaging raw turns and then compressing them hierarchically. When the number of turns reaches threshold dt={ct,ut}d_t = \{c_t, u_t\}2, they are grouped into a first-level unit,

dt={ct,ut}d_t = \{c_t, u_t\}3

The implementation choice is dt={ct,ut}d_t = \{c_t, u_t\}4, so each dt={ct,ut}d_t = \{c_t, u_t\}5 contains 6 turns, or 3 user–agent rounds. For higher levels, when the number of segments dt={ct,ut}d_t = \{c_t, u_t\}6 reaches dt={ct,ut}d_t = \{c_t, u_t\}7, MOOM aggregates them through LLM summarization,

dt={ct,ut}d_t = \{c_t, u_t\}8

In practice, dt={ct,ut}d_t = \{c_t, u_t\}9 and ctc_t0, yielding two summarization stages: raw ctc_t1 to ctc_t2 for local key events, and ctc_t3 to ctc_t4 for high-level storyline summaries centered on central conflicts and turning points. The resulting hierarchy ctc_t5 provides long-term plot memory.

The Persona Construction Branch maintains a key–value persona profile. The keys include static attributes such as Name, Age, and Profession; preferences such as Favorite foods, Disliked animals, and Hobbies; trajectory and history fields such as Recent activities and Important events; and more complex relational or psychological traits. These keys are organized into categories with distinct update policies: replace keys, append keys / expandable attributes, trajectory keys, contradictory keys, and complex keys.

Persona snapshots are extracted at specified intervals by prompting an LLM to produce a dictionary mapping persona keys to values found in recent dialogue. The paper describes one instantiation in which GPT-4 generates training labels and a Qwen2-7B model is fine-tuned to perform persona extraction more cheaply than repeated GPT-4 calls. Snapshot fusion uses three strategies: rule-based merging for replace, append, and trajectory keys; embedding-based merging for contradictory keys using BGE similarity; and LLM-based merging for complex keys that require semantic integration. The reported ablation establishes complementarity between branches: NSB-only achieves MemScore 2.603 and QA precision 0.693, PCB-only achieves MemScore 2.468 and QA precision 0.752, and the full system achieves MemScore 3.170 and QA precision 0.832 (Chen et al., 15 Sep 2025).

3. Memory representation, retrieval, and forgetting

MOOM’s memory pool combines narrative summaries from NSB and persona key–value entries from PCB. Narrative summaries ctc_t6 and ctc_t7 are event-centric and temporally structured; persona entries encode user traits, preferences, and history in a more semantic form. Each memory item is a short text snippet associated with metadata: creation round ctc_t8, retrieval history ctc_t9, and an importance score utu_t0.

Update rules differ by branch. In NSB, every turn is appended as raw history, raw turns are packaged into utu_t1 when utu_t2 is met, and higher-level summaries are created whenever the segment count reaches the corresponding utu_t3. Summaries utu_t4 and utu_t5 are inserted into the memory pool with metadata. In PCB, persona snapshots are extracted at persona intervals, merged into the current persona sketch, and the changed or newly added key–value entries are inserted or updated in utu_t6.

Retrieval is context-dependent. For a retrieval context utu_t7, MOOM first uses the BGE reranker to compute similarity between utu_t8 and each memory item utu_t9, then retrieves the top DD0 memories by semantic relevance. Among these DD1 candidates, the top DD2 form the relevant set DD3, the next DD4 form the interfering set DD5, and the remaining memory items are the unactivated set DD6. Only DD7, up to 9 items because DD8, is inserted into the prompt context together with the current query.

The forgetting mechanism is grounded in interference theory and inhibitory control. Each memory item’s importance score evolves according to

DD9

where tt0 is the current round, tt1 is the creation round, tt2 is the set of past retrieval rounds, and tt3 avoids division by zero. The first term is temporal decay; the second is retrieval reinforcement. The reported parameter setting is tt4, tt5, tt6, which gives retrieval reinforcement dominance over temporal decay. After top-tt7 retrieval, the relevant memories record tt8 into their retrieval histories, while the interfering memories have their scores halved. Retention and pruning then enforce bounded capacity, with capacities such as 3k, 6k, and 10k items used in the experiments.

This mechanism is intended to realize competition and inhibition operationally: repeatedly useful memories are strengthened, near-relevant but currently distracting memories are suppressed, and low-utility memories are gradually pruned. The reported empirical result is that, at equal capacity such as 6k items, competition-inhibition surpasses Ebbinghaus-curve decay and simple capacity control on BERTScore, M3E, ROUGE, and QA precision, and that a limited-capacity configuration can outperform unbounded memory because noisy entries are suppressed (Chen et al., 15 Sep 2025).

4. ZH-4O dataset and evaluation methodology

ZH-4O is a Chinese ultra-long role-playing dialogue dataset designed specifically for memory evaluation. It contains 28 dialogue sessions with an average of 600 turns per dialogue. The dialogues are human–LLM interactions rather than purely synthetic conversations: annotators role-play with a persona-configured chatbot under minimal constraints besides ethics and legality, and the dialogues include substantial Chinese cultural content such as cuisine and celebrities.

The dataset includes 1,115 memory annotations across the 28 dialogues. Annotators first skimmed the dialogues and then read them sentence by sentence to extract notable information and tag its turn index. Each dialogue was annotated by two annotators, and a third annotator resolved discrepancies and merged similar points. Many annotations follow SVO structures, but annotators were not constrained to SVO tagging.

ZH-4O also includes a probing setup with 1,068 multiple-choice questions created from the robot’s perspective. Each question is associated with a specific memory point and has four options, one correct and three distractors. In addition, a universal probe table contains 30 structured probes, each defined by an information-containing snippet tt9, a later information-retrieval snippet M={m1,m2,,mt1}M = \{m_1, m_2, \dots, m_{t-1}\}0, and a reference answer M={m1,m2,,mt1}M = \{m_1, m_2, \dots, m_{t-1}\}1. The multiple-choice questions are used for QA precision, while the probe table supports LLM-scored QA similarity on a 0–5 scale.

Evaluation emphasizes how well extracted memories reflect human annotations. The reported metrics are: BERTScore precision, computed by matching each label to its best memory item; M3E embedding similarity, computed with the same matching scheme; ROUGE precision using ROUGE-2 and ROUGE-L; MemScore, which uses Qwen2.5-72B to rate semantic fidelity of memory items on a 0–5 scale after BERTScore matching; QA Precision, computed over the 1,068 probe questions; and LLM QA similarity, computed from answers to the universal probe table and then rated on a 0–5 scale. Relative to prior datasets, ZH-4O differs by combining ultra-long realistic human–LLM role-playing, rich memory annotations, probe QA structure, and a Chinese focus (Chen et al., 15 Sep 2025).

5. Empirical performance and comparative results

On ZH-4O, MOOM is compared with Mem0, MemoChat, and MemoryBank across multiple LLM sizes. The reported MOOM-7B fine-tuned configuration, using Qwen1.5-14B for plot summarization and a fine-tuned Qwen2-7B for persona extraction, achieves BERTScore 0.8018, M3E 0.9017, ROUGE-2 0.2806, ROUGE-L 0.4834, MemScore 3.170, and QA precision 0.832. The MOOM-72B configuration achieves BERTScore 0.8071, M3E 0.9149, ROUGE-2 0.3341, ROUGE-L 0.5153, MemScore 3.317, and QA precision 0.840. For comparison, the reported Mem0-72B scores are BERTScore 0.7108, MemScore 0.519, and QA precision 0.612; MemoChat-72B has MemScore 2.303 and QA precision 0.693; and MemoryBank-72B has MemScore 1.780 and QA precision 0.692.

The long-context comparison further distinguishes memory organization from sheer context-window size. In Table 6, MOOM uses a 1k context window with 9 retrieved memory items only. For 7B models, QA precision is 0.607 for vanilla Qwen1.5-7B, 0.570 for InfLLM-7B, 0.730 for HippoRAG2-7B, 0.793 for MOOM-7B, and 0.781 for Qwen2.5-1M-7B. For 14B models, the reported values are 0.687 for vanilla Qwen1.5-14B, 0.827 for MOOM-14B, and 0.852 for Qwen2.5-1M-14B. This suggests that short-context retrieval with structured memory can be competitive with, and in some cases better than, feeding extensive history.

The probe-table QA evaluation in Table 11 reports an LLM-scored QA similarity of 1.521 for MOOM, compared with 0.951 for Mem0, 1.212 for MemoChat, and 0.942 for MemoryBank. The paper attributes part of this difference to MOOM’s concise memory snippets, whereas MemoryBank’s large, verbose entries appear to hurt response generation.

Ablations isolate the role of architectural choices. The dual-branch ablation shows that combining NSB and PCB substantially improves both intrinsic memory quality and downstream QA. The PCB merging ablation indicates that, under unconstrained memory, MemScore rises from 2.843 with rule-based merging only to 3.172 when embedding-based merging is added, while adding LLM-based merging gives 3.170, a minor additional gain. Under constrained capacity of 50 items, the same progression is 1.189, 1.205, and 1.405, indicating that LLM-based merging becomes more important when capacity is tight.

MOOM also generalizes beyond Chinese evaluation. On the English LoCoMo dataset, MOOM-72B achieves BERTScore 0.7088, ROUGE-2 0.2925, ROUGE-L 0.4288, and MemScore 3.288, all reported as the best values in Table 13. The MOOM-14B variant also outperforms Mem0, MemoChat, and MemoryBank on that benchmark. The framework also reduces LLM-call overhead: for the same LLM, the time consumption ratio MOOM : Mem0 : MemoChat : MemoryBank is reported as approximately 1 : 2.5 : 3 : 1.5, and on H800, processing 20 rounds or approximately 40 turns with MOOM-7B takes approximately 8 seconds (Chen et al., 15 Sep 2025).

6. Implementation, limitations, and broader significance

MOOM is primarily a framework that orchestrates LLM calls, rule-based merging, and embedding-based retrieval. NSB summarization uses prompts with general-purpose LLMs such as Qwen1.5-14B, Qwen2.5-32B, and Qwen2.5-72B, without task-specific fine-tuning. PCB persona extraction can use a fine-tuned Qwen2-7B model distilled from GPT-4 outputs. The fine-tuning pipeline described in the paper collects approximately 100 user dialogues, segments them into 10-turn slices for a total of 10,000 slices, uses GPT-4 to generate persona summaries for each slice, cleans and refines the snapshots, and fine-tunes Qwen2-7B with batch size 64, learning rate M={m1,m2,,mt1}M = \{m_1, m_2, \dots, m_{t-1}\}2, and 800 steps.

Several limitations are explicitly identified. The annotation pool for ZH-4O consists of 10 Chinese annotators, all highly educated, with no collected demographic diversity or personal background metadata, which may bias memory annotations. ZH-4O is entirely Chinese, although MOOM is also evaluated on English LoCoMo. The fine-tuned persona extraction model uses GPT-4-generated labels, so GPT-4 biases may influence persona modeling. The dataset is text-only and limited to two-party human–AI dialogue, leaving multi-party and multimodal role-playing outside the reported scope.

The paper also outlines directions for future work: multilingual expansion of ZH-4O, multimodal and multi-agent dialogue settings, refinement of plot and persona abstractions through graph-based narrative structures or richer personality taxonomies, more advanced forgetting and retrieval with adaptive parameters or learned controllers, and practical deployment in systems such as customer support, tutoring, and social companions. A plausible implication is that MOOM’s central contribution lies less in any single retrieval heuristic than in the integration of literary structure, hybrid symbolic-neural memory updating, and bounded-memory competition-inhibition into a unified operational design. In the paper’s own high-level summary, this shifts dialogue memory management from ad hoc similarity-based heuristics toward a more theory-inspired framework for coherent, efficient, long-term role-playing (Chen et al., 15 Sep 2025).

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

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 MOOM.