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

没有黑盒的模加法:压缩计算数值积分的 MLP 的解释

Modular addition without black-boxes: Compressing explanations of MLPs that compute numerical integration

Chun Hei Yip, Rajashree Agrawal, Lawrence Chan, Jason Gross

AI总结:

本文针对模加法模型中的 ReLU MLP,利用无限宽度视角将其激活后矩阵乘法解释为近似积分,揭示单层 transformer 的“pizza”算法中 MLP 等价于求积格式。

摘要:

机制可解释性的目标是发现模型所实现的更简单、低秩的算法。虽然我们可以将激活压缩为特征,但压缩非线性特征映射(如 MLP 层)仍是一个开放问题。在本工作中,我们首次对严格压缩非线性特征映射进行案例研究,这类映射是压缩小型 transformer 模型时主要的渐近瓶颈。我们在经典的模加法模型设置中开展研究,目标是以与电路参数量成线性关系的时间,获得关于 ReLU MLP 行为的非平凡界。为了以解析方式研究 ReLU MLP,我们采用无限宽度视角,它将激活后的矩阵乘法转化为近似积分。我们发现了对实现“pizza”算法的单层 transformer 中 MLP 层的一种新颖解释:该 MLP 可被理解为在评估一个求积格式,其中每个神经元计算一个三角积分恒等式曲线下某个矩形的面积。我们的代码可在 https://tinyurl.com/mod-add-integration 获取。

英文摘要:

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.

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

↑