atlas

Research map / Optimization / Implicit bias and generalization

Why Do We Need Weight Decay in Modern Deep Learning?

NeurIPS 2024 · Optimization › Implicit bias and generalization · approach: Explicit and implicit regularization interplay · 10 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 that weight decay plays different roles in two regimes: in multi-pass vision training (ResNet) it enables non-vanishing SGD noise that implicitly regularizes the Jacobian norm, while in one-pass LLM training (GPT-2 with AdamW) it acts as an effective learning-rate modulator that improves the bias-variance tradeoff and bfloat16 stability.

Problem

Weight decay is widely used in deep learning, but its role is poorly understood: classical regularization views do not explain its effect on over-parameterized ResNets trained for many epochs or on LLMs trained for about one epoch.

Approach

Weight decay combined with large learning rates stabilizes the training loss (loss stabilization), keeping SGD noise non-vanishing so implicit regularization of the Jacobian norm takes effect; in one-pass LLM training, weight decay instead raises the effective learning rate under sign-like Adam updates, improving bias-variance tradeoff and stability rather than acting as a regularizer.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use WD 0.0015 rather than no WD with LR 0.15ResNet18 with EMA · CIFAR-10 testtest error: 0.13 -> 0.09Helped
Average SGD iterates as a snapshot ensemble instead of EMAResNet18 with WD 0.0075 and LR 0.05 · CIFAR-10 testtest error: 0.08 -> 0.09Mixed
Replace decoupled weight decay with an L2 penalty (ablation)GPT-2-124M trained with AdamW · OpenWebTexttraining lossNo clear effect
Include LayerNorm parameters in weight decay (ablation)GPT-2-124M · OpenWebTexttraining lossMixed
Use SGD with momentum instead of AdamW (ablation)GPT-2-124M · OpenWebTexttraining lossNo clear effect
Remove weight decay (ablation)GPT-2-124M trained with bfloat16 · OpenWebText, context length 1024training stabilityHurt
Add weight decayGPT-2-124M trained with AdamW · OpenWebTexttraining loss: ≈0.02 lowerHelped
Match the weight-decay run's effective learning rate without weight decay (ablation)GPT-2-124M trained in float32 · OpenWebTexttraining loss dynamicsNo clear effect
Match effective learning rate without weight decay in bfloat16 (ablation)GPT-2-124M · OpenWebTexttraining stabilityHurt
Reduce learning rate from 0.001 to 0.0006 instead of adding weight decay (ablation)GPT-2-124M trained with bfloat16 · OpenWebText, context length 1024training speed: 0.001 to 0.0006Hurt
Use weight decay with LR 0.001 rather than no weight decayGPT-2-124M trained with bfloat16 · OpenWebText, context length 1024training stability: 0.001Helped
Use EMA instead of learning-rate-decay fine-tuning (ablation)ResNet18 · CIFAR-10test errorHelped

Surprising findings

Limitations

Experimental setup

Datasets: CIFAR-10 CIFAR-100 Tiny-ImageNet CIFAR-5m OpenWebText

Benchmarks: CIFAR-10 CIFAR-100 Tiny-ImageNet OpenWebText validation loss

Metrics: test error training cross-entropy loss Jacobian norm parameter L2 norm total variation distance validation loss

Baselines: Adam without weight decay SGD without weight decay learning rate decay fine-tuning float32 training

Builds on: AdamW scale-invariant networks effective learning rate label-noise SGD implicit regularization NanoGPT

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