arXiv:2604.20487cs.CLcs.AI2026-04被引 1

用结构化记忆单元让大模型更稳定地调用外部知识

Knowledge Capsules: Structured Nonparametric Memory Units for LLMs

论文配图:Knowledge Capsules: Structured Nonparametric Memory Units for LLMs
图 1 · 摘自论文原文
  • 用非参数化胶囊存储文档中的关系型知识
  • 在注意力机制中直接注入知识,提升长文本推理准确率
  • 无需更新参数,适合需要持续扩展知识的场景

大语言模型将知识编码在参数权重中,更新或扩展需重训练。检索增强生成(RAG)通过在输入中插入检索文本缓解此问题,但仅通过上下文扩展实现,外部知识以令牌形式参与注意力计算,影响间接且不稳定,尤其在长上下文和多跳推理中表现不佳。本文提出知识胶囊(Knowledge Capsules),一种从文档语料库中使用冻结基础模型直接构建的结构化非参数化记忆单元,表示归一化的关联知识。我们引入外部键值注入(KVI)框架,将胶囊转化为注意力兼容的键值表示,使外部知识直接参与模型注意力计算。通过将知识整合从上下文级增强转变为记忆级交互,该框架在多个问答基准上均优于RAG和GraphRAG,长上下文与多跳推理中表现更稳定、更准确,且无需参数更新。

原文摘要 · Abstract (English)

Large language models (LLMs) encode knowledge in parametric weights, making it costly to update or extend without retraining. Retrieval-augmented generation (RAG) mitigates this limitation by appending retrieved text to the input, but operates purely through context expansion, where external knowledge competes as tokens within the attention mechanism. As a result, its influence is indirect and often unstable, particularly in long context and multi hop reasoning scenarios. We propose Knowledge Capsules, structured nonparametric memory units that represent normalized relational knowledge and can be constructed directly from document corpora using a frozen base model. Instead of injecting knowledge as text, we introduce an External Key Value Injection (KVI) framework that compiles capsules into attention-compatible key value representations, enabling external knowledge to directly participate in the model's attention computation. By shifting knowledge integration from context-level augmentation to memory level interaction, the proposed framework consistently outperforms RAG and GraphRAG across multiple QA benchmarks, with improved stability and accuracy in long context and multi hop reasoning, while requiring no parameter updates.

知识增强记忆模块RAG改进

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。