Elsevier

Journal of Computational and Applied Mathematics

Volume 369, 1 May 2020, 112512
第 369 卷,2020 年 5 月 1 日,112512
Journal of Computational and Applied Mathematics

Iterative refinement for singular value decomposition based on matrix multiplication
基于矩阵乘法的奇异值分解迭代细化

https://doi.org/10.1016/j.cam.2019.112512Get rights and content  获取权利和内容
Under an Elsevier user license
在 Elsevier 用户许可下
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) 的细化算法。与牛顿方法相同,如果给出适度准确的初始估计值,则所提出的算法将呈二次方收敛。由于所提出的算法是基于矩阵乘法的,因此可以有效地实现。数值结果表明,与使用多精度算术的标准方法相比,所提算法在收敛速率和实测计算时间方面具有优异的性能。

MSC  MSC 系列

65F30
15A18
15A23

Keywords  关键字

SVD
Iterative refinement
Convergence analysis
Higher-precision arithmetic

SVD
迭代细化
收敛分析
更高精度的算术

1. Introduction  1. 引言

Let A be a real m×n matrix. In this paper, we propose a refinement algorithm for the singular value decomposition (SVD) of A with mn. If m<n, considering the SVD of AT 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].
A 为实 m×n 矩阵。在本文中,我们提出了一种 with mnA 奇异值分解 (SVD) 的细化算法。如果 m<n ,考虑 的 SVD AT 会产生等效的结果。众所周知,SVD 在各个领域都有许多应用,例如信号处理、统计分析等。SVD 的精彩概述可以在 、 中找到。
Throughout the paper, let In and O denote the n×n 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 InO 分别表示适当大小的 n×n 单位矩阵和零矩阵。此外, 表示矩阵的谱范数。如有必要,我们区分近似量和计算结果,例如,对于某个量 α ,我们分别将 和 αˆα˜α 的近似 α 值和 计算结果 。
Let σiR, i=1,,n, denote the singular values of A. We consider the (full size) SVD of A such that A=UΣVT,URm×m,VRn×n,ΣRm×n,where both U and V are orthogonal and Σ is diagonal with Σii=σi. For simplicity, we assume that σ1>σ2>>σn>0.In other words, we consider the case that all singular values are simple, and A has full column rank. If there are multiple or nearly multiple singular values, we need some special care as in [7], [8].
σiRi=1,,n , 表示 的 A 奇异值。我们考虑 的(全尺寸)SVD 是 A 这样的,其中 UV 都是正交的,并且 Σ 是与 Σii=σi 的对角线。为简单起见,我们假设换句话说,我们考虑所有奇异值都是简单的,并且 A 具有完整的列排名。如果存在多个或几乎多个奇异值,则需要特别小心,如 , 。
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] 的快速准确算法可用于高效实现。
The idea of our algorithm is to use the following relations: (1)UTU=Im(orthogonality of U)(2)VTV=In(orthogonality of V)(3)UTAV=Σ(diagonality of A as the SVD) 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)UTU=Im(U 的 正交性 )(2)VTV=In(V 的 正交性 (3)Unexpected text node: '('利用这些关系,我们以与牛顿方法相同的方式为 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 (σ,u,v)R×Rn×Rn individually, where σ is a singular value and u and v are corresponding left and right singular vectors, applying such an approach to all triplets requires O(n4) arithmetic operations. In [13], Davies and Smith proposed an iterative refinement algorithm for updating the singular value decomposition in O(n3) 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 A is preconditioned to a nearly diagonal matrix such as UˆTAVˆ, where Uˆ and Vˆ are computed SVD factors, i.e., Uˆ and Vˆ are approximately orthogonal matrices. Since Uˆ and Vˆ involve numerical errors, the matrix multiplications in UˆTAVˆ are generally not orthogonal transformations, and the singular values of UˆTAVˆ are slightly perturbed from the original matrix A. Then, the singular vectors are also perturbed. Therefore, even if the Davies–Smith algorithm provides accurate singular vectors of UˆTAVˆ, they are not necessarily accurate ones of A. On the other hand, our proposed algorithm uses the original matrix A for obtaining accurate singular vectors of A.
SVD 有几种基于牛顿非线性方程法的细化算法(参见 e.g.)。由于这种算法旨在单独改进三元组 (σ,u,v)R×Rn×Rn ,其中 σ 是奇异值 和 uv 是相应的左和右奇异向量,因此将这种方法应用于所有三元组需要 O(n4) 算术运算。在 中,Davies 和 Smith 提出了一种迭代细化算法,用于更新运算中的 O(n3) 奇异值分解。然而,与上一篇文章中提到的对称特征值分解的 Davies-Modi 算法类似,Davies-Smith 算法在结果的可实现精度方面存在局限性。原因如下。Davies-Smith 算法假设给定的实数矩阵 A 被预设为接近对角线的矩阵,例如 UˆTAVˆ ,其中 UˆVˆ 是计算的 SVD 因子,即 UˆVˆ 是近似正交矩阵。由于 UˆVˆ 涉及数值误差,因此 中的 UˆTAVˆ 矩阵乘法通常不是正交变换,并且 的 UˆTAVˆ 奇异值与原始矩阵 A 略有不同。然后,奇异向量也会受到扰动。因此,即使 Davies-Smith 算法提供了 的 UˆTAVˆ 精确奇异向量 ,它们也不一定是 的 A 准确向量。另一方面,我们提出的算法使用原始矩阵 A 来获取 的 A 精确奇异向量。
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. Proposed algorithm  2. 建议的算法

Let UˆRm×m and VˆRn×n be given approximation of U and V, respectively. Let further FRm×m and GRn×n be correction matrices satisfying U=Uˆ(Im+F) and V=Vˆ(In+G), respectively. Let ϵ be defined as (4)ϵmax(ϵF,ϵG),ϵFF,ϵGG.We assume that ϵ<1. Then, both Im+F and In+G are nonsingular, and (Im+F)1=ImF+ΔF,ΔFk=2(F)k,ΔFϵF1ϵF,(In+G)1=InG+ΔG,ΔGk=2(G)k,ΔGϵG1ϵG. Inserting U=Uˆ(Im+F) into (1), we have (Im+FT)UˆTUˆ(Im+F)=Imand UˆTUˆ=(Im+FT)1(Im+F)1=(ImFT+ΔFT)(ImF+ΔF),which yields (5)F+FT=ImUˆTUˆ+Δ1,Δ1ΔF+ΔFT+(FΔF)T(FΔF).Similarly, inserting V=Vˆ(In+G) into (2), we have (6)G+GT=InVˆTVˆ+Δ2,Δ2ΔG+ΔGT+(GΔG)T(GΔG).Moreover, inserting U=Uˆ(Im+F) and V=Vˆ(In+G) into (3), we have (7)ΣFTΣΣG=UˆTAVˆ+Δ3,Δ3ΣΔGΔFTΣ(FΔF)TΣ(GΔG).Here, (8)Δ1(32ϵF)ϵF2(1ϵF)2χ(ϵ)ϵ2,(9)Δ2(32ϵG)ϵG2(1ϵG)2χ(ϵ)ϵ2,(10)Δ3ϵF2+ϵG2+(1ϵFϵG)ϵFϵG(1ϵF)(1ϵG)Σχ(ϵ)ϵ2A, where
UˆRm×mVˆRn×n 分别得到 UV 的近似值。设 further FRm×mGRn×n 分别是满足 U=Uˆ(Im+F)V=Vˆ(In+G) 的校正矩阵。设 ϵ 定义为 我们假设 ϵ<1 。那么,和 都是 Im+F 奇异的,并且 插入 U=Uˆ(Im+F) 到 ,我们有 和 ,得到 同样,插入 V=Vˆ(In+G) 到 ,我们有 此外,插入 U=Uˆ(Im+F)V=Vˆ(In+G) 进入 ,我们有 这里 In+G ,其中
(11)χ(ϵ)32ϵ(1ϵ)2.
Omitting the second-order terms Δ1, Δ2, and Δ3 from (5), (6), and (7) in a similar way to Newton’s method, we obtain a system of matrix equations for F˜=(f˜ij)Rm×m, G˜=(g˜ij)Rn×n, and Σ˜=diag(σ˜i)Rm×n as (12)F˜+F˜T=R,RImUˆTUˆG˜+G˜T=S,SInVˆTVˆΣ˜F˜TΣ˜Σ˜G˜=T,TUˆTAVˆ(13)f˜ij+f˜ji=rijfor1i,jmg˜ij+g˜ji=sijfor1i,jnΣ˜ijσ˜jf˜jiσ˜ig˜ij=tijfor1im,1jn. All that remains is to solve (12) for F˜, G˜, and Σ˜.
以与牛顿方法类似的方式省略 (5)、(6)(7) 中的二阶项 Δ1Δ2Δ3 ,我们得到一个矩阵 F˜=(f˜ij)Rm×m 方程组 , G˜=(g˜ij)Rn×n Σ˜=diag(σ˜i)Rm×n 因为 (12)F˜+F˜T=R,RImUˆTUˆG˜+G˜T=S,SInVˆTVˆΣ˜F˜TΣ˜Σ˜G˜=T,TUˆTAVˆ(13)f˜ij+f˜ji=rijfor1i,jmg˜ij+g˜ji=sijfor1i,jnΣ˜ijσ˜jf˜jiσ˜ig˜ij=tijfor1im,1jn. 剩下的就是求解 F˜ 、 和 G˜ Σ˜(12)
In the following, we will show that we can easily solve the system of matrix equations (12). We partition F˜,Σ˜,R,T as follows: nmnF˜=F˜11F˜12}nF˜21F˜22}mn,nΣ˜=Σ˜n}nO}mnnmnR=R11R12}nR21R22}mn,nT=T1}nT2}mn Then it follows from (12) that (14a)F˜11+F˜11T=R11,(14b)F˜21+F˜12T=R21,(14c)F˜22+F˜22T=R22, and (15a)Σ˜nF˜11TΣ˜nΣ˜nG˜=T1,(15b)F˜12TΣ˜n=T2Σ˜nF˜12=T2T.
在下文中,我们将展示我们可以轻松求解矩阵方程组 (12)。我们按如下方式进行分区 F˜,Σ˜,R,T :{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)F˜11+F˜11T=R11,(14b)F˜21+F˜12T=R21,(14c)F˜22+F˜22T=R22, 可以得出 和 (15a)Σ˜nF˜11TΣ˜nΣ˜nG˜=T1,(15b)F˜12TΣ˜n=T2Σ˜nF˜12=T2T.
First, we focus on the diagonal parts of F˜11 and G˜. It follows from the first and second equations in (13) that f˜ii=rii2,g˜ii=sii2for1in.Moreover, the third equation in (13) yields (1f˜iig˜ii)σ˜i=(1(rii+sii)2)σ˜i=tiifor1in.Thus, if rii+sii2 for 1in, we have (16)σ˜i=tii1(rii+sii)2for1in.
首先,我们关注 F˜11 和 的 G˜ 对角线部分。从 (13) 中的第一个和第二个方程中可以得出, f˜ii=rii2,g˜ii=sii2for1in. 此外,(13) 中的第三个方程得出 (1f˜iig˜ii)σ˜i=(1(rii+sii)2)σ˜i=tiifor1in. 因此,如果 rii+sii2 for 1in ,我们有 (16)σ˜i=tii1(rii+sii)2for1in.

Remark 1  注 1

In theory, there is a possibility that rii+sii=2. However, R and S are residuals in terms of orthogonality, and it is likely that |rii|1 and |sii|1, and |rii+sii|1 in practice.
理论上,有可能 rii+sii=2 .但是, R and S 是正交性的残差,并且很可能是 |rii|1|sii|1 ,并且 |rii+sii|1 在实践中。
Next, we focus on the off-diagonal parts of F˜11 and G˜. Combining (13), (16), they can be determined by solving 4 × 4 linear systems (17)f˜ij+f˜ji=rij(18)g˜ij+g˜ji=sij(19)σ˜if˜ij+σ˜jg˜ji=tji(20)σ˜jf˜ji+σ˜ig˜ij=tij for 1i,jn, ij. By multiplying (19) by σ˜i and (20) by σ˜j, σ˜i2f˜ij+σ˜iσ˜jg˜ji=σ˜itji,