Remember that in Adagrad, we have see that each parameter has its own learning rate.
However, the learning rate is rapidly decreasing as the number of iterations increases.
This can be a problem because the learning rate can become too small and the model stops learning.
In this post, we will see how Adadelta prevents learning rate decreasing rapidly over time.
Instead of inefficiently storing, or summing, all the past squared gradients,
Adadelta calculates the average of the decayed past gradients and uses it to update parameters.
Most importantly, Adadelta uses no learning rate.
Mathematics of Adadelta
The parameter update rule is expressed as
Δθt=−RMS[g]tRMS[Δθ]t−1⊙gtθt+1=θt+Δθt
where
Δθt is the update at time t
θt is the parameter at time t
RMS[Δθ]t−1 is the root mean square of the updates up to time t−1
RMS[g]t is the root mean square of the gradients up to time t
gt is the gradient at time t
RMS[Δθ]t−1, the root mean square of parameters up to time t,
can be expressed as follows:
RMS[Δθ]t−1=E[Δθ2]t−1+ϵ
where E[Δθ2]t−1 is the mean squared parameter updates up to time t−1.
g0,t and g1,t are the gradients of the cost function with respect
to the intercept and the coefficient respectively, and can be expressed as follows:
First, define a function that calculates the root mean square of the values.
Second, calculate the intercept and the coefficient gradients.
Notice that the intercept gradient g0,t is the prediction error.
Third, we need to determine RMS[g]t. Since we have define the function rms() in the beginning,
we can calculate the root mean square of the gradients.
Fourth, we need to determine RMS[Δθ]t−1, and we are going to do the same
but we are going to apply the function on the intercept and the coefficients columns.
Finally, we can update the intercept and the coefficient.
Conclusion
Pathways of SGD, Adagrad, and Adadelta along the 2D MSE contour.
With Adadelta, we can reach the minimum point of the cost function faster than Vanilla SGD and Adagrad.
Thus, it allows us to explore more in the parameter space and find the optimal parameters for the model.
Code
References
Zeiler, Matthew D. ADADELTA: An Adaptive Learning Rate Method. arXiv:1212.5701 (2012).
Sebastian Ruder. An overview of gradient descent optimization algorithms. arXiv:1609.04747 (2016).