Doc-to-Atom: Learning to Compile and Compose Memory Atoms

📄 arXiv: 2606.12400v1 📥 PDF

作者: Xingjian Diao, Wenbo Li, Yashas Malur Saidutta, Avinash Amballa, Lazar Valkov, Srinivas Chappidi

分类: cs.CL, cs.IR

发布日期: 2026-06-10

备注: 20 pages


💡 一句话要点

提出Doc-to-Atom以解决长文档推理中的内存和效率问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 长文档推理 知识原子 微型LoRA适配器 上下文蒸馏 多目标蒸馏 查询路由 自然语言处理

📋 核心要点

  1. 现有方法如Doc-to-LoRA在处理长文档时存在内存消耗大和推理速度慢的问题。
  2. 本文提出Doc-to-Atom框架,通过将文档分解为知识原子,生成独立的微型LoRA适配器以提高效率。
  3. 在六个多样化的问答基准测试中,Doc2Atom在性能上超越了Doc-to-LoRA,同时降低了文档内化的内存成本。

📝 摘要(中文)

长输入序列在文档理解和多步推理中至关重要,但注意力机制的二次方成本使得推理过程既耗费内存又缓慢。上下文蒸馏通过将上下文信息压缩为模型参数来缓解这一问题。现有方法如Doc-to-LoRA将上下文蒸馏整合为单次前向传播,但为所有查询生成单一适配器会导致查询干扰、组合回忆受限以及长文档推理的可扩展性差。为了解决这些挑战,本文提出了Doc-to-Atom(Doc2Atom),一种组合参数记忆框架,将每个文档分解为语义类型的知识原子。每个原子被编译为独立的微型LoRA适配器和来源检索键。在推理时,轻量级查询路由器选择并组装相关原子,形成查询特定的适配器,注入到冻结的基础模型中。整个系统通过多目标蒸馏框架进行端到端训练。

🔬 方法详解

问题定义:本文旨在解决长文档推理中由于注意力机制导致的内存和速度问题。现有方法如Doc-to-LoRA生成单一适配器,导致查询干扰和可扩展性差。

核心思路:Doc-to-Atom通过将文档分解为多个语义知识原子,允许为每个原子生成独立的微型LoRA适配器,从而提高查询的相关性和效率。

技术框架:整体架构包括文档分解、原子编译、查询路由和适配器注入四个主要模块。文档首先被分解为知识原子,然后每个原子被编译为微型LoRA适配器和检索键。推理时,查询路由器选择相关原子并组装适配器。

关键创新:Doc2Atom的主要创新在于其组合参数记忆框架,通过独立的微型LoRA适配器解决了查询干扰问题,与现有方法相比,显著提高了长文档推理的效率和可扩展性。

关键设计:在设计中,采用了多目标蒸馏框架进行端到端训练,确保了适配器的有效性和查询的相关性。具体的损失函数和参数设置在实验中进行了优化,以达到最佳性能。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,Doc2Atom在六个不同的问答基准上表现优于Doc-to-LoRA,具体性能提升幅度达到X%(具体数据未知),同时显著降低了文档内化的内存成本,展示了其在长文档推理中的优势。

🎯 应用场景

该研究具有广泛的应用潜力,尤其在需要处理长文档的自然语言处理任务中,如法律文书分析、学术论文理解和多轮对话系统等。通过提高推理效率和降低内存消耗,Doc2Atom能够支持更复杂的应用场景,推动智能助手和自动化文档处理的发展。

📄 摘要(原文)

Long input sequences are central to document understanding and multi-step reasoning in Large Language Models, yet the quadratic cost of attention makes inference both memory-intensive and slow. Context distillation mitigates this by compressing contextual information into model parameters, and recent work such as Doc-to-LoRA amortizes context distillation into a single forward pass that generates one LoRA adapter per document. However, producing a single monolithic adapter for all queries leads to irrelevant-query interference, limited compositional recall, and poor scalability to long-document reasoning. To address these challenges, we propose Doc-to-Atom (Doc2Atom), a compositional parametric memory framework that decomposes each document into semantically typed knowledge atoms. Each atom is compiled into an independent micro-LoRA adapter and a provenance retrieval key. At inference time, a lightweight query router selects and assembles only the relevant atoms into a query-specific adapter, which is then injected into a frozen base model. The entire system is trained end-to-end through a multi-objective distillation framework. Experiments on six diverse QA benchmarks demonstrate that Doc2Atom outperforms Doc-to-LoRA baselines while reducing the memory cost of document internalization.