atlas

Research map / Architectures and efficiency / Attention and transformers

HydraViT: Stacking Heads for a Scalable ViT

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Hybrid and interpretable ViT designs · 3 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 HydraViT, a stochastic tail-drop training method that stacks attention heads (with coupled embedding dimension) in a standard ViT so one set of weights yields many nested subnetworks for scalable inference on ImageNet-1K.

Problem

Vision Transformers need separate models of different sizes (trained, tuned and stored individually) to fit heterogeneous hardware, and the available size granularity is coarse.

Approach

Couple the embedding dimension to the number of heads (each head owns a fixed 64-dim slice) and, during training, uniformly sample a head count k and optimize only the first k heads' subnetwork, so heads become ordered by importance and any prefix is a usable model without fine-tuning.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use weighted sampling (25% 3-head, 30% 6-head, 45% 12-head) instead of uniform sampling (ablation)HydraViT · ImageNet-1K, 12-head subnetworkaccuracy: +0.3 to nearly 0.6 p.p.Helped
Use weighted sampling instead of uniform sampling (ablation)HydraViT · ImageNet-1K, 3-head subnetworkaccuracy: a decrease of 0.5 to 1.0 p.p.Hurt
Use weighted sampling instead of uniform sampling (ablation)HydraViT · ImageNet-1K, 6-head subnetworkaccuracy: -0.2 to +0.2 p.p.Mixed
Add separate classifiers for each subnetwork instead of a shared classifier (ablation)HydraViT · ImageNet-1K, 3-, 6-, and 12-head subnetworksaccuracy: up to 0.2 percentage pointsMixed
Combine weighted sampling with separate classifiers (ablation)HydraViT · ImageNet-1K, 3-, 6-, and 12-head subnetworksaccuracy: up to 0.15 p.p. higherHelped
Train for 800 epochs instead of 300 (ablation)HydraViT with 10 subnetworks · ImageNet-1K, accuracy across subnetworksaccuracy: 80.45 -> 81.93; 78.40 -> 79.84; 67.34 -> 68.78Helped
Initialize with DeiT-base instead of DeiT-tiny (ablation)HydraViT · ImageNet-1K, 12-head subnetworkaccuracy: 80.90 -> 81.84Helped
Initialize with DeiT-base instead of DeiT-tiny (ablation)HydraViT · ImageNet-1K, 3-head subnetworkaccuracy: 73.16 -> 70.83Hurt
Initialize with DeiT-base instead of DeiT-tiny (ablation)HydraViT · ImageNet-1K, 6-head subnetworkaccuracy: 79.63 -> 79.62No clear effect
Train on 9–12 heads rather than the wider scalability range (ablation)HydraViT · ImageNet-1Kaccuracy: 82.25% compared to MatFormer's 82.04%Helped

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1K

Benchmarks: ImageNet-1K ImageNet-v2 ImageNet-R ImageNet-A ImageNet-Sketch ImageNet-ReaL

Metrics: top-1 accuracy GMACs throughput RAM usage parameters

Baselines: MatFormer DynaBERT SortedNet DeiT-tiny DeiT-small DeiT-base

Builds on: DeiT MatFormer DynaBERT SortedNet Matryoshka Representation Learning

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