Efficient Distributed Hessian Free Algorithm for Large-scale Empirical Risk Minimization via Accumulating Sample Strategy

Majid Jahani, Xi He, Chenxin Ma, Aryan Mokhtari, Dheevatsa Mudigere, Alejandro Ribeiro, Martin Takác

Introduction

Training machine learning models on massive datasets often involves a trade-off between the computational efficiency of first-order methods and the rapid convergence of second-order methods. First-order methods like Stochastic Gradient Descent (SGD) are industry standards due to their low per-iteration cost, but they often require numerous data passes and tedious hyperparameter tuning. Second-order Newton-type methods offer much faster convergence but are traditionally considered too computationally expensive for large-scale problems due to the massive cost of calculating and inverting Hessian matrices.

In their AISTATS 2020 paper, Jahani et al. introduce DANCE (Distributed Accumulated Newton Conjugate gradiEnt), a method that bridges this gap. By gradually increasing the sample size and employing an approximate second-order approach, DANCE achieves high statistical accuracy with significantly fewer passes over the data and reduced communication overhead.

The Challenge of Large-Scale ERM

The core challenge in large-scale Empirical Risk Minimization (ERM) is the computational burden of processing millions of samples in high-dimensional spaces. The authors identify three primary bottlenecks:

  1. The Optimization-Statistics Gap: Finding the absolute mathematical minimum of a training loss is often unnecessary. One only needs to reach "statistical accuracy"—the point where further optimization no longer improves generalization performance.
  2. The Hessian Hurdle: Standard Newton methods require inverting a $d \times d$ Hessian matrix, a process with $O(d^3)$ complexity. When the number of features $d$ is in the millions, this becomes infeasible.
  3. Distributed Bottlenecks: In distributed environments, the time spent on communication between machines often outweighs the gains from parallel computation.

The DANCE Algorithm

DANCE addresses these challenges through three key technical pillars:

  • Accumulating Sample Strategy: The algorithm operates in multiple stages, starting with a small subset of data. Once it reaches the statistical accuracy for that subset, it geometrically increases the sample size (e.g., doubling it), using the previous solution as a "warm start" for the next stage.
  • Hessian-Free (PCG) Solver: Instead of explicit Hessian inversion, DANCE utilizes the Preconditioned Conjugate Gradient (PCG) method. This allows the algorithm to approximate the Newton direction using only Hessian-vector products, which are computationally efficient.
  • Distributed Implementation: The workload is partitioned across $K$ worker nodes. Each node computes gradients and Hessian-vector products locally. As the sample size grows, the local computation time increases while communication overhead remains relatively constant, leading to excellent scaling properties.

Experimental Evaluation

The authors evaluated DANCE on both convex (Logistic Regression) and non-convex (Deep Learning) problems using datasets such as rcv1, gisette, MNIST, and CIFAR-10.

Convex Performance

On logistic regression tasks, DANCE reaches optimal test accuracy in significantly fewer epochs and less wall-clock time than baselines like DiSCO or SGD. By solving a small-scale version of the problem first, DANCE quickly enters the neighborhood of the global solution.

Test accuracy vs. running time on the gisette dataset. DANCE reaches high accuracy significantly faster than SGD or DiSCO.

Deep Learning Performance

While the theoretical guarantees focus on convex problems, DANCE also excels in training deep neural networks. Experiments on CIFAR-10 using the VGG11 architecture show that DANCE is highly competitive against various SGD configurations, particularly in terms of convergence speed relative to running time.

Comprehensive performance metrics for VGG11 on CIFAR-10. DANCE (black line) shows efficient convergence in both loss reduction and accuracy improvement over time compared to multiple SGD baselines.

Conclusion

DANCE provides a robust framework for large-scale optimization by leveraging warm starts and statistical stopping criteria. The algorithm demonstrates "strong scaling," where adding more computing nodes consistently leads to faster wall-clock times. While current proofs are limited to convex functions, the empirical success in non-convex settings suggests significant potential for broader application in deep learning. Future research may focus on extending theoretical guarantees and exploring advanced preconditioning techniques.

Summary updated

BibTeX
@inproceedings{jahani2020efficient,
  author = {Majid Jahani and Xi He and Chenxin Ma and Aryan Mokhtari and Dheevatsa Mudigere and Alejandro Ribeiro and Martin Takác},
  title = {{Efficient Distributed Hessian Free Algorithm for Large-scale Empirical Risk Minimization via Accumulating Sample Strategy}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2020},
  url = {https://openreview.net/forum?id=4IahHkLzqHRM},
}
Figure