Md. Asif Uddin

    Proposition 1I.8.P0128 of 100 in the corpus

    Regularisation does not improve the fit; it decides which fit you get.

    A penalty, a random mask and an early checkpoint express different preferences. Each can improve prediction on new data, and each can suppress a real signal.

    An exact fit and a constrained oneSeven data points fitted by a curve that passes exactly through every one, and by a straighter curve that misses all of them slightly. A held-out point lies far from the exact curve and close to the constrained one.the same seven points, fitted twiceheld outpasses through every pointpasses through none of themRegularisation does notimprove the fit. It decideswhich fit you get whenseveral are available.
    Fig. 1 — Seven points fitted exactly and fitted loosely. Regularisation does not improve the fit — it decides which fit you get when many are available.

    The training loss cannot choose for you

    Two predictors can agree on every training example and disagree on the next one. An optimiser sees the agreement. It has no evidence about the disagreement until we supply more data or a preference.

    The figure is a schematic of that choice, not a theorem that the smoother curve wins. If the true function oscillates, suppressing its oscillations costs accuracy. Regularisation is useful precisely when its preference suits the problem.

    An explicit regulariser changes the quantity being minimised:

    J(w)=Ldata(w)+λ2∥w∥22,λ≥0.\mathcal{J}(\vec w)=\mathcal{L}_{\mathrm{data}}(\vec w) +\frac{\lambda}{2}\|\vec w\|_2^2,\qquad \lambda\geq0.
    (I.8.5)

    The fit and the preference are separate terms.

    Here w\vec w contains the weights we choose to penalise, not automatically every parameter in the model. Biases and normalisation scales are separate choices. A soft penalty does not remove functions from the hypothesis class; it makes some of them more expensive.

    L2 and weight decay coincide in one particular update

    Differentiating the penalty in (I.8.5) gives λw\lambda\vec w. Plain gradient descent therefore takes the step

    wt+1=wt−η(gt+λwt)=(1−ηλ)wt−ηgt.\vec w_{t+1} =\vec w_t-\eta(\vec g_t+\lambda\vec w_t) =(1-\eta\lambda)\vec w_t-\eta\vec g_t.
    (I.8.6)

    The same plain-gradient step can be read as a gradient plus shrinkage.

    For 0≤ηλ≤10\leq\eta\lambda\leq1, the first term shrinks the old weights without reversing their sign. This is the algebra behind the familiar equivalence between an L2 penalty and weight decay.

    Keep the qualifier: plain gradient descent. With Adam, adding λw\lambda\vec w to the gradient changes the first and second moments. AdamW forms those moments from the data gradient and applies the shrinkage separately:

    wt+1=(1−ηtλ)wt−ηtm^tv^t+ε.\vec w_{t+1}=(1-\eta_t\lambda)\vec w_t -\eta_t\frac{\hat{\vec m}_t}{\sqrt{\hat{\vec v}_t}+\varepsilon}.

    The operations do not commute. Even momentum without adaptive scaling can break the equivalence when the penalty enters its accumulator but decoupled decay does not. The comparison in (I.8.6) is not a licence to copy a coefficient between arbitrary optimiser implementations.

    Small weights also do not guarantee a smooth predictor independently of architecture. In a multilayer network, sensitivities involve products of weights and activation derivatives. A rescaling of one layer may be cancelled by another. The penalty is a preference in a chosen parameterisation.

    A case where the preference can be solved exactly

    For a linear model, take Ldata=∥Xw−y∥22/(2n)\mathcal{L}_{\mathrm{data}}=\|\mat X\vec w-\vec y\|_2^2/(2n). Setting the derivative of (I.8.5) to zero gives

    (XTXn+λI)wridge=XTyn.\left(\frac{\mat X^{\mathsf T}\mat X}{n}+\lambda\mat I\right) \vec w_{\mathrm{ridge}} =\frac{\mat X^{\mathsf T}\vec y}{n}.
    (I.8.7)

    Positive lambda supplies curvature in directions the data do not identify.

    For any nonzero u\vec u, the quadratic form of the matrix on the left is ∥Xu∥22/n+λ∥u∥22>0\|\mat X\vec u\|_2^2/n+\lambda\|\vec u\|_2^2>0 when λ>0\lambda>0. It is invertible even when the columns of X\mat X are dependent.

    In an eigendirection with curvature a>0a>0 and right-hand component bb, least squares gives b/ab/a while ridge gives b/(a+λ)b/(a+\lambda). The ratio is a/(a+λ)a/(a+\lambda). Weakly identified directions shrink most. That is the whole mechanism, including its cost: a genuine component in a weak direction is shrunk too.

    Equation (I.8.7) uses an averaged data loss. Replacing it with a summed loss while leaving λ\lambda unchanged makes the penalty relatively weaker as the dataset grows.

    Dropout changes the training problem by adding noise

    Let hh be a fixed activation and let MM be an independent Bernoulli mask, equal to one with keep probability q∈(0,1]q\in(0,1]. Inverted dropout uses

    h~=Mhq,E[h~∣h]=h,Var⁡(h~∣h)=1−qqh2.\begin{aligned} \widetilde h&=\frac{Mh}{q},\\ \mathbb E[\widetilde h\mid h]&=h,\\ \operatorname{Var}(\widetilde h\mid h)&=\frac{1-q}{q}h^2. \end{aligned}
    (I.8.8)

    Surviving activations are enlarged to compensate for the missing ones.

    There are only two outcomes: zero with probability 1−q1-q, and h/qh/q with probability qq. Multiplying each by its probability proves the mean in (I.8.8); doing the same for the squares gives E[h~2∣h]=h2/q\mathbb E[\widetilde h^2\mid h]=h^2/q, from which the variance follows.

    Training minimises an expected loss over masks as well as examples. This discourages a representation from depending too heavily on a particular activation being present. At inference inverted dropout is the identity. There is no second multiplication by qq.

    Preserving the mean is a smaller promise than reproducing the masked networks’ average prediction. If a later operation squares the activation, the two results differ by the variance term above. The exact counterexample is I.8.B05.

    Stopping is also a preference

    On one quadratic eigendirection, L(w)=aw2/2−bw+constant\mathcal L(w)=aw^2/2-bw+\text{constant}, start at zero and apply gradient descent. The recurrence wt+1=(1−ηa)wt+ηbw_{t+1}=(1-\eta a)w_t+\eta b sums to

    wt=[1−(1−ηa)t]ba,a>0,w0=0.w_t=\left[1-(1-\eta a)^t\right]\frac{b}{a}, \qquad a>0,\quad w_0=0.
    (I.8.9)

    Finite training time acts as a direction-dependent filter.

    For 0<ηa≤10<\eta a\leq1, the bracket grows from zero towards one. Directions with smaller curvature grow more slowly. Stopping early therefore suppresses them, much as ridge does, but its filter in (I.8.9) is not ridge’s a/(a+λ)a/(a+\lambda). A single λ\lambda generally cannot match all directions. For a non-convex network this calculation is an analogy with a specified boundary, not an identity.

    Choose the checkpoint on validation data. Keep the test set for the final evaluation. Looking at test loss every epoch and selecting its minimum is training a selection rule on the test set, even if no gradient passes through it.

    Augmentation spends domain knowledge

    A label-preserving transformation states something stronger than a generic penalty: these two inputs ought to receive the same target. The statement can be wrong. Rotating a digit can change which digit it is; cropping an image can remove the object whose class was retained.

    Neither the regularisation strength nor the augmentation policy comes with a guarantee. Compare them on held-out data, keep the evaluation protocol fixed, and report the preference that was actually tested.

    Sources