Non-negative Least Squares (NNLS) is a foundational optimization problem in machine learning, underpinning techniques from non-negative matrix factorization (NMF) to text mining and medical imaging. The standard objective is to minimize $\|Ax - b\|_2^2$ subject to $x \ge 0$. Historically, off-the-shelf solvers have treated the non-negativity constraint as an obstacle, requiring additional computational effort compared to unconstrained least squares.
However, a paper presented at NeurIPS 2022 flips this narrative. The authors observe that in many practical applications, the data matrix $A$ is also non-negative. By exploiting this "NNLS+" structure, they demonstrate that the non-negativity constraint actually makes the problem significantly easier to solve.
The Limitations of Standard Solvers
Traditional NNLS solvers typically provide additive error guarantees, meaning they find a solution within some absolute value $\epsilon$ of the optimum. Crucially, the convergence speed of these algorithms depends heavily on matrix constants—specifically, the spectral norm of $A$. If the input data is scaled up or poorly conditioned, traditional accelerated methods like FISTA slow down considerably.
Introducing SI-NNLS+
To overcome these limitations, the authors introduce SI-NNLS+ (Scale-Invariant NNLS+), an algorithm that leverages the inherent structure of non-negative data to achieve scale-invariant optimization. The methodology combines several sophisticated techniques:
- Primal-Dual Perspective: Instead of solely minimizing the objective function, SI-NNLS+ operates on a Lagrangian formulation. This allows the algorithm to bound the duality gap, providing a rigorous measure of convergence progress.
- Accelerated Coordinate Descent: Rather than taking full gradient steps, the algorithm uses randomized coordinate updates. This keeps the computational cost per iteration low, scaling proportionally with the number of non-zero entries in the data matrix, $O(\text{nnz}(A))$.
- Scale Invariance: Because both the data and the variables are non-negative, the authors prove that the optimal solution must lie within a specific bounded hyperrectangle. This structural insight allows them to design an algorithm whose complexity is completely independent of the Lipschitz constant or the spectral norm of $A$.
- Adaptive Restart: To achieve linear convergence (where the error decreases exponentially), the authors employ an adaptive restart strategy. The algorithm runs for a set number of iterations and then restarts using the current best estimate as the new initialization point.
Key Insights: Multiplicative Error Guarantees
One of the most significant theoretical contributions of SI-NNLS+ is its shift from additive to multiplicative error guarantees. While most solvers guarantee $f(x) - f(x^*) \le \epsilon$, SI-NNLS+ guarantees $f(x) - f(x^*) \le \epsilon |f(x^*)|$. This relative error guarantee holds regardless of the problem's scale, making the algorithm highly robust to poorly scaled data.
Theoretically, SI-NNLS+ reaches an $\epsilon$-multiplicative error in $O(\text{nnz}(A) \sqrt{n/\epsilon})$ operations. When coupled with the restart strategy, this complexity improves to $O(\text{nnz}(A) \sqrt{n/\mu} \log(1/\epsilon))$, where $\mu$ is a local error bound constant.
Experimental Evaluation
The authors evaluated SI-NNLS+ on large-scale, sparse datasets from the LibSVM library, including real-sim (72K samples, 20K features) and news20 (20K samples, 1.3M features). They also tested it on E2006train, a dataset containing some negative values, to assess robustness when the non-negativity assumption is slightly violated.
In head-to-head comparisons against state-of-the-art solvers like FISTA and APCG:
- Efficiency: On the
real-simdataset, SI-NNLS+ required significantly fewer data passes to achieve high precision. - Scalability: On the massive
news20dataset, the restarted version of SI-NNLS+ was among the fastest to converge to a stable solution. - Robustness: Even on the
E2006traindataset, SI-NNLS+ outperformed traditional methods like FISTA, which struggled to reduce the function value meaningfully within a four-hour time limit.
Limitations and Future Directions
While SI-NNLS+ offers profound theoretical and empirical advantages, the authors note a few limitations. First, the per-iteration overhead of coordinate descent can be high on extremely sparse data compared to full-gradient methods that leverage highly optimized BLAS libraries. Second, while a mini-batch version of the algorithm can improve wall-clock time on modern hardware, larger batches technically weaken the theoretical scale-invariance. Finally, extending this scale-invariant framework beyond quadratic problems with non-negative data to broader classes of constrained optimization remains an exciting open challenge for future research.
Summary updated