ArticleslgStudy

computer science

Limited-memory BFGS

Limited-memory BFGS is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Limited-memory BFGS rather than just read about it. In short: Limited-memory BFGS (L-BFGS or LM-BFGS) is an optimization algorithm in the collection of quasi-Newton methods that approximates the Broyden–Fletcher–Goldfarb–Shanno algorithm (BFGS) using a limited amount of computer memory. It is a popular algorithm for parameter estimation in machine learning.

Key takeaways

  • Limited-memory BFGS belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Limited-memory BFGS to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Limited-memory BFGS from memory before moving on to harder problems.

Reference excerpt

Limited-memory BFGS (L-BFGS or LM-BFGS) is an optimization algorithm in the collection of quasi-Newton methods that approximates the Broyden–Fletcher–Goldfarb–Shanno algorithm (BFGS) using a limited amount of computer memory. It is a popular algorithm for parameter estimation in machine learning. The algorithm's target problem is to minimize f ( x ) {\displaystyle f(\mathbf {x} )} over unconstrained values of the real-vector x {\displaystyle \mathbf {x} } where f {\displaystyle f} is a differentiable scalar function. Like the original BFGS, L-BFGS uses an estimate of the inverse Hessian matrix to steer its search through variable space, but where BFGS stores a dense n × n {\displaystyle n\times n} approximation to the inverse Hessian (n being the number of variables in the problem), L-BFGS stores only a few vectors that represent the approximation implicitly. Due to its resulting linear memory requirement, the L-BFGS method is particularly well suited for optimization problems with many variables. Instead of the inverse Hessian Hk, L-BFGS maintains a history of the past m updates of the position x and gradient ∇f(x), where generally the history size m can be small (often m < 10 {\displaystyle m<10} ). These updates are used to implicitly do operations requiring the Hk-vector product.

Algorithm The algorithm starts with an initial estimate of the optimal value, x 0 {\displaystyle \mathbf {x} _{0}} , and proceeds iteratively to refine that estimate with a sequence of better estimates x 1 , x 2 , … {\displaystyle \mathbf {x} _{1},\mathbf {x} _{2},\ldots } . The derivatives of the function g k := ∇ f ( x k ) {\displaystyle g_{k}:=\nabla f(\mathbf {x} _{k})} are used as a key driver of the algorithm to identify the direction of steepest descent, and also to form an estimate of the Hessian matrix (second derivative) of f ( x ) {\displaystyle f(\mathbf {x} )} . L-BFGS shares many features with other quasi-Newton algorithms, but is very different in how the matrix-vector multiplication d k = − H k g k {\displaystyle d_{k}=-H_{k}g_{k}} is carried out, where d k {\displaystyle d_{k}} is the approximate Newton's direction, g k {\displaystyle g_{k}} is the current gradient, and H k {\displaystyle H_{k}} is the inverse of the Hessian matrix. There are multiple published approaches using a history of updates to form this direction vector. Here, we give a common approach, the so-called "two loop recursion." We take as given x k {\displaystyle x_{k}} , the position at the k-th iteration, and g k ≡ ∇ f ( x k ) {\displaystyle g_{k}\equiv \nabla f(x_{k})} where f {\displaystyle f} is the function being minimized, and all vectors are column vectors. We also assume that we have stored the last m updates of the form

s k = x k + 1 − x k {\displaystyle s_{k}=x_{k+1}-x_{k}}

y k = g k + 1 − g k {\displaystyle y_{k}=g_{k+1}-g_{k}} . We define ρ k = 1 y k ⊤ s k {\displaystyle \rho _{k}={\frac {1}{y_{k}^{\top }s_{k}}}} , and H k 0 {\displaystyle H_{k}^{0}} will be the 'initial' approximate of the inverse Hessian that our estimate at iteration k begins with. The algorithm is based on the BFGS recursion for the inverse Hessian as

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Limited-memory BFGS

Start with the simplest possible case. Write down what Limited-memory BFGS claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Limited-memory BFGS before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Limited-memory BFGS ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Limited-memory BFGS

In research
Limited-memory BFGS appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Limited-memory BFGS in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Limited-memory BFGS is common in secondary-school and first-year university syllabi. It links to neighbouring topics Optimization algorithms and methods, so understanding it makes those chapters shorter.
In everyday life
Look for Limited-memory BFGS outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Limited-memory BFGS in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Limited-memory BFGS means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Limited-memory BFGS out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Limited-memory BFGS in simple terms?

Limited-memory BFGS (L-BFGS or LM-BFGS) is an optimization algorithm in the collection of quasi-Newton methods that approximates the Broyden–Fletcher–Goldfarb–Shanno algorithm (BFGS) using a limited amount of computer memory. It is a popular algorithm for parameter estimation in machine learning.

Why does Limited-memory BFGS matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Limited-memory BFGS?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Limited-memory BFGS.

Tags

  • Optimization algorithms and methods

Keep exploring