AdamW and L2: Why are the two contractions different from the pre-adaptation conditions

Two updates are compared in the case of fixed preconditions, explaining the coupling of decay with the history of gradients.

• Step by stepCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives . 1 first fix

Try to do it after reading

  • Comparison of two updates in the case of fixed preconditions
  • Explains the coupling of decay with the history of gradients

Suggested first

  • Gradient and vector calculations

The same name of punishment may vary

(a) The standard gradient drops and the square parameter is added to the target, which corresponds directly to the weighting down of the right in terms of the rate of study; The counterpart is normally not maintained after a coordinates-by-coordinate pre-condition. AdamW decoupled the self-adaptation step of the power retrenchment with the data gradient and avoided the punishment being reweighted at different coordinates of historical scales.

Dissociate an updated synthesis example

To see only the mechanism, a fixed precondition matrix diag(1,10) is given, with current weight (1,1) and a data gradient of zero, learning rate 0.1 and decay strength 0.1. If the L2 gradient 0.1 w is added to the precondition, it is updated to (0.99,0.9). If the coupling is directly reduced, both are multiplied by 1 - 0.01 and obtained (0.99, 0.99). This is not a full-scale software recurrence for Adam training, as the true pre-conditions are also shaped by the rectangular state; It merely indicates that a change by coordinates would result in a different scaling of the coupling penalty. In real Adam, the L2 entry may also enter a second-tier history, and the difference is not just the current multiplier.

Distinction between objective and achievement

Decoupling does not mean full parity with a fixed L2 target under all optimizers. When comparing methods, learning rates, decaying intensity, schedule, parameter groups and torque status are recorded at the same time, and not just one configuration field can be renamed.

Which parameters are decaying

Some of the trainings excluded bias or reclassification parameters, while others were mandated to apply other rules. This is a clear design choice and cannot be unrecorded because it is common. Each step of the contraction resulting from the same decay factor may also be different for different groups of parameters, if the learning rate is different; The accumulated contractions as a result of movement movements change accordingly.

Authentication and restoration

The state of the optimiser and the number of steps will still be retained at the time of recovery, and the order of the parameter groups will be matched to the weight of weight. If certain parameters are frozen and the non-graduation of the non-graduation parameters is not achieved, the interface behaviour should be viewed and no formula can be used to extrapolate all software. The generalization of deterioration or deterioration depends on task and involvement, and benefits are guaranteed by the fact that the decoupling in the name does not. A fixed vector to check the coupling path and then compare it under consistent data and calculation of the budget avoids misapplied attribution of learning rates or parameter group changes to algorithms. This document does not report framework operations, GPU training or any real business effects, but only validated a linear update that can be independently calculated.

w′=(1−ηλ)w−ηDg

Self-measurement and provocator

This is a coupon. L2 Why did you shrink the second coordinates more?

Premise coordinates 10 and the punishment gradient was also enlarged by 10 times to 0.9 instead of 0.99.

Does decoupling mean that it is equal to the same L2 target under any optimizer?

No, it's not. It clearly changes the path of the update, and the equivalent is analysed under specific optimizer and scale conditions.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. Loshchilov and Hutter — Decoupled Weight Decay Regularization
  2. PyTorch — AdamW

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.