Skip to main content
Journal of Research of the National Institute of Standards and Technology logoLink to Journal of Research of the National Institute of Standards and Technology
. 2006 Apr 1;111(2):113–119. doi: 10.6028/jres.111.010

Fast Algorithms for Structured Least Squares and Total Least Squares Problems

Anoop Kalsi 1, Dianne P O’Leary 2,3
PMCID: PMC4662500  PMID: 27274922

Abstract

We consider the problem of solving least squares problems involving a matrix M of small displacement rank with respect to two matrices Z1 and Z2. We develop formulas for the generators of the matrix M HM in terms of the generators of M and show that the Cholesky factorization of the matrix M HM can be computed quickly if Z1 is close to unitary and Z2 is triangular and nilpotent. These conditions are satisfied for several classes of matrices, including Toeplitz, block Toeplitz, Hankel, and block Hankel, and for matrices whose blocks have such structure. Fast Cholesky factorization enables fast solution of least squares problems, total least squares problems, and regularized total least squares problems involving these classes of matrices.

Keywords: block Toeplitz matrix, displacement rank, errors in variables method, image deblurring, structured total least squares, Tikhonov regularization, total least squares

1. Introduction

In [6], Mastronardi, Lemmerling, and Van Huffel present an algorithm for solving fast structured total least squares problems of the form

minE,β,x[Eβ]F2 (1)

subject to the constraints

(A+E)x=y+β

with ACm×n a given Toeplitz matrix and yCm×1 a given vector. They include one additional constraint: E is a Toeplitz matrix. They produced a fast algorithm for solving this structured total least squares problem (STLS) and showed that the solution was a better estimator than the solution to the total least squares problem without the Toeplitz constraint.

In this paper, we work through the details of a small generalization of this algorithm. We consider the same problem (1), but under the constraint that A and E have small displacement rank relative to some matrices Z1 and Z2. Choosing these two matrices to be shift-down matrices and the rank to be two gives the Toeplitz constraint considered by [6], but we will be interested in other cases as well. See [3] for a discussion of displacement structure.

We also consider fast solution of the problem under the additional constraint that the norm of the solution vector x is specified, a problem posed in Pruessner and O’Leary [10]. This corresponds to a Tikhonov regularization of our structured total least squares problem and results in a fast solution algorithm for the problem considered in [8, 9, 10, 7].

The core of the algorithm in [6], based on a more general algorithm of [11], relies on two results: the representation of the generators for the matrix AHA that appears in the normal equations when A is Toeplitz, and then a fast factorization of a matrix derived from these generators. So we begin in Sec. 2 with a construction of the generators for MHM when M is any matrix of small displacement rank and Z1 is close to unitary. In Sec. 3 we show that it is inexpensive to form a Cholesky factorization of M HM whenever Z2 is triangular and nilpotent. Section 4 concerns the application of this algorithm, and we conclude in Sec. 5.

The results in this work are derived from [4, 5].

2. Generators of MHM

One way to solve a least squares problem

minxMxb2

involving a matrix M of full column rank is to use the normal equation formulation; we factor MHM = LLH where L is a square lower triangular matrix and then solve the linear system

LLHx=MHb. (2)

Thus, we can solve this problem fast if we can compute a Cholesky factorization of MHM fast. To do this, we will first derive a generator for the matrix MHM when MCm×n (mn) has low displacement rank.

Suppose that M has low displacement rank relative to the matrices Z1Cm×m and Z2Cn×n, which means that if we define

NMZ1MZ2H,

then rank (N), which we denote by ρ1, is small relative to n.

Suppose

Z˜=Z1+W

is a unitary matrix (Z˜HZ˜=I), where W has rank ρ2, also assumed to be small. For example, if E is Toeplitz, let Z1 be the shift-down matrix with ones on its subdiagonal and zeros elsewhere, and then W is the matrix with a one in the last position of row 1.

Then M HM also has low displacement rank relative to Z2, as we can see from the identity

