Two harmonic Jacobi–Davidson methods for computing a partial generalized singular value decomposition of a large matrix pair††thanks: Supported by the National Natural Science Foundation of China (No. 12171273).
Abstract
Two harmonic extraction based Jacobi–Davidson (JD) type algorithms are proposed to compute a partial generalized singular value decomposition (GSVD) of a large regular matrix pair. They are called cross product-free (CPF) and inverse-free (IF) harmonic JDGSVD algorithms, abbreviated as CPF-HJDGSVD and IF-HJDGSVD, respectively. Compared with the standard extraction based JDGSVD algorithm, the harmonic extraction based algorithms converge more regularly and suit better for computing GSVD components corresponding to interior generalized singular values. Thick-restart CPF-HJDGSVD and IF-HJDGSVD algorithms with some deflation and purgation techniques are developed to compute more than one GSVD components. Numerical experiments confirm the superiority of CPF-HJDGSVD and IF-HJDGSVD to the standard extraction based JDGSVD algorithm.
keywords:
Generalized singular value decomposition, generalized singular value, generalized singular vector, standard extraction, harmonic extraction, Jacobi–Davidson type methodAMS:
65F15, 15A18, 65F101 Introduction
For a pair of large and possibly sparse matrices and , the matrix pair is called regular if , i.e., , where and denote the null spaces of and , respectively. The generalized singular value decomposition (GSVD) of was introduced by Van Loan [34] and developed by Paige and Saunders [28]. Since then, GSVD has become a standard matrix decomposition and has been widely used [2, 3, 4, 9, 10, 25]. Let , and , , where the superscript denotes the transpose. Then the GSVD of is
(1.1) |
where is nonsingular, and are orthogonal, and the diagonal matrices and satisfy
with . Here, and are the zero matrices and identity matrices of order , respectively; see [28]. The GSVD part in (1.1) that corresponds to and can be written as
(1.2) |
where is the th column of and the unit-length vectors and are the th columns of and , respectively. The quintuples , are called nontrivial GSVD components of . Particularly, the numbers or the pairs are called the nontrivial generalized singular values, and and are the corresponding left and right generalized singular vectors, respectively, .
For a given target , we assume that all the nontrivial generalized singular values of are labeled by their distances from :
(1.3) |
We are interested in computing the GSVD components corresponding to the nontrivial generalized singular values of closest to . If is inside the nontrivial generalized singular spectrum of , then , are called interior GSVD components of ; otherwise, they are called the extreme, i.e., largest or smallest, ones. A large number of GSVD components, some of which are interior ones [5, 6, 7], are required in a variety of applications. Throughout this paper, we assume that is not equal to any generalized singular value of .
Zha [37] proposes a joint bidiagonalization (JBD) method to compute extreme GSVD components of the large matrix pair . The method is based on a JBD process that successively reduces to a sequence of upper bidiagonal pairs, from which approximate GSVD components are computed. Kilmer, Hansen and Espanol [26] have adapted the JBD process to the linear discrete ill-posed problem with general-form regularization and developed a JBD process that reduces to lower-upper bidiagonal forms. Jia and Yang [24] have developed a new JBD process based iterative algorithm for the ill-posed problem and considered the convergence of extreme generalized singular values. In the GSVD computation and the solution of discrete ill-posed problem, one needs to solve an least squares problem with the coefficient matrix at each step of the JBD process. Jia and Li [22] have recently considered the JBD process in finite precision and proposed a partial reorthogonalization strategy to maintain numerical semi-orthogonality among the generated basis vectors so as to avoid ghost approximate GSVD components, where the semi-orthogonality means that two unit-length vectors are numerically orthogonal to the level of with being the machine precision.
Hochstenbach [12] presents a Jacobi–Davidson (JD) GSVD (JDGSVD) method to compute a number of interior GSVD components of with of full column rank, where, at each step, an -dimensional linear system, i.e., the correction equation, needs to be solved iteratively with low or modest accuracy; see [14, 15, 20, 21]. The lower -dimensional and upper -dimensional parts of the approximate solution are used to expand the right and one of the left searching subspaces, respectively. The JDGSVD method formulates the GSVD of as the equivalent generalized eigendecomposition of the augmented matrix pair for of full column rank, computes the relevant eigenpairs, and recovers the approximate GSVD components from the converged eigenpairs. The authors [16] have shown that the error of the computed eigenvector is bounded by the size of the perturbations times a multiple , where denotes the -norm condition number of with and being the largest and smallest singular values of , respectively. Consequently, with an ill-conditioned , the computed GSVD components may have very poor accuracy, which has been numerically confirmed [16]. The results in [16] show that if is ill conditioned but has full column rank and is well conditioned then the JDGSVD method can be applied to the matrix pair and computes the corresponding approximate GSVD components with high accuracy. Note that the two formulations require that and be rectangular or square, respectively. We should also realize that a reliable estimation of the condition numbers of and may be costly, so that it may be difficult to choose a proper formulation in applications.
Zwaan and Hochstenbach [39] present a generalized Davidson (GDGSVD) method and a multidirectional (MDGSVD) method to compute an extreme partial GSVD of . These two methods involve no cross product matrices and or matrix-matrix products, and they apply the standard extraction approach, i.e., the Rayleigh–Ritz method [31] to directly and compute approximate GSVD components with respect to the given left and right searching subspaces, where the two left subspaces are formed by premultiplying the right one with and , respectively. At iteration of the GDGSVD method, the right searching subspace is spanned by the residuals of the generalized Davidson method [1, Sec. 11.2.4 and Sec. 11.3.6] applied to the generalized eigenvalue problem of ; in the MDGSVD method, an inferior search direction is discarded by a truncation technique, so that the searching subspaces are improved. Zwaan [38] exploits the Kronecker canonical form of a regular matrix pair [32] and shows that the GSVD problem of can be formulated as a certain generalized eigenvalue problem without involving any cross product or any other matrix-matrix product. Such formulation currently is mainly of theoretical value since the nontrivial eigenvalues and eigenvectors of the structured generalized eigenvalue problem are always complex: the generalized eigenvalues are the conjugate quaternions with the imaginary unit, and the corresponding right generalized eigenvectors are
Clearly, the size of the generalized eigenvalue problem is much bigger than that of the GSVD of . The conditioning of eigenvalues and eigenvectors of this problem is also unclear. In the meantime, no structure-preserving algorithm has been found for such kind of complicated structured generalized eigenvalue problem. Definitely, it will be extremely difficult and highly challenging to seek for a numerically stable structure-preserving algorithm for this problem.
The authors [15] have recently proposed a Cross Product-Free JDGSVD method, referred to as the CPF-JDGSVD method, to compute several GSVD components of corresponding to the generalized singular values closest to . The CPF-JDGSVD method is cross products and free when constructing and expanding right and left searching subspaces; it premultiplies the right searching subspace by and to construct two left ones separately, and forms the orthonormal bases of those by computing two thin QR factorizations, as done in [39]. The resulting projected problem is the GSVD of a small matrix pair without involving any cross product or matrix-matrix product. Mathematically, the method implicitly deals with the equivalent generalized eigenvalue problem of without forming or explicitly. At the subspace expansion stage, an -by- correction equation is approximately solved iteratively with low or modest accuracy, and the approximate solution is used to expand the searching subspaces. Therefore, the subspace expansion is fundamentally different from that used in [39], where the dimension of the correction equations is no more than half of the dimension of those in [12].
Just like the standard Rayleigh–Ritz method for the matrix eigenvalue problem and the singular value decomposition (SVD) problem, the CPF-JDGSVD method suits better for the computation of some extreme GSVD components, but it may encounter some serious difficulties for the computation of interior GSVD components. Remarkably, adapted from the standard extraction approach for the eigenvalue problem and SVD problem to the GSVD computation, an intrinsic shortcoming of a standard extraction based method is that it may be hard to pick up good approximate generalized singular values correctly even if the searching subspaces are sufficiently good. This potential disadvantage may make the resulting algorithm expand the subspaces along wrong directions and converge irregularly, as has been numerically observed in [15]. To this end, inspired by the harmonic extraction based methods that suit better for computing interior eigenpairs and SVD components [11, 13, 14, 17, 23, 21, 27], we will propose two harmonic extraction based JDGSVD methods that are particularly suitable for the computation of interior GSVD components. One method is cross products and free, and the other is inversions and free. As will be seen, the derivations of the two harmonic extraction methods are nontrivial, and they are subtle adaptations of the harmonic extraction for matrix eigenvalue and SVD problems. In the sequel, we will abbreviate Cross Product-Free and Inverse-Free Harmonic JDGSVD methods as CPF-HJDGSVD and IF-HJDGSVD, respectively.
We first focus on the case and propose our harmonic extraction based JDGSVD type methods. Then by introducing the deflation technique in [15] into the methods, we present the methods to compute more than one, i.e., , GSVD components. To be practical, combining the thick-restart technique in [30] and some purgation approach, we develop thick-restart CPF-HJDGSVD and IF-HJDGSVD algorithms to compute the GSVD components associated with the generalized singular values of closest to .
The rest of this paper is organized as follows. In Section 2, we briefly review the CPF-JDGSVD method proposed in [15]. In Section 3, we propose the CPF-HJDGSVD and IF-HJDGSVD methods. In Section 4, we develop thick-restart CPF-HJDGSVD and IF-HJDGSVD with deflation and purgation to compute GSVD components of . In Section 5, we report numerical experiments to illustrate the performance of CPF-HJDGSVD and IF-HJDGSVD, make a comparison of them and CPF-JDGSVD, and show the superiority of the former two to the latter one. Finally, we conclude the paper in Section 6.
Throughout this paper, we denote by the column space of a matrix, and by and the - and -norms of a matrix or vector, respectively. As in (1.1), we denote by and the -by- identity and -by- zero matrices, respectively, with the subscripts and dropped whenever they are clear from the context.
2 The standard extraction based JDGSVD method
We review the CPF-JDGSVD method in [15] for computing the GSVD component of . Assume that a -dimensional right searching subspace is available, from which an approximation to is extracted. Then we construct
(2.1) |
as the two left searching subspaces, from which approximations to and are computed. It is proved in [15] that the distance between and (resp. and ) is as small as that between and , provided that (resp. ) is not very small. In other words, for the extreme and interior GSVD components, and constructed by (2.1) are as good as provided that the desired generalized singular values are neither very small nor very small. It is also proved in [15] that or is as accurate as for very large or small generalized singular values.
Assume that the columns of form an orthonormal basis of , and compute the thin QR factorizations of and :
(2.2) |
where and are orthonormal, and and are upper triangular. Then the columns of and are orthonormal bases of and , respectively. With , , and their orthonormal bases available, we can extract an approximation to the desired GSVD component of with respect to them. The standard extraction approach in [15] seeks for positive pairs with , normalized vectors , , and vectors that satisfy the Galerkin type conditions:
(2.3) |
Among pairs ’s, select closest to , and take as an approximation to . We call or a Ritz value and , and the corresponding left and right Ritz vectors, respectively.
It follows from the thin QR factorizations (2.2) of and that and . Write , and . Then (2.3) becomes
(2.4) |
which is precisely the GSVD of the projected matrix pair . Therefore, in the extraction phase, the standard extraction approach computes the GSVD of the -by- matrix pair , picks up the GSVD component with being the generalized singular value of closest to the target , and use
as an approximation to of . It is straightforward from (2.3) that , and
That is, is a standard Ritz pair to the eigenpair of the symmetric definite matrix pair with respect to the subspace . Because of this, we call a standard Ritz approximation in the GSVD context.
Since and , the residual of Ritz approximation is
(2.5) |
Obviously, is an exact GSVD component of if and only if . The approximate GSVD component is claimed to have converged if
(2.6) |
where is a user prescribed tolerance, and one then stops the iterations.
If has not yet converged, the CFP-JDGSVD method expands the right searching subspace and constructs the corresponding left subspaces and by (2.1). Specifically, the CPF-JDGSVD seeks for an expansion vector in the following way: For the vector
(2.7) |
that satisfies , we first solve the correction equation
(2.8) |
with the fixed for until
(2.9) |
for a user prescribed tolerance , say, , and then solve the modified correction equation with the dynamic for . Note that is an oblique projector onto the orthogonal complement of the subspace .
With the solution of (2.8), we expand to the new -dimensional , whose orthonormal basis matrix is
(2.10) |
where is called an expansion vector. We then compute the orthonormal bases and of the expanded left searching subspaces
by efficiently updating the thin QR factorizations of and , respectively, where
with
CPF-JDGSVD then computes a new approximate GSVD component of with respect to and , and repeat the above process until the convergence criterion (2.6) is achieved. We call iterative solutions of (2.8) the inner iterations and the extractions of the approximate GSVD components with respect to , and the outer iterations.
As has been shown in [15], it suffices to iteratively solve the correction equations approximately with low or modest accuracy and uses an approximate solution to update in the above way, in order that the resulting inexact CPF-JDGSVD method and its exact counterpart with the correction equations solved accurately behave similarly. Precisely, for the correction equation (2.8), we adopt the inner stopping criteria in [15] and stop the inner iterations when the inner relative residual norm satisfies
(2.11) |
where is a user prescribed parameter and is a constant depending on and the current approximate generalized singular values.
3 The harmonic extraction based JDGSVD methods
We shall make use of the principle of the harmonic extraction [31, 33] to propose the CPF-harmonic and IF-harmonic extraction based JDGSVD methods in Section 3.1 and Section 3.2, respectively. They compute new approximate GSVD components of with respect to the given left and right searching subspaces , and , and suit better for the computation of interior GSVD components.
3.1 The CPF-harmonic extraction approach
If has full column rank with some special, e.g., banded, structure, from which the inversion can be efficiently applied, we can propose our CPF-harmonic extraction approach to compute a desired approximate GSVD component as follows. For the purpose of derivation, assume that
(3.1) |
is the Cholesky factorization of with being nonsingular and lower triangular, and define the matrix
(3.2) |
We present the following result, which establishes the relationship between the GSVD of and the SVD of and will be used to propose the CPF-harmonic extraction approach.
Theorem 3.1.
By the definitions (3.2) and (3.3) of and , from we obtain
that is, the first relation in (3.4) holds. From the GSVD (1.2), it is straightforward that . Making use of this relation and (3.1) gives
which proves the second relation in (3.4).
Theorem 3.1 motivates us to propose our first harmonic extraction approach to compute the singular triplet of and then recover the desired GSVD component of .
Specifically, take the -dimensional and as the left and right searching subspaces for the left and right singular vectors and of , respectively. Then the columns of form a basis of . Mathematically, we seek for positive and vectors and such that
(3.5) |
This is the harmonic extraction approach for the eigenvalue problem of the augmented matrix
for the given target [31, 33], where is a harmonic Ritz value and is the harmonic Ritz vector with respect to the searching subspace
We pick up the closest to as the approximation to and take the normalized and as approximations to and , respectively. We will show how to obtain an approximation to afterwards.
Write and with and . Then , and requirement (3.5) amounts to the equation
Decompose , and rearrange the above equation. Then we obtain the generalized eigenvalue problem of a -by- matrix pair:
(3.6) |
By (3.2), and the thin QR factorization of in (2.2), we have
showing that
Moreover, exploiting the Cholesky factorization (3.1) of and the thin QR factorization of in (2.2), we obtain
Substituting these two relations into (3.6) yields
(3.7) |
For the brevity of presentation, we will denote the symmetric matrices
and
(3.8) |
In implementations, we compute the generalized eigendecomposition of the symmetric positive definite matrix pair and pick up the largest eigenvalue in magnitude and the corresponding unit-length eigenvector . Then the harmonic Ritz approximation to the desired singular triplet of is
(3.9) |
Since is an approximation to the right singular vector of , from (3.3) the vector after some proper normalization is an approximation to the right generalized singular vector of , which we write as
(3.10) |
where is a normalizing factor. It is natural to require that the approximate right singular vector be -norm normalized, i.e., , since the exact satisfies by (1.2). With this normalization, from (3.10), we have
from which it follows that
(3.11) |
Note that the approximate left generalized singular vector defined by (3.9) is no longer collinear with , as opposed to the collinear and obtained by the standard extraction approach in Section 2. To this end, instead of in (3.9), we take new and defined by
(3.12) |
as the harmonic Ritz approximations to and , which are colinear with and , respectively. Correspondingly, define and . Then by (3.11), the parameter in (3.10) becomes . Moreover, by definition (3.10) of and the thin QR factorizations of and in (2.2), we obtain
Using them, we can efficiently compute the approximate generalized singular vectors
(3.13) |
without forming products of the vector with the large and .
As for the approximate generalized singular value in (3.9), we replace it by the Rayleigh quotient of with respect to the approximate left and right generalized singular vectors and , , where
(3.14) |
The reason is that is a better approximation to than the harmonic Ritz value in the sense that
(3.15) |
We remark that the residual of can be defined similarly to (2.5), and a stopping criterion similar to (2.6) can be used.
The CPF-harmonic extraction approach does not need to form the cross product matrices or explicitly. To distinguish from the approximation obtained by the IF-harmonic extraction approach to be proposed in the next subsection, we call the CPF-harmonic Ritz approximation to with respect to the left and right searching subspaces , and , where or is the CPF-harmonic Ritz value, and and are the left and right CPF-harmonic Ritz vectors, respectively. Particularly, if we expand and in a similar manner to that described in Section 2, the resulting method is called the CPF-harmonic JDGSVD method, abbreviated as the CPF-HJDGSVD method.
From (3.7), we can efficiently update the projected matrix pair as the subspaces are expanded. At each expansion step, one needs to solve the large symmetric positive definite linear equations with the coefficient matrix and the multiple right-hand sides . This can be done efficiently in parallel whenever the Cholesky factorization (3.1) of can be computed efficiently, which is the case for some structured , e.g., banded structure.
However, for a general large and sparse , the calculation of the Cholesky factorization (3.1) of may be costly and even computationally infeasible. In this case, we can compute using the Conjugate Gradient (CG) method for each column of . For well conditioned, the CG method converges fast.
Finally, we remark that, when is of full column rank, the CPF-harmonic extraction approach proposed above can be directly applied to the matrix pair , whose GSVD components are , .
3.2 The IF-harmonic extraction approach
As is clear from the previous subsection, CPF-HJDGSVD requires that the symmetric be positive definite, namely, is square or rectangular and has full column rank. If the direct application of is unaffordable or the CG method converges slowly, then the CPF-harmonic extraction approach is costly. Alternatively, we will propose an inverse-free (IF) harmonic extraction approach that avoids this difficulty and removes the above restriction on .
Given the right searching subspace , the IF-harmonic extraction approach seeks for an approximate generalized singular value and an approximate right generalized singular vector with such that
(3.16) |
namely, the residual of as an approximate generalized eigenpair of the matrix pair is orthogonal to the subspace . This is precisely the harmonic Rayleigh–Ritz projection of onto with respect to the target , and the pairs are the harmonic Ritz approximations of with respect to for the given . One selects the positive closest to and the corresponding as approximations to the desired generalized singular value closest to and the corresponding right generalized singular vector .
Since the columns of span the subspace , requirement (3.16) is equivalent to
where is a normalizing factor such that .
Writing and rearranging the above equation, we obtain
(3.17) |
that is, is a generalized eigenvalue of the matrix pair and is the corresponding normalized generalized eigenvector, where
(3.18) |
We compute the generalized eigendecomposition of , pick up its largest generalized eigenvalue in magnitude, and take as an approximation to . Correspondingly, the harmonic Ritz pair to approximate is
(3.19) |
where is the generalized eigenvector of corresponding to the eigenvalue .
As for the normalizing factor , by the requirement that , following the same derivations as in Section 3.1, we have
(3.20) |
where and are defined by (2.2). Analogously to that done in Section 3.1, rather than using the harmonic Ritz value to approximate , we recompute a new and better approximate generalized singular value and the corresponding left generalized singular vectors by
(3.21) |
Since the new approximate generalized singular value is the square root of the Rayleigh quotient of the matrix pair with respect to , as an approximation to , it is more accurate than in (3.19) in the sense of (3.15) when the CPF-harmonic approximations , and are replaced by the IF-harmonic ones , and , respectively.
It is straightforward to verify that in (3.21) satisfies and with and . By (2.2), (3.20) and (3.21), it is easily shown that
(3.22) |
Therefore, compared with (3.21), we can exploit formula (3.22) to compute and more efficiently without using and to form matrix-vector products. We call the IF-harmonic Ritz approximation to with respect to the left and right searching subspaces , and , where the pair or is the IF-harmonic Ritz value, and and are the left and right IF-harmonic Ritz vectors, respectively. Particularly, when expanding and in a similar manner to that described in Section 2, the resulting method is called the IF-harmonic JDGSVD method, abbreviated as the IF-HJDGSVD method.
Based on the way that is computed, the associated residual and stopping criterion are defined as (2.5) and designed as (2.6), respectively.
In computations, as and are expanded, we first update the intermediate matrices
(3.23) |
efficiently and then form the matrices
(3.24) |
Compared with the CPF-harmonic extraction, the IF-harmonic extraction does not involve . Note that it uses and explicitly when forming the matrices and in (3.18). Fortunately, provided that the desired is not very small, then is a well conditioned eigenvalue of and is an approximation to with the accuracy [32, Sect. 3, Chap. XI].
4 Thick-restart JDGSVD type algorithms with deflation and purgation
As the subspace dimension increases, the computational complexity of the proposed JDGSVD type algorithms will become prohibitive. For a maximum number allowed, if the algorithms do not yet converge, then it is necessary to restart them. In this section, we show how to effectively and efficiently restart CPF-HJDGSVD and IF-HJDGSVD proposed in Section 3, and how to introduce some efficient novel deflation and purgation techniques into them to compute more than one, i.e., , GSVD components of .
4.1 Thick-restart
We adopt a commonly used thick-restart technique, which was initially advocated in [30] and has been popularized in a number of papers, e.g., [14, 15, 30, 35, 36]. Adapting it to our case, we take three new initial searching subspaces to be certain -dimensional subspaces of the left and right searching subspaces at the current cycle, which aim to contain as much information as possible on the desired left and right generalized singular vectors and their few neighbors. Then we continue to expand the subspaces in the regular way described in Sections 2–3, and compute new approximate GSVD components with respect to the expanded subspaces. We check the convergence at each step, and if converged, stop; otherwise expand the subspaces until the subspace dimension reaches . Proceed in this way until the desired GSVD component is found. In what follows we describe how to efficiently implement thick-restart in our GSVD context, which turns out to be involved and is not as direct as in the context of the standard eigenvalue problem and SVD problem.
At the current extraction phase, either CPF-HJDGSVD or IF-HJDGSVD has computed approximate right generalized singular vectors, denoted by in a unified form, corresponding to the approximate generalized singular values closest to , where is used to approximate the desired . Write and , and take the new initial right searching subspace
Compute the thin QR factorization of to obtain its Q-factor . Then the columns of
(4.1) |
form an orthonormal basis of . Correspondingly, we take the new initial left subspaces and . Notice that
We compute the thin QR factorizations of the small matrices and :
where are orthonormal, and and are upper triangular. Then the columns of
form orthonormal bases of and , and and are the R-factors of and , respectively.
For the CPF-harmonic extraction, we need to update the projection matrices and defined by (3.8). Concretely, we compute and the -, - and -block submatrices of by using and . The -block submatrix of is updated efficiently without involving :
(4.2) |
where is part of the -block submatrix of . For the IF-harmonic extraction, we efficiently update the intermediate matrices , and in (3.23) by
4.2 Deflation and purgation
If the GSVD components , of are required with labeled as in (1.3), we can adapt the efficient deflation and purgation techniques in [15] to our JDGSVD algorithms.
Assume that the approximate GSVD components have converged to the desired GSVD components with
(4.3) |
Write , and , , . Then is a converged approximate partial GSVD of that satisfies
and
Proposition 4.1 of [15] proves that if in (4.3) then the exact nontrivial GSVD components of the modified matrix pair
(4.4) |
are , where satisfies . Therefore, we can apply either CPF-HJDGSVD or IF-HJDGSVD to the pair (4.4), and compute the next desired GSVD component .
To this end, we require that the converged and be bi-orthogonal, i.e., . Moreover, as the right searching subspace is expanded, we require that be always -orthogonal to the converged approximate right generalized singular vectors , i.e., . Such an orthogonality can be guaranteed in computations, as shown below.
Assume that and . At the extraction phase, we use the CPF-harmonic or IF-harmonic extraction to obtain an approximate GSVD component of . If has not yet converged, we construct and with . Then it follows from and that , and . Therefore, is an oblique projector. At the subspace expansion phase, instead of (2.8), we use an iterative solver, e.g., the MINRES method [29], to approximately solve the modified symmetric correction equation
(4.5) |
with being the residual (2.5) of and or . Having found an approximate solution , we orthonormalize it against to obtain the expansion vector and update by (2.10). By assumption and (4.5), both and are orthogonal to , which makes the expansion vector and the expanded right searching subspace orthogonal to .
If has already converged, we add it to the converged partial GSVD and set . By assumption, the old and are bi-orthogonal. Since the added is orthogonal to the old , it is known that the new and are also bi-orthogonal. Proceed in this way until all the desired GSVD components of are found.
Remarkably, when has converged, the current searching subspaces usually contain reasonably good information on the next desired GSVD component. In order to make full use of such available information when computing the next , the authors in [14, 15] have proposed an effective and efficient purgation strategy. It can be adapted to our current context straightforwardly: We purge the newly converged from the current and take the reduced subspace as the initial right searching subspace for computing the next desired GSVD component of . To achieve this, we compute the QR factorization of the matrix to obtain its Q-factor such that the columns of form an orthonormal basis of the orthogonal completement subspace of . Then the columns of
form an orthonormal basis of , and is orthogonal to with because and
Therefore, provided that in (4.1) is replaced by , just as done in Section 4.1, we can efficiently construct orthonormal base of the new initial searching left and right subspaces , and . Therefore, the purgation can be done with very little cost. We then continue to expand the subspaces in a regular way until their dimensions reach .
5 Numerical experiments
In this section, we report numerical experiments on several problems to illustrate the performance of the two harmonic extraction based algorithms CPF-HJDGSVD, IF-HJDGSVD and the standard extraction based algorithm CPF-JDGSVD in [15], and make a comparison of them. All the numerical experiments were performed on an Intel Core (TM) i9-10885H CPU 2.40 GHz with 64 GB RAM using the Matlab R2021a with the machine precision under the Miscrosoft Windows 10 64-bit system.
nd3k | 9000 | 9000 | 9000 | 3306688 | 9.33e+1 | 1.16e+2 | 1.77e-6 | |
viscoplastic1 | T | 4326 | 4326 | 4326 | 74142 | 7.39e+1 | 5.26e+1 | 1.51e-4 |
rajat03 | 7602 | 7602 | 7602 | 55457 | 5.10e+2 | 2.65e+2 | 8.07e-6 | |
4486 | 2324 | 2324 | 21966 | 1.93e+2 | 1.10e+2 | 1.20e-2 | ||
Hamrle2 | 5952 | 5952 | 5952 | 40016 | 1.04e+2 | 7.29e+1 | 4.12e-4 | |
4228 | 2109 | 2109 | 95933 | 8.95e+2 | 1.86e+3 | 7.86e-1 | ||
grid2 | 3296 | 3295 | 3296 | 19454 | 7.54e+1 | 1.93e+3 | 3.32e-17 | |
dw1024 | 2048 | 2047 | 2048 | 14208 | 8.03 | 5.25e+2 | 2.55e-4 | |
9690 | 5189 | 5190 | 114523 | 6.24e+1 | 1.19e+4 | 2.91e-1 | ||
9590 | 5089 | 5090 | 69223 | 4.40e+1 | 9.77e+3 | 2.91e-1 | ||
bibd_81_2 | 3240 | 3238 | 3240 | 12954 | 4.12 | 4.69e+5 | 2.50e-1 | |
benzene | 8219 | 8217 | 8219 | 267320 | 5.58e+2 | 1.60e+7 | 2.89e-1 | |
blckhole | 2132 | 2130 | 2132 | 21262 | 3.64e+1 | 1.32e+6 | 6.90e-4 |
Table 1 lists all the test problems together with some of their basic properties, where the matrices or their transpose(s) are sparse matrices from [8] with , the matrices are taken to be (i) the symmetric tridiagonal Toeplitz matrices with whose diagonal and subdiagonal elements are and , respectively, and (ii)
which are the scaled discrete approximations of the first and second order derivative operators in dimension one with and , respectively, denotes the total numbers of the nonzero elements in and , and and denote the largest and smallest nontrivial generalized singular values of , respectively. We mention that, for those matrix pairs with , all the generalized singular values of are nontrivial ones and, for the matrix pairs with and , there are one and two infinite generalized singular values, respectively.
For the three algorithms under consideration, we take the vectors and and normalize them to form one dimensional right searching subspaces for with and , respectively, where and are the Matlab built-in functions. When the dimensions of , and reach the maximum number but the algorithms do not converge, we use the corresponding thick-restart algorithms by taking . An approximate GSVD component is claimed to have converged if its relative residual norm satisfies (2.6) with . We stop the algorithms if all the desired GSVD components have been computed successfully or the total outer iterations have been used. For the correction equation (2.8), we first take and then switch to if the outer residual norm satisfies (2.9) with . We take zero vectors as initial solution guesses for the inner iterations and use the Matlab built-in function minres to solve the correction equation (2.8) or (4.5) until the inner relative residual norm meets (2.11) with the stopping criterion . We comment that, as our extensive experience has demonstrated, preconditioning the correction equations by ILU type factorizations [29] has turned out to be ineffective and does not reduce the inner iterations for most of the test problems. The ineffectiveness is due to the (high) indefiniteness of correction equations. Therefore, we report only the results using the MINRES method without preconditioning.
In all the tables, for the ease of presentation, we further abbreviate the CPF-JDGSVD, CPF-HJDGSVD and IF-HJDGSVD algorithms as CPF, CPFH and IFH, respectively. We denote by and the total numbers of outer and inner iterations that an underlying JDGSVD algorithm uses to achieve the convergence, respectively, and by the total CPU time in seconds counted by the Matlab built-in commands tic and toc.
Example 5.1.
We compute one GSVD component of associated with the generalized singular value closest to the target that is highly clustered with some other ones of .

