arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2301.05217cs.LGcs.AI
收藏

通过机制可解释性研究grokking的进展度量

Progress measures for grokking via mechanistic interpretability

University of California, Berkeley(加州大学伯克利分校)

Neel Nanda, Lawrence Chan, Tom Lieberum, Jess Smith, Jacob Steinhardt

AI总结:

本文通过机制可解释性逆向工程小型Transformer在模加法任务上的grokking算法,定义进展度量将训练分为记忆化、电路形成和清理三阶段,揭示grokking源于结构化机制逐渐放大及记忆组件移除。

摘要:

神经网络常表现出涌现行为,即通过增加参数量、训练数据或训练步数产生质变的新能力。理解涌现的一种方法是寻找潜在支撑看似不连续质变的连续“进展度量”。我们认为,可通过机制可解释性(即将学习到的行为逆向工程为其独立组件)来寻找进展度量。作为案例,我们研究了在模加法任务上训练的小型Transformer所展现的“grokking”现象。我们完全逆向工程了这些网络学到的算法,该算法利用离散傅里叶变换和三角恒等式将加法转化为绕圆的旋转。我们通过分析激活值与权重并在傅里叶空间中进行消融实验验证了该算法。基于此理解,我们定义了进展度量,使我们能研究训练动力学,并将训练划分为三个连续阶段:记忆化、电路形成和清理。结果表明,grokking并非突变,而是源于权重中编码的结构化机制的逐渐放大,随后移除记忆化组件。

英文摘要:

Neural networks often exhibit emergent behavior, where qualitatively new capabilities arise from scaling up the amount of parameters, training data, or training steps. One approach to understanding emergence is to find continuous \textit{progress measures} that underlie the seemingly discontinuous qualitative changes. We argue that progress measures can be found via mechanistic interpretability: reverse-engineering learned behaviors into their individual components. As a case study, we investigate the recently-discovered phenomenon of ``grokking'' exhibited by small transformers trained on modular addition tasks. We fully reverse engineer the algorithm learned by these networks, which uses discrete Fourier transforms and trigonometric identities to convert addition to rotation about a circle. We confirm the algorithm by analyzing the activations and weights and by performing ablations in Fourier space. Based on this understanding, we define progress measures that allow us to study the dynamics of training and split training into three continuous phases: memorization, circuit formation, and cleanup. Our results show that grokking, rather than being a sudden shift, arises from the gradual amplification of structured mechanisms encoded in the weights, followed by the later removal of memorizing components.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