Doc-to-Atom:学习编译和组合记忆原子
Doc-to-Atom: Learning to Compile and Compose Memory Atoms
AI总结:
提出Doc2Atom框架,将文档分解为语义类型化的知识原子并编译为微LoRA适配器,通过轻量查询路由器选择相关原子组装成查询特定适配器,以解决文档压缩中的干扰和扩展性问题,在六个QA基准上优于Doc-to-LoRA。
摘要:
长输入序列是大语言模型文档理解和多步推理的核心,但注意力的二次成本使得推理既内存密集又缓慢。上下文蒸馏通过将上下文信息压缩到模型参数中来缓解这一问题,最近的工作如Doc-to-LoRA将上下文蒸馏摊销为一次前向传播,为每个文档生成一个LoRA适配器。然而,为所有查询生成单个整体适配器会导致无关查询干扰、有限的组合回忆以及长文档推理的可扩展性差。为了解决这些挑战,我们提出了Doc-to-Atom(Doc2Atom),一种组合参数化记忆框架,将每个文档分解为语义类型化的知识原子。每个原子被编译成一个独立的微LoRA适配器和一个来源检索键。在推理时,一个轻量查询路由器选择并仅组装相关原子到一个查询特定适配器中,然后将其注入冻结的基础模型。整个系统通过多目标蒸馏框架进行端到端训练。在六个不同的QA基准上的实验表明,Doc2Atom优于Doc-to-LoRA基线,同时降低了文档内部化的内存成本。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。