揭示MLP如何通过积分近似实现模加法,首次严格压缩非线性特征映射
Modular addition without black-boxes: Compressing explanations of MLPs that compute numerical integration
- 用无穷宽视角将ReLU MLP转化为积分运算,解析其计算机制
- 发现单层Transformer中MLP执行'披萨算法',每个神经元计算三角积分矩形面积
- 为小型Transformer模型压缩提供新思路,适合关注可解释性的研究者
机械可解释性旨在发现模型实现的简化、低秩算法。尽管可将激活压缩为特征,但压缩非线性特征映射(如MLP层)仍是开放问题。本文首次严谨压缩非线性特征映射,针对模加法模型中的ReLU MLP,实现了在电路参数量上线性时间的行为界。为分析该ReLU MLP,采用无限宽度视角,将激活后矩阵乘法转化为近似积分。我们发现,单层Transformer中的MLP层可被理解为评估一种求积方案:每个神经元计算一个三角积分恒等式曲线下矩形面积。代码已公开于https://tinyurl.com/mod-add-integration。
原文摘要 · Abstract (English)
The goal of mechanistic interpretability is discovering simpler, low-rank algorithms implemented by models. While we can compress activations into features, compressing nonlinear feature-maps -- like MLP layers -- is an open problem. In this work, we present the first case study in rigorously compressing nonlinear feature-maps, which are the leading asymptotic bottleneck to compressing small transformer models. We work in the classic setting of the modular addition models, and target a non-vacuous bound on the behaviour of the ReLU MLP in time linear in the parameter-count of the circuit. To study the ReLU MLP analytically, we use the infinite-width lens, which turns post-activation matrix multiplications into approximate integrals. We discover a novel interpretation of} the MLP layer in one-layer transformers implementing the ``pizza'' algorithm: the MLP can be understood as evaluating a quadrature scheme, where each neuron computes the area of a rectangle under the curve of a trigonometric integral identity. Our code is available at https://tinyurl.com/mod-add-integration.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。