atlas

Research map / Architectures and efficiency / Attention and transformers

Dense Vision Transformer Compression with Few Samples

CVPR 2024 · Architectures and efficiency › Attention and transformers · approach: Hybrid and interpretable ViT designs · 7 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.

Proposes DC-ViT, a few-shot ViT compression framework that drops attention modules, shrinks MLPs, and selects blocks via synthetic DeepDream-style images, producing densely spaced compressed models.

Problem

Few-shot (tiny, even unlabeled, training set) compression of Vision Transformers is unexplored, and existing few-shot block-pruning methods (PRACTISE) only yield sparse compression options.

Approach

Instead of dropping whole blocks, remove only the attention module and keep a reduced MLP (randomly selected nodes, with reused weights) so the MACs target can be hit densely; select blocks to compress using a metric loss on synthetic images generated from the pretrained model, which correlates better with post-finetuning error than training loss on the tiny set; progressively prune and finetune o

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace attention modules and part of the MLP with DC-ViT's dense compressionViT-Base compressed with 500 samples · ImageNet-1k validation, 15.5 × 109 MACsTop-1 accuracy: 73.32±0.14 -> 83.73±0.14Helped
Apply DC-ViT compressionResNet-34 · ImageNet-1k validationTop-1 accuracy: 70.3 -> 72.2Helped
Apply DC-ViT compressionMobileNetV2 · ImageNet-1k validationTop-1 accuracy: 69.3 -> 69.8Helped
Use progressive compression instead of top-k compression (ablation)DC-ViT, ViT-Base · ImageNet-1k validation, 15% and 30% MACs reductionTop-1 accuracy: 82.84 -> 83.25; 67.95 -> 79.28; 83.05 -> 83.25; 78.50 -> 79.28Helped
Finetune only the front part of blocks rather than the entire ViT (ablation)DC-ViT, ViT-Base · ImageNet-1k validation, 15% and 30% MACs reductionTop-1 accuracy: 82.66 -> 83.25; 78.17 -> 79.28Helped
Compress k blocks rather than (k + 1) blocks (ablation)DC-ViT, ViT-Base · ImageNet-1k validation, 15% and 30% MACs reductionTop-1 accuracy: 82.84 -> 83.25; 75.07 -> 79.28Helped
Reuse pretrained MLP weights rather than re-initialize them (ablation)DC-ViT, ViT-Base · ImageNet-1k validation, 15% and 30% MACs reductionTop-1 accuracy: 82.60 -> 83.25; 77.29 -> 79.28Helped
Use GeLU-based weights reuse instead of the default MLP weight reuse (ablation)DC-ViT, ViT-Base · ImageNet-1k validation, 15% and 30% MACs reductionTop-1 accuracy: 83.07; 79.25No clear effect
Use MSE loss instead of the default metric for choosing candidate models (ablation)DC-ViT, ViT-Base · ImageNet-1k validation, 15% and 30% MACs reductionTop-1 accuracy: 74.02; 69.22Hurt
Perform feature mimicking on the class token only (ablation)DC-ViT, ViT-Base · ImageNet-1k validation, 15% and 30% MACs reductionTop-1 accuracy: 82.73; 78.33Hurt

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1k CIFAR-10 CIFAR-100 Flowers Oxford-IIIT Pets CUB-200 Indoor67

Benchmarks: ImageNet-1k CIFAR-10 CIFAR-100 Flowers Oxford-IIIT Pets CUB-200 Indoor67

Metrics: top-1 accuracy top-5 accuracy latency (ms) MACs

Baselines: PRACTISE FSKD CD MiR S2ViTE EViT AutoFormer Mini-DeiT VTP RegNetY-16GF

Builds on: PRACTISE MiR DeepDream

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