atlas

Research map / Architectures and efficiency / Attention and transformers

ELSA: Exploiting Layer-wise N:M Sparsity for Vision Transformer Acceleration

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Vision transformer design

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.

Proposes ELSA, a weight-sharing supernet framework that searches layer-wise N:M sparse configurations for vision transformers, yielding subnets with lower FLOPs and small ImageNet accuracy loss without per-config fine-tuning.

Problem

Choosing layer-wise N:M sparsity configurations for vision transformers on accelerators that support mixed N:M sparsity, since ViT blocks have equal parameter counts and per-config fine-tuning is expensive.

Approach

Exploit the subset-superset relation among N:M levels so all sparsity choices share one dense weight matrix per linear layer (dynamic magnitude-based masking), train a single supernet with knowledge distillation and a computation-cost-stratified two-step sampler, filter overly sparse choices automatically, and search with evolutionary search.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use layer-wise N:4 sparsity instead of uniform 2:4 sparsityDeiT-B · ImageNet-1K valFLOPs: 9.2G -> 6.0GHelped
Use layer-wise N:4 sparsity instead of uniform 2:4 sparsitySwin-B · ImageNet-1K valFLOPs: 8G -> 5.3GHelped
Use layer-wise N:4 sparsity instead of uniform 2:4 sparsityDeiT-B · ImageNet-1K valTop-1 accuracy: 81.6% -> 81.4%No clear effect
Use two-step sampling rather than uniform configuration sampling (ablation)DeiT-S supernet · ImageNet-1K, around 1.6G FLOPsTop-1 accuracy: nearly 1%Helped
Add automatic choice filtering to two-step sampling (ablation)DeiT-B N:8 supernet · ImageNet-1K val, 8.0G FLOPsTop-1 accuracy: 80.9% -> 81.6%Helped
Add automatic choice filtering to two-step sampling (ablation)DeiT-B N:8 supernet · ImageNet-1K val, 7.0G FLOPsTop-1 accuracy: 80.5% -> 81.4%Helped
Add automatic choice filtering to two-step sampling (ablation)DeiT-B N:8 supernet · ImageNet-1K val, 6.0G FLOPsTop-1 accuracy: 80.1% -> 81.1%Helped
Use the supernet rather than the dense model to estimate subnet accuracy (ablation)DeiT-B N:4 search · ImageNet-1K val, 7.0G FLOPsTop-1 accuracy: 81.0% -> 81.5%Helped
Inherit 2:4 weights from ELSA rather than fine-tune from pretrained weights (ablation)DeiT-S · ImageNet-1K valTop-1 accuracy: 79.2% -> 79.1%No clear effect
Inherit 2:4 weights from ELSA rather than fine-tune from pretrained weights (ablation)DeiT-B · ImageNet-1K valTop-1 accuracy: 81.8% -> 81.6%No clear effect
Inherit 2:4 weights from ELSA rather than fine-tune from pretrained weights (ablation)Swin-S · ImageNet-1K valTop-1 accuracy: 82.9% -> 82.8%No clear effect
Inherit 2:4 weights from ELSA rather than fine-tune from pretrained weights (ablation)Swin-B · ImageNet-1K valTop-1 accuracy: 83.3% -> 83.1%No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1k

Benchmarks: ImageNet-1k

Metrics: Top-1 accuracy FLOPs

Baselines: Erdos-Renyi (N:M adapted) DominoSearch Uniform 2:4 sparsity ASP fine-tuning

Builds on: Once-for-all supernet paradigm ASP DominoSearch Erdos-Renyi sparsity SR-STE

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