Matrices with low-rank structure are ubiquitous in scientific computing. Choosing an appropriate rank is a key step in many computational algorithms that exploit low-rank structure. However, estimating the rank has been done largely in an ad-hoc fashion in large-scale settings. In this work we develop a randomized algorithm for estimating the numerical rank of a (numerically low-rank) matrix. The algorithm is based on sketching the matrix with random matrices from both left and right; the key fact is that with high probability, the sketches preserve the orders of magnitude of the leading singular values. We prove a result on the accuracy of the sketched singular values and show that gaps in the spectrum are detected. For an $m\times n$ $(m\geq n)$ matrix of numerical rank $r$, the algorithm runs with complexity $O(mn\log n+r^3)$, or less for structured matrices. The steps in the algorithm are required as a part of many low-rank algorithms, so the additional work required to estimate the rank can be even smaller in practice. Numerical experiments illustrate the speed and robustness of our rank estimator.
翻译:具有低秩结构的矩阵在科学计算中普遍存在。在众多利用低秩结构的计算算法中,选择合适的秩是关键步骤。然而,在大规模场景下,秩的估计长期以来主要依赖特设方法。本文提出一种用于估计(数值低秩)矩阵数值秩的随机算法。该算法基于从左右两侧用随机矩阵对原始矩阵进行草图化处理;其关键事实在于,该草图能高概率保留主导奇异值的数量级。我们证明了草图奇异值精度的理论结果,并展示了谱中间隙的检测能力。对于大小为$m\times n$($m\geq n$)且数值秩为$r$的矩阵,该算法的复杂度为$O(mn\log n+r^3)$,对于结构化矩阵则更低。由于该算法步骤是许多低秩算法的必要组成部分,实践中估计秩所需的额外计算甚至更少。数值实验验证了本秩估计方法的速度与鲁棒性。