PLAIN/TEXT — ISSUE 193/456 COMPUTER SCIENCE · FOUNDATION / AI LEARNING · ~4 MIN READING DATE: 2027-04-12 ARCHIVE: https://plaintext.click/newsletter/ SUBJECT: Why would training prefer a slightly worse fit? Why would training prefer a slightly worse fit? =============================================== / START HERE A prediction rule can match old examples closely yet behave badly on new ones. Training means adjusting that rule using examples with known answers. Regularization is a training method that discourages selected kinds of complexity in a prediction rule in addition to scoring its errors. It deliberately changes what counts as the best training result, so memorising every irregularity is not automatically rewarded. / WHY NOW The smallest error on practice examples is not always the most useful goal. A modest penalty can make a steadier rule preferable to one that follows every bump in a limited sample. / 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. / SOURCE TRAIL [1] Google — Regularization https://developers.google.com/machine-learning/crash-course/overfitting/regularization NEXT: How can a transformer change voltage? --- HARD IDEAS. PLAIN TEXT. You are receiving this because you asked for one clear computer-science or physics idea each day. Unsubscribe: https://plaintext.click/unsubscribe View in browser: https://plaintext.click/newsletter/2027/04/2027-04-12-regularization-penalty.html From: Plain/Text / Brickston Consulting · 30 N Gould St Ste N, Sheridan, WY 82801 US · knowledge@plaintext.click