atlas

Research map / Architectures and efficiency / Attention and transformers

Bridging the Divide: Reconsidering Softmax and Linear Attention

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Linear attention approximations · 14 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.

Analyzes why linear attention lags Softmax attention, identifying non-injectivity and weak local modeling as key causes, and proposes InLine attention (subtraction-based normalization plus a local attention residual) that outperforms Softmax counterparts on ImageNet, COCO, and ADE20K.

Problem

Linear attention substantially underperforms Softmax attention in vision Transformers, and the fundamental reasons for this gap are not well understood.

Approach

Shows Softmax attention is injective while linear attention (with division normalization) is not, and that Softmax relies on strong local modeling; proposes InLine attention, which replaces division normalization with subtraction so the attention function is injective, plus an MLP-predicted local attention residual over 3x3 neighborhoods to restore local bias.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace Softmax attention with InLine attentionCSwin-T · ImageNet-1KTop-1 accuracy: 82.7 -> 83.2Helped
Replace Softmax attention with InLine attentionCSwin-B · ImageNet-1KTop-1 accuracy: 84.2 -> 84.5Helped
Replace Softmax attention with InLine attentionCSwin-B · ImageNet-1K, 384²Top-1 accuracy: 85.4 -> 85.7Helped
Replace the PVT attention with InLine attentionPVT-L · COCO, Mask R-CNN, 1xbox AP: 42.9 -> 45.4Helped
Replace the Swin attention with InLine attentionSwin-B · COCO, Cascade Mask R-CNN, 3xbox AP: 51.9 -> 52.6Helped
Replace the PVT attention with InLine attentionPVT-L · ADE20K, SemanticFPNmIoU: 43.49 -> 44.71Helped
Replace the Swin attention with InLine attentionSwin-B · ADE20K, UperNetmIoU: 48.13 -> 49.10Helped
Add injective InLine attention instead of normalized linear attention (ablation)Swin-T with ReLU kernel · ImageNet-1Kaccuracy: 77.3 -> 79.8Helped
Add injective InLine attention instead of normalized linear attention (ablation)Swin-T with ReLU(A·+b) kernel · ImageNet-1Kaccuracy: 70.2 -> 80.0Helped
Add a local attention residual (ablation)InLine-Swin-T · ImageNet-1Kaccuracy: 80.3 -> 81.6; 80.4 -> 82.1; 80.2 -> 82.3; 80.2 -> 82.4Helped
Increase the window size from 7² to 56² without local residual (ablation)InLine-Swin-T · ImageNet-1Kaccuracy: 80.3; 80.4; 80.2; 80.2No clear effect
Use a ReLU kernel instead of Identity (ablation)InLine-Swin-T · ImageNet-1Kaccuracy: 82.4 -> 82.5No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1K COCO ADE20K

Benchmarks: ImageNet-1K COCO ADE20K

Metrics: top-1 accuracy box AP mask AP mIoU FLOPs throughput

Baselines: DeiT PVT Swin Transformer CSwin FLatten Hydra Attention Efficient Attention Linear Angular Attention ConvNeXt MViTv2 NAT DiNAT

Builds on: Swin Transformer Linear attention (Katharopoulos et al.) CSwin Transformer PVT DeiT

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