Solving Limited-Memory BFGS Systems with Generalized ... · Solving Limited-Memory BFGS Systems...

5
Solving Limited-Memory BFGS Systems with Generalized Diagonal Updates Jennifer Erway, Member, IAENG, and Roummel F. Marcia, Member, IAENG Abstract—In this paper, we investigate a formula to solve systems of the form (B k + D)x = y, where B k comes from a limited-memory BFGS quasi-Newton method and D is a diagonal matrix with diagonal entries di,i σ for some σ> 0. These types of systems arise naturally in large-scale optimization. We show that provided a simple condition holds on B0 and σ, the system (B k + D)x = y can be solved via a recursion formula that requies only vector inner products. This formula has complexity M 2 n, where M is the number of L-BFGS updates and n M is the dimension of x. We do not assume anything about the distribution of the values of the diagonal elements in D, and our approach is particularly for robust non-clustered values, which proves problematic for the conjugate gradient method. Index Terms—L-BFGS, quasi-Newton methods, diagonal modifications, Sherman-Morrison-Woodbury I. I NTRODUCTION L IMITED-memory (L-BFGS) quasi-Newton methods are powerful tools within the field of optimization [1], [2], [3], [4] for solving problems when second derivative infor- mation is not available or computing the second derivative is too computationally expensive. In addition, L-BFGS matrices can be used to precondition iterative methods for solving large linear systems of equations. For both L-BFGS methods and preconditioning schemes, being able to solve linear systems with L-BFGS matrices are of utmost importance. While there is a well-known two-loop recursion (cf. [4], [5]) for solving linear systems with L-BFGS matrices, little is known about solving systems involving matrix modifications of L-BFGS matrices. In this paper, we develop a recursion formula to solve linear systems with positive-definite diagonal modifications of L-BFGS matrices, i.e., systems of the form (B k + D)x = y, (1) where B k is the k-th step n × n limited-memory (L-BFGS) quasi-Newton matrix, D is a positive-definite diagonal matrix with each diagonal element d i,i σ for some σ > 0, and x, y n . Systems of the form (1) arise naturally in constrained optimization (see, e.g., [6], [7], [8], [9]) and are often a block component of so-called KKT systems (see, e.g., [10]). In previous work [11], we developed a direct recursion formula for solving (1) in the special case when D is a scalar multiple of the identity matrix, i.e., Manuscript received February 16, 2012; revised March 21, 2012. This work was supported in part by NSF grants DMS-08-11106 and DMS- 0965711. Jennifer B. Erway is with the Department of Mathematics, Wake Forest University, Winston-Salem, 27109, USA. E-mail: [email protected] (see http://math.wfu.edu/jerway). Roummel F. Marcia is with the Department of Applied Mathematics, University of California, Merced, 5200 N. Lake Road, Merced, 95340, USA. E-mail: [email protected] (see http://faculty.ucmerced.edu/rmarcia). D = αI for some constant α> 0, and we stated that the formula can be generalized to diagonal matrices. Here, we explicitly show how to generalize this approach to positive- definite diagonal matrices D. Furthermore, we compare this generalized formula to a popular direct method (the Matlab “backslash” command) and an indirect method (the conjugate gradients). Numerical results suggest that our approach offers significant computational time savings while maintaining high accuracy. II. THE LIMITED- MEMORY BFGS METHOD Let f (x): n a continuously differentiable function. The BFGS quasi-Newton method for minimizing f (x) works by minimizing a sequence of convex, quadratic models of f (x). Specifically, the method generates a sequence of positive-definite matrices {B k } to approximate 2 f (x) from a sequence of vectors {y k } and {s k } defined as y k = f (x k+1 ) -∇f (x k ) and s k = x x+1 - x k , respectively. (See, e.g., [12] for further background on quasi- Newton methods). The L-BFGS quasi-Newton method can be viewed as the BFGS quasi-Newton method where only at most M (M n) recently computed updates are stored and used to update the initial matrix B 0 . The number of updates M is generally kept very small; for example, Byrd et al. [1] suggest M [3, 7]. The L-BFGS quasi-Newton approximation to 2 f (x) is implicitly updated as follows: B k = B 0 - k-1 X i=0 1 s T i B i s i B i s i s T i B i + k-1 X i=0 1 y T i s i y i y T i , (2) where B 0 = γ -1 k I with γ k > 0 a constant. In practice, γ k is often taken to be γ k 4 = s T k-1 y k-1 /ky k-1 k 2 2 (see, e.g., [2] or [4]). Using the Sherman-Woodbury-Morrison formula, the inverse of B k is given by B -1 k = B -1 k-1 + s T k-1 y k-1 + y T k-1 B -1 k-1 y k-1 (s T k-1 y k-1 ) 2 s k-1 s T k-1 (3) - 1 s T k-1 y k-1 ( B -1 k-1 y k-1 s T k-1 + s k-1 y T k-1 B -1 k-1 ) . There is an alternative representation of B -1 k from which a two-term recursion can be established: B -1 k = (V T k-1 ··· V T 0 )B -1 0 (V 0 ··· V k-1 ) (4) + k-1 X j=1 (V T k-1 ··· V T j )s j-1 s T j-1 (V j ··· V k-1 ) + 1 y T k-1 s k-1 s k-1 s T k-1 , Proceedings of the World Congress on Engineering 2012 Vol I WCE 2012, July 4 - 6, 2012, London, U.K. ISBN: 978-988-19251-3-8 ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online) WCE 2012

Transcript of Solving Limited-Memory BFGS Systems with Generalized ... · Solving Limited-Memory BFGS Systems...

Page 1: Solving Limited-Memory BFGS Systems with Generalized ... · Solving Limited-Memory BFGS Systems with Generalized Diagonal Updates Jennifer Erway, Member, IAENG, and Roummel F. Marcia,

Solving Limited-Memory BFGS Systemswith Generalized Diagonal UpdatesJennifer Erway, Member, IAENG, and Roummel F. Marcia, Member, IAENG

Abstract—In this paper, we investigate a formula to solvesystems of the form (Bk + D)x = y, where Bk comes froma limited-memory BFGS quasi-Newton method and D is adiagonal matrix with diagonal entries di,i ≥ σ for someσ > 0. These types of systems arise naturally in large-scaleoptimization. We show that provided a simple condition holdson B0 and σ, the system (Bk + D)x = y can be solved viaa recursion formula that requies only vector inner products.This formula has complexity M2n, where M is the number ofL-BFGS updates and n � M is the dimension of x. We donot assume anything about the distribution of the values of thediagonal elements in D, and our approach is particularly forrobust non-clustered values, which proves problematic for theconjugate gradient method.

Index Terms—L-BFGS, quasi-Newton methods, diagonalmodifications, Sherman-Morrison-Woodbury

I. INTRODUCTION

L IMITED-memory (L-BFGS) quasi-Newton methods arepowerful tools within the field of optimization [1], [2],

[3], [4] for solving problems when second derivative infor-mation is not available or computing the second derivative istoo computationally expensive. In addition, L-BFGS matricescan be used to precondition iterative methods for solvinglarge linear systems of equations. For both L-BFGS methodsand preconditioning schemes, being able to solve linearsystems with L-BFGS matrices are of utmost importance.While there is a well-known two-loop recursion (cf. [4], [5])for solving linear systems with L-BFGS matrices, little isknown about solving systems involving matrix modificationsof L-BFGS matrices.

In this paper, we develop a recursion formula to solvelinear systems with positive-definite diagonal modificationsof L-BFGS matrices, i.e., systems of the form

(Bk +D)x = y, (1)

where Bk is the k-th step n× n limited-memory (L-BFGS)quasi-Newton matrix, D is a positive-definite diagonal matrixwith each diagonal element di,i ≥ σ for some σ > 0,and x, y ∈ Rn. Systems of the form (1) arise naturallyin constrained optimization (see, e.g., [6], [7], [8], [9]) andare often a block component of so-called KKT systems(see, e.g., [10]). In previous work [11], we developed adirect recursion formula for solving (1) in the special casewhen D is a scalar multiple of the identity matrix, i.e.,

Manuscript received February 16, 2012; revised March 21, 2012. Thiswork was supported in part by NSF grants DMS-08-11106 and DMS-0965711.

Jennifer B. Erway is with the Department of Mathematics, Wake ForestUniversity, Winston-Salem, 27109, USA. E-mail: [email protected](see http://math.wfu.edu/∼jerway).

Roummel F. Marcia is with the Department of AppliedMathematics, University of California, Merced, 5200 N. Lake Road,Merced, 95340, USA. E-mail: [email protected] (seehttp://faculty.ucmerced.edu/∼rmarcia).

D = αI for some constant α > 0, and we stated that theformula can be generalized to diagonal matrices. Here, weexplicitly show how to generalize this approach to positive-definite diagonal matrices D. Furthermore, we compare thisgeneralized formula to a popular direct method (the Matlab“backslash” command) and an indirect method (the conjugategradients). Numerical results suggest that our approach offerssignificant computational time savings while maintaininghigh accuracy.

II. THE LIMITED-MEMORY BFGS METHOD

Let f(x) : Rn → R a continuously differentiable function.The BFGS quasi-Newton method for minimizing f(x) worksby minimizing a sequence of convex, quadratic modelsof f(x). Specifically, the method generates a sequence ofpositive-definite matrices {Bk} to approximate ∇2f(x) froma sequence of vectors {yk} and {sk} defined as

yk = ∇f(xk+1)−∇f(xk) and sk = xx+1 − xk,

respectively. (See, e.g., [12] for further background on quasi-Newton methods).

The L-BFGS quasi-Newton method can be viewed as theBFGS quasi-Newton method where only at most M (M �n) recently computed updates are stored and used to updatethe initial matrix B0. The number of updates M is generallykept very small; for example, Byrd et al. [1] suggest M ∈[3, 7]. The L-BFGS quasi-Newton approximation to ∇2f(x)is implicitly updated as follows:

Bk = B0 −k−1∑i=0

1

sTiBisiBisis

TiBi +

k−1∑i=0

1

yTi siyiy

Ti , (2)

where B0 = γ−1k I with γk > 0 a constant. In practice, γk

is often taken to be γk 4= sTk−1yk−1/‖yk−1‖22 (see, e.g., [2]or [4]). Using the Sherman-Woodbury-Morrison formula, theinverse of Bk is given by

B−1k = B−1

k−1 +sTk−1yk−1 + yTk−1B

−1k−1yk−1

(sTk−1yk−1)2sk−1s

Tk−1 (3)

− 1

sTk−1yk−1

(B−1

k−1yk−1sTk−1 + sk−1y

Tk−1B

−1k−1

).

There is an alternative representation of B−1k from which a

two-term recursion can be established:

B−1k = (V T

k−1 · · ·V T0 )B−1

0 (V0 · · ·Vk−1) (4)

+k−1∑j=1

(V Tk−1 · · ·V T

j )sj−1sTj−1(Vj · · ·Vk−1)

+1

yTk−1sk−1sk−1s

Tk−1,

Proceedings of the World Congress on Engineering 2012 Vol I WCE 2012, July 4 - 6, 2012, London, U.K.

ISBN: 978-988-19251-3-8 ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)

WCE 2012

Page 2: Solving Limited-Memory BFGS Systems with Generalized ... · Solving Limited-Memory BFGS Systems with Generalized Diagonal Updates Jennifer Erway, Member, IAENG, and Roummel F. Marcia,

whereVj = I − 1

yTj sjyjs

Tj

(see, e.g., [5]). For the L-BFGS method, there is an efficientway for computing products with B−1

k . Given a vectorz, the following algorithm (cf. [4], [5]) terminates withq 4= B−1

k z:

Algorithm 2.1: Two-loop recursion to compute q = B−1k z

q ← z;for i = k − 1, . . . , 0

αi ← (sTi q)/(yTi si);

q ← q − αiyi;endq ← B−1

0 q;for i = 0, . . . , k − 1

β ← (yTi q)/(yTi si);

q ← q + (αi − β)si:end

The first loop in Algorithm 2.1 for B−1k z computes and

stores the products (Vj · · ·Vk−1)z for j = 0, . . . , k − 1.The algorithm then applies B1

0 . Finally, the second loopcomputes the remainder of (4). This algorithm can be mademore efficient by pre-computing and storing 1/yTi si for0 ≤ i ≤ k − 1. The two-term recursion formula requiresat most O(Mn) multiplications and additions. There iscompact matrix representation of the L-BFGS that can makecomputing products with the L-BFGS quasi-Newton matrixequally efficient (see, e.g., [5]).

It is important to note that computing the inverse of Bk+Dis not equivalent to simply replacing B−1

0 in the two-looprecursion with (B0+D)−1 (c.f. Figure 1 for an illustration).To see this, notice that replacing B−1

0 in (4) with (B0 +D)−1 would apply the updates Vi to the full quantity (B0+D)−1 instead of only B−1

0 . The main contribution of thispaper generalizes the recursion formula in [11] for computing(Bk +D)−1z in an efficient manner using only vector innerproducts.

III. THE RECURSION FORMULA

Consider the problem of finding the inverse of Bk + D,where Bk is an L-BFGS quasi-Newton matrix and D is apositive-definite diagonal matrix with each diagional elementdi,i ≥ σ for some constant σ > 0. The Sherman-Morrison-Woodbury (SMW) formula gives the following formula forcomputing the inverse of B+uvT , where B is invertible anduvT is a rank-one update (see [13]):

(B + uvT )−1 = B−1 − 1

1 + vTB−1uB−1uvTB−1

= B−1 − 1

1 + trace(B−1uvT )B−1uvTB−1

where u and v are both n-vectors. For simplicity, considercomputing the inverse of an L-BFGS quasi-Newton matrixafter only one update, i.e., the inverse of B1 +D. First, wesimplify (2) by defining

ai =Bisi√sTi Bisi

and bi =yi√yTi si

. (5)

Then, B1 +D becomes

B1 +D = (γ−11 I +D)− a0aT0 + b0b

T0

We apply the SMW formula twice to compute (γ−11 +D)−1.

More specifically, let

C0 = (γ−11 I +D),

C1 = (γ−11 I +D)− a0aT0 ,

C2 = (γ−11 I +D)− a0aT0 + b0b

T0 .

Applying the SMW formula yields:

C−11 = C−1

0 +1

1− trace(C−10 a0aT0 )

C−10 a0a

T0 C

−10

C−12 = C−1

1 − 1

1 + trace(C−11 b0bT0 )

C−11 b0b

T0 C

−11 ,

giving an expression for (B1+D)−1 = C−12 , as desired. This

is the basis for the following recursion method that appearsin [14]:

Theorem 1. Let G and G+H be nonsingular matrices andlet H have positive rank M . Let

H = E0 + E1 + · · ·+ EM−1,

where each Ek has rank one and

Ck+1 = G+ E0 + · · ·+ Ek

is nonsingular for k = 0, . . .M−1. Then if C0 = G, then fork = 0, 1, . . . ,M − 1, the inverse of C−1

k+1 can be computedrecursively and is given by

C−1k+1 = C−1

k − τkC−1k EkC

−1k ,

whereτk =

1

1 + trace(C−1

k Ek

) .In particular,

(G+H)−1 = C−1M−1 − τM−1C

−1M−1EM−1C

−1M−1.

Proof: See [14].

We now show that applying the above recursion methodto Bk + D, the product (Bk + D)−1z can be computedrecursively, assuming γkσ is bounded away from zero. Theproof follows [11] very closely.

Theorem 2. Let B0 = γ−1k I , where γk > 0, and let D be a

diagonal matrix with di,i ≥ σ for some σ > 0 and γkσ > εfor some ε > 0. Let

E0 = −a0aT0 ,E1 = b0b

T0 ,

...

E2k−2 = −ak−1aTk−1,

E2k−1 = bk−1bTk−1,

where ai and bi for i = 0, 1, . . . , k − 1, are given in (5).Finally, let C0 = B0 +D and

Cj+1 = B0 +D + E0 + E1 + · · ·+ Ej ,

for j = 0, 1, . . . , 2k − 1. Then

C−1j+1 = C−1

j − τj C−1j EjC

−1j , (6)

Proceedings of the World Congress on Engineering 2012 Vol I WCE 2012, July 4 - 6, 2012, London, U.K.

ISBN: 978-988-19251-3-8 ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)

WCE 2012

Page 3: Solving Limited-Memory BFGS Systems with Generalized ... · Solving Limited-Memory BFGS Systems with Generalized Diagonal Updates Jennifer Erway, Member, IAENG, and Roummel F. Marcia,

= −

(Bk + D) Bk−1 ak−1aTk−1 bk−1b

Tk−1 D

++

!"#$

%&'$

Fig. 1. Pictorial representation of the L-BFGS update method. The matrix Bk is obtained from the previous matrix Bk by adding two rank-one matrices,ak−1a

Tk−1 and bk−1b

Tk−1, where ak−1 and bk−1 are given in (5). The inverse of Bk is similarly obtained by adding two rank-one updates to B−1

k−1

(see (3)). However, the inverse of Bk +D cannot be obtained by adding two rank-one updates to (Bk−1 +D)−1.

whereτj =

1

1 + trace(C−1

j Ej

) . (7)

In particular, since C2k = Bk +D,

(Bk +D)−1 = C−12k−1 − τ2k−1C

−12k−1E2k−1C

−12k−1. (8)

Proof: Notice that this theorem follows from Theorem 1,provided we satisfy its assumptions. First, we let

G = B0 +D and H = E0 + E1 + · · ·+ E2k−1.

Note that G = B0+D is nonsingular because B0 and D arepositive definite and that G+H = Bk+D is also nonsingularsince Bk and D are positive definite. Thus, it remains onlyto show that Cj , which is given by

Cj = G+

j−1∑i=0

Ei =

(B0 +

j−1∑i=0

Ei

)+D,

is nonsingular for j = 1, . . . 2k, for which we use inductionon j.

For the base case j = 1, since

C1 = C0 − a0aT0 = C0(I − C−10 a0a

T0 ),

the determinant of C1 and C0 are related as follows [15]:

det(C1) = det(C0)(1− aT0 C−10 a0).

In other words, C1 is invertible if C0 is invertible anda0C

−10 a0 6= 1. Since C0 is positive definite, it is therefore in-

vertible. To show the latter condition, we use the definition ofa0 = B0s0/

√sT0 B0s0 together with C−1

0 = (γ−1k I +D)−1

to obtain the following:

aT0 C−10 a0 =

1

sT0 B0s0sT0 B

T0 C

−10 B0s0

=γ−2k

γ−1k sT0 s0

sT0(γ−1k I +D

)−1s0

=1

γksT0 s0

(n∑

i=1

1

γ−1k + di,i

(s0)2i

)

≤ 1

γksT0 s0

(1

γ−1k + σ

sT0 s0

)=

1

1 + γkσ. (9)

By hypothesis, γkσ > ε, which implies that aT0 C−10 a0 < 1

and that det(C1) 6= 0. Therefore, C1 must be invertible.

Now we assume that Cj is invertible and show that Cj+1 isinvertible. If j is odd, then j+1 = 2i for some i and Cj+1 =Bi + D, which is positive definite because both Bi and Dare positive definite. Therefore Cj+1 must be nonsingular. Ifj is even, i.e., j = 2i for some i, then Cj = Bi +D, and

Cj+1 = Cj − aiaTi = Bi −1

sTi BisiBisis

Ti B

Ti +D.

We will demonstrate that Cj+1 is nonsingular by showingthat it is positive definite. Consider z ∈ Rn with z 6= 0.Then

zTCj+1z

= zT(Bi −

1

sTi BisiBisis

Ti B

Ti

)z + zTDz

= zTBiz −(zTBisi)

2

sTi Bisi+ zTDz

= ‖B1/2i z‖22 −

((B

1/2i z)T (B

1/2i si)

)2‖B1/2

i si‖22+ zTDz

= ‖B1/2i z‖22 − ‖B1/2

i z‖22 cos2(∠(B1/2

i z,B1/2i si)

)+ zTDz

= ‖B1/2i z‖22

(1− cos2

(∠(B1/2

i z,B1/2i si)

))+ zTDz

≥ σ‖z‖22> 0, (10)

since each di,i ≥ σ > 0. This demonstrates that Cj+1 ispositive definite, and therefore, it is nonsingular.

We have now thus satisfied all the assumptions of Theorem1. Therefore, (Bk + D)−1, which is equal to C−1

2k , can becomputed recursively and is specifically given using (6) and(8).

Now, we show that computing C−1k+1z can be done effi-

ciently as is done in [11]. We note that using (6), we have

C−1k+1z = C−1

k z − τkC−1k EkC

−1k z (11)

=

C−1

k z + τkC−1k a k

2aTk

2

C−1k z if k is even

C−1k z − τkC−1

k b k−12bTk−1

2

C−1k z if k is odd.

Proceedings of the World Congress on Engineering 2012 Vol I WCE 2012, July 4 - 6, 2012, London, U.K.

ISBN: 978-988-19251-3-8 ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)