MHMZ2MHMZ2H=MHMZ2MHZ˜HZ˜MZ2H=MHM(MN+WMZ2H)H(MN+WMZ2H)=(NWMZ2H)H(MN+WMZ2H)+MH(NWMZ2H).

Theorem 1. If the rank of NMZ1MZ2H is ρ1 and if the unitary matrix Z˜ is equal to Z1 + W where W has rank ρ2, then

MHMZ2MHMZ2H=NHN+NH(M+WMZ2H)+(MH+(WMZ2H)H)N(WMZ2H)H(WMZ2H)MH(WMZ2H)(WMZ2H)HM

has rank at most 2(ρ1 + ρ2).

Proof: The equation in the statement of the theorem is a regrouping of the terms in the previous equation. The rank of NWMZ2H is at most the rank of N plus the rank of W, so the rank of the sum in that equation is at most 2(ρ1 + ρ2). []

An alternate proof of this theorem can be derived by noting that displacement rank is preserved by taking a Schur complement [3, Lemma 1.5.2], and MHM is the Schur complement of

[IMMH0]

which has displacement rank at most 2(ρ1 + ρ2) relative to the matrix

[Z100Z2].

The bound 2(ρ1 + ρ2) can be an overestimate, since the N and W terms may interact. For example, for a Toeplitz matrix with rank computed relative to the shift-down matrices, the bound yields 6 while the actual rank is 4. If we use circular shifts, though, both the bound and the actual rank are 4.

Using the identity

abH+baH=12(a+b)(a+b)H12(ab)(ab)H,

3. Determining a Factorization of MHM From the Generators

Theorem 1 tells us how to determine ρ = 2 (ρ1 + ρ2) vectors hi so that

MHMZ2MHMZ2H=i=1ρsihihiH (3)

where si equals plus or minus 1. When Z1 and Z2 are shift-down matrices, it has been shown [6, 1, 2] that this implies that

MHM=i=1ρsiL(hi)L(hi)H=[L(h1)L(hρ)]S[L(h1)HL(hρ)H]

where S = diag(Si), Si = diag(si) (n × n), and L(hi) is the lower triangular Toeplitz matrix with first column equal to hi. We now generalize this result somewhat.

3.1 Triangular Factors of Structured Matrices

Theorem 2.

If Z1 is nilpotent, then

AZ1AZ2H=ghh

and only if

A=L1(g)L2H(h)

where

Li(x)=[xZixZin1x].

Proof: Suppose A=L1(g)L2H(h). Observe that

L1(g)L2H(h)=[gZ1gZ1n1g][hHhH(Z2H)hH(Z2H)n1]=j=0n1Z1jghHZ2j

and

Z1L1(g)L2H(h)Z2H=j=0n1Z2j+1ghHZ2j+1

so, since Z1n=0, we conclude that

L1(g)L2H(h)Z1L1(g)L2H(h)Z2H=ghH.

To prove the converse, suppose AZ1AZ2H=ghH. Then, since

ghH=L1(g)L2H(h)Z1L1(g)L2H(h)Z2H,

we conclude that if E=AL1(g)L2H(h), then

E=Z1EZ2H.

Now since Z1 is nilpotent, Z1ρ=0 for some pn. Therefore, Z1p1E=Z1pEZ2H=0, and working backward in powers of Z1, we see that Z10E=Z1EZ2H=0, so A=L1(g)L2H(h). []

The following corollary can be proved by finite induction.

Corollary 1: If Z1 is nilpotent, then

AZ1AZ2H=i=1ρgihiH

if and only if

A=i=1ρL1(gi)L2H(hi).

3.2 Triangular Factors of MHM

In order to solve our least squares problem, we wish to determine a Cholesky factorization

MHM=LLH,

so we need to reduce the matrix

[L2(h1)HL2(hρ)H]

to upper triangular form, where the vectors hi are defined in (3).

