摘要
基于一种选择系数矩阵的工作列的策略,提出了求解大型线性最小二乘问题的一种不同的贪婪Gauss-Seidel方法,并对该方法进行了收敛性分析。数值实验表明,在相同的精度下,所提方法在计算时间上优于文献提出的贪婪随机坐标下降方法。
线性最小二乘问题是数值代数与科学计算中一个经典问题,经常出现于参数估计、反演与预测等问题之中。常见的直接法包括带旋转的QR分解法和奇异值分解
众所周知, Gauss-Seidel方法与Kaczmarz方法密切相关, 如它们均可视为坐标下降法对应于特殊半正定线性系统的变形。具体地,对于线性系统, Kaczmarz方法的迭代格式与坐标下降法应用于半正定系统,并结合标准的原始-对偶映射的迭代格式一致, Gauss-Seidel方法等同于坐标下降法应用于半正定系统的迭代格
Bai和W
本文提出一种求解大型线性最小二乘问题的贪婪Gauss-Seidel(GGS)方法, 与GRCD方法相比,它采用了完全不同的方式来确定矩阵的工作列, 使得其每次迭代所需的计算时间更少。从理论上证明GGS方法的收敛性;在数值实验中,利用文献[
对于向量,表示它的第个分量。对于矩阵,、以及分别表示它的第列、谱范数以及F范数。此外,如果是一个正定矩阵,那么任意一个向量的能量范数定义为,其中表示一个向量或者一个矩阵的转置。另外,用表示单位矩阵, 用表示它的第列,用表示的最小正特征值,用表示集合W的元素个数。
类似文献[
(1) |
其中矩阵列满秩,向量. 众所周知, 是关于
(2) |
基于正规方程组(2),文献[
算法1 贪婪随机坐标下降方法。 ①置。 计算 。 ②定义正整数指标集。③令, 计算④根据概率选取指标 ⑤计算。 ⑥置, 转步骤①。
由贪婪随机坐标下降方法中和的定义可知, 如果, 那么
注意到
因此,不能得到如下结论:如果,那么, 也即
由此可知,可能存在一些使得
(3) |
与此同时, 对于任意的, 由迭代格式可以得到
(4) |
结合
考虑到贪婪随机坐标下降方法里指标集合中的列指标并不能保证之间的距离最大, 并且计算的时候需要计算矩阵的所有列范数; 同时,考虑到最近很多工作按照最大残
算法2 贪婪Gauss-Seidel方法。①置。 确定正整数指标集
②计算
③计算
④置, 转步骤①。
贪婪Gauss-Seidel方法主要包括2步:①通过正规方程组(2)的残差向量的最大元素确定指标集合。②按照之间的距离最大准则从集合中选择迭代所需列指标。粗略看来,该方法似乎改变了贪婪随机坐标下降方法的2个主要步骤的顺序。然而,与贪婪随机坐标下降方法相比,贪婪Gauss-Seidel方法除了在求时使得之间的距离最大之外,也不再需要计算矩阵每一列的范数。此外,由于是由向量的最大项决定的,还可以发现集合中的元素个数可能小于集合中的元素个数,即。因此,该方法可以减少每次迭代的计算成本,从而可期待在计算时间上会有更好的表现,这一点将在第3节中的数值实验中进行验证。
注1 如果=,则由此可知贪婪Gauss-Seidel方法中的集合非空。
注2 类似于贪婪随机坐标下降方法,贪婪Gauss-Seidel方法可利用,其中作为概率选择标准得到相应的随机算法。在这种情况下,它的收敛因子可能比贪婪Gauss-Seidel方法稍差,因为贪婪Gauss-Seidel方法是根据最大的值来选择指标的,其使得之间的距离最大。
注3 在贪婪Gauss-Seidel方法中确定了指标集合之后, 类似文献[
接下来, 给出贪婪Gauss-Seidel方法的收敛性分析。
定理1 由贪婪Gauss-Seidel方法生成的迭代序列,从初始向量开始,线性收敛于唯一的最小范数最小二乘解,并且
(5) |
对于,有
(6) |
此外, 令, 则对于,有
(7) |
证明 由贪婪Gauss-Seidel方法的迭代格式可知
这意味着平行于。与此同时
结合可以得到
则
故垂直于。因此, 向量垂直于向量. 由勾股定理可得
其等价形式为
(8) |
另一方面, 由贪婪Gauss-Seidel方法可知
并且
则
= | (9) |
因此, 将
(10) |
当时,有
结合文献[
(11) |
其中向量x属于A的列空间,可得到
(12) |
因此, 将
这即是
当时,有
根据贪婪Gauss-Seidel方法的迭代格式, 立刻可得
则
结合
(13) |
因此, 将
这即是
注4 运用下面不等式
可以得到
再结合
可得到
因此, 贪婪Gauss-Seidel方法的收敛因子确实是小于1的。
注5 贪婪随机坐标下降方
其中由此可知贪婪随机坐标下降方法的收敛因子为
由于直接比较贪婪Gauss-Seidel(GGS)和贪婪随机坐标下降(GRCD)2种方法的收敛因子并不容易, 所以采用2个数值例子进行比较。此外, 还绘制了2种方法的实际收敛速率, 其定

图1 GGS和GRCD方法的收敛因子与实际收敛速率
Fig. 1 Convergence factors and rates of the GGS and GRCD methods
通过数值实验比较贪婪Gauss-Seidel (GGS)方法和贪婪随机坐标下降(GRCD)方法在求解线性最小二乘问题上的表现,其中矩阵来自2类集合,一类是由Matlab函数randn随机生成,一类是来自不同应用的稀疏矩
主要依据迭代次数(IT)和CPU计算时间比较这2种方法。数值结果中的迭代次数和计算时间表示的是50次重复运行相应方法的平均值。此外,为了直观地比较2种方法,给出了GGS方法相对于GRCD方法的迭代次数加速比(-up),其定义为GRCD方法所需的迭代次数除以GGS方法所需的迭代次数,同时给出了GGS方法相对于GRCD方法的计算时间加速比(-up),其定义为GRCD方法所需的计算时间除以GGS方法所需的计算时间。对于来自文献[
在数值实验中,解向量由Matlab函数randn随机生成。对于相容的系统, 令右边对于不相容的系统, 取,其中是属于的零空间的一个非零向量, 由Matlab函数null生成。本节所有的数值实验, 均取初始向量, 停机准则为近似解的相对误差或者迭代次数超过20万步。
对于第一类随机生成的矩阵, 线性系统相容时, 2类迭代法的迭代次数和计算时间的数值结果如
对于第二类矩阵, 即文献[
因此,数值实验显示GGS方法的迭代次数与GRCD方法几乎相同, 但在所有情形中, 贪婪Gauss-Seidel方法在计算时间上总是优于贪婪随机坐标下降方法。
针对大型线性最小二乘问题, 提出了一类新的贪婪Gauss-Seidel方法,理论分析了新方法的收敛性。数值实验表明,本文方法虽然与贪婪随机坐标下降方法的迭代次数几乎相同, 但所需计算时间更少。主要原因在于本文方法不仅避免了矩阵所有列范数的计算, 而且指标集合的元素个数更少, 从而减少了每次迭代的计算时间。
众所周知, 对于Gauss-Seidel方法而言, 工作列的选取准则在整个迭代过程都有着十分重要的影响。如何设计一个随机的列选取准则改进贪婪Gauss-Seidel方法需要进行进一步的研究。
作者贡献声明
李寒宇:主要负责本文的指导和修订工作,包括文章框架结构、方法分析和验证等。
张彦钧:主要负责本文的初稿撰写工作,包括算法推导、理论证明与数值实现。
参考文献
BJÖRCK Å. Numerical methods for least squares problems [M]. Philadelphia:Society for Industrial and Applied Mathematics, 1996. [百度学术]
HIGHAM N J. Accuracy and stability of numerical algorithms [M]. Philadelphia:Society for industrial and applied mathematics, 2002. [百度学术]
SAAD Y. Iterative methods for sparse linear systems [M]. Philadelphia:Society for Industrial and Applied Mathematics, 2003. [百度学术]
HEFNY A, Needell D, Ramdas A. Rows versus columns: Randomized Kaczmarz or Gauss-Seidel for ridge regression [J]. SIAM Journal on Scientific Computing, 2017, 39(5): S528. [百度学术]
STROHMER T, VERSHYNIN R. A randomized Kaczmarz algorithm with exponential convergence [J]. Journal of Fourier Analysis and Applications, 2009, 15(2): 262. [百度学术]
LEVENTHAL D, LEWIS A S. Randomized methods for linear constraints: Convergence rates and conditioning [J]. Mathematics of Operations Research, 2010, 35(3): 641. [百度学术]
MA A, NEEDELL D, RAMDAS A. Convergence properties of the randomized extended Gauss-Seidel and Kaczmarz methods [J]. SIAM Journal on Matrix Analysis and Applications, 2015, 36(4): 1590. [百度学术]
EDALATPOUR V, HEZARI D, SALKUYEH D K. A generalization of the Gauss-Seidel iteration method for solving absolute value equations [J]. Applied Mathematics and Computation, 2017, 293: 156. [百度学术]
TU S, VENKATARAMAN S, WILSON A C, et al. Breaking locality accelerates block Gauss-Seidel [C]//International Conference on Machine Learning. Sydney: PMLR, 2017: 3482-3491. [百度学术]
CHEN L, SUN D, TOH K C. An efficient inexact symmetric Gauss-Seidel based majorized ADMM for high-dimensional convex composite conic programming [J]. Mathematical Programming, 2017, 161(1/2): 237. [百度学术]
TIAN Z, TIAN M, LIU Z, et al. The Jacobi and Gauss–Seidel-type iteration methods for the matrix equation AXB= C [J]. Applied Mathematics and Computation, 2017, 292: 63. [百度学术]
XU Y. Hybrid Jacobian and Gauss-Seidel proximal block coordinate update methods for linearly constrained convex programming [J]. SIAM Journal on Optimization, 2018, 28(1): 646. [百度学术]
DU K. Tight upper bounds for the convergence of the randomized extended Kaczmarz and Gauss-Seidel algorithms [J]. Numerical Linear Algebra with Applications, 2019, 26(3): e2233. [百度学术]
RAZAVIYAYN M, HONG M, REYHANIAN N, et al. A linearly convergent doubly stochastic Gauss-Seidel algorithm for solving linear equations and a certain class of over-parameterized optimization problems [J]. Mathematical Programming, 2019, 176(1/2): 465. [百度学术]
BAI Z Z, WU W T. On greedy randomized coordinate descent methods for solving large linear least-squares problems [J]. Numerical Linear Algebra with Applications, 2019, 26(4): e2237. [百度学术]
BAI Z Z, WU W T. On greedy randomized Kaczmarz method for solving large sparse linear systems [J]. SIAM Journal on Scientific Computing, 2018, 40(1): A592. [百度学术]
BAI Z Z, WU W T. On relaxed greedy randomized Kaczmarz methods for solving large sparse linear systems [J]. Applied Mathematics Letters, 2018, 83: 21. [百度学术]
杜亦疏,殷俊锋,张科.求解大型稀疏线性方程组的贪婪距离随机Kaczmarz方法[J].同济大学学报(自然科学版),2020,48(8):1224. [百度学术]
DU Yishu, YIN Junfeng, ZHANG Ke. Greedy randomized-distance Kaczmarz method for solving large sparse linear systems[J]. Journal of Tongji University(Natural Science),2020,48(8):1224. [百度学术]
NUTINI J. Greed is good: Greedy optimization methods for large-scale structured problems [D]. Vancouver : University of British Columbia, 2018. [百度学术]
ZHANG J J. A new greedy Kaczmarz algorithm for the solution of very large linear systems [J]. Applied Mathematics Letters, 2019, 91: 207. [百度学术]
DU K, GAO H. A new theoretical estimate for the convergence rate of the maximal weighted residual Kaczmarz algorithm [J]. Numerical Mathematics: Theory, Methods and Applications, 2019, 12(2): 627. [百度学术]
LIU Y, GU C Q. Variant of greedy randomized Kaczmarz for ridge regression [J]. Applied Numerical Mathematics, 2019, 143: 223. [百度学术]
NIU Y Q, ZHENG B. A greedy block Kaczmarz algorithm for solving large-scale linear systems [J]. Applied Mathematics Letters, 2020, 104: 106294. [百度学术]
ZHANG J, GUO J. On relaxed greedy randomized coordinate descent methods for solving large linear least-squares problems [J]. Applied Numerical Mathematics, 2020, 157: 372. [百度学术]
OSBORNE E E. On least squares solution of linar equations [J]. Journal of the Association for Computing Machinery, 1961, 8: 628. [百度学术]
HADDOCK J, NEEDELL D. On Motzkin’s method for inconsistent linear systems [J]. BIT Numerical Mathematics, 2019, 59(2): 387. [百度学术]
REBROVA E, NEEDELL D. Sketching for Motzkin’s iterative method for linear systems [C]//53rd Asilomar Conference on Signals, Systems, and Computers. Pacific Grove: IEEE, 2019: 271-275. [百度学术]
MOTZKIN T S, SCHOENBERG I J. The relaxation method for linear inequalities [J]. Canadian Journal of Mathematics, 1954, 6: 393. [百度学术]
NUTINI J, SEPEHRY B, LARADJI I, et al. Convergence rates for greedy Kaczmarz algorithms, and faster randomized Kaczmarz rules using the orthogonality graph [J]. arXiv preprint arXiv,2016:1612.07838. [百度学术]
PETRA S, POPA C. Single projection Kaczmarz extended algorithms [J]. Numerical Algorithms, 2016, 73(3): 791. [百度学术]
DU K, SI W, SUN X. Randomized extended average block Kaczmarz for solving least squares [J]. SIAM Journal on Scientific Computing, 2020, 42(6): A3541. [百度学术]
DU K, SUN X. A doubly stochastic block Gauss-Seidel algorithm for solving linear equations [J]. Applied Mathematics and Computation, 2021, 408: 126373. [百度学术]
NECOARA I. Faster randomized block Kaczmarz algorithms [J]. SIAM Journal on Matrix Analysis and Applications, 2019, 40(4): 1425. [百度学术]
LI H, ZHANG Y. Greedy block Gauss-Seidel methods for solving large linear least squares problem [J]. arXiv preprint arXiv, 2020: 2004.02476. [百度学术]
DAVIS T A, HU Y. The University of Florida sparse matrix collection [J]. ACM Transactions on Mathematical Software (TOMS), 2011, 38(1): 1. [百度学术]