[论文解读] A Toy Model of Universality: Reverse Engineering How Networks Learn Group Operations
本文提出一种群论算法(GCR)来说明网络如何实现有限群的结合,反向工程网络以展示它们学习了该算法,并在不同架构和群上评估普遍性,给出弱普遍性而非强普遍性的证据。
Universality is a key hypothesis in mechanistic interpretability -- that different models learn similar features and circuits when trained on similar tasks. In this work, we study the universality hypothesis by examining how small neural networks learn to implement group composition. We present a novel algorithm by which neural networks may implement composition for any finite group via mathematical representation theory. We then show that networks consistently learn this algorithm by reverse engineering model logits and weights, and confirm our understanding using ablations. By studying networks of differing architectures trained on various groups, we find mixed evidence for universality: using our algorithm, we can completely characterize the family of circuits and features that networks learn on this task, but for a given network the precise circuits learned -- as well as the order they develop -- are arbitrary.
研究动机与目标
- 研究神经网络在训练类似群组合任务时,是否在不同模型上学习到相同的电路。
- 开发并形式化一种使用表示理论和特征理论(GCR)的群组合算法,网络可能实现该算法。
- 通过实证方式对神经网络进行反向工程,以确定它们是否通过嵌入、激活和反嵌入权重实现GCR算法。
- 评估机制性可解释性中的普遍性是强普遍性(跨模型的表示完全相同)还是弱普遍性(共享算法但表示因模型而异)。
- 考察不同架构(MLP和Transformer)以及不同群如何影响学习到的表示和电路。
提出的方法
- 提出一种通用算法(GCR),通过一个表示5将群元素嵌入为矩阵,将它们相乘,并通过特征迹读取对数。
- 使用表示理论中的方程来证明 logits 的最大点对应正确的群积 ab,通过5(abc^{-1})和特征理论。
- 在有限群G上训练小型网络(一个隐藏层的MLP,后续是Transformer)以执行群积 ab = c。
- 对嵌入、反嵌入和MLP激活进行反向工程,以在网络组件中识别表示矩阵5(a)、5(b)和5(ab)。
- 对权重和激活进行消融,以测试性能对预测的GCR分量的依赖。
- 测量logit与字符的相似性,将嵌入/反嵌入投影到表示空间,并验证神经元按表示的稀疏性和聚类情况。
实验结果
研究问题
- RQ1在有限群的组合任务上训练是否会导致网络实现一个基于表示理论的通用算法?
- RQ2在不同架构和群之间,学习到的特征和电路的普遍性在多大程度上可观测到(强普遍性与弱普遍性)?
主要发现
- 网络始终实现基于表示的群组合算法,logits 与表示的特征对齐。
- 嵌入、反嵌嵌出和激活可由一组小而稀疏的表示集(关键表示)来很好解释,跨群与架构。
- MLP神经元按表示聚类,并在隐藏层内计算 ho(ab),最终logits经线性映射到 tr(ρ(ab)ρ(c^{-1}))通过反嵌入。
- 对预测的GCR分量的消融会降低性能,而对非预测分量的消融通常不改变性能,支持所提出的算法。
- 跨越七个群和两种架构,网络学习实现GCR的一族电路,表明存在弱普遍性而非强普遍性,不同的表示在不同种子和模型中学习到。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。