Skip to content

ComoRAG: A Cognitive-Inspired Memory-Organized RAG for Stateful Long Narrative Reasoning

Conference: AAAI2026 arXiv: 2508.10419
Code: EternityJune25/ComoRAG
Area: Information Retrieval Keywords: RAG, Long Narrative Reasoning, Memory-Organized, Metacognitive Regulation, Stateful Reasoning

TL;DR

Inspired by the metacognitive regulation mechanism of the prefrontal cortex, this paper proposes the ComoRAG framework, which achieves stateful multi-step reasoning via a dynamic memory workspace and iterative probe queries, significantly outperforming existing RAG methods on long narrative understanding tasks (200K+ tokens).

Background & Motivation

State of the Field

Background: Understanding long narratives (novels, stories) differs from general multi-hop QA in that it requires dynamically constructing and revising a global mental model of plot, characters, and motivational development. Consider the question "Why did Snape kill Dumbledore?"โ€”answering it requires weaving a complete evidence network from scattered clues spanning multiple books: Dumbledore's terminal illness, the Unbreakable Vow, and Snape's deeply concealed loyalty. The true significance of these clues can only be fully reconciled in retrospect.

Shortcomings of existing methods:

Limitations of Prior Work

Limitations of Prior Work: Long-context LLMs are constrained by limited context windows and are prone to the "lost in the middle" problem as input length increases.

Root Cause

Key Challenge: Single-step retrieval RAG methods (e.g., RAPTOR, HippoRAGv2, GraphRAG) rely on static indices, leading to shallow understanding and an inability to capture the dynamic evolution of evidence.

Starting Point

Key Insight: Multi-step retrieval RAG methods (e.g., IRCoT, Self-RAG, MemoRAG) treat each retrieval step independently, lacking coherent narrative reasoning and resulting in fragmented, stateless understanding.

Starting Point

Goal: How can stateful reasoning be realized in a RAG settingโ€”i.e., maintaining a dynamically updated memory throughout the retrieval process so that the system can, like a human reader, continuously construct and revise a global understanding of the narrative as new evidence emerges?

Method

The ComoRAG framework consists of three core components:

1. Hierarchical Knowledge Source

Retrieval indices are established along three complementary cognitive dimensions:

  • Veridical Layer: Retains original text chunks directly and uses an LLM to generate knowledge triples (subjectโ€“predicateโ€“object) for each chunk, enhancing query-to-chunk matching precision. This is the most fundamental and important layer.
  • Semantic Layer: Employs RAPTOR's GMM-driven clustering algorithm to recursively aggregate semantically similar chunks into a hierarchical summary tree, capturing thematic and conceptual connections across long distances.
  • Episodic Layer: Produces continuous narrative summaries of text chunks via a sliding window, reconstructing storylines and plot arcs to capture temporal development and causal chains.

2. Dynamic Memory Workspace

A memory unit \(m = (p, \mathcal{E}_p^{type}, \mathcal{C}_p^{type})\) serves as the bridge for multi-step reasoning and contains: - \(p\): the probe query that triggered retrieval - \(\mathcal{E}_p^{type}\): a homogeneous evidence set retrieved from a specific knowledge layer - \(\mathcal{C}_p^{type}\): a synthesized clue generated by the Comprehension Agent, reflecting how the retrieved evidence supplements the understanding of the original query

The memory pool \(\mathcal{M}_{pool}\) is continuously updated at each reasoning cycle, enabling cumulative knowledge accumulation across steps.

3. Metacognitive Regulation Loop

The core cognitive loop comprises six operations:

  1. Self-Probe: When the current round of reasoning fails, the Regulation Agent generates a new probe query \(\mathcal{P}^{(t)}\) based on the original query, the history of probe records, and the synthesized clues from the previous round, opening new exploratory paths.
  2. Tri-Retrieve: For each probe query, dense passage retrieval is performed independently across all three knowledge layers.
  3. Mem-Encode: A memory unit is generated for each retrieval result, recording how new evidence supplements the final answer.
  4. Mem-Fuse: Historically relevant memory clues are retrieved from the memory pool based on semantic similarity to the original query; the Integration Agent then fuses new and existing evidence to produce a high-level contextual summary.
  5. Try-Answer: The QA Agent attempts to answer the original query based on the new evidence from the current round and the fused historical context; if evidence is insufficient, a Failure Signal is issued and the next round begins.
  6. Mem-Update: Newly generated memory units are merged into the global memory pool.

The entire process iterates for at most 5 rounds. The initial step (\(t=0\)) performs one round of Tri-Retrieve + Try-Answer; if it fails, the full metacognitive loop is activated.

Key Experimental Results

Main results on four long-context narrative understanding datasets (all using GPT-4o-mini as the LLM backbone and BGE-M3 as the retrieval model):

Main Results

