atlas

Research map / Architectures and efficiency / Pruning and efficient tuning

On the Surprising Effectiveness of Attention Transfer for Vision Transformers

NeurIPS 2024 · Architectures and efficiency › Pruning and efficient tuning · approach: Efficient ViT adaptation · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows that transferring only the inter-token attention patterns from a pre-trained ViT (by copying or distilling attention maps) lets a randomly initialized student match fine-tuning accuracy on ImageNet-1K, while weaker under distribution shift.

Problem

Whether the benefit of pre-training ViTs comes from learned intra-token features or from the inter-token attention patterns that route information between tokens.

Approach

Decouple the two by transferring only attention maps from a pre-trained teacher ViT to a student that learns all other weights from scratch, either by directly copying the maps (Attention Copy) or by adding a cross-entropy distillation loss on attention maps (Attention Distillation).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
transfer MAE attention maps instead of training from scratchViT-L on ImageNet-1K · ImageNet-1Kaccuracy: 83.0 -> 85.1Helped
distill MAE attention maps rather than copy themViT-L on ImageNet-1K · ImageNet-1Kaccuracy: 85.1 -> 85.7Helped
ensemble Attention Distillation with fine-tuned MAEViT-L on ImageNet-1K · ImageNet-1Kaccuracy: +0.6Helped
transfer queries Q rather than attention maps (ablation)Attention Copy, ViT-L · ImageNet-1Kaccuracy: 85.1 -> 85.6Helped
transfer keys K or values V rather than attention maps (ablation)Attention Copy, ViT-L · ImageNet-1Kaccuracy: 85.1 -> 84.4Hurt
distill queries Q instead of attention maps (ablation)Attention Distillation, ViT-L · ImageNet-1Kaccuracy: 85.7 -> 81.3Hurt
transfer more attention layers, particularly later layers (ablation)Attention Copy, ViT-L · ImageNet-1KaccuracyHelped
transfer more attention heads (ablation)Attention Copy, ViT-L · ImageNet-1KaccuracyHelped
average attention maps across examples before transfer (ablation)Attention Copy, ViT-L · ImageNet-1Kaccuracy: 85.1 -> 79.7Hurt
average attention maps across query tokens before transfer (ablation)Attention Copy, ViT-L · ImageNet-1Kaccuracy: 85.1 -> 79.9Hurt
distill residual-stream features instead of attention maps (ablation)ViT-L on ImageNet-1K · ImageNet-1Kaccuracy: 85.7 -> 81.3Hurt
use a randomly initialized teacher for attention transfer (ablation)ViT-L attention transfer · ImageNet-1Kaccuracy: 85.1 -> 72.7Hurt

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1K ImageNet-22K COCO iNaturalist 2017 iNaturalist 2018 iNaturalist 2019 LAION-2B

Benchmarks: ImageNet-1K ImageNet-A ImageNet-R ImageNet-S ImageNet-V2 iNaturalist 2017 iNaturalist 2018 iNaturalist 2019 COCO object detection

Metrics: top-1 accuracy AP box AP mask CKA ensemble accuracy

Baselines: scratch training full weight fine-tuning feature distillation Q distillation MoCo-v3 DINO

Builds on: Vision Transformer Masked Autoencoders knowledge distillation layerwise learning rate decay

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy