NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Faster $p$-Norm Regression Using Sparsity

Mehrdad Ghadiri, Richard Peng, Santosh VempalaarXiv 2021 · DOI

Abstract

For a matrix $A\in \mathbb{R}^{n\times d}$ with $n\geq d$, we consider the dual problems of $\min \|Ax-b\|_p^p, \, b\in \mathbb{R}^n$ and $\min_{A^\top x=b} \|x\|_p^p,\, b\in \mathbb{R}^d$. We improve the runtimes for solving these problems to high accuracy for every $p>1$ for sufficiently sparse matrices. We show that recent progress on fast sparse linear solvers can be leveraged to obtain faster than matrix-multiplication algorithms for any $p > 1$, i.e., in time $\tilde{O}(pn^\theta)$ for some $\theta < \omega$, the matrix multiplication constant. We give the first high-accuracy input sparsity $p$-norm regression algorithm for solving $\min \|Ax-b\|_p^p$ with $1 < p \leq 2$, via a new row sampling theorem for the smoothed $p$-norm function. This algorithm runs in time $\tilde{O}(\text{nnz}(A) + d^4)$ for any $1 < p \leq 2$.

Introduction

Regression is a cornerstone of statistics and machine learning. While the $L_2$ norm (least squares) is the most common formulation, other $p$-norms are often preferred for specific properties: $p=1$ provides robustness against outliers, while $p \approx \infty$ is used for minimax problems.

The primary challenge lies in computational cost. For a matrix $A$ with $n$ rows and $d$ columns, standard high-accuracy solvers typically take $\tilde{O}(n^\omega)$ time, where $\omega \approx 2.37$ is the matrix multiplication constant. This becomes a massive bottleneck for the "tall and sparse" matrices common in big data ($n \gg d$). This work bridges the gap by providing fast, high-accuracy solvers for any $p > 1$ that specifically exploit matrix sparsity, breaking the traditional matrix multiplication barrier.

Methodology

Our approach employs a "sketch-and-precondition" framework enhanced by several sophisticated technical innovations:

  1. Fast Sparse Solvers: We build upon recent breakthroughs in sparse linear algebra (specifically Peng & Vempala [PV21]) to solve linear systems faster than the time required for dense matrix multiplication.
  2. The $\gamma$-Function (Smoothed $p$-norm): To handle the non-differentiability or poor conditioning of $p$-norms, we use a "quadratically smoothed" version called the $\gamma$-function. This function behaves like a quadratic ($L_2$) near the origin and like a $p$-norm further out, making it more amenable to iterative optimization.
  3. Iterative Row Sampling: A major theoretical contribution is a new sampling theorem. We show that by sampling rows based on "leverage scores," we can create a much smaller "sketch" of the matrix that preserves the value of the $\gamma$-function for all possible vectors $x$ within a certain range. Unlike standard $L_2$ sampling, this requires handling the non-homogeneity of the $\gamma$-function using $\epsilon$-nets to prove concentration across scales.
  4. Inverse Maintenance: For general $p$, the optimization process requires updating matrix weights repeatedly. We develop a method to maintain a spectral approximation of the matrix inverse using the Sherman-Morrison-Woodbury identity, allowing for low-rank updates without recomputing the entire inverse from scratch.

Key Results

The primary theoretical contributions are summarized in the table below, detailing the runtimes achieved for both primal and dual problems across different ranges of $p$.

Summary of runtimes for primal and dual p-norm regression problems across different ranges of p.
  • Input Sparsity Time for $1 < p \le 2$: We provide the first high-accuracy algorithm that runs in $\tilde{O}(\text{nnz}(A) + d^4)$. For very tall matrices, the cost is dominated simply by reading the non-zero entries.
  • Beating Matrix Multiplication: For any $p > 1$, we show the problem can be solved in $\tilde{O}(n^\theta)$ where $\theta < \omega$. This proves $p$-norm regression can be faster than the current best-known time for general matrix multiplication.
  • Breaking the $p$-Dependent Exponent: Previous state-of-the-art runtimes often had exponents of $d$ that grew with $p$. Our algorithms achieve runtimes where the exponent of $d$ is fixed (e.g., $d^4$ or $d^\theta$), providing stability for large $p$.

Limitations and Future Work

While the $d^4$ term is a breakthrough in terms of $p$-independence, it remains high for high-dimensional feature spaces; reducing this to $d^3$ or $d^\omega$ remains an open challenge. Additionally, the algorithms rely on complex subroutines like block-Krylov space methods, which may be difficult to implement efficiently in practice compared to simpler sketching methods. Finally, while our results are most advantageous for the "tall" case ($n \gg d$), the sparse optimization tools developed here—such as the $\gamma$-function sampling—could eventually be extended to speed up general Linear Programming (LP) solvers.

Summary updated

BibTeX
@misc{ghadiri2021faster,
  author = {Mehrdad Ghadiri and Richard Peng and Santosh Vempala},
  title = {{Faster $p$-Norm Regression Using Sparsity}},
  year = {2021},
  eprint = {2109.11537},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2109.11537},
}
Figure