Abstract
This paper introduces a highly optimized GPU implementation of the Randomized Singular Value Decomposition (RSVD) algorithm. By reformulating the decomposition to rely on high-performance BLAS-3 operations, on-device random number generation, and parallel Jacobi solvers, the authors achieve significant performance gains over traditional methods. The implementation, now integrated into NVIDIA’s official CUDA library, demonstrates up to a 100x speedup in synthetic tests and reduces processing time for real-world subspace clustering tasks from over 20 hours to approximately 43 minutes.
Introduction
Singular Value Decomposition (SVD) is a cornerstone of modern data science, essential for tasks ranging from image compression to Principal Component Analysis (PCA) on massive datasets. However, as data dimensionality grows, traditional SVD algorithms struggle with high polynomial complexity. While randomized SVD (RSVD) variants offer faster approximations, many existing implementations fail to fully exploit the parallel processing power of modern Graphics Processing Units (GPUs), often becoming "bandwidth-bound" due to inefficient data movement.
Methods
The authors focus on the Randomized $k$-SVD algorithm, which uses random projections to "sketch" a large matrix into a smaller one that retains its essential features. The technical core of this work involves three key GPU optimizations:
- BLAS-3 Dominance: The algorithm is restructured to prioritize General Matrix-Matrix Multiplication (GEMM). This shifts the workload from bandwidth-limited operations to compute-bound ones, maximizing GPU core utilization.
- On-Device Randomness: Utilizing the
cuRANDlibrary, the implementation generates sketching matrices directly on the GPU, avoiding the significant bottleneck of transferring random numbers from the CPU. - Parallel Jacobi Solvers: For the final decomposition of the sketched matrix, the authors employ a Jacobi-based eigenvalue solver. This approach allows for massive parallelism by performing multiple rotations simultaneously, a significant advantage over sequential QR-based methods.
Key Results and Performance
The proposed implementation was evaluated against standard CPU and GPU solvers using both synthetic and real-world datasets.
Speed-up Analysis
In synthetic tests, the optimized RSVD achieved dramatic speedups. As shown in Figure 1, the performance advantage scales with the dimension of the covariance matrix. In scenarios with fast eigenvalue decay, the speedup reached as high as 100x compared to traditional CPU-based solvers.
Real-world Impact: Subspace Clustering
The practical impact of these optimizations is most evident in large-scale applications. In a subspace clustering (SuMC) task, the GPU-accelerated solver completed the computation in approximately 43 minutes, whereas a traditional CPU-based solver required over 20 hours. Importantly, this speedup was achieved without sacrificing accuracy, as evidenced by the perfect ARI scores.
Conclusion
By bridging the gap between randomized algorithms and high-performance GPU computing, this work provides a scalable solution for high-dimensional SVD. The integration of these methods into the cusolver library makes these performance gains accessible for industrial-scale data analysis. Future research will address multi-GPU scaling for datasets exceeding single-device memory and the automation of parameter selection for target ranks.
Summary updated