The gradient of a scalar function is the vector of all partial derivatives:
Key properties:
- Points in the direction of steepest ascent of
- Its magnitude is the rate of steepest ascent
- It is perpendicular to level sets (contour surfaces) of
- at critical points (local min, max, or saddle)
Gradient descent walks downhill: , where is the learning rate. This is the foundation of all neural network training via Stochastic Gradient Descent.
Numerical gradient (finite differences): . Useful for gradient checking but cost per evaluation.
See also: Chain Rule (Multivariable), Jacobian Matrix, Hessian Matrix