为Transformer设计了具备对称性不变性的新型神经函数网络。
Equivariant Neural Functional Networks for Transformers
- 基于注意力模块的对称群构造权重空间,确保网络等变性。
- 提出Transformer-NFN,在12.5万模型检查点上验证有效性。
- 适合研究模型可解释性与训练优化的学者使用。
本文系统研究了神经函数网络(NFN)在Transformer架构中的应用。NFN将深度神经网络(DNN)的权重、梯度或稀疏模式作为输入数据,已在可学习优化器、隐式数据表示和权重编辑等任务中展现价值。尽管其在MLP和CNN中已有广泛应用,但针对Transformer的设计仍属空白,而变压器在现代深度学习中至关重要。本文首次确定多头注意力模块权重的最大对称群,并给出两组超参数定义相同函数的充要条件。据此构建了Transformer架构的权重空间及其群作用,确立了其NFN设计原则。基于此,提出Transformer-NFN,该网络在该群作用下保持等变性。此外,发布了一个包含超过125,000个在两个数据集上训练的Transformer模型检查点的数据集,为评估Transformer-NFN提供基准,并推动变压器训练与性能研究。
原文摘要 · Abstract (English)
This paper systematically explores neural functional networks (NFN) for transformer architectures. NFN are specialized neural networks that treat the weights, gradients, or sparsity patterns of a deep neural network (DNN) as input data and have proven valuable for tasks such as learnable optimizers, implicit data representations, and weight editing. While NFN have been extensively developed for MLP and CNN, no prior work has addressed their design for transformers, despite the importance of transformers in modern deep learning. This paper aims to address this gap by providing a systematic study of NFN for transformers. We first determine the maximal symmetric group of the weights in a multi-head attention module as well as a necessary and sufficient condition under which two sets of hyperparameters of the multi-head attention module define the same function. We then define the weight space of transformer architectures and its associated group action, which leads to the design principles for NFN in transformers. Based on these, we introduce Transformer-NFN, an NFN that is equivariant under this group action. Additionally, we release a dataset of more than 125,000 Transformers model checkpoints trained on two datasets with two different tasks, providing a benchmark for evaluating Transformer-NFN and encouraging further research on transformer training and performance.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。