ToM:利用面向树的MapReduce进行大型语言模型的长上下文推理
ToM: Leveraging Tree-oriented MapReduce for Long-Context Reasoning in Large Language Models
AI总结:
针对LLM长上下文推理中RAG和分治框架存在的逻辑断裂与冲突问题,提出基于树形MapReduce的ToM框架,通过构建文档树实现递归推理与自下而上聚合,显著提升了逻辑连贯性与推理性能。
摘要:
大型语言模型(LLMs)受限于有限的上下文窗口,在长上下文推理时常常面临显著的性能下降。为解决此问题,检索增强生成(RAG)对文本块进行检索和推理,但由于依赖基于相似度的排序,经常牺牲逻辑连贯性。类似地,分治框架(DCF)将文档分割成小块进行独立推理和聚合。虽然DCF对局部推理有效,但难以捕捉长距离依赖,并因孤立处理文本块而面临引发冲突的风险。为克服这些局限性,我们提出了ToM,一种用于长上下文推理的新型面向树的MapReduce框架。ToM通过分层语义解析构建DocTree,利用长文档固有的分层结构(如主标题和副标题),并执行自下而上的聚合。使用树形MapReduce方法,ToM实现了递归推理:在Map步骤中,在子节点生成理由;在Reduce步骤中,在兄弟节点间聚合这些理由,以在父节点解决冲突或达成共识。在70B+ LLMs上的实验结果表明,ToM显著优于现有的分治框架和检索增强生成方法,实现了更好的逻辑连贯性和长上下文推理。我们的代码可在 https://github.com/gjn12-31/ToM 获取。
英文摘要:
Large Language Models (LLMs), constrained by limited context windows, often face significant performance degradation when reasoning over long contexts. To address this, Retrieval-Augmented Generation (RAG) retrieves and reasons over chunks but frequently sacrifices logical coherence due to its reliance on similarity-based rankings. Similarly, divide-and-conquer frameworks (DCF) split documents into small chunks for independent reasoning and aggregation. While effective for local reasoning, DCF struggles to capture long-range dependencies and risks inducing conflicts by processing chunks in isolation. To overcome these limitations, we propose ToM, a novel Tree-oriented MapReduce framework for long-context reasoning. ToM leverages the inherent hierarchical structure of long documents (e.g., main headings and subheadings) by constructing a DocTree through hierarchical semantic parsing and performing bottom-up aggregation. Using a Tree MapReduce approach, ToM enables recursive reasoning: in the Map step, rationales are generated at child nodes; in the Reduce step, these rationales are aggregated across sibling nodes to resolve conflicts or reach consensus at parent nodes. Experimental results on 70B+ LLMs show that ToM significantly outperforms existing divide-and-conquer frameworks and retrieval-augmented generation methods, achieving better logical coherence and long-context reasoning. Our code is available at https://github.com/gjn12-31/ToM .
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。