For the matrix pairs in this and the next two examples, the matrices ’s are well conditioned, and their Cholesky factorizations can be cheaply computed at the cost of flops, so that each matrix-vector product with can be implemented using flops. Therefore, at the expansion phase of each step of CPF-HJDGSVD, we use the Matlab recommended command to carry out -vector products and update the matrix in (3.8). Purely for the experimental purpose and the illustration of the truly convergence behavior, when solving the inner linear systems (2.8) involved in the JDGSVD type algorithms, we compute the LU factorizations of and use them to solve the linear systems. That is, we solve all the correction equations accurately in finite precision arithmetic. We will demonstrate how the CPF-harmonic and IF-harmonic extraction approaches behave. Figure 1 depicts the outer convergence curves of the three JDGSVD type algorithms.
As can be seen from Figure 1, compared with CPF-JDGSVD, the two harmonic JDGSVD algorithms have smoother outer convergence behavior, and IF-HJDGSVD uses four fewer outer iterations to reach the convergence than CPF-JDGSVD and CPF-HJDGSVD. This illustrates the advantage of IF-HJDGSVD over CPF-JDGSVD and CPF-HJDGSVD. Of CPF-JDGSVD and CPF-HJDGSVD, although they use the same number of outer iterations to converge, CPF-HJDGSVD should be favorable because of its much more regular convergence behavior.
Example 5.2.
We compute one GSVD component of with the generalized singular value closest to a small target being clustered with some other ones of . We should notice that is fairly near to the left-end point of the generalized singular spectrum of . This implies that the desired generalized singular vectors and the correction equations (2.8) are ill conditioned, causing that minres converges slowly.

