Orientation Curvature: The gradient is the same and the local bends are still different
The two directions may have a similar one-step slope in their current position, but they have a completely different bending level.
Learning objectives and first steps2 objectives 2 first fixes
Try to do it after reading
- Calculate secondary target Hessian
- Explain the length limit of the course curve
Suggested first
- Vector and Matrix Operations
- Counts and chain rules
The size of the gradient alone is not enough to explain the update
The two directions may have a similar one-step slope in their current position, but they have a completely different bending level. The same length of steps along a large curve is easier to cross a low point. Second-order analysis provides a partial description, but it cannot be mistaken as proof of global recovery, nor can it be assumed that Hessian of the deep network is always fixed.
Take L(x,y) =0.5 x ²+2 y ²。 The gradient is [x, 4 y]], and Hessian is [[1.0], [0,4]. The x unit perturbation rate is 1, and y is 4. If the current point (1,1) is a gradient (1,4) and the learning rate 0.4 is updated to become (0.6 - 0.6) and y crosses zero points; If the learning rate is 0.6, y becomes −1.4, the losses associated with y are increased from 2 to 3.92.
The curvature in the direction of d can be written as d T Hd. For d = [1,1]/§2, result (1+4)/2 = 2.5. Unitization is important: if directly used [1,1], it will be 5 and will include the effect of a square length of direction, which can no longer be compared directly to the curvature of the unit axis.
For this regular secondary function, the normal gradient drops in each characteristic direction to meet the corresponding stability conditions. The maximum characteristic value is 4, so the fixed length of the step is expected to contract severely in all directions, requiring between 0 and 0.5. This range is derived from the precise secondary structure of the case and does not allow for an unspecified recommended learning rate to be converted into an arbitrary neurological network.
When there are many actual parameters, the whole Hessian is not necessarily clearly constructed and the multiplier of the Hessian with the vector can be studied. It usually needs to be again guided by the process of calculating the gradient, and if the first lead is sought by detach, the second-order lead of the original target is no longer represented. The freezing of parameters, non-smoking activation and random data also affect the interpretation.
Independently check g(t)=L(θ+td) through [g(ε)−2g(0)+g(−ε)]/ε² against dᵀHd. The theoretical value here is 2.5. Second differences suffer more cancellation than first differences, requiring double precision and a suitable step. This concerns a deterministic differentiable synthetic function.
If the target contains a random batch noise, the same input and random state should be fixed when comparing the two differences, otherwise the difference in the function may be derived mainly from the sampling changes. Validation of calculations and processing of random models first on the little function of certainty reduces the risk of misperception of noise as negative.
Review with standard Python
import mathd=[1/math.sqrt(2),1/math.sqrt(2)]assert abs(d[0]**2+4*d[1]**2-2.5)<1e-12Only fixed arithmeticals and indexes are validated above and no framework training is called.
Does a gradient of zero mean a curve of zero?
No, it's not. At the original point the gradient was zero, but in this case Hessian is still a diagonal [1,4], indicating that there are still clear bends around.
Is the negative curve equal to a program error?
Not necessarily. (b) A non-concentrated target may have a negative curve at certain points, indicating a partial downward bend in that direction; Objectives and numerical calculations need to be identified before their geometry is explained.
Sources and reconciliations
Definitions, methods and interfaces are available.
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.