WCE 2012

Page 4: Solving Limited-Memory BFGS Systems with Generalized ... · Solving Limited-Memory BFGS Systems with Generalized Diagonal Updates Jennifer Erway, Member, IAENG, and Roummel F. Marcia,

We define pk according to the following rules:

pk =

{C−1

k a k2

if k is even

C−1k b k−1

2if k is odd.

(12)

Thus, (11) simplifies to

C−1k+1z = C−1

k z + (−1)kτk(pTk z)pk.

Applying this recursively to C−1k z yields the following

formula:

C−1k+1z = C−1

0 z +k∑

i=0

(−1)iτi(pTi z)pi, (13)

with C−10 z = (γ−1

k I+D)−1z. Thus, the main computationaleffort in forming C−1

k z involves the inner product of z withthe vectors pi for i = 0, 1, . . . , k.

What remains to be shown is how to compute τk in (7)and pk in (12) efficiently. The quantity τk is obtained bycomputing trace(C−1

k Ek), which after substituting in thedefinition of Ek, is given by

trace(C−1k Ek) =

−aTk2

C−1k a k

2if k is even

bTk−12

C−1k b k−1

2if k is odd.

=

−aTk2

pk if k is even

bTk−12

pk if k is odd.

using (12). Thus, τk simplifies to

τk =

1

1− aTk2

pkif k is even

1

1 + bTk−12

pkif k is odd.

Finally, notice that we can compute pk in (12) by evaluating(13) at z = a k

2or z = b k−1

2:

pk =

C−1

0 a k2+

k−1∑i=0

(−1)iτi(pTi a k2)pi if k is even

C−10 b k−1

2+

k−1∑i=0

(−1)iτi(pTi b k−12)pi if k is odd.

Thus, by computing and storing aTk2

pk and bTk−12

pk, we canform τk and pk rather easily. The following pseudocodesummarizes the algorithm for computing C−1

k+1z:

Algorithm 3.1: Proposed recursion to compute q = C−1k+1z.

q ← (γ−1k+1I +D)−1z;

for j = 0, . . . , kif j even

c← aj/2;else

c← b(j−1)/2;endpj ← (γ−1

k+1I +D)−1c;for i = 0, . . . , j − 1

pj ← pj + (−1)ivi(pTi c)pi;end

TABLE I

nRelative Residual

Direct CG Recursion1, 000 1.27e-15 8.78e-16 7.21e-162, 000 1.91e-15 1.21e-15 1.20e-155, 000 2.83e-15 1.61e-15 1.41e-15

10, 000 3.47e-15 1.29e-15 8.98e-1620, 000 5.03e-15 2.12e-15 1.51e-15

A SAMPLE RUN COMPARING THE RELATIVE RESIDUALS OF THESOLUTIONS USING THE MATLAB “BACKSLASH” COMMAND, CONJUGATE

GRADIENT METHOD, AND THE PROPOSED RECURSION FORMULA. THERELATIVE RESIDUALS FOR THE RECURSION FORMULA ARE USED AS THE

CRITERIA FOR CONVERGENCE FOR CG.

TABLE II

nTime (sec)

Direct CG Recursion1, 000 0.0249 0.0152 0.00532, 000 0.2015 0.0188 0.01025, 000 1.5276 0.0473 0.0158

10, 000 8.0836 0.1549 0.017020, 000 51.8179 0.2519 0.0198

THE COMPUTATIONAL TIMES TO ACHIEVE THE RESULTS IN TABLE I.

vj ← 1/(1 + (−1)jpTj c);q ← q + (−1)ivi(pTi z)pi;

end

Algorithm 3.1 requires O(k2) vector inner products. Op-erations with C0 and C1 can be hard-coded since C0 is ascalar-multiple of the identity. Since k is kept small the extrastorage requirements and computations are affordable.

IV. NUMERICAL EXPERIMENTS

We demonstrate the effectiveness of the proposed recur-sion formula by solving linear systems of the form (1)where the matrices are of the form (2) and of various sizes.Specifically, we let the number of updates M = 5 andthe size of the matrix range from n = 103 up to 107.We implemented the proposed method in Matlab on a Two2.4 GHz Quad-Core Intel Xeon “Westmere” Apple MacPro and compared it to a direct method using the Matlab“backslash” command and the built-in conjugate-gradient(CG) method (pcg.m). Because of limitations in memory,we were only able to use the direct method for problemswhere n ≤ 20, 000. For our numerical experiments, we letthe entries in D to be evenly distributed between 1 andn/10. The relative residuals for the recursion formula areused as the criteria for convergence for CG. In other words,the time reported in this table reflects how long it takes forCG to achieve the same accuracy as the proposed recursionmethod. Often, CG terminated without converging to thedesired tolerance because the method stagnated (flag =3 in Matlab).

Results. The three methods were run on numerous problemswith varying problems sizes. Tables I–IV show the timeand the relative residuals for each method. In Tables Iand II, n ranges from 1,000 to 20,000; Tables III and IVcontain results for n ≥ 20, 000. We note that all methodsachieve very small relative residual errors for each of theproblems we considered. Besides from memory issues, thedirect method suffers from significantly longer computational

Proceedings of the World Congress on Engineering 2012 Vol I WCE 2012, July 4 - 6, 2012, London, U.K.

ISBN: 978-988-19251-3-8 ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)

