EngramEdit:通过条件记忆实现LLM中的解耦知识更新

·

研究论文 · 2026/10/08

条件记忆架构(如 DeepSeek Engram)利用输入 n-gram 查找学习到的嵌入,以有限额外计算扩展大语言模型容量。该架构已展现出将事实知识存储与通用计算解耦的潜力,为在保持 Transformer 主干固定的同时更新事实知识提供了途径。实现这一潜力面临挑战:同一事实的不同表达可能激活不同的 n-gram 嵌入,而更新共享嵌入可能无意中改变模型对其他事实的预测。我们提出 EngramEdit,通过条件记忆实现解耦知识更新。EngramEdit 首先计算目标记忆表示,使模型在多种表达下预测更新后的事实;然后联合更新共享 n-gram 嵌入,以在多种表达和编辑中匹配这些目标,并对频繁复用的嵌入施加更强惩罚以保留无关知识。实验表明,EngramEdit 能通过条件记忆实现独立的事实知识更新,达到近乎完美的编辑成功率。修订后的知识可用于未见表达和多跳推理,在思维链提示下准确率接近最强基线的三倍。即使事实更新累积,无关知识和通用能力也基本得以保留。这些发现表明,EngramEdit 将条件记忆转变为可编辑的知识接口,将其作用从模型扩展延伸至支持解耦知识更新。

该研究将条件记忆从模型扩展工具转变为可编辑的知识接口,为在不改动 Transformer 主干的情况下独立更新事实知识提供了可行方案,并在多表达、多跳推理和知识保留方面表现出显著优势。

Conditional memory architectures such as DeepSeek Engram use input n-grams to look up learned embeddings, expanding the capacity of large language models (LLMs) with limited additional computation. Beyond model scaling, this architecture has demonstrated the potential to decouple factual knowledge storage from general-purpose computation, offering a promising route to updating factual knowledge while keeping the Transformer backbone fixed. Realizing this potential is challenging because different expressions of a fact may activate different n-gram embeddings, while updating shared embeddings can unintentionally change the model's predictions about other facts. We propose EngramEdit for decoupled knowledge updates through conditional memory. EngramEdit first computes target memory representations that make the model predict the updated fact across multiple expressions. It then jointly updates the shared n-gram embeddings to match these targets across expressions and edits, penalizing updates to frequently reused embeddings more strongly to preserve unrelated knowledge. Experiments show that EngramEdit enables independent factual knowledge updates through conditional memory, achieving near-perfect editing success. Revised knowledge is usable across unseen expressions and in multi-hop reasoning, with nearly three times the strongest baseline's accuracy under chain-of-thought (CoT) prompting. Unrelated knowledge and general capabilities are largely preserved even as factual updates accumulate. These findings show that EngramEdit turns conditional memory into an editable knowledge interface, extending its role beyond model scaling to support decoupled knowledge updates.

阅读原文

参与讨论