[Paper Review] RSVDPACK: An implementation of randomized algorithms for computing the singular value, interpolative, and CUR decompositions of matrices on multi-core and GPU architectures
RSVDPACK is an open-source C library implementing randomized algorithms for efficient low-rank matrix decompositions—SVD, interpolative decomposition (ID), and CUR—on multi-core CPUs and GPUs. It accelerates computation by casting most operations into highly optimized matrix-matrix multiplications, achieving significant speedups over traditional methods, especially on GPUs, while supporting both fixed-rank and tolerance-based factorizations.
RSVDPACK is a library of functions for computing low rank approximations of matrices. The library includes functions for computing standard (partial) factorizations such as the Singular Value Decomposition (SVD), and also so called "structure preserving" factorizations such as the Interpolative Decomposition (ID) and the CUR decomposition. The ID and CUR factorizations pick subsets of the rows/columns of a matrix to use as bases for its row/column space. Such factorizations preserve properties of the matrix such as sparsity or non-negativity, are helpful in data interpretation, and require in certain contexts less memory than a partial SVD. The package implements highly efficient computational algorithms based on randomized sampling, as described and analyzed in [N. Halko, P.G. Martinsson, J. Tropp, "Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions," SIAM Review, 53(2), 2011], and subsequent papers. This manuscript presents some modifications to the basic algorithms that improve performance and ease of use. The library is written in C and supports both multi-core CPU and GPU architectures.
Motivation & Objective
- To develop a high-performance, scalable library for low-rank matrix factorizations that outperforms traditional SVD and QR methods in computational speed.
- To support both fixed-rank and tolerance-based factorizations, enabling adaptive accuracy control in data analysis and scientific computing.
- To leverage randomized sampling to reduce computational cost and communication overhead, especially for large matrices.
- To provide efficient implementations on multi-core CPUs and GPUs using optimized BLAS and GPU-accelerated libraries.
- To preserve structural properties like sparsity and non-negativity through structure-preserving factorizations such as ID and CUR.
Proposed method
- The core algorithm uses randomized sampling to form a sketch matrix via matrix multiplication with a Gaussian random matrix, reducing the problem size to a small, manageable scale.
- It computes a QR factorization of the sketch matrix to obtain an orthonormal basis, followed by SVD on the small matrix to extract dominant modes.
- The final low-rank approximation is reconstructed using the orthonormal basis and the SVD components, ensuring high accuracy with minimal error.
- Block-randomized variants are used to improve accuracy for matrices with slowly decaying singular values or noisy data.
- The implementation relies heavily on optimized matrix-matrix multiplication kernels, which are highly parallelizable on CPUs and GPUs.
- The library provides a MATLAB MEX interface for easy integration into existing scientific workflows, with support for both dense and future sparse matrix operations.
Experimental results
Research questions
- RQ1How can randomized algorithms be efficiently implemented on multi-core and GPU architectures to accelerate low-rank matrix factorizations?
- RQ2What performance gains can be achieved by replacing traditional SVD and QR with randomized matrix-matrix multiplication-based approaches?
- RQ3Can structure-preserving factorizations like ID and CUR maintain interpretability and sparsity while achieving competitive accuracy and speed?
- RQ4How does the inclusion of a tolerance-based factorization improve usability in real-world data analysis compared to fixed-rank methods?
- RQ5What is the impact of block-randomized sampling on accuracy for matrices with slowly decaying singular values?
Key findings
- On a 6000×12000 dense matrix, RSVDPACK's GPU-accelerated randomized SVD achieved significantly lower runtime than full SVD and QR, due to highly optimized matrix-matrix multiplication on GPU.
- The block-randomized QB-based method, while slower than standard randomized SVD, enables tolerance-based factorization, allowing users to specify an error bound instead of a fixed rank.
- The MATLAB MEX interface for RSVDPACK showed a substantial speedup over the PROPACK lansvd function, especially for larger ranks (k=100, 300, 500).
- Matrix-matrix multiplication on GPU was up to 10x faster than on CPU, and this performance difference directly translated into faster factorization times for all randomized algorithms.
- The library achieved high scalability and reduced communication cost by casting most computation into BLAS-optimized matrix-matrix operations, which are well-parallelized on modern hardware.
- The implementation supports both dense and future sparse matrix operations, with ongoing development for distributed-memory systems and enhanced GPU performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.