Mimetic Initialization of Self-Attention Layers
Asher Trockman, J. Zico Kolter
摘要
It is notoriously difficult to train Transformers on small datasets; typically, large pre-trained models are instead used as the starting point. We explore the weights of such pre-trained Transformers (particularly for vision) to attempt to find reasons for this discrepancy. Surprisingly, we find that simply initializing the weights of self-attention layers so that they "look" more like their pre-trained counterparts allows us to train vanilla Transformers faster and to higher final accuracies, particularly on vision tasks such as CIFAR-10 and ImageNet classification, where we see gains in accuracy of over 5% and 4%, respectively. Our initialization scheme is closed form, learning-free, and very simple: we set the product of the query and key weights to be approximately the identity, and the product of the value and projection weights to approximately the negative identity. As this mimics the patterns we saw in pre-trained Transformers, we call the technique mimetic initialization.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 27 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- CoAtNet: Marrying Convolution and Attention for All Data Sizes 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- CoAtNet: Marrying Convolution and Attention for All Data Sizes 引用了 Going deeper with Image Transformers
- CoAtNet: Marrying Convolution and Attention for All Data Sizes 引用了 CvT: Introducing Convolutions to Vision Transformers
- CoAtNet: Marrying Convolution and Attention for All Data Sizes 引用了 Training data-efficient image transformers & distillation through attention
- What can a Single Attention Layer Learn? A Study Through the Random Features Lens 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Initializing Models with Larger Ones 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Initializing Models with Larger Ones 引用了 Going deeper with Image Transformers
- Initializing Models with Larger Ones 引用了 Training data-efficient image transformers & distillation through attention
- Going deeper with Image Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Going deeper with Image Transformers 引用了 Training data-efficient image transformers & distillation through attention
- SAMformer: Unlocking the Potential of Transformers in Time Series Forecasting with Sharpness-Aware Minimization and Channel-Wise Attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- CvT: Introducing Convolutions to Vision Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- CvT: Introducing Convolutions to Vision Transformers 引用了 Training data-efficient image transformers & distillation through attention
- In-Context Learning with Transformers: Softmax Attention Adapts to Function Lipschitzness 引用了 What can a Single Attention Layer Learn? A Study Through the Random Features Lens
- Training data-efficient image transformers & distillation through attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Simplifying Transformer Blocks 引用了 Going deeper with Image Transformers
引用它的顶会 Paper27
- SAMformer: Unlocking the Potential of Transformers in Time Series Forecasting with Sharpness-Aware Minimization and Channel-Wise AttentionRomain Ilbert, Ambroise Odonnat, Vasilii Feofanov, Aladin Virmaux 等ICML 2024 · 62 次引用
- Simplifying Transformer BlocksBobby He, Thomas HofmannICLR 2024 · 52 次引用
- What can a Single Attention Layer Learn? A Study Through the Random Features LensHengyu Fu, Tianyu Guo, Yu Bai, Song MeiNeurIPS 2023 · 47 次引用
- Initializing Models with Larger OnesZhiqiu Xu, Yanjie Chen, Kirill Vishniakov, Yida Yin 等ICLR 2024 · 40 次引用
- In-Context Learning with Transformers: Softmax Attention Adapts to Function LipschitznessLiam Collins, Advait Parulekar, Aryan Mokhtari, Sujay Sanghavi 等NeurIPS 2024 · 33 次引用
它引用的 Paper11
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa 等ICML 2021 · 8,974 次引用
- CvT: Introducing Convolutions to Vision TransformersHaiping Wu, Bin Xiao, Noel Codella, Mengchen Liu 等ICCV 2021 · 2,397 次引用
- CoAtNet: Marrying Convolution and Attention for All Data SizesZihang Dai, Hanxiao Liu, Quoc V. Le, Mingxing TanNeurIPS 2021 · 1,747 次引用
- Going deeper with Image TransformersHugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve 等ICCV 2021 · 1,279 次引用
相关 Paper
- Conditioned Initialization for AttentionHemanth Saratchandran, Simon LuceyICLR 2026
- On the Surprising Effectiveness of Attention Transfer for Vision TransformersAlexander C. Li, Yuandong Tian, Beidi Chen, Deepak Pathak 等NeurIPS 2024 · 21 次引用
- Structured Initialization for Vision TransformersJianqiao Zheng, Xueqian Li, Hemanth Saratchandran, Simon LuceyNeurIPS 2025 · 6 次引用
- Can We Scale Transformers to Predict Parameters of Diverse ImageNet Models?Boris Knyazev, Doha Hwang, Simon Lacoste-JulienICML 2023 · 31 次引用
- Can You Learn to See Without Images? Procedural Warm-Up for Vision TransformersZachary Shinnick, Liangze Jiang, Hemanth Saratchandran, Damien Teney 等CVPR 2026 · 9 次引用