We draw the outer convergence curves of the three JDGSVD type algorithms in Figure 2. As the figure shows, both CPF-HJDGSVD and IF-HJDGSVD converge much more regularly than CPF-JDGSVD. Specifically, IF-HJDGSVD converges much faster than CPF-JDGSVD in the first sixteen outer iterations, and it has already reached the level of at iteration 16. Although it stagnates for the next several outer iterations, IF-HJDGSVD manages to converge two outer iterations more early than CPF-JDGSVD. On the other hand, CPF-HJDGSVD converges steadily in the first twenty-two outer iterations, and it then drops sharply and achieves the convergence criterion in the next two outer iterations. As the results indicate, CPF-HJDGSVD uses seven and nine fewer outer iterations than CPF-JDGSVD and IF-HJDGSVD, respectively.
Obviously, for this problem, both CPF-HJDGSVD and IF-HJDGSVD performs better than CPF-JDGSVD. Of the two harmonic algorithms, CPF-HJDGSVD is favorable for its faster overall convergence.
Example 5.3.
We compute ten GSVD components of the matrix pairs , , and with the generalized singular values closest to the targets , , and , respectively. The desired generalized singular values of and are the largest ones, which are fairly isolated one another, and those of and are highly clustered interior ones. In the expansion phase of the three algorithms, we use minres without preconditioning to solve all the correction equations.

