can someone explain to me why we square the gradient for velocity ? like what was the intuition for that to be "velocity" ? i don't get it. some mathematical background maybe ?
vₜ isn't velocity. It's a running average of g², an estimate of how large and noisy the gradient is for each parameter. Dividing by √vₜ normalises each step to roughly η: big or noisy gradients get small steps, and small but consistent gradients get bigger ones. mₜ is the momentum ('velocity') part."
i thought they also named the second momentum 'velocity' but anyway, Basically, the square root of the 'velocity' normalises the η ? but why the squared ? why not any function that amplifies, for example, exponential, and take log instead of sqrt. or any other functions, would it also work ?
Yes, √vₜ normalises the step to roughly η. The function must be scale-equivariant: multiply gradients by c, and the denominator should also grow by c, so the step doesn't change. Power means (avg |g|ᵖ)1/p satisfy this. p=2 is Adam, and p=∞ is AdaMax, which is in the same paper and works. Exp then log fails: it isn't scale-equivariant, it treats negative gradients as near zero, and e1000 overflows. p=2 wins because it ties to variance, is smooth and cheap, and approximates the diagonal Fisher.
squaring turns the gradient into a always-positive magnitude so it builds up like speed without directions canceling each other out, kinda like a running average of how steep things have been lately
love that the Momentum plot actually shows it overshooting the minimum and rolling back up the other side, makes the "heavy ball" analogy click immediately
3
u/Any-Acanthaceae2762 1d ago
can someone explain to me why we square the gradient for velocity ?
like what was the intuition for that to be "velocity" ? i don't get it.
some mathematical background maybe ?
1
u/Handwritten_note 1d ago
This image is from this book Deep learning handwritten notes
1
u/Alone_Photograph_670 1d ago
THANK YOU
1
u/Federal_Signature708 1d ago
love that the Momentum plot actually shows it overshooting the minimum and rolling back up the other side, makes the "heavy ball" analogy click immediately
1
u/Vegetable-Lie4932 13h ago
this is not always true, tutorial diagrams always look cool. its much more nuanced than this.