DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk3 min

SGD vs. AdamW for Fine-Tuning: Which Optimizer Works Better?

AdamW led many tested vision fine-tuning comparisons, but freezing the embedding layer let SGD edge ahead in the study. Here’s what the evidence means for choosing fairly.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Neither optimizer wins for every fine-tuning task. In a Microsoft Research comparison of modern vision models, AdamW substantially outperformed SGD on the tested downstream tasks, especially under distribution shift. But freezing the models’ small embedding layer changed the result: SGD performed slightly better in the study’s tested settings and used less optimizer-state memory. These findings are specific to the architectures and tasks evaluated, not a universal rule for all fine-tuning.

First, distinguish Adam from AdamW

The most directly relevant fine-tuning comparison is between SGD and AdamW, not vanilla Adam. AdamW uses decoupled weight decay: the weight-decay update is separated from Adam’s adaptive gradient update. That distinction matters because optimizer results depend on the method being tested, not just the broad optimizer family.

As an Amazon Associate I earn from qualifying purchases.

The decoupled weight-decay paper reports improved Adam generalization in its image-classification experiments and says the approach can compete with momentum SGD. That evidence helps explain why AdamW is a useful comparator, but it does not establish that AdamW always beats SGD. Loshchilov and Hutter, “Decoupled Weight Decay Regularization”.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What the direct fine-tuning comparison found

Microsoft Research’s “How to Fine-Tune Vision Models with SGD”, listed as an ICLR 2024 publication, compares SGD and AdamW when fine-tuning modern Vision Transformer and ConvNeXt models. The authors report that AdamW substantially outperformed SGD across their downstream-task suite, with particularly large gaps on tasks involving distribution shifts.

#1 Best Overall
Sale
HPE NVIDIA Tesla V100 32GB HBM2 PCIe 3.0 x16 Passive GPU Computational Accelerator for AI Machine Learning HPC Deep Learning 699-2G500-0216-400 (Renewed)
  • NVIDIA Volta GV100 Architecture — 4,608 CUDA Cores, 640 1st-Gen Tensor Cores delivering 14 TFLOPS FP32 and 112 TFLOPS deep learning performance for AI training, inference, HPC, and scientific computing workloads
  • 32GB HBM2 ECC Memory — 900 GB/s Bandwidth — High-bandwidth memory on a 4096-bit bus with ECC error correction provides the memory capacity and throughput required for the largest AI models, simulations, and datasets
  • PCIe 3.0 x16 Interface — 250W TDP — Standard PCIe Gen3 connectivity with passive cooling designed for enterprise rack server deployment in HPE ProLiant, Dell PowerEdge, and Supermicro platforms with adequate chassis airflow
  • NVLink — Scale to 96GB Unified Memory — Connect two V100 GPUs via NVLink at 300 GB/s bi-directional bandwidth to scale GPU memory from 32GB to 96GB for larger AI training and HPC workloads
  • Multi-Precision Computing — Supports FP64 (7 TFLOPS), FP32 (14 TFLOPS), FP16 (112 TFLOPS) and INT8 precision modes for flexible deployment across training, inference, and scientific simulation workloads

The study also connects the optimizer gap to unusually large gradients in the models’ first embedding layer. The authors tested freezing that layer, which represented less than 1% of parameters in their analysis. In those settings, SGD—with or without momentum—performed slightly better than AdamW across the datasets and models they tested.

The authors report state-of-the-art accuracies on five distribution-shift benchmarks: WILDS-FMoW, WILDS-Camelyon, BREEDS-Living-17, Waterbirds, and DomainNet. Those results describe the paper’s evaluated vision models and tasks; they do not settle which optimizer is better for language models or other fine-tuning domains.

How optimizer-state memory compares

In the case where the methods perform the same, the Microsoft Research authors report these optimizer-memory figures:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Method Reported optimizer memory
SGD with momentum 12 bytes per parameter
SGD without momentum 8 bytes per parameter
AdamW 16 bytes per parameter

These are the study authors’ stated figures for optimizer memory, not a complete estimate of training memory. Actual total memory use can also depend on implementation, numeric precision, model activations, gradients, and other training choices. The practical point is conditional: when performance is equivalent, SGD’s lower reported optimizer-state cost may make it attractive under a memory constraint.

How to choose fairly for your fine-tuning task

Do not decide from optimizer defaults alone. Optimizer comparisons can change with the hyperparameter-tuning protocol, and each method needs an appropriate configuration. The empirical-comparisons paper discusses how tuning choices affect conclusions; “On Empirical Comparisons of Optimizers for Deep Learning”.

  1. Define the target. Record the model, dataset, fine-tuning procedure, validation metric, and whether the target data may differ from the pretraining distribution. A ranking on one task does not automatically transfer to another.
  2. Compare AdamW with SGD as distinct methods. State whether SGD uses momentum, and record weight decay rather than treating “Adam” and “AdamW” as interchangeable labels.
  3. Tune each optimizer’s settings. Give both methods suitable learning rates, schedules, and regularization settings. If trials are limited, Google’s tuning guide recommends prioritizing Adam’s base learning rate and using a decaying learning-rate schedule rather than a constant one. These are tuning recommendations, not a substitute for testing on your task: Google’s learning-rate tuning guide.
  4. Keep the comparison budget and evaluation consistent. Use the same model, data split, validation metric, training budget, and stopping rule; disclose the tuning trial budget and final settings so readers can interpret the result.
  5. Account for architecture and resource limits. If using a comparable vision architecture and memory is tight, test whether freezing the embedding layer is viable. Treat it as a targeted experiment suggested by the study, not a guaranteed improvement for other models.
  6. Choose using both quality and cost. Compare validation performance alongside optimizer-state memory and training constraints. If one method is better on the metric that matters and fits available resources, that is the relevant winner for your use case.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What can—and cannot—be concluded

For the modern vision-model fine-tuning settings studied by Microsoft Research, AdamW is the stronger starting point when the embedding layer remains trainable, particularly for distribution-shift tasks. Freezing that layer reversed the slight performance preference in the study, favoring SGD, while its reported optimizer-memory figures were lower. No evidence here establishes one optimizer as best across all models, datasets, or fine-tuning domains.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.