Stochastic Gradient Descent (SGD) has long been the undisputed king of deep learning optimization. Despite its widespread use, SGD presents significant challenges: it is notoriously difficult to tune and inherently sequential, making it hard to parallelize. This paper challenges SGD's dominance, demonstrating that "off-the-shelf" batch optimization methods like Limited-memory BFGS (L-BFGS) and Conjugate Gradient (CG) can often be superior. These methods are easier to tune, converge faster for sparse models, and scale more effectively across GPUs and distributed clusters.
The Bottlenecks of SGD
In the landscape of deep learning, SGD suffers from two major pain points:
- The Hyperparameter Headache: Finding the right learning rate schedule and convergence criteria for SGD often requires an expensive, exhaustive grid search.
- Parallelization Limits: Because SGD updates weights after every small batch (or even a single example), it requires constant sequential updates. This makes it difficult to parallelize across multiple GPUs or a cluster without massive communication overhead.
To address these issues, the authors investigate whether sophisticated, second-order (or quasi-second-order) optimization methods can simplify the workflow and improve performance.
Rethinking Optimization: L-BFGS and CG
The researchers focused on two classic optimization algorithms, pairing them with a line search procedure:
- L-BFGS (Limited-memory BFGS): A quasi-Newton method that approximates the Hessian matrix (second-order derivative information) to find optimal descent directions.
- CG (Conjugate Gradient): An algorithm utilizing "conjugacy" to ensure new search directions do not undo the progress made in previous steps.
The "Minibatch" Twist: Traditionally, L-BFGS and CG are "batch" methods that process the entire dataset at once. To adapt them for deep learning, the authors introduced the use of large minibatches (e.g., 1,000 to 10,000 examples). The optimizer runs for a few iterations on a large minibatch before resampling. This hybrid approach marries the stability of batch methods with the computational efficiency of stochastic methods.
Key Insights and Advantages
Testing primarily on the MNIST dataset (scaling up to 10,000 hidden units), the authors uncovered several major advantages to this approach:
- Automatic Tuning: Incorporating a line search procedure essentially "auto-tunes" the step size. This removes the need for manual learning rate decay adjustments, offering a massive productivity boost for researchers.
- Stability for Sparse Models: Training sparse autoencoders is tricky with SGD because the noise in small batches makes estimating average neuron activations difficult. The larger minibatches used in L-BFGS/CG provide stable estimates, making sparsity enforcement highly effective.
- GPU Synergy: L-BFGS and CG perform more computation per batch than SGD. This better amortizes the overhead of moving data to the GPU, allowing these methods to extract significantly more benefit from GPU acceleration.
Performance and Scaling Results
The empirical results strongly support the adoption of these alternative optimizers for specific architectures.
Speed and Convergence: L-BFGS and CG converged significantly faster than carefully tuned SGD across various autoencoder tasks.
State-of-the-Art Accuracy: By applying L-BFGS to a convolutional neural network, the authors achieved a 0.69% test error on MNIST. At the time of publication, this was a state-of-the-art result for algorithms not relying on data distortions (like rotations or scaling) or unsupervised pretraining.
Hardware Efficiency and Distributed Scaling: Switching from CPU to GPU provided a 2x speedup for L-BFGS and CG, whereas SGD saw negligible gains. Furthermore, while dense networks struggle with communication overhead in distributed setups, locally connected or convolutional networks have fewer parameters. This allowed L-BFGS to achieve nearly linear scaling up to 8 machines in a Map-Reduce style distributed training environment.
Limitations and Future Work
While powerful, these methods are not a universal silver bullet:
- Incompatibility with RBMs: Restricted Boltzmann Machines (RBMs) remain a poor fit. Because RBM gradients are typically approximated (e.g., via Contrastive Divergence), the resulting gradient "noise" breaks the core assumptions that L-BFGS and CG rely on.
- Memory Overhead: L-BFGS must store several previous gradients to approximate the Hessian. For extremely large models, this memory requirement can become prohibitive.
- The "Flatness" Problem: If the loss landscape is extremely non-smooth, the second-order approximations utilized by L-BFGS may become less reliable, hindering convergence.
Ultimately, this research highlights that while SGD is ubiquitous, researchers should seriously consider L-BFGS and CG—especially when working with convolutional networks, sparse models, or distributed computing environments.
Summary updated