Primal Method for ERM with Flexible Mini-batching Schemes and Non-convex Losses

Dominik Csiba, Peter RichtárikarXiv 2015

TL;DR

This paper introduces a new primal-dual free algorithm for empirical risk minimization (ERM) that handles arbitrary mini-batching schemes, extending previous work to non-convex loss functions under certain conditions. This approach offers improved data utilization and theoretical guarantees, matching state-of-the-art methods for convex losses and providing a pathway to understanding non-convex ERM.

What Problem Does This Paper Address?

The paper tackles the challenge of efficiently solving Empirical Risk Minimization (ERM) problems, a cornerstone of machine learning for training predictive models. Specifically, it focuses on the L2-regularized ERM problem:

$$ \min_{w \in \mathbb{R}^d} P(w) := \frac{1}{n} \sum_{i=1}^n \Phi_i(A_i w) + \frac{\lambda}{2} \|w\|^2 $$

where $A_i$ are data matrices, $\Phi_i$ are loss functions, and $\lambda$ is a regularization parameter. While many algorithms exist for ERM, this paper aims to improve upon them by:

  1. Flexible Mini-batching: Allowing for arbitrary mini-batching schemes (i.e., how data is sampled in each iteration), which can be beneficial for distributed computing, importance sampling, and hardware optimization (like NUMA architectures).
  2. Non-convex Losses: Extending the analysis and guarantees to non-convex loss functions, a significant challenge in machine learning, provided the average loss is convex.
  3. Dual-Free Analysis: Building upon recent techniques that enable analysis without relying on dual variables, simplifying the theoretical framework and broadening applicability.

Methods

The core contribution is a new algorithm, dubbed dfSDCA (Dual-Free SDCA), which is an extension of existing SDCA (Stochastic Dual Coordinate Ascent) methods. The key innovations are:

  • Arbitrary Mini-batching: The algorithm explicitly supports sampling mini-batches of data points according to any probability distribution $\hat{S}$. This is a departure from methods that require specific sampling strategies.
  • Dual-Free Analysis: The theoretical analysis of the algorithm is performed without recourse to dual variables. This is achieved by tracking a potential function that combines the primal objective error and the error in auxiliary variables.
  • Primal Update: The algorithm maintains primal variables $w$ and auxiliary variables $a_i$. The update for $w$ is designed to maintain a specific relationship: $w^{(t)} = \frac{1}{n\lambda} \sum_{i=1}^n A_i a_i^{(t)}$. This relationship is motivated by the optimality condition of the ERM problem.
  • Non-convex Extension: The dual-free analysis naturally extends to non-convex loss functions, as long as the average loss function $\frac{1}{n}\sum \Phi_i$ is convex. This is a significant theoretical advantage.

The algorithm is presented as Algorithm 1 in the paper. It involves sampling a mini-batch $S_t$, updating the auxiliary variables $a_i$ for $i \in S_t$, and then updating the primal variable $w$.

Datasets

The paper uses standard benchmark datasets for logistic regression experiments:

  • w8a
  • dorothea
  • protein
  • rcv1
  • cov1

These datasets are used to evaluate the performance of the proposed algorithm against existing state-of-the-art methods. No new datasets are introduced.

Key Insights and Ideas

  • Flexibility in Sampling is Powerful: The ability to use any mini-batching scheme, not just uniform random sampling, opens up possibilities for optimizing performance on real-world hardware and for developing more efficient sampling strategies.
  • Dual-Free Analysis Simplifies and Generalizes: The dual-free approach not only simplifies the theoretical analysis but also crucially allows for convergence guarantees in the presence of non-convex loss functions, a major hurdle for many optimization algorithms.
  • "Chunking" for Parallelism: The paper demonstrates a practical application of flexible mini-batching called "chunking." This method partitions data into "chunks" to balance the workload across parallel processors, mitigating synchronization bottlenecks caused by varying data sparsity.
  • Bridging Convex and Non-convex: The work provides a theoretical bridge between convex and non-convex ERM by showing that under specific conditions (convex average loss), the proposed method can handle non-convex individual losses.

Key Results

  • Convex Loss Functions: For convex loss functions, the algorithm achieves convergence rates that match those of the QUARTZ algorithm, which is a primal-dual method. This indicates competitive theoretical performance.
  • Non-convex Loss Functions: For non-convex loss functions (with a convex average loss), the paper provides theoretical guarantees on the decay of a potential function, showing exponential convergence to zero. This is a significant theoretical advancement.
  • Experimental Validation: Experiments demonstrate the utility of arbitrary mini-batching schemes, particularly the "chunking" strategy, which shows improved efficiency in parallel processing by reducing waiting times between cores. Figure 1 illustrates how "chunking" reduces the difference in workload across cores. Figure 3 compares the new sampling strategy with standard sampling, showing competitive or improved convergence.

Limitations and Future Work

  • Non-convexity Condition: The convergence guarantees for non-convex loss functions are contingent on the average loss being convex. The paper acknowledges this as a step towards understanding non-convex models, implying that fully non-convex ERM remains an open challenge.
  • Practical Implementation of Sampling: While the paper introduces the concept of "chunking" for parallelization, the optimal design and implementation of arbitrary sampling schemes for various hardware architectures and problem types could be a direction for future research.
  • Comparison with Other Non-convex Methods: The paper focuses on extending dual-free analysis to non-convex losses. Further comparisons with other state-of-the-art methods specifically designed for non-convex optimization would be valuable.
  • Hyperparameter Tuning: The theoretical analysis often relies on carefully chosen step sizes ($\theta$) and sampling probabilities ($p_i$). Investigating robust and adaptive methods for setting these parameters in practice would be beneficial.

Summary updated

Abstract

In this work we develop a new algorithm for regularized empirical risk minimization. Our method extends recent techniques of Shalev-Shwartz [02/2015], which enable a dual-free analysis of SDCA, to arbitrary mini-batching schemes. Moreover, our method is able to better utilize the information in the data defining the ERM problem. For convex loss functions, our complexity results match those of QUARTZ, which is a primal-dual method also allowing for arbitrary mini-batching schemes. The advantage of a dual-free analysis comes from the fact that it guarantees convergence even for non-convex loss functions, as long as the average loss is convex. We illustrate through experiments the utility of being able to design arbitrary mini-batching schemes.
BibTeX
@misc{csiba2015primal,
  author = {Dominik Csiba and Peter Richtárik},
  title = {{Primal Method for ERM with Flexible Mini-batching Schemes and Non-convex Losses}},
  year = {2015},
  eprint = {1506.02227},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1506.02227},
}
Figure