Fast and Accurate Least-Mean-Squares Solvers

Alaa Maalouf, Ibrahim Jubran, Dan Feldman

Abstract

Least-Mean-Squares (LMS) solvers, including Linear Regression and PCA, are essential tools in data science but often suffer from high computational costs and numerical instability on large-scale datasets. This paper introduces a novel meta-algorithm that accelerates these solvers by up to 100x. By fusing data sketching with coreset construction, the proposed "Fast-Caratheodory" algorithm reduces massive datasets into a small, representative subset in near-linear time. The method is theoretically lossless and maintains high numerical stability, outperforming standard solvers in both speed and reliability.

Introduction

As datasets scale into the millions of records, standard LMS solvers face a critical trade-off between speed and numerical stability. Rapid covariance matrix computation can lead to significant floating-point errors in streaming or GPU-based environments. While Caratheodory’s Theorem (1907) guarantees that a dataset can be represented by a tiny subset of $d+1$ points with the exact same mean, the classical algorithm to find this subset is computationally prohibitive at $O(n^2d^2)$. This work overcomes this "Caratheodory Bottleneck" by introducing a scalable, near-linear time algorithm for data reduction.

Methodology

The proposed approach introduces a "Fast-Caratheodory" recipe that integrates two distinct data summarization techniques: Sketches and Coresets. Sketches (e.g., cluster means) are fast to compute but synthetic, while coresets are stable, weighted subsets of the original data.

The Fast-Caratheodory Algorithm

The algorithm follows a recursive partitioning strategy:

  1. Partition: The $n$ data points are divided into $k$ small clusters.
  2. Sketch: The mean of each cluster is computed.
  3. Coreset Step: The classical Caratheodory algorithm is applied to these $k$ means. Since $k$ is small, this step is efficient.
  4. Recover and Recurse: The selected means are replaced by their original clusters, and the process repeats until a final subset of $d+1$ points is reached.
The Fast-Caratheodory process: partitioning data into clusters and using their means as proxies for selection.

For high-dimensional data, a Sparsified Caratheodory variant is employed. This version processes data coordinates in chunks, effectively maintaining a linear running time $O(nd)$ relative to the input size by "zeroing out" less important entries.

Experimental Evaluation

The "booster" algorithm was evaluated against standard scikit-learn solvers using synthetic data and four real-world datasets from the UCI repository, including the 2M-record Household Electric Power Consumption dataset and the 90-dimensional Million Song Dataset.

Key Results

  • Performance Gains: The algorithm achieved speedups of 10x to 100x on common LMS tasks.
  • Complexity: The time complexity for finding a Caratheodory set was reduced from $O(n^2d^2)$ to $O(nd + d^4 \log n)$, with the sparsified version reaching the theoretical gold standard of $O(nd)$.
  • Numerical Stability: Unlike sketch-only methods, the coreset-based approach remained stable in 32-bit floating-point tests on GPUs, where standard methods often failed due to error accumulation.
  • Efficiency in Hyperparameter Tuning: Because the coreset is computed once and is independent of model parameters, tuning phases (e.g., for Lasso) can be run on the tiny subset, leading to massive cumulative speedups.
Overview of the meta-algorithm pipeline, illustrating the transition from initial clustering to the final representative coreset.

Conclusion

By bridging the gap between sketches and coresets, this work provides a powerful "booster" for fundamental machine learning tools. The Fast-Caratheodory algorithm offers a lossless, stable, and highly efficient method for data reduction. Future research will explore extending this framework to more complex models, such as deep learning and decision trees.

Summary updated

BibTeX
@inproceedings{maalouf2019fast,
  author = {Alaa Maalouf and Ibrahim Jubran and Dan Feldman},
  title = {{Fast and Accurate Least-Mean-Squares Solvers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
}
Figure