Equivariant Neural Functional Networks for Transformers

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Tran, Viet-Hoang, Vo, Thieu N., The, An Nguyen, Huu, Tho Tran, Nguyen-Nhat, Minh-Khoi, Tran, Thanh, Pham, Duy-Tung, Nguyen, Tan Minh
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866929746757025792
author Tran, Viet-Hoang
Vo, Thieu N.
The, An Nguyen
Huu, Tho Tran
Nguyen-Nhat, Minh-Khoi
Tran, Thanh
Pham, Duy-Tung
Nguyen, Tan Minh
author_facet Tran, Viet-Hoang
Vo, Thieu N.
The, An Nguyen
Huu, Tho Tran
Nguyen-Nhat, Minh-Khoi
Tran, Thanh
Pham, Duy-Tung
Nguyen, Tan Minh
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2410_04209
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Equivariant Neural Functional Networks for Transformers
Tran, Viet-Hoang
Vo, Thieu N.
The, An Nguyen
Huu, Tho Tran
Nguyen-Nhat, Minh-Khoi
Tran, Thanh
Pham, Duy-Tung
Nguyen, Tan Minh
Machine Learning
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.
title Equivariant Neural Functional Networks for Transformers
topic Machine Learning
url https://arxiv.org/abs/2410.04209