If Z1 and Z2 are shift-down matrices, then [6] shows how to do this reduction fast. Using Corollary 1, we will see that this can be done fast whenever Z2 is triangular and nilpotent. We present the algorithm for the case Z2 lower triangular; the upper triangular case is analogous but works with the columns in reverse order.

The algorithm proceeds by columns, putting zeros below the main diagonal. Note that

L^[L2(h1)HL2(hρ)H]=[h1Hh1HZ2Hh1H(Z2H)nhρHhρHZ2HhρH(Z2H)n].

Suppose we determine a rotation between the first row h1H and row n + 1, which contains h2H, to zero the first element of h2H. The same rotation between h1H(Z2H)j and h2H(Z2H)j(j=1,,n1) also zeroes the first element of h2H(Z2H)j since Z2H is upper triangular. Therefore, by introducing one zero into our matrix, we have implicitly introduced n − 1 more, so we can put zeroes below the main diagonal in column 1 by using only ρ − 1 rotations, independent of the size of n.

We then use the resulting second row, equal to the first row postmultiplied by Z2H, to zero the second element of row n + 1. Again this implicitly introduces additional zeros, n − 2 of them, and we complete the operations on column 2 by using ρ − 1 rotations.

If we repeat this for each column, we accomplish our reduction. Let H be the ρ × n matrix whose rows are hiH. We can thus reduce L^ to upper triangular form just by operating on the matrix H.

We design our algorithm to use Givens rotations as often as possible, minimizing the number of hyperbolic rotations in order to preserve stability. A Givens rotation can be used between row i and row j whenever si and sj (see equation (3)) have the same sign; if they have different signs, then we must use a hyperbolic rotation. We’ll assume that we have ordered the generators so that the first ρ^ rows of H have si = 1 and the remaining ones have si = − 1.

Algorithm Reduce (H)3

 For j = 1, …, n,
  For i = 2, …, ρ^,
   If hij is nonzero, then
    zero it by a Givens rotation between row 1 and row i;
  end for
  For i=ρ^+2,,ρ,
   If hij is nonzero, then
    zero it by a Givens rotation between row ρ^+1 and row i;
  end for
   If hρ^+1,j is nonzero, then
    zero it by a stabilized hyperbolic rotation between row 1 and row ρ^+1;
   Then the jth row of LH is h1H, the first row of the current H matrix.
   Replace the first row of H by h1HZ2H to form the pivot row for the next value of j.
  end for

The cost of this reduction is at most O(ρn2), ignoring sparsity, plus the cost of the multiplications by Z2. Sometimes sparsity can reduce this cost significantly [7]. Without exploiting the structure of L^ the cost would be O(ρn3). Once the factors LLH are computed, they can then be used to solve (2).

4. Some Applications

Our fast algorithm enables us to solve least squares, total least squares, and regularized total least squares problems involving matrices for which Z1 is close to unitary and Z2 is triangular and nilpotent. This includes several important classes of structured matrices.

4.1 Solving Least Squares Problems

Consider first the least squares problem

minxMxb2

where MC m×n has full column rank. We can use our algorithm if

  • M is Toeplitz. Then Z1 and Z2 are the shift-down matrices of appropriate size and the displacement rank is 2.

  • M is block Toeplitz:
    M=[MδMδ1M1Mδ+1MδM2Mδ+γ1Mδ+γ2Mδ],
    where Mδ has dimension m / γ × n / δ. Then choosing Z1Cm×m as
    Z1=[0000I00000I0],
    where each block has dimension m/γ×m/γ, and choosing Z2Cm×n similarly but with blocks of dimension n / δ × n / δ gives a displacement rank of m / γ + n / δ.
  • M has Toeplitz blocks:
    M=[M11M12M1,δM21M22M2,δMγ,1Mγ,2Mγ,δ],
    where each block Mij is Toeplitz. Then choosing Z1Cm×m as a block-diagonal matrix consisting of shift-down matrices of dimensions matching the column dimension of the diagonal blocks of M and choosing Z2Cn×n similarly but with blocks matching the row dimension gives a displacement rank of 2(γ + δ).
  • M Hankel, block Hankel, or having Hankel blocks. These cases are analogous to those considered above.

