提出高效存事实的MLP构造方法,提升大模型知识存储效率。
Constructing Efficient Fact-Storing MLPs for Transformers
- 设计可适配绝大多数输入输出对的MLP构造框架
- 参数效率逼近信息论极限,实现最优事实存储密度
- 支持在单层Transformer中直接替换MLP实现知识编辑
大型语言模型的成功部分归因于其能将事实知识以键值映射形式高效存储在MLP参数中。近期研究提出了显式的权重构造方法,深化了对大模型事实存储机制的理解。本文提出一种改进的MLP构造框架,在三个方面超越先前方法:1)适用于除测度为零集合外的所有可行输入-输出对;2)在某些嵌入下达到渐近最优参数效率,匹配信息论界限;3)保持在Transformer中用于事实召回的可用性。通过该框架,我们发现了一种刻画事实/参数比的值嵌入度量,适用于构造和梯度下降训练的MLP;识别出一个简单编码器-解码器机制,其在所有测试输入输出上与梯度下降训练的MLP的事实/参数渐近表现一致;并揭示了MLP事实存储容量与其在Transformer中可用性之间的根本权衡。最后,我们演示了一个概念验证应用:通过一次性替换整个MLP,在单层Transformer中实现模块化事实编辑。
原文摘要 · Abstract (English)
The success of large language models (LLMs) can be attributed in part to their ability to efficiently store factual knowledge as key-value mappings within their MLP parameters. Recent work has proposed explicit weight constructions to build such fact-storing MLPs, providing an improved understanding of LLM fact storage mechanisms. In this paper, we introduce an MLP construction framework that improves over previous constructions in three areas: it 1) works for all but a measure-zero set of feasible input-output pairs, 2) achieves asymptotically optimal parameter efficiency matching information-theoretic bounds for some embeddings, and 3) maintains usability within Transformers for factual recall. Through our improvements, we 1) discover a metric on value embeddings that characterizes facts-per-parameter scaling for both constructed and gradient-descent-trained MLPs, 2) identify a simple encoder-decoder mechanism that empirically matches gradient-descent MLP facts-per-parameter asymptotics across all the inputs and outputs we test, and 3) uncover a fundamental tradeoff between an MLP's fact-storage capacity and its usability within Transformers. Finally, we demonstrate a proof-of-concept application of fact-storing MLPs: modular fact editing on one-layer Transformers by \textit{replacing entire MLPs at once}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。