LogSumExp: what changes when the maximum is leveled

Stabilizes the logarithms of the index, explaining the smooth maximum value and the softmax gradient.

• 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

  • Stabilization index and logarithms
  • Explain the smooth maximum value with the softmax gradient

Suggested first

  • Vector and Matrix Operations

We want to compare candidates with successive guides

The maximum value is not smooth at the winner ' s switch; Some of the objectives would prefer to retain the “larger candidate is more important” character, while allowing each to have a measurable gradient. LogSumExp brings the index and re-log to a smooth approximation of the maximum value. It is not only an overflow-proof programming technique, but also a clear approximation and gradient structure, which needs to be separated.

Steady calculation of three fractions

Scores [10,9,8]. (a) The maximum value of 10 is reduced by the calculation of 1, exp(-1), exp(-2) and approximately 1.503214; The logarithms were added back to 10, and 10.40760596 was obtained. This result is approximately 0.40706 above the maximum value, but not more than the maximum value plus log(3), which corresponds to the upper limit. If the score is added to the sum of 1000, the result is only 1,000 more, and the internal weights of the uniformity are unchanged. For each fraction, the corresponding index is divided by the sum of the index, which is approximately [0665241,244728,0.09031]. The three guides are non-negative and equal to 1 and indicate that smooth targets allocate sensitivity to all candidates, with a larger fraction weight. These weights are derived from the function structure, not the candidate correctness, nor are they causal contributions.

Temperature change approximation

If positive temperature multipliers and logarithms are used, and fractions are divided by temperature, the upper limit will become the maximum plus temperature multiplied by log (candidatures). The lower the temperature, the closer to the hard maximum, the gradient will be concentrated in a few candidates and the values and optimizations around the winner will vary. Temperature reduction should not be interpreted simply as “more accurate”, but as a change in the level of smoothness of the target.

Value stability does not equal probability calibration

The index, which directly calculates large fractions, may spill over, and the maximum impairment is based on a strict algebra constant equivalent, with no approximate loss. On the contrary, arbitrary cutbacks of the original fractions in order to protect against spillovers may alter the true target and gradient. When all candidates are hidden, entered into infinity or non-numeric values, there is still a need for a clear-cut mishandling, and stabilization formulas cannot allow undefined issues to be automatically justified. In the classification of cross-alkanes, LogSumExp usually subtracts points from the target category; In a sorting or energy model, it may assume another role of normalization. The same calculation does not imply the same statistical interpretation. If the candidate pool comes from a negative sample, the sum covers only the items collected, and the sample distribution and necessary correction is checked, the possibility of uniformizing the small pool cannot be directly assumed as a pool.

maxizi≤log(∑i=1nexp(zi))≤maxizi+log(n)

Self-measurement and provocator

What happens when you add 1,000 points to all scores, softmax weights?

(a) No change since the public index factor is offset by the molecular denominator; LogSumExp itself increases by 1,000.

The LogSumExp gradient and number 1, are they shown to be the correct class probabilities?

No, it's not. They are sensitive to the function; Statistical probabilities also depend on training models, labelling and calibration.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. Boyd and Vandenberghe — Convex Optimization
  2. Stanford CS229 Lecture Notes

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.