Method NarrativeQA F1 EN.QA F1 EN.MC ACC DetectiveQA ACC
HippoRAGv2+IRCoT 28.98 29.27 64.19 62.50
RAPTOR+IRCoT 31.35 32.09 63.76 64.77
ComoRAG 31.43 34.52 72.93 68.18

Key findings:

  • On EN.MC, ComoRAG improves accuracy by approximately +8.7% over the strongest baseline, HippoRAGv2+IRCoT.
  • Despite using only the 0.3B BGE-M3 retrieval model, ComoRAG substantially outperforms Naive RAG with an 8B embedding model.
  • On documents exceeding 150K tokens, the accuracy gap between ComoRAG and HippoRAGv2 peaks at +24.6%.
  • Switching to GPT-4.1 raises EN.MC accuracy from 72.93% to 78.17%.
  • When applied as a plug-and-play module on top of RAPTOR, EN.MC accuracy improves from 57.21% to 69.00% (+21% relative gain).
  • Performance gains largely converge within the first 2โ€“3 rounds of iteration.

Ablation Study

Ablation experiments confirm: removing the Veridical Layer causes approximately 30% relative performance degradation; removing the metacognitive process (Metacognition) causes EN.QA F1 to drop by approximately 22%; removing the regulation process (Regulation) causes EN.MC accuracy to drop by approximately 24%.

Highlights & Insights

  • Cognitive Science Inspiration: The framework is designed from the metacognitive regulation mechanism of the human prefrontal cortex, modeling narrative reasoning as a dynamic interplay between "new evidence acquisition" and "integration of prior knowledge," with a theoretically well-motivated design.
  • Stateful Reasoning: Cross-step knowledge accumulation and reasoning state tracking are achieved via the dynamic memory workspace, addressing the fundamental statelessness of traditional multi-step RAG.
  • Three-Layer Knowledge Indexing: Context is modeled across three complementary dimensionsโ€”veridical, semantic, and episodicโ€”with the Episodic Layer's design specifically targeting the capture of narrative timelines.
  • Strong Modularity: The core cognitive loop can be applied as a plug-and-play module to existing RAG methods (e.g., RAPTOR, HippoRAGv2) and is compatible with different LLM backbones.
  • Targeted Advantage: On narrative-type queries requiring global context understanding, relative F1 improvement reaches 19%, precisely addressing the bottleneck of existing methods.

Limitations & Future Work

  • Multi-round iteration introduces additional LLM inference overhead (up to 5 rounds, each involving multiple agent calls); actual latency and cost are not sufficiently discussed.
  • Experiments focus primarily on narrative text; generalizability to other long-document types (scientific papers, legal documents, etc.) has not been validated.
  • Construction of the hierarchical knowledge source itself relies on LLM-generated triples and summaries, introducing additional preprocessing overhead.
  • The robustness of the Episodic Layer's sliding window design to varied narrative structures (non-linear narratives, multi-perspective narratives) warrants further investigation.
  • The classification under model compression is inaccurate; the work more appropriately belongs to NLP/RAG-related domains.
Method Knowledge Index Multi-Step Retrieval Memory Mechanism Stateful Reasoning
RAPTOR Semantic Tree โœ— โœ— โœ—
HippoRAGv2 Knowledge Graph โœ— โœ— โœ—
IRCoT Raw Chunks โœ“ (CoT) โœ— โœ—
MemoRAG Compressed Context โœ“ Dual System Partial
Self-RAG Raw Chunks โœ“ (Adaptive) โœ— โœ—
ComoRAG Three-Layer Hierarchical โœ“ (Iterative Probe) Dynamic Workspace โœ“

The core distinction of ComoRAG lies in the introduction of an explicit memory workspace and goal-directed probe query generation, making each retrieval round not independent but a directed exploration grounded in the historical reasoning state.

  • The design philosophy of the dynamic memory workspace is generalizable to other RAG scenarios requiring multi-step reasoning (e.g., code debugging, medical diagnosis).
  • The Episodic Layer design in the three-layer knowledge index offers reference value for tasks such as video understanding and temporal event reasoning.
  • The Self-Probe mechanism in the cognitive loop parallels the "reflectionโ€“replanning" paradigm in LLM agents and can be integrated with agent frameworks.
  • The plug-and-play property enables ComoRAG to serve as an enhancement module for existing RAG systems, offering practical engineering value.

Rating

  • Novelty: 8/10 โ€” The cognitively inspired approach to stateful RAG is novel, and the dynamic memory workspace concept demonstrates originality.
  • Experimental Thoroughness: 8/10 โ€” Four datasets, multiple baselines, comprehensive ablations and analyses, though efficiency comparisons are absent.
  • Writing Quality: 8/10 โ€” Analogies are clear, structure is complete, and the Harry Potter example is highly illustrative.
  • Value: 7/10 โ€” The plug-and-play property has engineering value, though the application scope is relatively narrow (narrative understanding).