Figures 3–4 depict the convergence curves of the three JDGSVD algorithms for computing the ten desired GSVD components of and , and Table 2 displays the results on the four test problems.

Algorithm | ||||
---|---|---|---|---|
rajat03 | CPF | 53 | 14695 | 3.70 |
CPFH | 48 | 13082 | 3.48 | |
IFH | 45 | 13207 | 3.55 | |
CPF | 75 | 4971 | 0.49 | |
CPFH | 67 | 4609 | 0.48 | |
IFH | 46 | 4477 | 0.42 | |
Hamrle2 | CPF | 100 | 17210 | 3.50 |
CPFH | 113 | 16330 | 3.60 | |
IFH | 72 | 17214 | 3.69 | |
CPF | 102 | 13382 | 2.06 | |
CPFH | 62 | 9469 | 1.53 | |
IFH | 42 | 8848 | 1.31 |
For and , we can observe from the figures and Table 2 that, regarding the outer convergence, CPF-HJDGSVD and especially IF-HJDGSVD outperform CPF-JDGSVD as they use a little bit fewer and substantially fewer outer iterations than the latter for and , respectively. Specifically, for , we see from Figure 4 that the two harmonic algorithms CPF-HJDGSVD and IF-HJDGSVD have much smoother and faster outer convergence. We must remind the reader that, for , each JDGSVD algorithm has ten convergence stages, which denote the one by one convergence processes of the desired ten GSVD components. In the meantime, we also see from Table 2 that, regarding the overall efficiency, CPF-HJDGSVD and IF-HJDGSVD outperform CPF-JDGSVD in terms of total inner iterations and total CPU time.
For , since the desired generalized singular values are highly clustered, the corresponding left and right generalized singular vectors are ill conditioned. As a result, it may be hard to compute the desired GSVD components using the standard and harmonic JDGSVD algorithms [18]. We observe quite irregular convergence behavior and sharp oscillations of CPF-JDGSVD and CPF-HJDGSVD, while IF-HJDGSVD converges much more smoothly and uses significantly fewer outer iterations, compared with CPF-JDGSVD and CPF-HJDGSVD, as shown in Table 2. Therefore, IF-HJDGSVD is preferable for this problem.
For the matrix pair , the three JDGSVD algorithms succeed in computing all the desired GSVD components. Among them, CPF-HJDGSVD outperforms CPF-JDGSVD considerably in terms of outer iterations and overall efficiency, and IF-HJDGSVD is slightly better than CPF-HJDGSVD as it uses quite fewer outer iterations and slightly fewer inner iterations and less CPU time than the latter one. Clearly, both CPF-HJDGSVD and IF-HJDGSVD are suitable for this problem and IF-HJDGSVD is favorable due to the faster outer convergence.
In summary, for the four test problems, IF-HJDGSVD performs best, CPF-HJDGSVD is the second, and both of them are considerably better than CPF-JDGSVD.
Example 5.4.
We compute the ten GSVD components of with the desired generalized singular values closest to the target . The desired generalized singular values are the largest ones and well separated one another.

