math.NASep 26, 2026
SaveFast Differentiable SVD on GPU via Polar Decomposition
Organizations: HSE University
Abstract
We present a fully GPU-oriented SVD pipeline based on polar decomposition, motivated by iterative methods that rely solely on matrix multiplications, such as the Newton-Schulz iteration. We show that this approach enables up to a speedup compared to standard implementations. Furthermore, we derive a numerically stable backward pass for the polar decomposition and leverage it to obtain a fully differentiable SVD. Our methods are released as open-source implementations in both PyTorch and JAX: https://github.com/fallnlove/cans_svd.
Figures & tables
Figure 1: Comparison of different parts of the SVD computation by their share of the total runtime for a random matrix with on an NVIDIA B200 GPU. We report the shares of polar-factor computation (in blue), symmetric EVD (EIGH) (in pink), and other routines (in green) for different polar-decomposition-based SVD algorithms.
Figure 2: Comparison of SVD algorithms on random matrices. The total wall-clock time is averaged over trials and reported with the standard deviation. Note: The algorithms have different accuracy levels, see Tables 1 and 2 for a more comprehensive analysis. The experiments are conducted on an NVIDIA B200 GPU.
| Method | |||||
|---|---|---|---|---|---|
| CANS SVD (fp32) | 4.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 4.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 4.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-6} | 4.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 5.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-6} |
| CANS SVD (tf32) | 9.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} | 8.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} | 8.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} | 8.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} | 1.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-3} |
| QDWH SVD | 3.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 5.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 6.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| CUDA POLAR | 4.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 5.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 7.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{1} | 7.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{1} | 7.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{1} |
| CUDA QR | 1.8_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-5} | 2.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-5} | 1.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-5} | 1.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-5} | 1.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-5} |
| CUDA JACOBI | 9.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.4}\cdot 10^{-4} | 8.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.4}\cdot 10^{-4} | 6.8_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.8}\cdot 10^{-4} | 6.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.6}\cdot 10^{-4} | 5.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.7}\cdot 10^{-4} |
Table 1: Comparison of the accuracy of SVD algorithms on a random square matrix for different condition numbers. The reported metric is the relative reconstruction error , with standard deviation. Results are averaged over sampled matrices. Red indicates cases with significantly large errors.
| Method | |||||
|---|---|---|---|---|---|
| CANS SVD (fp32) | 3.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.9}\cdot 10^{-6} | 3.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 2.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| CANS SVD (tf32) | 6.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} | 6.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} | 2.8_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 6.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} | 6.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} |
| QDWH SVD | 3.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| CUDA POLAR | 4.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 4.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 8.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 8.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 7.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| CUDA QR | 9.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-6} | 1.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-5} | 1.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-5} | 1.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-5} | 9.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.4}\cdot 10^{-6} |
| CUDA JACOBI | 2.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-3} | 2.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-3} | 2.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-3} | 2.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-3} | 2.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-3} |
Table 2: Comparison of the accuracy of SVD algorithms on a random square matrix for different condition numbers. The reported metric is the relative orthogonality error , with standard deviation. Results are averaged over sampled matrices.
| Method \ Spec.gap | |||||||
|---|---|---|---|---|---|---|---|
| Analytical Townsend (2016) | 66.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.6} | 67.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm 1.0} | 100.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm 41.0} | 690.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm 580.0} | 5500.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm 4600.0} | NaN | NaN |
| Taylor Wang et al. (2021) | 49.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.3} | 49.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.3} | 49.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.3} | 49.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.3} | 49.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.3} | 49.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.3} | 49.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.3} |
| Tikhonov (ours) | 66.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.6} | 67.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm 1.0} | 100.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm 41.0} | 690.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm 580.0} | 5500.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm 4600.0} | 66.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.6} | 66.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.6} |
Table 3: Comparison of the gradient norm of SVD backward pass algorithms on a random square matrix for different spectral gaps. The reported metric is the Frobenius norm of the gradient . Results are averaged over sampled matrices.
| Ratio | Method | PPL | Val Loss | sec. / iter. |
|---|---|---|---|---|
| 100% | LLaMA-2-7B | {\color[rgb]{0.5,0.5,0.5}{5.53}} | {\color[rgb]{0.5,0.5,0.5}{6.25}} | {\color[rgb]{0.5,0.5,0.5}{-}} |
| Dobi-SVD | 6.95 | 7.17 | 75.09 | |
| 80% | Our ( ) | 6.90 | 7.19 | 55.62 |
| Our ( ) | 6.87 | 7.11 | 55.62 | |
| Our ( ) | 6.93 | 7.17 | 55.62 | |
| Dobi-SVD | 7.47 | 7.83 | 75.09 |
Table 4: Metric values of various compression methods. Experiments were conducted using the LLaMA-2-7B model on the WikiText-2 dataset.
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 3: Comparison of computation time for matrix multiplications in tf32 precision (left plot) and QR decompositions (right plot) across different GPUs on random square matrices of various sizes. The total wall-clock time is averaged over trials.
Figure 4: Comparison illustrating how many matrix multiplications can be executed within the runtime of a single QR decomposition for square matrices of different sizes across different GPUs. In the left plot, matrix multiplications are performed in tf32 precision. In the right plot, matrix multiplications are performed in fp32 precision. The total wall-clock time is averaged over trials.
Figure 5: Comparison of SVD algorithms on a random low rank matrix with . Total wall-clock time was averaged over trials and reported with the standard deviation. Note: we do not report CUDA POLAR for this setting, since it has substantially large reconstruction error. And algorithms have different accuracy, see Tables 5 and 6 for a more comprehensive analysis. The experiments are conducted on an NVIDIA B200 GPU.
| Method | |||||
|---|---|---|---|---|---|
| CANS SVD (fp32) | 1.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 2.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-6} | 4.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 8.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.4}\cdot 10^{-6} | 4.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| CANS SVD (tf32) | 5.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-4} | 7.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-4} | 1.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-3} | 9.8_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} | 9.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} |
| QDWH SVD | 1.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-6} | 1.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 2.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| CUDA POLAR | 8.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm 22.7}\cdot 10^{0} | 7.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{1} | 7.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{1} | 7.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{1} | 4.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| CUDA QR | 7.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.5}\cdot 10^{-7} | 1.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-6} | 6.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.4}\cdot 10^{-6} | 1.8_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-5} | 1.8_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-5} |
| CUDA JACOBI | 3.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.6}\cdot 10^{-5} | 9.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-5} | 5.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.4}\cdot 10^{-4} | 1.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-4} | 9.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.4}\cdot 10^{-4} |
Table 5: Comparison of SVD algorithms accuracy on a random square matrix for different ranks. Reported relative reconstruction error , with standard deviation. Metrics were averaged over sampled matrices. Red indicates cases with significantly large error.
| Method | |||||
|---|---|---|---|---|---|
| CANS SVD (fp32) | 1.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 1.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 1.8_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm 1.2}\cdot 10^{-6} | 3.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| CANS SVD (tf32) | 1.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-6} | 1.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 2.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 6.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} |
| QDWH SVD | 1.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 1.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 1.8_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 3.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| CUDA POLAR | 7.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm 1.4}\cdot 10^{-6} | 3.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 6.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 1.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-5} | 4.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| CUDA QR | 7.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-6} | 7.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-6} | 6.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-6} | 9.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.3}\cdot 10^{-6} | 9.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-6} |
| CUDA JACOBI | 2.5_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.2}\cdot 10^{-6} | 3.8_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-4} | 1.7_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-3} | 2.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-3} | 2.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-3} |
Table 6: Comparison of SVD algorithms accuracy on a random square matrix for different ranks. Reported relative orthogonality , with standard deviation. Metrics were averaged over sampled matrices.
| Method | |||||
|---|---|---|---|---|---|
| CANS SVD (fp32) | 4.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 4.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 4.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-6} | 4.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 5.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-6} |
| Extended | 5.8_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 5.6_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-6} | 5.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.1}\cdot 10^{-6} | 1.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-5} | 9.0_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| SciPy | 5.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 5.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 5.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 5.2_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 5.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} |
| Gram | 4.4_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-6} | 2.3_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-5} | 1.1_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} | 3.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} | 6.9_{\color[rgb]{0.5,0.5,0.5}\scriptscriptstyle\pm.0}\cdot 10^{-4} |
Table 7: Comparison of the accuracy of SVD algorithms on a random square matrix for different condition numbers. The reported metric is the relative reconstruction error , with standard deviation. Results are averaged over sampled matrices.
Figure 6: Comparison of SVD algorithms on a square random matrices with . Total wall-clock time was averaged over trials and reported with the standard deviation. The experiments are conducted on an NVIDIA B200 GPU.
Figure 7: Comparison of different methods for computing polar decomposition on a square random matrices with . The reported metric is relative orthogonality error .
Figure 8: Pareto front for different CUDA JACOBI tolerance settings on square random matrices with .
Table 8: Ablation on different for preprocessing on a random matrix for different condition numbers. The reported metric is the relative reconstruction error of CANS SVD (fp32).
Table 9: Ablation on different for preprocessing on a random matrix for different condition numbers. The reported metric is the relative reconstruction error of CANS SVD (tf32).
Figure 9: Performance comparison of different precisions (tf32 and bf16) for matrix multiplication. The left plot shows the runtime of the matrix multiplications themselves. The right plot shows how the SVD runtime changes when the multiplication precision is varied. The total wall-clock time is averaged over trials. Experiments are conducted on an NVIDIA B200 GPU.
Figure 10: Comparison of different methods for solving the symmetric Lyapunov equation under different scenarios. The total wall-clock time was averaged over trials and reported with the standard deviation. The experiments were conducted on an NVIDIA B200 GPU.
Explore similar work
Singular value soft-thresholding can be computed via a reduction to the matrix polar decomposition, which allows one to exploit GPU-friendly algorithms for computing the polar decomposition. Empirically, there is a significant speed-up on GPUs compared to the standard approach using the SVD. We leave the investigation of robustness to future work, but note that due to the discontinuous nature of the sign function, the reduction to the polar decomposition is likely only suitable for low-accuracy applications.
Quasi-SVD: Learning a Lie-constrained matrix factorisation for real-time imaging
Singular Value Decomposition (SVD) underlies matrix factorisation tasks across many fields, with imaging applications demanding real-time processing. Yet SVD algorithms are inherently sequential, constraining real-time GPU throughput and limit online deployment in imaging pipelines. This study introduces a fully parallelized matrix factorization framework for GPUs by enforcing matrix orthogonality on left singular vectors via Lie-parametrised algebra and recovering the remaining components through soft constraints. This asymmetric constraint design enables an efficient parallel and provably valid decomposition, achieves high reconstruction fidelity and substantially accelerates computation relative to the exact SVD, with real-time throughput exceeding standard video frame rates. Performance is evaluated on multiple imaging tasks spanning complementary computational regimes: (1) spatio-temporal background subtraction for ultrasound localisation microscopy, requiring high-dimensional matrix separation, (2) Mueller matrix polarimetry for neurosurgical tissue characterisation, requiring massive batch processing of small matrices, and (3) an MNIST denoising benchmark at an intermediate scale with known ground truth. Across regimes and instruments, the proposed framework demonstrates robust domain transfer at various matrix scales, sufficient for live image-guided workflows that classical solvers cannot currently support in these settings. By prioritising downstream reconstruction fidelity over exact spectral recovery, the proposed SVD framework makes structured matrix factorisation practical for real-time processing.
Training Without Orthogonalization, Inference With SVD: A Gradient Analysis of Rotation Representations
Recent work has shown that removing orthogonalization during training and applying it only at inference improves rotation estimation in deep learning, with empirical evidence favoring 9D representations with SVD projection. However, the theoretical understanding of why SVD orthogonalization specifically harms training, and why it should be preferred over Gram-Schmidt at inference, remains incomplete. We provide a detailed gradient analysis of SVD orthogonalization specialized to matrices and projection. Our central result derives the exact spectrum of the SVD backward pass Jacobian: it has rank (matching the dimension of ) with nonzero singular values and condition number , creating quantifiable gradient distortion that is most severe when the predicted matrix is far from (e.g., early in training when ). We further show that even stabilized SVD gradients introduce gradient direction error, whereas removing SVD from the training loop avoids this tradeoff entirely. We also prove that the 6D Gram-Schmidt Jacobian has an asymmetric spectrum: its parameters receive unequal gradient signal, explaining why 9D parameterization is preferable. Together, these results provide the theoretical foundation for training with direct 9D regression and applying SVD projection only at inference.