Iterative refinement for singular value decomposition based on matrix multiplication
基于矩阵乘法的奇异值分解迭代细化
open archive 打开档案
Abstract 抽象
We propose a refinement algorithm for singular value decomposition (SVD) of a real matrix. In the same manner as Newton’s method, the proposed algorithm converges quadratically if a modestly accurate initial guess is given. Since the proposed algorithm is based on matrix multiplication, it can efficiently be implemented. Numerical results demonstrate the excellent performance of the proposed algorithm in terms of the convergence rate and the measured computing time compared to a standard approach using multiple precision arithmetic.
我们提出了一种用于实矩阵奇异值分解 (SVD) 的细化算法。与牛顿方法相同,如果给出适度准确的初始估计值,则所提出的算法将呈二次方收敛。由于所提出的算法是基于矩阵乘法的,因此可以有效地实现。数值结果表明,与使用多精度算术的标准方法相比,所提算法在收敛速率和实测计算时间方面具有优异的性能。
我们提出了一种用于实矩阵奇异值分解 (SVD) 的细化算法。与牛顿方法相同,如果给出适度准确的初始估计值,则所提出的算法将呈二次方收敛。由于所提出的算法是基于矩阵乘法的,因此可以有效地实现。数值结果表明,与使用多精度算术的标准方法相比,所提算法在收敛速率和实测计算时间方面具有优异的性能。
MSC MSC 系列
65F30
15A18
15A23
Keywords 关键字
SVD
Iterative refinement
Convergence analysis
Higher-precision arithmetic
SVD
迭代细化
收敛分析
更高精度的算术
1. Introduction 1. 引言
Let be a real matrix. In this paper, we propose a refinement algorithm for the singular value decomposition (SVD) of with . If , considering the SVD of yields equivalent results. It is well known that the SVD has many applications in various fields, such as signal processing [1], [2], statistical analysis [3], [4], and so forth. Excellent overviews of the SVD can be found in [5], [6].
设 为实 矩阵。在本文中,我们提出了一种 with 的 奇异值分解 (SVD) 的细化算法。如果 ,考虑 的 SVD 会产生等效的结果。众所周知,SVD 在各个领域都有许多应用,例如信号处理、统计分析等。SVD 的精彩概述可以在 、 中找到。
设 为实 矩阵。在本文中,我们提出了一种 with 的 奇异值分解 (SVD) 的细化算法。如果 ,考虑 的 SVD 会产生等效的结果。众所周知,SVD 在各个领域都有许多应用,例如信号处理、统计分析等。SVD 的精彩概述可以在 、 中找到。
Throughout the paper, let and denote the identity matrix and the zero matrix of appropriate size, respectively. Moreover, denotes the spectral norm for matrices. If necessary, we distinguish between the approximate quantities and the computed results, e.g., for some quantity , we write and as an approximation of and a computed result for , respectively.
在整篇论文中,let 和 分别表示适当大小的 单位矩阵和零矩阵。此外, 表示矩阵的谱范数。如有必要,我们区分近似量和计算结果,例如,对于某个量 ,我们分别将 和 写 为 的近似 值和 计算结果 。
在整篇论文中,let 和 分别表示适当大小的 单位矩阵和零矩阵。此外, 表示矩阵的谱范数。如有必要,我们区分近似量和计算结果,例如,对于某个量 ,我们分别将 和 写 为 的近似 值和 计算结果 。
Let , , denote the singular values of . We consider the (full size) SVD of such that where both and are orthogonal and is diagonal with . For simplicity, we assume that In other words, we consider the case that all singular values are simple, and has full column rank. If there are multiple or nearly multiple singular values, we need some special care as in [7], [8].
设 , , 表示 的 奇异值。我们考虑 的(全尺寸)SVD 是 这样的,其中 和 都是正交的,并且 是与 的对角线。为简单起见,我们假设换句话说,我们考虑所有奇异值都是简单的,并且 具有完整的列排名。如果存在多个或几乎多个奇异值,则需要特别小心,如 , 。
设 , , 表示 的 奇异值。我们考虑 的(全尺寸)SVD 是 这样的,其中 和 都是正交的,并且 是与 的对角线。为简单起见,我们假设换句话说,我们考虑所有奇异值都是简单的,并且 具有完整的列排名。如果存在多个或几乎多个奇异值,则需要特别小心,如 , 。
Recently, the authors proposed refinement algorithms for symmetric eigenvalue decomposition in [7], [8]. In the same spirit of the previous papers, the use of higher-precision arithmetic in our proposed refinement algorithm for the SVD is primarily restricted to matrix multiplication, which accounts for most of the computational cost. There are several approaches for higher-precision matrix multiplication. For example, XBLAS (extra precise BLAS) [9] and fast and accurate algorithms for dot products [10] and matrix products [11] based on error-free transformations are available for efficient implementation.
最近,作者在 [7]、[8] 中提出了对称特征值分解的改进算法。本着与前几篇论文相同的精神,在我们提出的 SVD 细化算法中,更高精度算术的使用主要限于矩阵乘法,这占了大部分计算成本。有几种方法可以进行更高精度的矩阵乘法。例如,XBLAS (超精确 BLAS) [9] 和基于无差错变换的点积 [10] 和矩阵积 [11] 的快速准确算法可用于高效实现。
最近,作者在 [7]、[8] 中提出了对称特征值分解的改进算法。本着与前几篇论文相同的精神,在我们提出的 SVD 细化算法中,更高精度算术的使用主要限于矩阵乘法,这占了大部分计算成本。有几种方法可以进行更高精度的矩阵乘法。例如,XBLAS (超精确 BLAS) [9] 和基于无差错变换的点积 [10] 和矩阵积 [11] 的快速准确算法可用于高效实现。
The idea of our algorithm is to use the following relations: (1)(2)(3) Using these relations, we develop a refinement algorithm for the SVD in the same manner as Newton’s method. Thus, the proposed algorithm has quadratic convergence.
我们算法的思路是使用以下关系式:(1)2)(3)利用这些关系,我们以与牛顿方法相同的方式为 SVD 开发了一种细化算法。因此,所提出的算法具有二次收敛性。
我们算法的思路是使用以下关系式:(1)2)(3)利用这些关系,我们以与牛顿方法相同的方式为 SVD 开发了一种细化算法。因此,所提出的算法具有二次收敛性。
There exist several refinement algorithms for SVD that are based on Newton’s method for nonlinear equations (cf. e.g., [12]). Since this sort of algorithm is designed to improve a triplet individually, where is a singular value and and are corresponding left and right singular vectors, applying such an approach to all triplets requires arithmetic operations. In [13], Davies and Smith proposed an iterative refinement algorithm for updating the singular value decomposition in operations. However, similarly to the Davies–Modi algorithm [14] for the symmetric eigenvalue decomposition as mentioned in the previous paper [7], the Davies–Smith algorithm has the limitation of achievable accuracy of the results. The reason is as follows. The Davies–Smith algorithm assumes that a given real matrix is preconditioned to a nearly diagonal matrix such as , where and are computed SVD factors, i.e., and are approximately orthogonal matrices. Since and involve numerical errors, the matrix multiplications in are generally not orthogonal transformations, and the singular values of are slightly perturbed from the original matrix . Then, the singular vectors are also perturbed. Therefore, even if the Davies–Smith algorithm provides accurate singular vectors of , they are not necessarily accurate ones of . On the other hand, our proposed algorithm uses the original matrix for obtaining accurate singular vectors of .
SVD 有几种基于牛顿非线性方程法的细化算法(参见 e.g.)。由于这种算法旨在单独改进三元组 ,其中 是奇异值 和 和 是相应的左和右奇异向量,因此将这种方法应用于所有三元组需要 算术运算。在 中,Davies 和 Smith 提出了一种迭代细化算法,用于更新运算中的 奇异值分解。然而,与上一篇文章中提到的对称特征值分解的 Davies-Modi 算法类似,Davies-Smith 算法在结果的可实现精度方面存在局限性。原因如下。Davies-Smith 算法假设给定的实数矩阵 被预设为接近对角线的矩阵,例如 ,其中 和 是计算的 SVD 因子,即 和 是近似正交矩阵。由于 和 涉及数值误差,因此 中的 矩阵乘法通常不是正交变换,并且 的 奇异值与原始矩阵 略有不同。然后,奇异向量也会受到扰动。因此,即使 Davies-Smith 算法提供了 的 精确奇异向量 ,它们也不一定是 的 准确向量。另一方面,我们提出的算法使用原始矩阵 来获取 的 精确奇异向量。
SVD 有几种基于牛顿非线性方程法的细化算法(参见 e.g.)。由于这种算法旨在单独改进三元组 ,其中 是奇异值 和 和 是相应的左和右奇异向量,因此将这种方法应用于所有三元组需要 算术运算。在 中,Davies 和 Smith 提出了一种迭代细化算法,用于更新运算中的 奇异值分解。然而,与上一篇文章中提到的对称特征值分解的 Davies-Modi 算法类似,Davies-Smith 算法在结果的可实现精度方面存在局限性。原因如下。Davies-Smith 算法假设给定的实数矩阵 被预设为接近对角线的矩阵,例如 ,其中 和 是计算的 SVD 因子,即 和 是近似正交矩阵。由于 和 涉及数值误差,因此 中的 矩阵乘法通常不是正交变换,并且 的 奇异值与原始矩阵 略有不同。然后,奇异向量也会受到扰动。因此,即使 Davies-Smith 算法提供了 的 精确奇异向量 ,它们也不一定是 的 准确向量。另一方面,我们提出的算法使用原始矩阵 来获取 的 精确奇异向量。
The rest of the paper is organized as follows. In Section 2, we present a refinement algorithm for the SVD. In Section 3, we provide a convergence analysis of the proposed algorithm. In Section 4, we present some numerical results showing the behavior and performance of the proposed algorithm.
本文的其余部分组织如下。在第 2 节中,我们提出了 SVD 的优化算法。在第 3 节中,我们提供了所提出的算法的收敛分析。在第 4 节中,我们提供了一些数值结果,显示了所提出的算法的行为和性能。
本文的其余部分组织如下。在第 2 节中,我们提出了 SVD 的优化算法。在第 3 节中,我们提供了所提出的算法的收敛分析。在第 4 节中,我们提供了一些数值结果,显示了所提出的算法的行为和性能。
2. Proposed algorithm 2. 建议的算法
Let and be given approximation of and , respectively. Let further and be correction matrices satisfying and , respectively. Let be defined as (4)We assume that . Then, both and are nonsingular, and Inserting into (1), we have and which yields (5)Similarly, inserting into (2), we have (6)Moreover, inserting and into (3), we have (7)Here, (8)(9)(10) where
设 和 分别得到 和 的近似值。设 further 和 分别是满足 和 的校正矩阵。设 定义为 我们假设 。那么,和 都是 奇异的,并且 插入 到 ,我们有 和 ,得到 同样,插入 到 ,我们有 此外,插入 和 进入 ,我们有 这里 ,其中(11)
设 和 分别得到 和 的近似值。设 further 和 分别是满足 和 的校正矩阵。设 定义为 我们假设 。那么,和 都是 奇异的,并且 插入 到 ,我们有 和 ,得到 同样,插入 到 ,我们有 此外,插入 和 进入 ,我们有 这里 ,其中(11)
Omitting the second-order terms , , and from (5), (6), and (7) in a similar way to Newton’s method, we obtain a system of matrix equations for , , and as (12)(13) All that remains is to solve (12) for , , and .
以与牛顿方法类似的方式省略 (5)、(6) 和 (7) 中的二阶项 、 和 ,我们得到一个矩阵 方程组 , 因为 (12)(13) 剩下的就是求解 、 和 的 (12) 。
以与牛顿方法类似的方式省略 (5)、(6) 和 (7) 中的二阶项 、 和 ,我们得到一个矩阵 方程组 , 因为 (12)(13) 剩下的就是求解 、 和 的 (12) 。
In the following, we will show that we can easily solve the system of matrix equations (12). We partition as follows: Then it follows from (12) that (14a)(14b)(14c)
and (15a)(15b)
在下文中,我们将展示我们可以轻松求解矩阵方程组 (12)。我们按如下方式进行分区 :{n {m−n F ̃= F ̃11 F ̃12 }n F ̃21 F ̃22 }m−n, {n Σ ̃= Σ ̃n }n O }m−n {n {m−n R= R11 R12 }n R21 R22 }m−n, {n T= T1 }n T2 }m−n 然后,从 (12) (14a)(14b)(14c) 可以得出 和 (15a)(15b)
在下文中,我们将展示我们可以轻松求解矩阵方程组 (12)。我们按如下方式进行分区 :{n {m−n F ̃= F ̃11 F ̃12 }n F ̃21 F ̃22 }m−n, {n Σ ̃= Σ ̃n }n O }m−n {n {m−n R= R11 R12 }n R21 R22 }m−n, {n T= T1 }n T2 }m−n 然后,从 (12) (14a)(14b)(14c) 可以得出 和 (15a)(15b)
First, we focus on the diagonal parts of and . It follows from the first and second equations in (13) that Moreover, the third equation in (13) yields Thus, if for , we have (16)
首先,我们关注 和 的 对角线部分。从 (13) 中的第一个和第二个方程中可以得出, 此外,(13) 中的第三个方程得出 因此,如果 for ,我们有 (16)
首先,我们关注 和 的 对角线部分。从 (13) 中的第一个和第二个方程中可以得出, 此外,(13) 中的第三个方程得出 因此,如果 for ,我们有 (16)
Remark 1 注 1
In theory, there is a possibility that . However, and are residuals in terms of orthogonality, and it is likely that and , and in practice.
理论上,有可能 .但是, and 是正交性的残差,并且很可能是 和 ,并且 在实践中。
理论上,有可能 .但是, and 是正交性的残差,并且很可能是 和 ,并且 在实践中。
Next, we focus on the off-diagonal parts of and . Combining (13), (16), they can be determined by solving 4 × 4 linear systems (17)(18)(19)(20) for , . By multiplying (19) by and (20) by ,