ComoRAG:一種受認知啟發的記憶組織化RAG,用於狀態化長篇敘事推理
ComoRAG: A Cognitive-Inspired Memory-Organized RAG for Stateful Long Narrative Reasoning
August 14, 2025
作者: Juyuan Wang, Rongchen Zhao, Wei Wei, Yufeng Wang, Mo Yu, Jie Zhou, Jin Xu, Liyan Xu
cs.AI
摘要
長篇故事和小說的敘事理解一直是一個具有挑戰性的領域,這歸因於其複雜的情節線索以及角色與實體之間錯綜複雜且不斷演變的關係。考慮到大型語言模型(LLM)在處理長上下文時的推理能力受限以及高昂的計算成本,基於檢索的方法在實踐中仍然扮演著關鍵角色。然而,傳統的檢索增強生成(RAG)方法由於其無狀態的單步檢索過程,往往難以捕捉長範圍上下文中相互關聯關係的動態特性,從而存在不足。在本研究中,我們提出了ComoRAG,其核心原則是敘事推理並非一次性過程,而是一個動態演變的過程,涉及新證據的獲取與過去知識的整合,這與人類在處理與記憶相關信號時的認知過程相似。具體而言,當遇到推理瓶頸時,ComoRAG會與動態記憶工作空間進行交互,經歷多次推理循環。在每個循環中,它會生成探測性查詢以開闢新的探索路徑,然後將檢索到的新方面證據整合到全局記憶池中,從而為查詢解析提供連貫的上下文支持。在四個具有挑戰性的長上下文敘事基準測試(超過20萬個詞元)中,ComoRAG相較於最強的RAG基線模型,取得了最高達11%的相對性能提升。進一步分析表明,ComoRAG在需要全局理解的複雜查詢上表現尤為突出,為基於檢索的長上下文理解提供了一種基於認知科學原理的狀態推理範式。我們的代碼已公開於https://github.com/EternityJune25/ComoRAG。
English
Narrative comprehension on long stories and novels has been a challenging
domain attributed to their intricate plotlines and entangled, often evolving
relations among characters and entities. Given the LLM's diminished reasoning
over extended context and high computational cost, retrieval-based approaches
remain a pivotal role in practice. However, traditional RAG methods can fall
short due to their stateless, single-step retrieval process, which often
overlooks the dynamic nature of capturing interconnected relations within
long-range context. In this work, we propose ComoRAG, holding the principle
that narrative reasoning is not a one-shot process, but a dynamic, evolving
interplay between new evidence acquisition and past knowledge consolidation,
analogous to human cognition when reasoning with memory-related signals in the
brain. Specifically, when encountering a reasoning impasse, ComoRAG undergoes
iterative reasoning cycles while interacting with a dynamic memory workspace.
In each cycle, it generates probing queries to devise new exploratory paths,
then integrates the retrieved evidence of new aspects into a global memory
pool, thereby supporting the emergence of a coherent context for the query
resolution. Across four challenging long-context narrative benchmarks (200K+
tokens), ComoRAG outperforms strong RAG baselines with consistent relative
gains up to 11% compared to the strongest baseline. Further analysis reveals
that ComoRAG is particularly advantageous for complex queries requiring global
comprehension, offering a principled, cognitively motivated paradigm for
retrieval-based long context comprehension towards stateful reasoning. Our code
is publicly released at https://github.com/EternityJune25/ComoRAG