Abstract
Second-order methods hold significant promise for enhancing the convergence of deep neural network training; however, their large memory and computational demands have limited their practicality. Thus there is a need for scalable second-order methods that can efficiently train large models. In this paper, we introduce the Sparsified Online Newton (SONew) method, a memory-efficient second-order algorithm that yields a sparsified yet effective preconditioner. The algorithm emerges from a novel use of the LogDet matrix divergence measure; we combine it with sparsity constraints to minimize regret in the online convex optimization framework. Empirically, we test our method on large scale benchmarks of up to 1B parameters. We achieve up to 30% faster convergence, 3.4% relative improvement in validation performance, and 80% relative improvement in training loss, in comparison to memory efficient optimizers including first order methods. Powering the method is a surprising fact -- imposing structured sparsity patterns, like tridiagonal and banded structure, requires little to no overhead, making it as efficient and parallelizable as first-order methods. In wall-clock time, tridiagonal SONew is only about 3% slower per step than first-order methods but gives overall gains due to much faster convergence.
Introduction
Training deep neural networks (DNNs) involves a fundamental trade-off between computational efficiency and convergence speed. First-order methods such as Adam and SGD are the industry standard because their memory and time requirements scale linearly ($O(n)$) with the number of parameters. However, by relying solely on gradient direction, they often struggle with slow convergence on complex loss landscapes.
Conversely, second-order methods like Newton’s method utilize curvature information to take more informed steps, leading to faster convergence. Historically, these methods have been impractical for large models because they require storing and inverting massive Hessian matrices, scaling quadratically ($O(n^2)$) or cubically ($O(n^3)$). Even modern "efficient" second-order methods like Shampoo require significant engineering effort and high memory overhead to scale. The Sparsified Online Newton (SONew) method bridges this gap, offering the intelligence of second-order optimization with the scalability of first-order methods.
The SONew Algorithm
SONew is derived through the framework of Online Convex Optimization (OCO). The method relies on two core innovations:
- LogDet Regularization: The algorithm uses the LogDet matrix divergence to update the preconditioner. This ensures the preconditioner remains close to its previous state while minimizing regret over time.
- Structured Sparsification: To maintain linear scaling, SONew imposes fixed sparsity patterns—specifically tridiagonal or banded structures—on the preconditioner.
The authors demonstrate that for these patterns, the LogDet optimization problem has an explicit, $O(n)$ solution that is highly parallelizable. Unlike methods requiring complex Kronecker product factorizations, SONew's update is computationally lightweight and adds minimal overhead per step.
Complexity and Scalability
A key advantage of SONew is its theoretical and practical efficiency. By utilizing structured sparsity, the time complexity remains $O(d_1 d_2)$, identical to first-order methods like Adam. In contrast, methods like Shampoo exhibit cubic complexity in the layer dimensions, making them difficult to scale to massive models.
In terms of memory, tridiagonal SONew requires only twice the parameters for its statistics, significantly less than the overhead seen in Shampoo. This makes SONew particularly viable for memory-constrained hardware and large-scale training.
Empirical Evaluation
The researchers evaluated SONew across several architectures and scales:
- Vision Transformer (ViT): Reached target validation performance in 10% fewer steps than Adam on ImageNet.
- Graph Neural Network (GNN): Achieved 30% fewer steps and a 3.4% relative improvement in validation performance compared to Adam on the OGBG-molpcba dataset.
- Large Language Model (LLM): On a 1-billion parameter model trained on the C4 dataset, SONew reached the same performance as AdaFactor using 26% fewer steps, resulting in a 1.35x total training speedup.
The method also demonstrates numerical stability. If the preconditioner becomes unstable, the algorithm can "remove edges" from the sparsity graph (effectively zeroing out certain correlations) to restore stability without significant performance loss.
Conclusion and Future Work
SONew provides a scalable path for second-order optimization in deep learning. While highly effective, its performance can be sensitive to parameter ordering, as tridiagonal patterns only capture correlations between adjacent parameters in the flattened vector. Future work may explore optimal parameter ordering or alternative graph-based sparsity patterns. Additionally, integrating a native second-order step-size determination method could further enhance the algorithm's autonomy from first-order "grafting" techniques.
Summary updated