Gradient Descent Techniques Overview
Gradient Descent Techniques Overview
Fall 2021
Machine
Learning
-
Sarath Chandar
[Link]
[Link] n
-
-
:{
"
(n'
")J
'
Dataset , y
, , ,
1. Bath descent
-
gradient :
computes the
gradient of the cost fn
training
the entire
art .
the parameters or for
dataset .
tf Tfo ; )
( Iit ) (Iit )
0=0 -
rn n y
,
Can be slow
→
very .
to the model
→ Doesn't allow us
update on1
→ Guaranteed to
converge to the
global minimum
for
convex error surfaces and to a
local minimum
for non -
convex surfaces >
-
Stochastic descent :
2.
-
gradient
SGD performs parameter updates for each
o -
o -
→ SGD does
away
with this
redundancy by
update time
performing
one at a
.
SGD fluctuation .
to skip local However
→ these fluctuations help minima .
→ If we
slowly decrease the
learning rate
,
SGD
baKhGf
descent
3) Mini batch
gradient : -
-
→ Performs an
update for batch of
every
mini
examples
training
a-
.
a- O -
D -4510 ; [Link]?yCi:i+n )
→ reduces the Variance of the parameter updates ,
operations .
-
Chew : -
①
Choosing
a
proper learning rate is difficult .
too small
learning rate → slow convergence .
annealing i. e.
reducing
rate to
according predefined
learning
a
the
advance
defined in .
③ Same
learning rate
applies to an parameter
updates .
If our data is
sparse and our
to
might not want to update all of them some
ocaeñngfeatu
Gradiertdesarttt: -
Men : -
scenarios
,
SGD oscillates across the slopes of
while hesitant
the ravine
only making progress
the bottom towards the local
along optimum .
SGD
Momentum :
helps accelerate SGD in the relevant
and
direction dampens oscillations .
Of =
8%+77%510 )
o =
o -
Ot
8- momentum coefficient f friction coefficient)
usually 0.9 .
down a hill .
The ball accumulates momentum
as
it rolls downhill
, becoming faster and
faster
the
way
on .
and
gradients point in the same directions
oscillation
faster convergence ,
reduced .
SGD with
momentum .
a hill
, blindly following
the
slope ,
is
highly
We would like to have a smarter
unsatisfactory .
→
Computing ( o -
8%, ) gives
us an
approximation
position of the
of the next
parameters .
lookahead
→ we can
efficiently by calculating
now
the
gradient not went .
our current
parameters
0 but wrt .
so
4- =
f- ,
-117
To to -64 ) ,
0 =
0 -
Of .
-
like to
SGD in turn
,
we would also adapt our
updates to individual to
each
parameter perform
larger smaller
updates their
depending
or
on
importance .
Ada_grad : -
Adapts the
learning rate to the
parameters ,
-
Well suited for sparse
data .
To lot ;))
9£ , ;
=
,
gradient of the
[Link] .
wer -
t .
the parameter Oi
÷¥gp;I It"
-
T
9 term
sum
of squares of past smoothing
Cex :/ e- 8)
gradients
to avoid division
by zero .
Sparse gradients -
learning rate is
high
frequent gradients learning rate is low
-
Adge ! Each
parameter gets its
-
own
learning rate .
initial
Disadvantage the
gradients large
1.
If are
,
the
remainder of the
training .
the
learning rate will continue to
decrease
during the
training ,
eventually
to
decreasing zero and
stopping
training .
Riaspnpi -
Instead
of
accumulating
the sum of squared
time
gradients over all
use
,
moving average .
←,
-14 -
e) 9+2
9
Decay constant (
usually 0.97
RMS [g)
+
=
\/E[gYt+E
[Link]?gy-9tAda-dtu:-
9- + , =
Ot -
Consider SGD :
•
It ,
=
% _n
±
Ota =
Of toot
Units
of oof ✗ units
of gt 2 dL ✗
1-
dot units
of of
and
80g witless
→
Adagrad RMS
Prop are
are
?⃝
Consider Newton 's method !
-
I
got ✗ High ✗ units ofot
÷-
.
dot
correct units for parameter updates .
Newton's
Rearranging method
Cassuming a
diagonal Hessian )
¥ .
1- E.
Not
=
=
-0g
¥
÷, *
dot
the
since the RMS
of previous gradient
the denominator add
already
we
is presented in
,
numerator
RMS of bot in .
Rms[gf
Adad : Adaptive Moment Estimation .
←
estimate of first
my
= B , Mt, + 4-B) Gt moment (mean )
Vt = P2 4- -
,
+ (1-132)%2
a
estimate second
of
moment Cuncerlered
variance )
where Bx , 132 are
usually get to 0-9 and 0£99
As initialized to vector
Mt and Vt are
of
0 's
,
they are biased towards zero ,
especially during
initial
steps .
Bias correction Ñt
Mtl
:
=
,t
-
-
B
if =
E-
1- Bat
9-a = 9- -
ñt
-
Additional
strategies :
-
(few epochs ) .
4 Sometimes to the
.
adding
noise
gradient helps
to escape
local minima .
You should
Youshouldkno
① Batch gradient descent
③ batch descent
gradient
Mini -
④ Momentum
Heady
⑧
⑨ Adam .