atlas

Research map / Architectures and efficiency / Pruning and efficient tuning

How to Fine-Tune Vision Models with SGD

ICLR 2024 · Architectures and efficiency › Pruning and efficient tuning · approach: Adapter-based parameter-efficient tuning · 5 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.

Shows AdamW beats SGD when fine-tuning ViTs and ConvNeXts on distribution-shift benchmarks, traces the gap to large first-layer (embedding) gradients, and proposes freezing the embedding layer so SGD matches or beats AdamW with less memory.

Problem

SGD is cheaper in memory than AdamW for fine-tuning large vision models, but it often underperforms AdamW, especially out-of-distribution, on modern ViT and ConvNeXt models.

Approach

Large gradients in the first embedding layer cause SGD to over-tune it; freezing the embedding layer (under 1% of parameters) lets SGD (with or without momentum) match or beat AdamW OOD while using less memory.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Freeze the embedding layer during SGD fine-tuningSGD on seven pretrained models · Five distribution-shift benchmarks, average OODaccuracy: 71.9% -> 76.7%Helped
Remove momentum while freezing the embedding layerSGD (freeze-embed) · Five distribution-shift benchmarks, average OODaccuracy: 76.7% -> 76.9%Helped
Freeze the embedding layer during SGD fine-tuningSGD on seven pretrained models · Five distribution-shift benchmarks, average IDaccuracy: 90.2% -> 91.3%Helped
Replace SGD with AdamWFine-tuning seven pretrained models · Five distribution-shift benchmarks, average OODaccuracy: 72.0% -> 76.0%Helped
Do not freeze the embedding layer's following layer norm (ablation)SGD (freeze-embed) on CLIP ViT-B/16 · Five benchmarks, average OODaccuracy: 75.9 -> 75.9No clear effect
Use 5x lower learning rate on the embedding layer instead of freezing it (ablation)SGD on CLIP ViT-B/16 · Five benchmarks, average OODaccuracy: 67.9 -> 75.0Helped
Remove momentum without freezing the embedding layer (ablation)SGD on CLIP ViT-B/16 · Five benchmarks, average OODaccuracy: 67.9 -> 67.9No clear effect
Add weight decay to SGD (ablation)SGD on CLIP ViT-B/16 · Five benchmarks, average OODaccuracy: 67.9 -> 67.8No clear effect
Freeze only the stem rather than the stem and first stage (ablation)SGD fine-tuning ConvNeXt-Base · Five benchmarks, average OODaccuracy: 79.4 -> 78.7Hurt
Freeze the embedding layer during AdamW fine-tuning (ablation)AdamW on seven pretrained models · Five distribution-shift benchmarks, average OODaccuracy: 76.0% -> 76.5%No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: Living-17 Waterbirds DomainNet WILDS-FMoW WILDS-Camelyon CIFAR-10

Benchmarks: Living-17 Waterbirds DomainNet WILDS-FMoW WILDS-Camelyon CIFAR-10

Metrics: in-distribution accuracy out-of-distribution accuracy GPU memory (GB)

Baselines: SGD AdamW LARS LAMB LP-FT Gradual-unfreezing Linear probing

Builds on: AdamW LARS LAMB LP-FT

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