Underlying mechanisms of memorization in LLMs -- the verbatim reproduction of training data -- remain poorly understood. What exact part of the network decides to retrieve a token that we would consider as start of memorization sequence? How exactly is the models' behaviour different when producing memorized sentence vs non-memorized? In this work we approach these questions from mechanistic interpretability standpoint by utilizing transformer circuits -- the minimal computational subgraphs that perform specific functions within the model. Through carefully constructed contrastive datasets, we identify points where model generation diverges from memorized content and isolate the specific circuits responsible for two distinct aspects of memorization. We find that circuits that initiate memorization can also maintain it once started, while circuits that only maintain memorization cannot trigger its initiation. Intriguingly, memorization prevention mechanisms transfer robustly across different text domains, while memorization induction appears more context-dependent.


翻译:大型语言模型中的记忆机制——即对训练数据的逐字复现——至今仍未得到充分理解。究竟是网络的哪个具体部分决定检索出被我们视为记忆序列起始的标记?模型在生成记忆性语句与非记忆性语句时的行为究竟有何差异?本研究从机制可解释性视角出发,利用Transformer电路——即模型内执行特定功能的最小计算子图——来探讨这些问题。通过精心构建的对比数据集,我们定位了模型生成偏离记忆内容的关键节点,并分离出负责记忆两个不同维度的特定电路。研究发现,启动记忆的电路在记忆开始后也能维持记忆,而仅维持记忆的电路则无法触发记忆启动。值得注意的是,记忆预防机制在不同文本领域间展现出稳健的迁移性,而记忆诱导机制则表现出更强的语境依赖性。

0
下载
关闭预览

相关内容

数学上,序列是被排成一列的对象(或事件);这样每个元素不是在其他元素之前,就是在其他元素之后。这里,元素之间的顺序非常重要。
注意力机制介绍,Attention Mechanism
专知会员服务
172+阅读 · 2019年10月13日
深度学习中Attention Mechanism详细介绍:原理、分类及应用
深度学习与NLP
10+阅读 · 2019年2月18日
深度学习中的注意力机制
人工智能头条
16+阅读 · 2017年11月2日
深入理解LSTM网络
深度学习
17+阅读 · 2017年6月7日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
39+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关VIP内容
注意力机制介绍,Attention Mechanism
专知会员服务
172+阅读 · 2019年10月13日
相关基金
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
39+阅读 · 2015年12月31日
国家自然科学基金
10+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员