2
$\begingroup$

$$ w_{n+1} = w_n - \alpha \frac{f \nabla f}{||\nabla f||^2} $$ It calculates where the line that’s in the same direction as gradient and has $f$’s slope in that direction becomes zero. In one dimensional case it becomes: $$ [x_{n+1}] = [x_n] - \alpha f(x_n) \frac{[f’(x_n)]}{||[f’(x_n)]||^2}$$

$$x_{n+1} = x_n - \alpha \frac{f(x_n)}{f’(x_n)}$$

Which is just Newton’s root finding method if $\alpha = 1$.

$\endgroup$
1
  • 1
    $\begingroup$ Used where? Can you be more specific? Right now, this could not even be related to AI. $\endgroup$
    – nbro
    Commented Aug 1 at 14:07

2 Answers 2

4
$\begingroup$

Automatic Differentiation (AD) is a technique used to compute the derivatives of functions with respect to their inputs applying chain rules, and the famous backpropagation algo used in most ANNs is a specific reverse mode of AD. They're highly effective for calculating first order gradients together with SGD empirically in ML and other fields and are used by many frameworks like TensorFlow, PyTorch and JAX.

On the other hand, your referenced method involves essentially a nonlinearly scaled version of the gradient which can lead to instability or divergence in certain cases especially if the gradient value in the denominator is very small or zero. And if it's very large you update becomes also very slow. In practice algorithm stability and robustness are critical in ML where techniques like SGD with adaptive learning rates (e.g., Adam, RMSprop) have been designed well to handle issues of step size adaptation and convergence. Therefore in ML your proposed 'scaled' gradient algorithm is not used compared to the vanilla gradient AD algorithms due to its instability and extra problematic inverse computation.

$\endgroup$
1
$\begingroup$

There may be a confusion between root finding and optimization.

Your formula appears designed to find a point where a scalar function $f$ of several variables is equal to zero. However, this goal is not particularly useful. Generically, a function of $n$ variables equals zero on some $(n - 1)$-dimensional space. Your formula may converge to some point in this space. But why does one want to find such a point?

If the goal is fitting a model, and $f$ is a loss function, one wants to find a point where $f$ is minimized, not where $f = 0$. (Note, even if somehow one knew a priori that $f$'s minimum value is zero, Newton's method would be an inefficient way to find it.)

One can also frame minimization as finding a point where $\nabla f = 0$, but this is finding a root of a vector function (i.e., simultaneous root of $n$ scalar functions), not of a single scalar function.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .