EngramEdit: Decoupled Knowledge Updates in LLMs through Conditional Memory

AK's Picks LLM Model Editing KECM
2026年10月07日
诸如DeepSeek Engram等条件记忆架构,利用输入的n元语法(n-grams)检索已习得的嵌入表示,从而在仅引入有限额外计算开销的前提下,显著扩展大语言模型(LLM)的知识容量。除模型规模扩展之外,该架构还展现出将事实性知识存储与通用计算能力解耦的潜力,为在保持Transformer主干网络不变的前提下动态更新事实性知识,提供了一条极具前景的技术路径。然而,要真正释放这一潜力仍面临严峻挑战:同一事实的不同表述形式可能激活不同的n元语法嵌入;而若对被多个事实共享的嵌入进行更新,则可能无意中干扰模型对其他事实的预测结果。为此,我们提出EngramEdit——一种依托条件记忆实现知识解耦式更新的方法。EngramEdit首先针对待更新的事实,在其多种不同表述形式下,分别计算出能使模型准确预测该新事实的目标记忆表征;随后,它协同优化这些共享的n元语法嵌入,使其在所有相关表述及编辑任务中均能逼近上述目标表征;与此同时,该方法对高频复用的嵌入施加更强的更新惩罚,以最大程度保留与当前编辑无关的既有知识。实验表明,EngramEdit能够借助条件记忆机制,独立、精准地完成事实性知识更新,编辑成功率接近完美。经修订的知识不仅可泛化至未见过的表述形式,还能有效支撑多跳推理任务;在思维链(Chain-of-Thought, CoT)提示下,其准确率约为当前最强基线方法的近三倍。尤为关键的是,即便持续进行大量事实性知识更新,模型对无关知识的记忆以及通用能力(如语言理解、生成等)仍基本得以完好保留。上述发现表明,EngramEdit成功将条件记忆从一种模型扩展机制,升级为一个可编辑的知识接口,使其功能不再局限于提升模型规模,更进一步支持事实性知识的解耦式、可维护式更新。
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.
许愿