WCE 2012

Page 5: Solving Limited-Memory BFGS Systems with Generalized ... · Solving Limited-Memory BFGS Systems with Generalized Diagonal Updates Jennifer Erway, Member, IAENG, and Roummel F. Marcia,

TABLE III

nRelative residual

CG Recursion100, 000 5.68e-16 2.31e-16200, 000 6.66e-16 2.34e-16500, 000 5.35e-16 2.32e-16

1, 000, 000 6.32e-16 2.29e-162, 000, 000 7.24e-16 2.30e-165, 000, 000 8.21e-16 2.28e-16

10, 000, 000 7.85e-16 2.33e-16

COMPARISON BETWEEN THE PROPOSED RECURSION METHOD AND THEBUILT-IN CONJUGATE GRADIENT (CG) METHOD IN MATLAB. THE

RELATIVE RESIDUALS FOR THE RECURSION FORMULA ARE USED AS THECRITERIA FOR CONVERGENCE FOR CG. IN ALL CASES, CG

TERMINATED WITHOUT CONVERGING TO THE DESIRED TOLERANCEBECAUSE “THE METHOD STAGNATED.”

TABLE IV

nComputational Time (sec)

CG Recursion100, 000 1.006 0.066200, 000 3.069 0.123500, 000 4.568 0.471

