[Reproducibility Report] SAdam: A Variant of Adam for Strongly Convex Functions

Yash Raj Sarrof, Narayanan Elavathur RanganathaOpenReview 2021

TL;DR

This reproducibility report confirms that SAdam, a modified Adam optimizer, indeed converges faster on strongly convex problems due to its theoretical logarithmic regret bound. Crucially, the authors also found that SAdam's performance advantage extends to non-convex scenarios, maintaining competitive results across various deep learning tasks.

What Problem Does This Paper Address?

The original paper by Wang et al. introduced SAdam, an optimization algorithm designed to improve upon Adam by leveraging the property of strong convexity. While Adam is widely used, it can suffer from convergence issues. SAdam aims to address this by incorporating a data-dependent logarithmic regret bound, theoretically leading to faster convergence, especially in convex optimization problems. The original paper also claimed that this performance improvement carries over to non-convex settings, which are more common in real-world deep learning applications. This reproducibility study aims to verify these core claims by independently implementing and testing SAdam.

Methods

The researchers in this report took a rigorous approach to reproducibility. They did not use the original authors' code but instead implemented SAdam and several other optimizers (including Adam, AMSGrad, SC-RMSProp, SC-Adagrad, and OGD) from scratch using the PyTorch framework. This contrasts with the original paper's use of TensorFlow. They performed a grid search for hyperparameters to find optimal settings for each experiment and dataset. All experiments were conducted on a NVIDIA Tesla K80 GPU available through Google Colab.

Datasets

The following datasets were utilized in the experiments:

  • MNIST: A dataset of handwritten digits (60,000 training, 10,000 test images).
  • CIFAR-10: A dataset of 32x32 color images across 10 object classes (6,000 images per class).
  • CIFAR-100: A dataset with 100 classes, grouped into 20 superclasses (500 training, 100 testing images per class).
  • PennTreeBank: A dataset for language modeling, containing text from the Wall Street Journal and Brown Corpus.

Key Insights and Ideas

  • SAdam's Convexity Advantage Holds: The empirical results strongly support the claim that SAdam converges faster on convex problems, exhibiting the lowest overall regret across various datasets.
  • Non-Convex Performance is Robust: SAdam's performance advantage isn't limited to convex problems; it also demonstrates competitive and often superior results in non-convex deep learning tasks, validating the original paper's second major claim.
  • Implementation from Scratch is Crucial for Bias-Free Verification: By reimplementing the algorithms in a different framework (PyTorch), the researchers ensured that their findings were not influenced by the original implementation's specifics, providing a more robust validation.
  • Hyperparameter Tuning Matters, But Core Claims Remain: While optimal hyperparameters might differ slightly from the original paper, the core claims about SAdam's performance were consistently observed, suggesting that the optimizer's benefits are not overly sensitive to minor tuning variations.

Key Results

The reproducibility report found that:

  • Regret Calculation: SAdam consistently achieved the lowest regret in L2-regularized Logistic Regression across MNIST, CIFAR-10, and CIFAR-100 datasets. SC-RMSProp and SC-Adagrad showed similar, albeit slightly higher, performances. Adam and AMSGrad had significantly higher regrets, while OGD, as expected, had the highest. The reported regret values were slightly higher than the original paper, attributed to differences in normalization (e.g., batch size).
  • 4-Layer CNN Performance: SAdam generally achieved the highest test accuracy and lowest training loss on the 4-layer CNN across all datasets. For CIFAR-100, SAdam's test accuracy exceeded the original paper's results by 2%.
  • ResNet-18 Performance: While AMSGrad showed the best test accuracy after 100 epochs, SAdam demonstrated strong performance early on (around 30 epochs). The report noted that optimizers leveraging convexity maintained their faster convergence properties even on this deeper architecture.
  • LSTM Language Model: In the language domain, SAdam's performance mirrored that of Adam, both significantly underperforming compared to SGD with Momentum, with perplexity values being about five times higher. This suggests SAdam might be more domain-specific than initially assumed.
  • Accuracy Range: Overall, the reproduced results were within a 1-2% accuracy range of the original paper's findings.

Limitations and Future Work

  • Theoretical Foundation for Non-Convex Performance: The report acknowledges that while SAdam performs well in deeper networks (non-convex scenarios), there's no explicit theoretical foundation provided for this empirical observation. Addressing this would require advanced calculus and optimization mathematics.
  • Domain Specificity: The performance in the language domain (LSTM) was not as strong as in vision tasks, suggesting SAdam might not be universally applicable across all problem types. Future work could explore its effectiveness in other domains.
  • Mini-batch Size Contradictions: The researchers encountered difficulties due to conflicting recommendations for mini-batch sizes between SAdam and SC-RMSProp, which impacted the regret calculation experiments. While SAdam is more robust to a wider range of batch sizes, SC-RMSProp can surpass SAdam with very small batch sizes. This highlights the importance of careful hyperparameter selection and understanding its impact on different optimizers.
  • Code Availability: The authors were very responsive and shared their codebase, which was helpful. However, the report emphasizes the value of having publicly available PyTorch implementations for comparison optimizers, which were lacking for some at the time of writing.

Summary updated

BibTeX
@misc{sarrof2021reproducibility,
  author = {Yash Raj Sarrof and Narayanan Elavathur Ranganatha},
  title = {{[Reproducibility Report] SAdam: A Variant of Adam for Strongly Convex Functions}},
  year = {2021},
  url = {https://openreview.net/forum?id=eNj0zqNUkBU},
  howpublished = {OpenReview},
}
Figure