/ THE IDEA
Consider a model that multiplies each input measurement by an adjustable weight. Large weights can make its prediction respond strongly to small input changes. One common regularizer, called L2, adds the sum of squared weights to the training objective. The objective is the number the training process tries to reduce. A coefficient controls the trade-off. At zero, the penalty has no effect. At a larger value, training is more reluctant to use large weights unless they improve the fit enough to compensate. This is a preference built into learning, not a mathematical proof that small weights are always closer to the truth.
THE FORMAL IDEA
J = L_data + λΣwⱼ²
| J is the combined objective; L_data is the ordinary average prediction loss. λ, pronounced lambda, sets penalty strength. | | wⱼ is weight number j; Σ means add the squared weights. Assume dimensionless, consistently scaled inputs and a compatible loss in this toy comparison. |
|
RUN THE TINY EXAMPLE
Change one thing. Predict what happens.
Candidate A: data loss 1; one weight of 3. Candidate B: loss 2; weight 1. With λ = 0, objectives are 1 and 2: A wins. Change λ to 0.2: A gives 1 + 0.2×9 = 2.8. B gives 2 + 0.2×1 = 2.2: B now wins.
|
No old prediction improved merely because the penalty changed. Instead, the definition of preferred behaviour changed. Candidate B accepts a worse fit to the observed examples in exchange for a smaller response weight. Whether that exchange helps unfamiliar examples must be checked with evidence beyond the fit itself.
/ SO WHAT?
The idea is useful whenever there are more plausible patterns than the data can reliably distinguish. A flexible model can explain accidental details, including measurement noise. Regularization gives the learning process a reason to leave some details unexplained. The useful question becomes how much flexibility the evidence supports, not whether flexibility is inherently good or bad.
ONE CAVEAT |
| Too much regularization can erase real structure and worsen predictions. L2 is only one method, and its effect depends on feature scaling and model design. A penalty coefficient is normally selected using separate evaluation data. |
KEEP THIS
Regularization changes the bargain between fitting known examples and limiting sensitivity, so the best training fit need not be the preferred model.
|
NEXT: How can a transformer change voltage?
|