Second-order Information in First-order Optimization Methods

Yuzheng Hu, Licong Lin, Shange TangarXiv 2019

Abstract

In this paper, we try to uncover the second-order essence of several first-order optimization methods. For Nesterov Accelerated Gradient (NAG), we rigorously prove that the algorithm makes use of the difference between past and current gradients, thus approximating the Hessian and accelerating training. For adaptive methods, we relate Adam and Adagrad to a powerful technique in computational statistics—Natural Gradient Descent (NGD). These adaptive methods can be treated as relaxations of NGD, with the primary difference lying in the square root of the denominator in the update rules. Skeptical about the necessity of this square root, we design a new algorithm—AdaSqrt—which removes the square root and scales the learning rate by $\sqrt{T}$. Surprisingly, our new algorithm is comparable to SGD and Adam on MNIST and even outperforms Adam on CIFAR-10. This phenomenon suggests that as long as an algorithm explores higher-order information of the loss surface, proper scaling of the learning rate alone can guarantee fast training and good generalization.

Introduction

In deep learning, first-order optimization methods like Stochastic Gradient Descent (SGD) and Adam are the standard due to the extreme computational cost of calculating the Hessian matrix for models with millions of parameters. However, the significant performance differences between these methods suggest that some may be implicitly utilizing higher-order information. This paper investigates two specific mysteries: why Nesterov Accelerated Gradient (NAG) is more effective than standard momentum, and whether the square root operation in adaptive methods is a fundamental requirement or merely a heuristic.

Theoretical Framework: The Second-Order Essence of NAG

The authors demonstrate that NAG is effectively a Hessian-free second-order method. By mathematically analyzing the update rules, they prove that NAG is equivalent to an update that utilizes the difference between current and past gradients. This gradient difference acts as a proxy for the curvature of the loss surface, providing the algorithm with implicit second-order information.

Algorithm 1: Standard Momentum update rules.

As shown in Algorithm 2, NAG evaluates the gradient at a "look-ahead" position. This allows the optimizer to anticipate changes in the gradient, leading to faster convergence rates that standard momentum (Algorithm 1) cannot achieve.

Challenging the Square Root Convention: AdaSqrt

Adaptive methods are often viewed as providing per-coordinate learning rates. This paper reinterprets them as relaxations of Natural Gradient Descent (NGD). Based on the observation that NGD does not strictly require a square root in its denominator, the authors propose AdaSqrt. This new update rule removes the square root and balances the linear sum of squared gradients with a $\sqrt{t}$ term in the numerator:

$$\theta_{t+1} = \theta_t - \eta \frac{\sqrt{t} \cdot g_t}{\sum_{i=1}^t g_i^2 + \epsilon}$$

Theoretical analysis confirms that AdaSqrt achieves a standard regret bound of $O(\sqrt{T})$, ensuring its robustness and convergence.

Experimental Evaluation

The authors evaluated AdaSqrt against standard optimizers on two computer vision benchmarks:

  • MNIST: Using a two-layer fully connected network, AdaSqrt achieved comparable performance to Adam and showed greater stability in the late stages of training (epochs 9-13).
  • CIFAR-10: Using a three-layer CNN, AdaSqrt initially trailed Adam but eventually overtook it after five epochs, resulting in lower final training loss and prediction error. It consistently outperformed Adagrad and SGD throughout the training process.

Conclusion and Future Work

This research reveals that the success of popular "first-order" methods often stems from their ability to implicitly capture second-order dynamics. The success of AdaSqrt specifically challenges the long-held belief that the square root operation is essential for adaptive optimization. Future work will involve testing AdaSqrt on larger datasets like ImageNet and exploring ways to implicitly incorporate even higher-order information (third-order and beyond) to further accelerate deep learning training.

Summary updated

BibTeX
@misc{hu2019second,
  author = {Yuzheng Hu and Licong Lin and Shange Tang},
  title = {{Second-order Information in First-order Optimization Methods}},
  year = {2019},
  eprint = {1912.09926},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.09926},
}
Figure