atlas

Research map / Architectures and efficiency / Attention and transformers

Window Attention is Bugged: How not to Interpolate Position Embeddings

ICLR 2024 · Architectures and efficiency › Attention and transformers · approach: Sparse and structured attention · 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.

Identifies a bug where interpolating absolute position embeddings combined with window attention degrades high-resolution finetuning, and proposes "absolute win" (tiled window embeddings plus global embeddings) to fix it in Hiera and ViTDet, yielding HieraDet with 61.7 COCO box mAP.

Problem

Naively bicubic-interpolating absolute position embeddings in vision transformers that also use window attention misaligns the learned embeddings with windows, hurting accuracy when finetuning at higher resolution (for Hiera and ViTDet).

Approach

Replace naive interpolation with an "absolute win" position embedding: a window embedding that is tiled to the full feature map plus a separately learned global embedding that is interpolated, so the embedding stays aligned with window attention at any image size; for ViTDet, tile the pretrained embedding and use relpos only in global layers.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace naive position-embedding interpolation with absolute winHiera-L · ImageNet-1k, finetuning from 224px to 256pxtop-1 accuracy: 0.4%Helped
Use absolute win instead of original absolute embeddingsFully supervised Hiera-B · ImageNet-1kaccuracyHelped
Use absolute winFully supervised Hiera-L · ImageNet-1kaccuracy: +3.7%Helped
Reset position embeddings and train supervised for 50 epochs (ablation)MAE-pretrained Hiera-L · ImageNet-1kaccuracy: 84.1% v.s. 85.6%Hurt
Use absolute win rather than naive interpolationHiera · ImageNet-1k at larger finetuning resolutionsaccuracyHelped
Use absolute win at high resolutionHiera-L · Kinetics-400top-1 accuracy: 1-2%Helped
Use absolute win for high-resolution Kinetics-400 pretrainingHiera-L and Hiera-H · AVA v2.2AP: +2.6 AP for L and +1.3 AP for HHelped
Tile pretrained position embeddings and use absolute win without relative position embeddingsViTDet · COCObox mAP: +0.4 mAP boxHelped
Tile pretrained position embeddings and use absolute win without relative position embeddingsViTDet · COCOmask mAP: +0.6 mAP maskHelped
Remove relative position embeddings during finetuning (ablation)Original ViTDet · COCObox mAP: up to 1 mAP boxHurt
Remove relative position embeddings during finetuning (ablation)Original ViTDet · COCOmask mAP: 0.7 mAP maskHurt
Add a zero-initialized absolute position embedding at the input or qkv outputs of global-attention blocks (ablation)ViTDet absolute win · COCOdetection performanceNo clear effect

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1k Kinetics-400 AVA v2.2 COCO train2017 LVIS

Benchmarks: ImageNet-1k Kinetics-400 AVA v2.2 COCO val2017 LVIS

Metrics: top-1 accuracy box mAP mask mAP AP inference ms/im

Baselines: Hiera ViTDet MViTv2 Swin VideoMAE HTC

Builds on: Hiera ViTDet Mask R-CNN MAE Detectron2

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