4.2 Solving Structured Total Least Squares Problems

In some cases the matrix of the problem can be estimated only with error, and we need to determine not just the parameters x of the least squares fit but also the corrections to the operator. This problem can be formulated as

minE,β,x[Eβ]F2 (4)

subject to the constraints

(A+E)x=y+β

with A and E having the same structure.

Suppose that the matrix E can be specified by p parameters α1,…, αp. For example, if E is a Toeplitz matrix, then

E=[αnαn1α1αn+1αnα2αm+n1αm+n2αm],

and p = m + n − 1. We rewrite our problem as

minα,β,x[βα]22 (5)

where

β=(A+E)xy.

Following [6], we have replaced the term EF2 by αHα, equivalent except for scaling of the entries αι2.

We define the matrix XCm×p by the equation

Xa=Ex.

For example, if E is Toeplitz, then p = m + n − 1 and

X=[xnxn1x1000xnxn1x10000xnxn1x1].

Following [11], we form a quadratic approximation to (5) by using linear approximations α + ∆α and x + ∆x, resulting in

β(A+(E+ΔE))(x+Δx)y(A+E)x+XΔα+(A+E)Δxy

so that

[βα]22=[IX0A+E][ΔαΔx]+[α(A+E)xy]22.

If we minimize this with respect to ∆α and ∆x, then we can form a new approximation

α=α+Δαx=x+Δx

to the solution of (5) and then repeat the procedure until convergence. As noted by [11], this is a Gauss-Newton algorithm applied to (5). Therefore, the main computational task is to solve linear least squares problems of the form

minΔα,ΔxM[ΔαΔx]+[(A+E)xyα]22 (6)

where

M=[XA+EI0].

If A is in one of the classes considered in Sec. 4.1, then the matrix M has low displacement rank and we can solve the problem fast.

4.3 Solving Regularized Total Least Squares Problems

In many deblurring problems and other discretized problems involving integral equations of the first kind, the matrix A is so ill-conditioned that noise in the observations y is magnified in solving the STLS problem and a meaningful solution cannot be obtained.

In this case it is necessary to add a regularization constraint to the problem. One common regularization constraint is to restrict the size of the solution, or some linear transformation of the solution:

Cxu

where u is a given scalar and C is commonly chosen to be the identity matrix or a difference operator. If C has low displacement rank relative to Z2 and an appropriate Z^1, our algorithm can be easily modified to incorporate regularization. In this case, our problem (5) can be reformulated as

minα,β,x[βαλCx]22 (7)

where β = (A + E)xy and λ, the regularization parameter, is the Lagrange multiplier for the new constraint. Using a derivation similar to that above, the linearization of (7) results in the following problem to be solved at each step of the iteration:

minΔα,Δx[XA+EI00λC][ΔαΔx]+[βαλCx]p.

Thus, our new M matrix is the matrix M from the previous section augmented by the extra rows [0, λC], and the only change necessary in the algorithm is to find the generators of this matrix rather than the old one.

The displacement structure of this matrix is greatly simplified if C is upper triangular and Z1 and Z2 are shift-down matrices. As noted before, W is zero except for a one in the last position of the first row, and thus WM is zero except for a λ in the last position of the first row. Therefore, WMZ2H=0, so, applying Theorem 1, we have the following result.

Theorem 3. If C is upper triangular and Z1 and Z2 are shift-down matrices, then

MHMZ2MHMZ2H=(MN/2)HN+NH(MN/2) (8)

and has rank 2ρ1, where ρ1 is the rank of N. More generally, (8) holds whenever WMZ2H=0.

5. Conclusions

