Abstract
Solving large-scale over-determined least squares problems is a cornerstone of modern data science. While iterative methods like LSQR are efficient, their convergence is heavily dependent on the condition number of the data matrix. This paper presents a GPU-optimized "sketch-and-precondition" framework using Sparse Sign Sketches. By introducing a novel rejection-sampling technique for parallel sketching matrix generation, the authors achieve significant performance gains on modern GPU architectures. The approach demonstrates that randomized preconditioning provides a robust, hardware-efficient solution that scales effectively across multi-GPU systems.
Introduction
In the era of "big data," linear regression—specifically solving the over-determined least squares problem $\min \|b - Ax\|$—is a fundamental task. However, as datasets grow to millions of rows ($m$) and thousands of columns ($n$), classical direct methods like QR factorization become computationally intractable, scaling at $O(mn^2)$.
Iterative methods, such as Krylov Subspace Methods (KSMs) like LSQR, offer a faster alternative because they only require matrix-vector products. However, if the data matrix $A$ is "poorly conditioned" (i.e., its features are highly correlated), these methods can require thousands of iterations to converge. Preconditioning transforms the problem into a better-conditioned one, but traditional preconditioning can be expensive. This paper explores "sketch-and-precondition" techniques, specifically optimized for modern Graphics Processing Units (GPUs).
Methodology: Sketch-and-Precondition
The authors utilize the sketch-and-precondition paradigm using Sparse Sign Sketches (SASO). The core idea is to use a small, randomized summary of the data to build an effective preconditioner.
As shown in the algorithm above, the process involves:
- Sketching: Multiplying the large matrix $A$ by a smaller random matrix $S$ to obtain a "sketch" $Y = SA$.
- Preconditioning: Performing a QR factorization on the small sketch $Y$ to find an upper triangular matrix $R$. The inverse, $M = R^{-1}$, serves as the preconditioner.
- Iteration: Using the preconditioned LSQR algorithm to solve the problem.
GPU-Optimized Rejection-Sampling
A key technical contribution is the method for generating the sparse sketching matrix $S$ on a GPU. Standard sequential methods like Fisher-Yates shuffles are poorly suited for parallel architectures. Instead, the authors employ a rejection-sampling approach:
- Row indices are sampled with replacement, which is "embarrassingly parallel."
- High-level GPU primitives (sorting and array-wise comparison) identify and replace duplicate indices.
- Since the probability of duplicates is mathematically low for typical problem sizes, this process is extremely fast on GPUs.
Experimental Evaluation
The framework was evaluated on a diverse set of benchmarks, including synthetic matrices (dense, sparse, and identity-based), the MNIST dataset, and large sparse matrices from the SuiteSparse Matrix Collection.
Key Results and Insights
- Performance Gains: On dense problems (e.g., $10^5 \times 600$), the sketch-and-precondition approach significantly outperformed both direct solvers and unpreconditioned LSQR.
- Convergence Speed: The randomized preconditioner ensures rapid convergence regardless of the original matrix's condition number.
- Sparsity and Dimension: While Gaussian sketches are theoretically optimal, the authors found that sparse sign sketches—with as few as 8 non-zeros per column—perform nearly identically in practice. They also proposed a heuristic based on the Lambert-W function to automatically determine the optimal sketching dimension $d$ to balance the cost of QR factorization against the quality of the preconditioner.
- Multi-GPU Scaling: The implementation scales linearly on systems with up to 8 NVIDIA A100 GPUs, despite some communication overhead.
Conclusion and Future Work
This work demonstrates that randomized sketching is not just a theoretical tool but a highly practical one for high-performance computing. By tailoring the sketching process to GPU architectures, the authors provide a scalable solution for massive linear regression.
Future research directions include addressing the $R^{-1}$ bottleneck in multi-GPU setups, where the inversion is currently performed on a single GPU. Additionally, further theoretical work is needed to explain the surprising effectiveness of "hyper-sparse" sketches in practical applications.
Summary updated