1, 000, 000 28.573 1.4042, 000, 000 113.832 2.9345, 000, 000 362.982 6.801

10, 000, 000 540.158 12.208

COMPARISON OF THE COMPUTATIONAL TIMES BETWEEN THE PROPOSEDRECURSION METHOD AND THE BUILT-IN CONJUGATE GRADIENT (CG)

METHOD IN MATLAB.

time, especially for the larger problems. Compared to CG forthe larger problems, not only does the proposed method yieldmore accurate solutions (its relative residuals are smaller thanthose from CG), but it is also significantly faster.

V. CONCLUSION

In this paper, we proposed an algorithm based on theSMW formula to solve systems of the form Bk +D, whereBk is an n × n L-BFGS quasi-Newton matrix. We showedthat as long as the diagonal elements of D are boundedaway from zero, the algorithm is well-defined. The algorithmrequires at most M2 vector inner products. (Note: We assumethat M � n, and thus, M2 is also significantly smallerthan n.) Numerical results demonstrate that the proposedmethod is not only accurate (the resulting relative residualsare comparable to the Matlab direct solver and the conjugategradient method), but it is also efficient with respect tocomputational time (often up to about 50× faster thanCG). The algorithm proposed in this paper can be foundat http://www.wfu.edu/∼erwayjb/software.

