Fast Generalized Matrix Regression with Applications in Machine Learning

Haishan Ye, Shusen Wang, Zhihua Zhang, Tong ZhangarXiv 2019

Abstract

Generalized Matrix Regression (GMR) is a fundamental problem in numerical linear algebra, underpinning tasks such as CUR decompositions, kernel approximations, and streaming SVDs. This paper introduces Fast GMR, a sketching-based algorithm that solves the problem $\min_{\mathbf{X}} \|\mathbf{A} - \mathbf{CXR}\|_F$ with a $(1+\epsilon)$ relative error. By utilizing optimized sketching matrices, the algorithm achieves a sketch size of $O(\epsilon^{-1/2})$, a significant improvement over the traditional $O(\epsilon^{-1})$ requirement typically found in standard least-squares sketching.

Introduction

In the era of big data, exact matrix operations like SVD or inversion are often computationally prohibitive. GMR allows for finding low-rank approximations by fixing dictionary matrices $\mathbf{C}$ and $\mathbf{R}$ and solving for the core matrix $\mathbf{X}$. While sketching—compressing a large matrix into a smaller one that preserves essential properties—is a common solution, existing theories often demand large sketch sizes to achieve high precision. Fast GMR addresses this by demonstrating that high accuracy can be achieved with significantly smaller sketches than previously thought possible.

The Fast GMR Algorithm

The core of the algorithm involves using two sketching matrices, $\mathbf{S}_C$ and $\mathbf{S}_R$, to reduce the dimensions of the problem: $$\min_{\mathbf{X}} \|\mathbf{S}_C(\mathbf{CXR} - \mathbf{A})\mathbf{S}_R^T\|_F$$

Because the sketched matrices are much smaller, the computational cost becomes independent of the original matrix dimensions ($m$ and $n$) once the sketch is computed. The authors evaluate several types of sketching matrices, including Gaussian projections, Subsampled Randomized Hadamard Transforms (SRHT), Count Sketches, and OSNAP, each offering different trade-offs in terms of speed and memory.

Comparison of sketching methods across different theoretical properties.

Theoretical Contributions: The $\epsilon^{-1/2}$ Breakthrough

The primary theoretical advancement of this work is the reduction of the sketch size dependency from $O(\epsilon^{-1})$ to $O(\epsilon^{-1/2})$. This improvement is closely tied to the Signal-to-Noise Ratio ($\rho$), a parameter that captures how much of the target matrix $\mathbf{A}$ is represented by the dictionaries $\mathbf{C}$ and $\mathbf{R}$. When $\rho$ is large (indicating high-quality dictionaries), the required sketch size can be remarkably small.

Sketch size orders and computational complexities ($T_{sketch}$) for various sketching matrices, highlighting the $1/\sqrt{\epsilon}$ dependency.

Experimental Validation

The authors validated Fast GMR on several real-world datasets from the LIBSVM repository, ranging from dense image data (mnist) to sparse text data (rcv1).

  • Accuracy: Empirical tests confirmed the $O(\epsilon^{-1/2})$ dependence, with the error ratio scaling linearly with $1/a^2$ (where $a$ is the sketch size factor), matching the theoretical predictions.
  • SPSD and Streaming: The algorithm was extended to handle Symmetric Positive Semi-Definite (SPSD) matrices and single-pass SVD. In SPSD tests on the madelon dataset, the method achieved significantly lower error ratios than the standard Nyström method. In streaming contexts, the proposed method proved more parameter-efficient and accurate than existing state-of-the-art single-pass SVD techniques.

Conclusion

Fast GMR provides a robust and efficient framework for large-scale matrix regression. By optimizing the sketch size to $O(\epsilon^{-1/2})$, it enables high-precision approximations for massive datasets that were previously too costly to process. While the process of sketching remains a primary bottleneck for extremely sparse matrices, the use of Count Sketches and OSNAP helps mitigate these costs. Future work may apply these GMR techniques to constrained regression or complex tensor decompositions.

Summary updated

BibTeX
@misc{ye2019fast,
  author = {Haishan Ye and Shusen Wang and Zhihua Zhang and Tong Zhang},
  title = {{Fast Generalized Matrix Regression with Applications in Machine Learning}},
  year = {2019},
  eprint = {1912.12008},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.12008},
}
Figure