Lune

ICML2023Top-tier venue

Mimetic Initialization of Self-Attention Layers

Asher Trockman, J. Zico Kolter

Abstract

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

27 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • CoAtNet: Marrying Convolution and Attention for All Data Sizes cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • CoAtNet: Marrying Convolution and Attention for All Data Sizes cites Going deeper with Image Transformers
  • CoAtNet: Marrying Convolution and Attention for All Data Sizes cites CvT: Introducing Convolutions to Vision Transformers
  • CoAtNet: Marrying Convolution and Attention for All Data Sizes cites Training data-efficient image transformers & distillation through attention
  • What can a Single Attention Layer Learn? A Study Through the Random Features Lens cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Initializing Models with Larger Ones cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Initializing Models with Larger Ones cites Going deeper with Image Transformers
  • Initializing Models with Larger Ones cites Training data-efficient image transformers & distillation through attention
  • Going deeper with Image Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Going deeper with Image Transformers cites 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 cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • CvT: Introducing Convolutions to Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • CvT: Introducing Convolutions to Vision Transformers cites Training data-efficient image transformers & distillation through attention
  • In-Context Learning with Transformers: Softmax Attention Adapts to Function Lipschitzness cites What can a Single Attention Layer Learn? A Study Through the Random Features Lens
  • Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Simplifying Transformer Blocks cites Going deeper with Image Transformers
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers27

  1. 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 et al.ICML 2024 · 62 citations
  2. Simplifying Transformer BlocksBobby He, Thomas HofmannICLR 2024 · 52 citations
  3. What can a Single Attention Layer Learn? A Study Through the Random Features LensHengyu Fu, Tianyu Guo, Yu Bai, Song MeiNeurIPS 2023 · 47 citations
  4. Initializing Models with Larger OnesZhiqiu Xu, Yanjie Chen, Kirill Vishniakov, Yida Yin et al.ICLR 2024 · 40 citations
  5. In-Context Learning with Transformers: Softmax Attention Adapts to Function LipschitznessLiam Collins, Advait Parulekar, Aryan Mokhtari, Sujay Sanghavi et al.NeurIPS 2024 · 33 citations

Builds on11

  1. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  2. Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
  3. CvT: Introducing Convolutions to Vision TransformersHaiping Wu, Bin Xiao, Noel Codella, Mengchen Liu et al.ICCV 2021 · 2,397 citations
  4. CoAtNet: Marrying Convolution and Attention for All Data SizesZihang Dai, Hanxiao Liu, Quoc V. Le, Mingxing TanNeurIPS 2021 · 1,747 citations
  5. Going deeper with Image TransformersHugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve et al.ICCV 2021 · 1,279 citations

Related papers

  1. Conditioned Initialization for AttentionHemanth Saratchandran, Simon LuceyICLR 2026
  2. On the Surprising Effectiveness of Attention Transfer for Vision TransformersAlexander C. Li, Yuandong Tian, Beidi Chen, Deepak Pathak et al.NeurIPS 2024 · 21 citations
  3. Structured Initialization for Vision TransformersJianqiao Zheng, Xueqian Li, Hemanth Saratchandran, Simon LuceyNeurIPS 2025 · 6 citations
  4. Can We Scale Transformers to Predict Parameters of Diverse ImageNet Models?Boris Knyazev, Doha Hwang, Simon Lacoste-JulienICML 2023 · 31 citations
  5. Can You Learn to See Without Images? Procedural Warm-Up for Vision TransformersZachary Shinnick, Liangze Jiang, Hemanth Saratchandran, Damien Teney et al.CVPR 2026 · 9 citations
Dusk over the sea between two cliffs drawn in fine vertical lines