For the matrix pairs with rank deficient, CPF-HJDGSVD cannot be applied. We only use CPF-JDGSVD and IF-HJDGSVD to compute the desired GSVD components of and report the results obtained. The outer iterations, inner iterations and CPU time used by CPF-JDGSVD are 48, 71317 and 6.6 seconds, respectively, and those used by IF-HJDGSVD are 42, 67463 and 6.3 seconds, respectively. In Figure 5, we draw the outer convergence curves of these two algorithms.
As can be seen from Figure 5 and the data listed above, IF-HJDGSVD outperforms CPF-JDGSVD in terms of the outer iterations, the overall efficiency and smooth convergence behavior.
Example 5.5.
We compute the ten GSVD components of the matrix pairs , , , , and with the generalized singular values closest to the targets , , , , and , respectively. All the desired generalized singular values are interior ones and are fairly clustered, except for , whose desired generalized singular values are well separated one another.
CPF-JDGSVD | IF-HJDGSVD | |||||
---|---|---|---|---|---|---|
dw1024 | 62 | 61063 | 3.61 | 47 | 49560 | 2.86 |
73 | 58292 | 14.9 | 44 | 56257 | 15.0 | |
48 | 111177 | 24.7 | 40 | 96114 | 22.5 | |
bibd_81_2 | 166 | 484601 | 39.9 | 112 | 314748 | 27.3 |
benzene | 65 | 154109 | 88.9 | 41 | 109394 | 61.3 |
blckhole | 180 | 356204 | 23.5 | 128 | 242227 | 16.1 |
Table 3 displays all the results obtained. As is observed from them, for the matrix pairs , , , and with the given targets, IF-HJDGSVD uses fewer outer and inner iterations and less CPU time to converge than CPF-JDGSVD, and it outperforms CPF-JDGSVD either slightly or significantly. For , however, IF-HJDGSVD uses much fewer outer iterations but comparable inner iterations and CPU time to compute all the desired GSVD components, compared with CPF-JDGSVD. In terms of a smoother and faster outer convergence, IF-HJDGSVD outperforms CPF-JDGSVD for this problem; almost the same overall efficiency, i.e., and , is due to approximate solutions of correction equations using the MINRES method, whose convergence is complicated and depends on several factors, especially when a linear system is highly indefinite.
Summarizing all the numerical experiments, we conclude that (i) for the computation of large GSVD components, CPF-HJDGSVD and IF-HJDGSVD generally suit better than CPF-JDGSVD, (ii) for the computation of interior GSVD components, CPF-HJDGSVD and IF-HJDGSVD generally outperform CPF-JDGSVD, and, of them, IF-HJDGSVD is often favorable due to its faster and smoother convergence, higher overall efficiency and wider applicability, and (iii) for the computation of small GSVD components, if is of full column rank, then CPF-HJDGSVD performs slightly better than IF-HJDGSVD and both of them are preferable to CPF-JDGSVD.
6 Conclusions
In this paper, we have proposed two harmonic extraction based JDGSVD methods CPF-HJDGSVD and IF-HJDGSVD that are more suitable for the computation of interior GSVD components of a large matrix pair. The algorithms are and free and their inversions free, respectively. To be practical, we have developed their thick-restart algorithms with efficient deflation and purgation to compute more than one GSVD components of with a given target . We have detailed a number of key issues on subtle efficient implementations.
We have made numerical experiments on a number of problems, illustrating that both IF-HJDGSVD and CPF-HJDGSVD outperform CPF-JDGSVD and can be much better than CPF-JDGSVD, especially for the computation of interior GSVD components. Furthermore, we have observed that IF-HJDGSVD is generally more robust and reliable than CPF-HJDGSVD and, therefore, is preferable but CPF-HJDGSVD is a better option when small GSVD components are required and has full column rank.
However, as we have observed, IF-HJDGSVD and CPF-HJDGSVD, though better than CPF-JDGSVD, may perform badly for some test problems, and they may exhibit irregular convergence behavior. This is most probably due to the intrinsic possible irregular convergence and even non-convergence of a harmonic extraction approach, which states that harmonic Ritz vectors may converge irregularly and even fail to converge even though the distances between desired eigenvectors or, equivalently, (generalized) singular vectors and searching subspaces tend to zero; see [19]. Such potential drawback has severe effects on effective expansions of searching subspaces and strongly affects the convergence of the resulting harmonic extraction based algorithms. To better solve the GSVD problem in this paper, a refined or refined harmonic extraction based JDGSVD type algorithm should be appealing. This will constitute our future work.
Statements and Declarations
This work was supported by the National Science Foundation of China (No. 12171273). The two authors declare that they have no financial interests, and the two authors read and approved the final manuscript. The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.
References
- [1] Z. Bai, J. Demmel, J. Dongarra, A. Ruhe, and H. A. Van der Vorst, Templates for the Solution of Algebraic Eigenvalue Problems: A Practical Guide, SIAM, Philadelphia, PA, 2000.
- [2] T. Betcke, The generalized singular value decomposition and the method of particular solutions, SIAM J. Sci. Comput., 30 (2008), pp. 1278–1295.
- [3] Å. Björck, Numerical Methods for Least Squares Problems, SIAM, Philadelphia, PA, 1996.
- [4] K.-W. E. Chu, Singular value and generalized singular value decompositions and the solution of linear matrix equations, Linear Algebra Appl., 88 (1987), pp. 83–98.
- [5] K. Chui, Charles and J. Wang, Randomized anisotropic transform for nonlinear dimensionality reduction, Int. J. Geomath, 1 (2010), pp. 23–50.
- [6] R. R. Coifman and S. Lafon, Diffusion maps, Appl. Comput. Harmon. Anal., 21 (2006), pp. 5–30.
- [7] R. R. Coifman, S. Lafon, A. B. Lee, M. Maggioni, B. Nadler, F. Warner, and S. W. Zucker, Geometric diffusions as a tool for harmonic analysis and structure definition of data: Multiscale methods, PNAS, 21 (2006), pp. 5–30.
- [8] T. A. Davis and Y. Hu, The University of Florida Sparse Matrix Collection, ACM Trans. Math. Software, 38 (2011), pp. 1–25. Data available online at http://www.cise.ufl.edu/research/sparse/matrices/.
- [9] G. H. Golub and C. F. van Loan, Matrix Computations, 4th Ed., The John Hopkins University Press, Baltimore, 2012.
- [10] P. C. Hansen, Rank-Deficient and Discrete Ill-Posed Problems: Numerical Aspects of Linear Inversion, SIAM, Philadelphia, PA, 1998.
- [11] M. E. Hochstenbach, Harmonic and refined extraction methods for the singular value problem, with applications in least squares problems, BIT, 44 (2004), pp. 721–754.
- [12] M. E. Hochstenbach, A Jacobi–Davidson type method for the generalized singular value problem, Linear Algebra Appl., 431 (2009), pp. 471–487.
- [13] M. E. Hochstenbach and G. L. Sleijpen, Harmonic and refined Rayleigh–Ritz for the polynomial eigenvalue problem, Numer. Linear Algebra Appl., 15 (2008), pp. 35–54.
- [14] J. Huang and Z. Jia, On inner iterations of Jacobi–Davidson type methods for large SVD computations, SIAM J. Sci. Comput., 41 (2019), pp. A1574–A1603.
- [15] J. Huang and Z. Jia, A cross-product free Jacobi–Davidson type method for computing a partial generalized singular value decomposition (GSVD) of a large matrix pair, (2020). arXiv:2004.13975 [math.NA].
- [16] J. Huang and Z. Jia, On choices of formulations of computing the generalized singular value decomposition of a matrix pair, Numer. Algor., 87 (2021), pp. 689–718.
- [17] Z. Jia, The refined harmonic Arnoldi method and an implicitly restarted refined algorithm for computing interior eigenpairs of large matrices, Appl. Numer. Math., 42 (2002), pp. 489–512.
- [18] Z. Jia, Some theoretical comparisons of refined Ritz vectors and Ritz vectors, Sci. China Ser. A, 47 (2004), pp. 222–233.
- [19] Z. Jia, The convergence of harmonic Ritz values, harmonic Ritz vectors and refined harmonic Ritz vectors, Math. Comput., 74 (2005), pp. 1441–1456.
- [20] Z. Jia and C. Li, Inner iterations in the shift-invert residual Arnoldi method and the Jacobi–Davidson method, Sci. China Math., 57 (2014), pp. 1733–1752.
- [21] Z. Jia and C. Li, Harmonic and refined harmonic shift-invert residual Arnoldi and Jacobi–Davidson methods for interior eigenvalue problems, J. Comput. Appl. Math., 282 (2015), pp. 83–97.
- [22] Z. Jia and H. Li, The joint bidiagonalization process with partial reorthogonalization, Numer. Algor., 88 (2021), pp. 965–992.
- [23] Z. Jia and D. Niu, A refined harmonic Lanczos bidiagonalization method and an implicitly restarted algorithm for computing the smallest singular triplets of large matrices, SIAM J. Sci. Comput., 32 (2010), pp. 714–744.
- [24] Z. Jia and Y. Yang, A joint bidiagonalization based algorithm for large scale general-form Tikhonov regularization, Appl. Numer. Math., 157 (2020), pp. 159–177.
- [25] B. Kågström, The generalized singular value decomposition and the general (AB)-problem, BIT, 24 (1984), pp. 568–583.
- [26] M. E. Kilmer, P. C. Hansen, and M. I. Espanol, A projection-based approach to general-form Tikhonov regularization, SIAM J. Sci. Comput., 29 (2007), pp. 315–330.
- [27] R. B. Morgan and M. Zeng, Harmonic projection methods for large non-symmetric eigenvalue problems, Numer. Linear Algebra Appl., 5 (1998), pp. 33–55.
- [28] C. C. Paige and M. A. Saunders, Towards a generalized singular value decomposition, SIAM J. Numer. Anal., 18 (1981), pp. 398–405.
- [29] Y. Saad, Iterative Methods for Sparse Linear Systems, 2nd ed., SIAM, Philadelphia, PA, 2003.
- [30] A. Stathopoulos, Y. Saad, and K. Wu, Dynamic thick restarting of the Davidson, and the implicitly restarted Arnoldi methods, SIAM J. Sci. Comput., 19 (1998), pp. 227–245.
- [31] G. W. Stewart, Matrix Algorithms II: Eigensystems, SIAM, Philadelphia, PA, 2001.
- [32] G. W. Stewart and J. G. Sun, Matrix Perturbation Theory, Acadmic Press, Inc., Boston, 1990.
- [33] H. Van der Vorst, Computational Methods for Large Eigenvalue Problems, Elsvier, Holland, 2002.
- [34] C. F. Van Loan, Generalizing the singular value decomposition, SIAM J. Numer. Anal., 13 (1976), pp. 76–83.
- [35] L. Wu, R. Romero, and A. Stathopoulos, PRIMME_SVDS: A high–performance preconditioned SVD solver for accurate large–scale computations, SIAM J. Sci. Comput., 39 (2017), pp. S248–S271.
- [36] L. Wu and A. Stathopoulos, A preconditioned hybrid SVD method for accurately computing singular triplets of large matrices, SIAM J. Sci. Comput., 37 (2015), pp. S365–S388.
- [37] H. Zha, Computing the generalized singular values/vectors of large sparse or structured matrix pairs, Numer. Math., 72 (1996), pp. 391–417.
- [38] I. N. Zwaan, Cross product-free matrix pencils for computing generalized singular values, (2019). arXiv:1912.08518 [math.NA].
- [39] I. N. Zwaan and M. E. Hochstenbach, Generalized Davidson and multidirectional-type methods for the generalized singular value decomposition, (2017). arXiv:1705.06120 [math.NA].