We have derived the generators for MHM when M is any matrix of small displacement rank relative to Z1 and Z2. We have shown that it is inexpensive to form a Cholesky factorization of MHM whenever Z1 is close to unitary and Z2 is triangular and nilpotent, and we have generalized this algorithm when a regularization constraint is to be applied.

Acknowledgments

We are grateful to Haw-ren Fang for helpful comments on the manuscript. This work was partially supported by the National Science Foundation under Grant CCR-0204084.

Biography

About the authors: Dianne O’Leary is a professor of computer science at the University of Maryland and a mathematician in the NIST Mathematical and Computational Sciences Division. She has a B.S. from Purdue University and a Ph.D from Stanford University. She is the author of over 75 publications on numerical analysis and computational science and over 20 publications on education and mentoring. Anoop Kalsi completed her M.S. degree in the Applied Mathematics Program at the University of Maryland in 2002, and this work formed the basis for her thesis. She is now teaching in New Jersey. The National Institute of Standards and Technology is an agency of the Technology Admininstration, U.S. Department of Commerce.

Footnotes

3

There is an analogous algorithm, FTriang, in [6], for the special case in which M is Toeplitz, but it has some typographical errors. In the statement following “if i<m”, g3 on the left-hand side should be g4. In 12 places on p. 552, “m+n” should be “mn1”. Also, the numbering of the phases of the computation is off by one compared with the description in the paper (“Initialization” should be “Phase 1”, etc.).

6. References

  • 1.Chun J, Kailath T, Lev-Ari H. Fast parallel algorithms for QR and triangular factorizations. SIAM J Sci Stat Comput. 1987;8:899–913. [Google Scholar]
  • 2.Kailath T, Kung S, Morf M. Displacement ranks of matrices and linear equations. J Math Anal Appl. 1979;68:395–407. [Google Scholar]
  • 3.Kailath Thomas. Displacement structure and array algorithms, in Fast Reliable Algorithms for Matrices with Structure. SIAM; Philadelphia: 1999. pp. 1–56. [Google Scholar]
  • 4.Kalsi Anoop. MA Thesis. Mathematics Department, University of Maryland; 2002. Blind two-dimensional deconvolution using total least squares. [Google Scholar]
  • 5.Kalsi Anoop, O’Leary Dianne. Algorithms for structured total least squares problems with applications to blind image deblurring. University of Maryland; Aug, 2002. (Technical report, Computer Science Department Report CS-TR-4390). [Google Scholar]
  • 6.Mastronardi N, Lemmerling P, Van Huffel S. Fast structured total least squares algorithm for solving the basic deconvolution algorithm. SIAM J Matrix Anal Appl. 2000;22:533–553. [Google Scholar]
  • 7.Mastronardi Nicola, Lemmerling Phillip, Kalsi Anoop, O’Leary Dianne, Van Huffel Sabine. Regularized structured total least squares algorithms for blind image deblurring. Linear Algebra and Its Appl. 2004;391:203–221. [Google Scholar]
  • 8.Mesarović V, Galatsanos N, Katsaggelos A. Regularized constrained total least squares image restoration. IEEE Transactions on Image Processing. 1995;4:1096–1108. doi: 10.1109/83.403444. [DOI] [PubMed] [Google Scholar]
  • 9.Ng MK, Plemmons RJ, Pimentel F. A new approach to constrained total least squares image restoration. Linear Algebra and Its Appl. 2000;316:237–258. [Google Scholar]
  • 10.Pruessner Armin, O’Leary Dianne P. Blind deconvolution using a regularized structured total least norm algorithm. SIAM J on Matrix Anal Appl. 2003;24:1018–1037. [Google Scholar]
  • 11.Rosen JB, Park H, Glick J. Total least norm formulation and solution for structured problems. SIAM J Matrix Anal Appl. 1996;17:110–126. [Google Scholar]

Articles from Journal of Research of the National Institute of Standards and Technology are provided here courtesy of National Institute of Standards and Technology

RESOURCES