Introduction
DeepOBS is an open-source Python framework designed to standardize the evaluation of deep learning optimizers. By providing a diverse suite of "ready-to-use" problems—ranging from toy functions to ImageNet—and automating the messy parts of benchmarking (like hyperparameter tuning and multiple random seeds), it ensures that new optimization algorithms are compared fairly against industry standards like Adam and SGD.
The Problem with Optimizer Benchmarking
In the world of deep learning, architectures and hardware have evolved at breakneck speed, yet the optimizers we use to train them (like SGD and Adam) have remained largely the same. While researchers constantly propose "faster" or "better" optimizers, these new methods rarely gain traction.
The authors argue this is due to a lack of a standardized evaluation protocol. Currently, optimizer research suffers from:
- Inconsistent Baselines: New optimizers are often compared against poorly tuned versions of SGD or Adam.
- Cherry-picked Problems: Authors might only show results on datasets where their method happens to excel.
- Stochastic Noise: Performance can vary wildly based on the random seed, but many papers only report a single run.
- The Generalization Gap: A method that minimizes training loss quickly might actually result in poor test accuracy due to overfitting.
The DeepOBS Framework
DeepOBS introduces a rigorous benchmarking protocol and a software package to implement it.
Key features of the framework include:
- Standardized Metrics: It tracks four key metrics: training loss, test loss, training accuracy, and test accuracy.
- Stochasticity Control: It automates running experiments over multiple random seeds (typically 10) and reports mean and standard deviation to ensure statistical significance.
- Automated Tuning: It includes a protocol for hyperparameter tuning (using a log-grid search for learning rates) to ensure that every optimizer is performing at its best before comparison.
- Speed Measurement: It defines "speed" as the time (or number of iterations) required to reach a specific, predefined performance threshold, rather than just looking at the final value.
- Extensible Framework: Built on TensorFlow, it provides "runners" that handle the training loop and logging, allowing researchers to plug in a new optimizer with minimal code.
Diverse Test Datasets
The suite includes a wide variety of test problems categorized by task, ensuring optimizers are evaluated across different domains:
- Toy Problems: 2D functions (Beale, Rosenbrock) and ill-conditioned quadratics for sanity checks.
- Image Classification: MNIST, Fashion-MNIST, CIFAR-10, CIFAR-100, SVHN, and ImageNet.
- Generative Models: Variational Autoencoders (VAE) on MNIST and Fashion-MNIST.
- Natural Language Processing: Character-level language modeling (CharRNN) on the works of Leo Tolstoy.
Key Insights and Baseline Results
By providing fixed baseline results for popular optimizers, DeepOBS prevents researchers from under-tuning the competition to make their own method look better.
- No "Silver Bullet": The results confirm there is no single best optimizer for every problem. While Adam performs well on many tasks, Momentum-SGD significantly outperforms it on others. For example, on CIFAR-100, Momentum achieved 60.33% accuracy, notably higher than Adam’s 56.15%.
- The Generalization Disconnect: An optimizer’s rank on training loss often differs from its rank on test loss. This highlights why it is dangerous to evaluate optimizers solely on how fast they drive the training error to zero.
- Adam’s Real Advantage is Tunability: While Adam might not always reach the highest final accuracy, its optimal learning rate is much more consistent across different problems compared to SGD. This makes it significantly easier to tune in practice.
- Standardized Visualization: As seen in the generated learning curves, the package automatically produces standardized plots that make it easy to see the variance between runs (shaded regions), ensuring performance claims are statistically sound.
Limitations and Future Work
- Framework Dependency: At the time of publication, the package was primarily built for TensorFlow, though the community has since developed PyTorch versions.
- ImageNet Barriers: Due to licensing, ImageNet cannot be automatically downloaded, requiring manual setup by the user.
- Tuning Complexity: While log-grid search is a solid baseline, more advanced tuning methods (like Bayesian Optimization) could be integrated, though this would require re-running all baselines for a fair comparison.
- Hardware Sensitivity: Wall-clock time measurements are highly dependent on specific hardware and implementation efficiency, which remains a challenge for cross-lab reproducibility.
Summary updated