How do quasi-Newton methods (BFGS and L-BFGS) approximate the Hessian without computing second derivatives, what are the secant equation and the curvature condition sk⊤yk>0, and how does L-BFGS reduce memory from O(d2) to O(md)?

Linear algebra and optimisation, Second-order methods
Level L4 Advanced. Length Medium. Nature Th+Mat Both.

What's being asked

Whether you understand how BFGS builds curvature from gradient differences alone and why L-BFGS scales to large parameter vectors.

Key idea

BFGS maintains a symmetric positive-definite approximation Bk (or its inverse Hk=Bk−1) updated at every step using only the step vector sk=xk+1−xk and gradient change yk=∇f(xk+1)−∇f(xk), enforcing the secant equation Bk+1sk=yk.

Steps

  1. Motivate the secant equation: by Taylor's theorem, ∇f(xk+1)−∇f(xk)≈∇2f(xk+1)(xk+1−xk). Defining sk=xk+1−xk and yk=∇f(xk+1)−∇f(xk), a good Hessian approximation Bk+1 should satisfy the secant equation Bk+1sk=yk (equivalently Hk+1yk=sk).
  2. Explain the curvature condition sk⊤yk>0: multiplying Bk+1sk=yk on the left by sk⊤ gives sk⊤Bk+1sk=sk⊤yk. For Bk+1 to remain positive definite (so −Bk+1−1∇f is guaranteed to be a descent direction), we must have sk⊤yk>0. A Wolfe line search enforces this.
  3. Describe the BFGS update: for xk∈Rd, among all symmetric matrices satisfying the inverse secant equation Hk+1yk=sk, BFGS chooses the inverse-Hessian approximation Hk+1 closest to Hk (in a weighted Frobenius norm), yielding a rank-two update to Hk (and also to Bk) that preserves symmetry and positive definiteness in O(d2) time per step, avoiding O(d3) matrix inversion.
  4. Explain L-BFGS (limited-memory BFGS): storing Hk takes O(d2) memory, which is infeasible when d=106. L-BFGS never forms Hk explicitly; it stores only a small history of the most recent m pairs {(si,yi)}i=k−mk−1 (typically m≈5–20) in O(md) memory and computes the product Hk∇f(xk) on the fly via the two-loop recursion in O(md) time.

Common mistakes

How long your answer should be

Half a page; 4–5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Linear algebra and optimisation: For L(W)=12∥Y−XW∥F2+λ2tr⁡(W⊤AW), where X∈Rn×d, W∈Rd×k, Y∈Rn×k and A∈Rd×d is symmetric, how do you derive ∇WL(W) using differentials and verify every matrix product by its shapes?
Next in Linear algebra and optimisation: Why can deterministic gradient descent take arbitrarily long or get trapped near a strict saddle point, and how do stochastic gradient noise (SGD) or perturbed gradient descent escape strict saddles?