REFERENCES

[1] R. H. Byrd, J. Nocedal, and R. B. Schnabel, “Representations of quasi-Newton matrices and their use in limited-memory methods,” Math.Program., vol. 63, pp. 129–156, 1994.

[2] D. C. Liu and J. Nocedal, “On the limited memory BFGS methodfor large scale optimization,” Math. Program., vol. 45, pp. 503–528,1989.

[3] J. Morales, “A numerical study of limited memory BFGS methods,”Applied Mathematics Letters, vol. 15, no. 4, pp. 481–487, 2002.

[4] J. Nocedal, “Updating quasi-Newton matrices with limited storage,”Math. Comput., vol. 35, pp. 773–782, 1980.

[5] J. Nocedal and S. J. Wright, Numerical Optimization, 2nd ed. NewYork: Springer-Verlag, 2006.

[6] A. Fiacco and G. McCormick, Nonlinear programming: sequentialunconstrained minimization techniques, ser. Classics in applied math-ematics. Society for Industrial and Applied Mathematics, 1990.

[7] P. E. Gill and D. P. Robinson, “A primal-dual augmented Lagrangian,”Computational Optimization and Applications, pp. 1–25, 2010.[Online]. Available: http://dx.doi.org/10.1007/s10589-010-9339-1

[8] N. I. M. Gould, “On the accurate determination of search directions forsimple differentiable penalty functions,” IMA J. Numer. Anal., vol. 6,pp. 357–372, 1986.

