提出高效存事实的MLP构造方法,可在Transformer中实现理论最优存储效率。
MLPs are Hebbians: Constructing Efficient Fact-Storing MLPs for Transformers

- 基于解码边界分析,设计可适配Transformer的闭式MLP构造
- 在相同事实数量下,参数量减少10至104倍,达到信息论最优存储率
- 支持模块化事实编辑,适合需高效存储与修改知识的场景
大型语言模型(LLMs)将事实知识存储于参数中。尽管已有研究指出这些知识存在于MLP层,但现有可解释性模型无法解释一个意外现象:它们以信息论最优速率存储事实。本文首次建立该现象的理论解释,提出首个兼容Transformer的事实存储型MLP闭式构造,满足三个实证观察特性:(i)实现最优事实存储缩放;(ii)处理任意输入输出几何结构;(iii)可嵌入Transformer。在各向同性嵌入下,该构造达到信息论最优存储容量缩放,且在相同事实数量下,参数量仅为先前构造的1/10至1/104。对于任意键值嵌入,其存储容量缩放保持一致,仅受嵌入几何影响的惩罚因子制约。此外,我们在Transformer块中验证了该构造在事实召回任务中的有效性,参数量减少15至63倍。最后,作为概念验证,我们展示了通过替换MLP实现模块化事实编辑的可行性。
原文摘要 · Abstract (English)
Large language models (LLMs) store factual knowledge in their parameters. While recent work has shown that this knowledge resides in MLP layers, existing constructive and mechanistic interpretability models of fact-storage in LLMs fail to explain the surprising empirical phenomenon that they store facts at an information-theoretically optimal rate. In this work, we develop a theoretical account of this phenomenon. We develop the first Transformer-compatible fact-storing MLP closed-form construction that satisfies the following three properties empirically observed in LLMs: it (i) attains optimal fact storage scaling, (ii) handles arbitrary input/output geometries, and (iii) works inside Transformers. Key to our work is to analyze the decoding margin of MLPs, whereas prior work only studies MLP fact storage. Under isotropic embeddings, our construction achieves information-theoretically optimal storage capacity scaling and requires $10$-$104\times$ fewer parameters at matched fact count than prior constructions. For arbitrary key and value embeddings, we show that our construction attains the same storage capacity scaling, up to penalization factors depending on the embedding geometries. Moreover, we demonstrate that our constructed MLPs can be used within Transformer blocks for factual recall tasks at optimal capacity scaling, requiring $15$-$63\times$ fewer parameters at matched fact count than prior constructions. Finally, as a proof-of-concept, we show that fact-storing MLPs enable modular fact editing by swapping a Transformer's MLP with a new one.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。