Efficient Primal-Dual Algorithms for Large-Scale Multiclass Classification

Dmitry Babichev, Dmitrii Ostrovskii, Francis R. BacharXiv 2019

Abstract

In the era of "extreme classification," where the number of classes, features, and samples can each reach into the millions, traditional optimization methods face prohibitive computational costs. This paper introduces a novel primal-dual framework for training $\ell_1$-regularized multiclass linear classifiers. By reformulating the problem as a saddle-point task and employing Stochastic Mirror Descent (SMD) with non-uniform sampling and "lazy" updates, the authors achieve a sublinear iteration complexity of $O(d + n + k)$. This approach drastically reduces the per-iteration cost compared to standard methods, making massive-scale multiclass classification computationally feasible.

Introduction

Modern machine learning applications frequently encounter datasets where the number of features ($d$), samples ($n$), and classes ($k$) are all extremely large. Standard optimization methods for multiclass linear classification typically scale linearly with the product of these dimensions—for instance, $O(dnk)$ for deterministic methods or $O(dk)$ for stochastic ones. When $k$ represents millions of categories, these costs become a bottleneck for model training.

This research addresses $\ell_1$-regularized problems, which are preferred for their ability to produce sparse, interpretable models. However, the non-smooth nature of the $\ell_1$ objective makes it notoriously difficult to optimize efficiently. The goal of this work is to develop an algorithm that reduces not just the total number of iterations required for convergence, but the fundamental cost of each individual iteration.

Methodology

The proposed approach rests on three technical pillars designed to exploit the underlying geometry of the multiclass problem.

1. Saddle-Point Reformulation

The authors utilize the Fenchel-Young loss framework to transform the original minimization problem into an equivalent convex-concave saddle-point problem. This transformation results in a "quasi-bilinear" objective, which is significantly more amenable to first-order optimization methods than the original non-smooth formulation.

2. Stochastic Mirror Descent with Custom Geometry

Rather than relying on standard Euclidean distances, the algorithm employs Stochastic Mirror Descent (SMD) using Bregman divergences based on entropy-type potentials. This choice is strategically aligned with the geometry of the probability simplex (for the $k$ classes) and the $\ell_1$-ball (for the $d$ features). This geometric alignment enables multiplicative updates, similar to the Exponentiated Gradient algorithm, which are highly effective for sparse recovery.

3. Randomized Sampling and Lazy Updates

To achieve sublinear complexity, the authors implement two levels of stochasticity:

  • Partial Sampling: By sampling one row of the feature matrix and one training example per iteration, the cost is reduced to $O(dn + dk + nk)$.
  • Full Sampling: Specifically for the multiclass hinge loss, the authors sample both rows and columns. When paired with a "lazy update" technique—where only the specific elements of the weight matrix touched by the sample are updated while global scaling factors are tracked separately—the iteration cost drops to $O(d + n + k)$.

Experimental Evaluation

The authors rigorously evaluated the scaling laws of the proposed algorithms using synthetic datasets to isolate the effects of $n, d,$ and $k$.

  • Data Generation: Features ($X$) were generated using i.i.d. standard Gaussian entries, with labels derived from a sparse ground-truth weight matrix ($U^o$) plus noise.
  • Scaling Tests: Experiments varied $n, d,$ and $k$ up to 6,400 each. The results confirmed that the runtime grows linearly with the dimension factor rather than their products, validating the theoretical sublinear complexity.
  • Performance: In synthetic benchmarks, the "Full-SMD" algorithm significantly outperformed the Stochastic Subgradient Method (SSM) in the time required to reach a target primal accuracy or duality gap.

Key Insights

  • Geometry as an Efficiency Driver: The choice of $\ell_1$ regularization is not merely for sparsity; its specific geometry allows for entropy-based potentials. These potentials are the prerequisite for the multiplicative updates that make sublinear sampling schemes theoretically sound.
  • The Importance of Non-Uniform Sampling: To maintain low variance in stochastic gradients, the authors derive optimal sampling distributions based on the norms of the data rows/columns and current weights, rather than sampling uniformly.
  • Efficiency through Laziness: The "lazy update" trick is the bridge between theoretical complexity and practical wall-clock speedup. By avoiding dense matrix operations and updating only necessary components, the algorithm bypasses the traditional $O(dk)$ bottleneck.

Conclusion and Future Work

This paper demonstrates that $O(d+n+k)$ iteration complexity is achievable for large-scale multiclass problems. While the results are compelling, some limitations remain. The theoretical guarantees are strongest for "light-tailed" data (like Gaussian distributions), and the fully sublinear implementation is currently optimized for the multiclass hinge loss. Future research may focus on extending the "lazy update" mechanism to other loss functions, such as logistic or softmax loss, and refining hyperparameter tuning for Mirror Descent variants.

Summary updated

BibTeX
@misc{babichev2019efficient,
  author = {Dmitry Babichev and Dmitrii Ostrovskii and Francis R. Bach},
  title = {{Efficient Primal-Dual Algorithms for Large-Scale Multiclass Classification}},
  year = {2019},
  eprint = {1902.03755},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.03755},
}
Figure