[9] M. H. Wright, “The interior-point revolution in optimization: history,recent developments, and lasting consequences,” Bull. Amer. Math.Soc. (N.S, vol. 42, pp. 39–56, 2005.

[10] M. Benzi, G. H. Golub, and J. Liesen, “Numerical solution ofsaddle point problems,” in Acta Numerica, 2005, ser. Acta Numer.Cambridge: Cambridge Univ. Press, 2005, vol. 14, pp. 1–137.

[11] J. B. Erway and R. F. Marcia, “Limited-memory BFGS systems withdiagonal updates,” Linear Algebra and its Applications, 2012, acceptedfor publication.

[12] J. E. Dennis, Jr. and R. B. Schnabel, Numerical methods for un-constrained optimization and nonlinear equations. Philadelphia,PA: Society for Industrial and Applied Mathematics (SIAM), 1996,corrected reprint of the 1983 original.

[13] G. H. Golub and C. F. Van Loan, Matrix Computations, 3rd ed.Baltimore, Maryland: The Johns Hopkins University Press, 1996.

[14] K. S. Miller, “On the Inverse of the Sum of Matrices,” MathematicsMagazine, vol. 54, no. 2, pp. 67–72, 1981.

[15] J. E. Dennis Jr. and J. J. More, “Quasi-Newton methods, motivationand theory,” SIAM Review, vol. 19, pp. 46–89, 1977.

Proceedings of the World Congress on Engineering 2012 Vol I WCE 2012, July 4 - 6, 2012, London, U.K.

ISBN: 978-988-19251-3-8 ISSN: 2078-0958 (Print); ISSN: 2078-0966 (Online)

WCE 2012