Expectigrad: Fast Stochastic Optimization with Robust Convergence Properties

Brett Daley, Christopher Amato

Abstract

Adaptive gradient methods like Adam and RMSProp have become the de facto standard for training deep neural networks due to their rapid initial progress. However, these methods often suffer from divergence issues on certain objective functions, a phenomenon known as the "Reddi Problem," primarily due to their reliance on Exponential Moving Averages (EMAs). We present Expectigrad, a novel optimizer that replaces the "forgetful" EMA with a robust arithmetic mean and introduces an "outer momentum" framework. Our approach provides stronger theoretical convergence guarantees while maintaining or exceeding the performance of state-of-the-art optimizers across diverse vision and language tasks.

Introduction

Modern deep learning relies heavily on adaptive optimizers that scale learning rates per parameter based on historical gradient magnitudes. While effective, the use of EMAs in methods like Adam causes the optimizer to prioritize recent data, potentially "forgetting" critical historical information. This lack of long-term memory can lead to divergence even in simple convex settings. Existing solutions, such as AMSGrad and Yogi, attempt to mitigate this but often at the cost of training speed or increased hyperparameter sensitivity. Expectigrad addresses these shortcomings by fundamentally redesigning the normalization and momentum components of the adaptive update rule.

Methodology

Expectigrad introduces two core innovations to the adaptive optimization landscape:

1. Arithmetic Mean Normalization

Unlike Adam, which uses an EMA to estimate the second moment of gradients, Expectigrad employs an unweighted arithmetic mean of all historical squared gradients. This ensures that the denominator remains stable and less susceptible to noise as training progresses. To handle the sparsity often encountered with ReLU activations, Expectigrad incorporates an auxiliary counter ($n_t$) for each parameter component. This counter tracks the number of non-zero gradients, preventing stepsize explosions when a rare feature is updated after a long period of inactivity.

2. Outer Momentum Framework

In traditional adaptive optimizers, momentum is typically applied to the gradient before it is divided by the adaptive denominator (inner momentum). Expectigrad shifts this operation, applying momentum after the adaptive step has been calculated. This "outer momentum" satisfies the principle of linear superposition: past updates are not arbitrarily re-scaled by future changes in the adaptive learning rate. This mathematical consistency ensures that the intended momentum direction is preserved throughout the optimization process.

Comparison of different momentum formulations in Expectigrad. The "Bias-corrected Outer" approach (Expectigrad) achieves the lowest training loss across a range of momentum constants.

Experimental Results

Synthetic Benchmarks: The Reddi Problem

We evaluated Expectigrad on the "Reddi Problem," a synthetic convex task specifically designed to induce divergence in Adam. As shown in the comparative analysis, while Adam diverges toward infinity, Expectigrad successfully converges to the global minimum. Notably, Expectigrad achieves this convergence approximately 10 times faster than other robust alternatives like AMSGrad and Yogi, demonstrating its efficiency in handling adversarial gradient distributions.

Performance of various optimizers on the Reddi Problem (online and stochastic variants). Expectigrad demonstrates robust convergence in both position and average regret compared to Adam and other baselines.

Vision and Language Tasks

Expectigrad's performance extends beyond synthetic tasks to large-scale benchmarks:

  • Computer Vision: On CIFAR-10 (VGGNet-16, ResNet-50) and ImageNet (MobileNetV2), Expectigrad consistently achieved lower training loss and superior top-1 error rates compared to Adam, AdaGrad, and Yogi.
  • Natural Language Processing: In the IWSLT’15 English-Vietnamese translation task, where Adam frequently failed to converge, Expectigrad matched or exceeded the performance of Yogi and AMSGrad, achieving a competitive BLEU score of 29.12 on the Transformer architecture.

Conclusion

Expectigrad represents a significant step forward in making adaptive optimization both fast and robust. By utilizing arithmetic mean normalization and a theoretically grounded outer momentum framework, it overcomes the divergence pitfalls of EMA-based methods without sacrificing the "fast-start" benefits that make adaptive methods popular. Future research will explore the applicability of the outer momentum principle to other classes of first-order optimizers.

Summary updated

BibTeX
@misc{daley2020expectigrad,
  author = {Brett Daley and Christopher Amato},
  title = {{Expectigrad: Fast Stochastic Optimization with Robust Convergence Properties}},
  year = {2020},
  eprint = {2010.01356},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.01356},
}
Figure