Mind the duality gap: safer rules for the Lasso

Olivier Fercoq, Alexandre Gramfort, Joseph Salmon

The Lasso (Least Absolute Shrinkage and Selection Operator) is a cornerstone of modern statistics, widely used to find sparse solutions in high-dimensional data where the number of features ($p$) far exceeds the number of observations ($n$). However, solving Lasso problems for massive datasets or across a "path" of regularization parameters ($\lambda$) remains computationally expensive.

To accelerate Lasso solvers, researchers have historically used "safe screening rules." These rules identify variables guaranteed to have a coefficient of zero in the optimal solution, allowing them to be safely removed from the optimization process. Unfortunately, previous screening rules suffered from significant drawbacks: they were often static (becoming useless for small $\lambda$), unsafe (relying on exact solutions to previous problems, which is impossible in practice), or non-converging (their "safe regions" did not shrink as the solver approached the truth).

This paper introduces GAP SAFE rules, a powerful new class of screening methods that discard irrelevant variables more aggressively and safely than previous approaches. By leveraging the duality gap, GAP SAFE rules provide up to 11x speedups and are the first to guarantee exact support recovery in finite time while remaining robust to approximate solutions.

The GAP SAFE Approach

The core innovation of GAP SAFE rules is the use of the duality gap—the difference between the primal and dual objective functions—to define geometric "safe regions" in the dual space. The duality gap provides a natural, theoretically sound "budget" for the uncertainty of the dual solution.

Unlike prior work, the diameter of a GAP SAFE region is tied directly to this gap. As a solver (such as Coordinate Descent) converges, the duality gap approaches zero, causing the safe region to shrink to a single point: the optimal dual solution. Because these rules account for the current duality gap, they remain "safe" even when initialized with an approximate solution from a previous $\lambda$ in a path. This dynamic and sequential nature makes them highly practical for real-world software.

Sphere and Dome Tests

The authors provide explicit formulas for constructing these safe regions, primarily focusing on two geometric shapes: a "Sphere" test and a "Dome" test.

Geometric definition of the Dome safe region.

The Sphere test is computationally simple, defining a safe ball in the dual space. The Dome test is a more refined approach, constructing the safe region as the intersection of a ball and a half-space. If a feature's correlation with the current residual is low enough relative to the radius of this safe region, it is guaranteed to be zero and is safely discarded.

Comparison of various safe regions, including the Sphere and Dome tests.

Key Results and Insights

The authors evaluated GAP SAFE rules across three distinct datasets to demonstrate their versatility: Leukemia (dense, small-scale), 20 Newsgroups (medium-scale, sparse), and RCV1 (large-scale, sparse).

  • Massive Speedups: On the Leukemia dataset, the GAP SAFE sphere rule was 11x faster than competing methods when high accuracy (a $10^{-8}$ duality gap) was required.
  • Efficiency at Small $\lambda$: Traditional safe rules often fail to screen any variables when the regularization parameter $\lambda$ is small. In contrast, GAP SAFE rules continue to screen variables effectively in these difficult regimes as iterations proceed.
  • Finite-Time Support Discovery: The authors prove a significant theoretical result: any "converging" safe rule will identify the exact set of non-zero variables (the active set or support) in a finite number of iterations.
  • Sphere vs. Dome: Interestingly, empirical results showed that the more complex Dome test provided only marginal improvements over the simpler Sphere test. This suggests that the Sphere test offers the best trade-off between computational overhead and screening power for practical implementation.

Limitations and Future Directions

While highly effective, screening is not entirely free; it requires computing correlations. If the screening is ineffective (e.g., if $\lambda$ is very small and the gap is still large), this computational overhead can technically slow down the initial iterations. The authors mitigate this by applying the screening periodically (e.g., every 10 passes) rather than at every step.

Furthermore, while the performance benchmarks primarily focused on Coordinate Descent, the rules are theoretically compatible with any solver. The authors note that these GAP SAFE principles can be extended to other models, such as the Elastic Net, and suggest future applications for Generalized Linear Models (GLMs) and Group-Lasso.

Summary updated

BibTeX
@inproceedings{fercoq2015mind,
  author = {Olivier Fercoq and Alexandre Gramfort and Joseph Salmon},
  title = {{Mind the duality gap: safer rules for the Lasso}},
  booktitle = {International Conference on Machine Learning},
  year = {2015},
  url = {https://openreview.net/forum?id=B1Zt9iZd-H},
}
Figure