the.ai

Optimization / Regularization

verified

Weight Decay

A model with enormous weights has usually memorised something rather than learned it. Weight decay pulls every parameter slightly toward zero on every step, so a weight has to keep earning its size. It is the simplest regulariser and often the only one a large model needs.

Viz primitive · update-spectrumdecay = 0.1 · bars = 8

8 values. The left group decays steeply; the right group is 36% of the way to flat, and reads flatter than the left.

Weight magnitudes without decay and with it. Drag the coefficient to watch the largest weights pulled in hardest.

0.1

Reviewed by opendroid · 2026-08-04