44.03.06 · optimization-control / unconstrained-optimization

Nonlinear Conjugate Gradient Methods: Fletcher-Reeves and Polak-Ribière

shipped3 tiersLean: none

Anchor (Master): Nocedal & Wright 2006 Numerical Optimization 2e (Springer) §5.2 and the global-convergence analysis of Fletcher-Reeves under strong Wolfe (the Al-Baali descent lemma) together with the PR cycling example and the PR+ fix; Hager & Zhang 2006 A survey of nonlinear conjugate gradient methods (Pacific J. Optim. 2, 35-58) (the unified family, descent and global-convergence theory, and the CG_DESCENT line search); Dai & Yuan 1999 A nonlinear conjugate gradient method with a strong global convergence property (SIAM J. Optim. 10, 177-182)

Intuition Beginner

The conjugate gradient idea was built for a perfect bowl: a valley whose shape comes from a symmetric system of equations, where you can choose each downhill direction so it never spoils the progress of the earlier ones, and you reach the bottom in a fixed small number of clever steps. Most real problems are not perfect bowls. The valley bends, the steepness changes from place to place, and there is no single matrix describing the whole landscape. Nonlinear conjugate gradient is the answer to a simple question: can the same cheap, low-memory trick still help when the valley is a general curved surface?

The plan adapts in two ways. First, since there is no fixed matrix to read the slope from, you measure the slope freshly at each new spot — that is what the gradient gives you. Second, you still blend a little of your previous direction into the new downhill direction, so your path stays coordinated rather than zig-zagging. The amount you blend in is a single number, and the two famous recipes for that number are named Fletcher-Reeves and Polak-Ribière.

Two practical worries appear that the perfect bowl never had. Because the landscape keeps changing, the careful coordination slowly drifts out of tune, so every so often you throw away the accumulated direction and just step straight downhill again — a restart. And because a blended direction might accidentally point uphill on a curved surface, you have to choose your step length carefully enough to keep heading down.

The payoff is the same one that made the original method popular: each step stores only a couple of vectors and costs one gradient, so the method scales to problems with millions of variables where richer methods cannot afford the memory.

Visual Beginner

Picture two valleys side by side. The left one is the perfect bowl of the earlier method; the right one is a banana-shaped curved valley, the kind that bends as you descend. On the bowl, the coordinated directions reach the bottom in a couple of long clean strides. On the curved valley, the same blended directions still help — the path is far straighter than plain steepest descent — but the coordination gradually slips, so once in a while the path takes a fresh straight-downhill step to reset itself.

Read the table to see how the new method differs from both of its ancestors.

feature steepest descent linear CG (perfect bowl) nonlinear CG (curved valley)
direction straight downhill downhill blended with last direction downhill blended with last direction
how slope is found measured each step read from the fixed matrix measured each step
reaches bottom in n steps? no yes, exactly only if the valley is a bowl
restarts needed? never never yes, every so often
memory per step tiny tiny tiny

The takeaway: nonlinear conjugate gradient borrows the coordinated-direction trick from the perfect-bowl method but measures the slope freshly each step and restarts when needed. It keeps the small memory footprint, which is why it is a workhorse for very large problems.

Worked example Beginner

Let us minimise the simple curved surface . Its lowest point is the origin. We start at the point and take one nonlinear conjugate gradient step.

Step 0. The slope at a point is the pair , so at the gradient is . The first direction is just straight downhill, . We move along it by the amount that lowers the surface the most along that line; for this surface that distance works out to , giving the new point .

Step 1. Measure the slope again at : the gradient is . Now we need the blend number. The Fletcher-Reeves recipe divides the new slope's squared length by the old one:

The next direction blends the fresh downhill direction with a little of the old direction:

What this tells us: the new direction is mostly straight downhill (the part) with a small memory of where we just came from (the tiny blend of ). That small memory is what stops the path from making the sharp wasteful turns of plain steepest descent. Each step cost only one slope measurement and stored only two short vectors.

Check your understanding Beginner

Formal definition Intermediate+

Let be continuously differentiable with gradient , and write . The nonlinear conjugate gradient iteration generalises the linear conjugate gradient method 43.07.04 from the quadratic (whose gradient supplies both the residual and the matrix ) to a general smooth , by replacing the residual with the negative gradient and computing the step length by a line search rather than the closed-form . Starting from with , for ,

where is chosen by a line search satisfying the strong Wolfe conditions of 44.03.01 and is the conjugate gradient parameter. On the quadratic with exact line search every choice below reduces to the linear CG coefficient ; the methods differ only away from the quadratic.

Writing , the principal parameter choices are

The PR+ variant truncates the Polak-Ribière parameter at zero,

which is equivalent to restarting with steepest descent () whenever the Polak-Ribière number turns negative. The new symbols , , the parameters , and the direction recurrence are recorded in _meta/NOTATION.md.

Restarts. Because the conjugacy relations that hold exactly on a quadratic only hold approximately on a general , the accumulated direction degrades and is periodically reset. A restart sets (equivalently ). Two standard triggers are a fixed schedule — restart every steps, so the method recovers the finite-termination structure of linear CG on each quadratic patch — and the Powell restart test, which restarts whenever consecutive gradients lose orthogonality,

Counterexamples to common slips Intermediate+

  • The four formulas are not interchangeable off the quadratic. They agree on a strictly convex quadratic with exact line search, but on a general they generate genuinely different iterates with different convergence behaviour: Fletcher-Reeves has the cleanest convergence proof, Polak-Ribière is usually faster in practice, and the two can diverge dramatically when the line search is inexact.

  • A descent direction is not automatic. For linear CG with exact line search is always a descent direction; for nonlinear CG it can fail. Fletcher-Reeves needs the strong Wolfe conditions with to guarantee ; Polak-Ribière can produce an ascent direction even under strong Wolfe, which is one motivation for the PR+ truncation.

  • Polak-Ribière is not globally convergent in general. Powell exhibited a smooth function on which PR with exact line search cycles among three points without converging. The cure is the truncation PR+ , which is provably globally convergent. Fletcher-Reeves never cycles this way but can stall by taking many tiny steps.

  • Restarting is not a failure mode but part of the method. Omitting restarts on a strongly nonquadratic lets stale curvature information accumulate in ; the periodic reset to is what keeps the method robust and is essential to the -step quadratic-termination interpretation.

Key theorem with proof Intermediate+

The signature result is that on a general smooth the Fletcher-Reeves direction stays a descent direction when the step is chosen by a sufficiently strict strong-Wolfe line search — the property that linear conjugate gradient got for free from exact line minimisation, and the property without which no global-convergence theory can even begin.

Theorem (Al-Baali descent lemma for Fletcher-Reeves). Let with for all , run Fletcher-Reeves from with each satisfying the strong Wolfe conditions for a fixed . Then every direction is a descent direction; precisely,

and since for , the upper bound is strictly negative, giving [Nocedal, J. & Wright, S. J. — Numerical Optimization (2nd ed.)].

Proof. Induct on . For , gives , and the bounds read , so the base case holds with equality. Assume the bounds hold at index . The Fletcher-Reeves recurrence is with . Dividing the identity by ,

using to cancel the .

The strong Wolfe curvature bound gives , so dividing by ,

Insert the inductive bounds . For the upper bound, gives , so

For the lower bound, (the partial sum is below ), so , whence . This completes the induction. Finally , and makes , so the upper bound : every direction descends.

Bridge. This descent guarantee is the foundational reason Fletcher-Reeves can be analysed at all on nonquadratic functions, and it builds toward the global-convergence theorem of the Advanced results, where the descent bound feeds directly into the Zoutendijk summability of 44.03.01 to force . The bridge is exactly the line-search theory of 44.03.01 doing the work the matrix did for free in linear CG 43.07.04: there, exact line minimisation made and conjugacy was automatic; here the strong Wolfe curvature bound is the quantitative replacement that keeps the blended direction tilted downhill. The constant generalises the exact-line-search limit , and this is exactly why Fletcher-Reeves with a loose curvature tolerance can lose descent while a tight one preserves it. The same telescoped geometric-series bound appears again in 44.03.04, where quasi-Newton methods instead guarantee descent through positive-definiteness of the inverse-Hessian approximation rather than through a line-search inequality. Putting these together, the central insight is that nonlinear CG trades the structural conjugacy of the quadratic case for a line-search-enforced descent condition, and the entire convergence theory rests on how strictly that condition is imposed.

Exercises Intermediate+

Advanced results Master

The nonlinear conjugate gradient method is the iteration with a strong-Wolfe step, one object parametrised by the scalar , and the results below settle which choices descend, which converge globally, where Polak-Ribière fails and how PR+ repairs it, and how the whole family relates to limited-memory quasi-Newton methods.

Theorem 1 (global convergence of Fletcher-Reeves). *Let be bounded below on the level set with Lipschitz on an open neighbourhood of . Run Fletcher-Reeves with strong Wolfe steps and . Then .* The proof rests on the Al-Baali descent lemma (Key theorem), which delivers with , together with the bound obtained by squaring the recurrence; substituting into Zoutendijk's condition of 44.03.01 and arguing by contradiction against yields the conclusion. The restriction is essential and is the price Fletcher-Reeves pays for its clean guarantee [Nocedal, J. & Wright, S. J. — Numerical Optimization (2nd ed.)].

Theorem 2 (Polak-Ribière can cycle; PR+ restores convergence). There is a twice-continuously-differentiable on which Polak-Ribière with exact line search generates iterates that cycle among a neighbourhood of three points with bounded away from zero, so PR is not globally convergent. The truncated variant PR+ with a line search enforcing sufficient descent satisfies . Powell constructed the cycling example; the mechanism is that a negative can rotate toward an ascent direction, and the line search then takes a near-zero step that fails to escape. The PR+ truncation forces a steepest-descent restart whenever , which keeps the directions in a descent cone; Gilbert and Nocedal proved global convergence of PR+ under a line search that guarantees sufficient descent [Hager, W. W. & Zhang, H. — A survey of nonlinear conjugate gradient methods].

Theorem 3 (Dai-Yuan converges under standard Wolfe). Run the Dai-Yuan method with steps satisfying only the (weak) Wolfe conditions and Lipschitz, bounded below. Then is a descent direction whenever is and . The Dai-Yuan choice is engineered so that the descent identity telescopes cleanly: from and one finds , and the weak Wolfe curvature condition makes , propagating the sign. Dai-Yuan thus attains global convergence under the weakest line search of the four, the complement to Fletcher-Reeves which needs the strongest [Hager, W. W. & Zhang, H. — A survey of nonlinear conjugate gradient methods].

Theorem 4 (the family, restarts, and the L-BFGS comparison). The choices FR, PR(+), HS, DY are members of a one-parameter family of conjugate-gradient methods; all coincide on a strictly convex quadratic with exact line search and reduce nonlinear CG to linear CG 43.07.04, giving -step termination. On a general , periodic restart with every steps, or the Powell test , recovers approximate finite-termination behaviour and clears stale curvature. The practical significance is memory: nonlinear CG stores only data — the vectors , , — and costs one gradient and a handful of inner products per step, against the storage of limited-memory BFGS 44.03.04 with history length . For very large , CG (especially HS/PR+ hybrids such as CG_DESCENT) is competitive with L-BFGS at small and is preferred when even vectors are too expensive; L-BFGS typically wins when its modest extra memory is affordable, because its curvature model gives faster asymptotic progress than the single-direction CG blend [Hager, W. W. & Zhang, H. — A survey of nonlinear conjugate gradient methods].

Synthesis. Nonlinear conjugate gradient is one method — the recurrence with a Wolfe step — viewed under one invariant, the scalar , and the foundational reason the whole family exists is that on a strictly convex quadratic with exact line search every choice collapses to the single linear CG coefficient of 43.07.04, so nonlinear CG is linear CG plus a recipe for what to do when the quadratic model breaks. This is exactly the division of labour the line-search theory of 44.03.01 enforces: the strong Wolfe condition owns descent and globalisation, while the choice of owns the curvature memory, and the two are dual in the sharpest sense — Fletcher-Reeves needs the strongest line search () to descend but converges cleanly, while Dai-Yuan needs the weakest (plain Wolfe) because its is engineered to propagate descent algebraically. The central insight is that the conjugacy which the matrix guaranteed for free in linear CG must here be manufactured step by step, and it degrades, which is why restarts are not a patch but a structural ingredient that reasserts the -step quadratic-termination property on each near-quadratic patch.

Putting these together, the Polak-Ribière story is the cautionary face of the same principle: PR's self-restarts adaptively (it shrinks toward zero when consecutive gradients are similar) and is fast in practice, yet it can cycle because nothing stops from rotating the direction uphill — and the PR+ truncation is precisely the minimal restart-enforcing repair, the bridge from a fast heuristic to a convergent method. The family generalises linear CG outward and connects downward to L-BFGS 44.03.04: both are low-memory answers to the same large-scale problem, CG carrying one direction of memory and L-BFGS carrying , and the trade is memory against asymptotic rate.

Full proof set Master

Proposition 1 (quadratic reduction). On , , with exact line search and , the FR, PR, HS, and DY parameters all equal and nonlinear CG coincides with linear CG, terminating in at most steps.

Proof. The gradients are . Exact line search gives , and by the linear CG theory of 43.07.04 the residuals are mutually orthogonal, . Then . From and one gets , so , whence and . All four equal the linear CG coefficient; the exact step matches linear CG, so the iterates coincide and inherit finite termination in at most steps.

Proposition 2 (Al-Baali descent bound). Under strong Wolfe steps with , Fletcher-Reeves satisfies , so for all .

Proof. This is the Key theorem; the induction uses the FR cancellation together with the strong Wolfe bound , and for makes the upper bound strictly negative.

Proposition 3 (direction-norm bound for FR). Under the hypotheses of Proposition 2, where .

Proof. Square : . The strong Wolfe bound and give . Dividing the recursion by and telescoping the resulting bound on , using from Proposition 2 and Cauchy-Schwarz, yields for a constant absorbing ; collecting terms and using produces the stated linear-in- growth .

Proposition 4 (global convergence of FR). Under the hypotheses of Theorem 1, .

Proof. Proposition 2 gives , so . Zoutendijk's condition of 44.03.01 (applicable because each descends and the step is strong-Wolfe) gives , so . If for all large , Proposition 3 gives for (gradients are bounded on the compact level set), so , and diverges — a contradiction. Hence .

Proposition 5 (Dai-Yuan descent propagation). For Dai-Yuan with weak Wolfe steps, if then and .

Proof. The weak Wolfe curvature condition gives since and . Now , using . Since and , this is negative. With descending, induction propagates descent at every step.

Proposition 6 (PR+ descent under sufficient-descent line search). If the line search enforces for some tied to and , then there is a constant , independent of , with along iterations between restarts.

Proof. From , . At a restart gives , the case . Between restarts and the sufficient-descent line-search bound controls the cross term: , and a bound — enforced by the line search (CG_DESCENT) or by the restart trigger that fires before the accumulated direction grows too large — yields . The truncation is what makes the cross term controllable; an unrestricted negative admits , the ascent that underlies Powell's cycling example.

Connections Master

  • The conjugate gradient method 43.07.04 is the parent algorithm that this unit generalises from quadratics to arbitrary smooth objectives. On a strictly convex quadratic with exact line search, every nonlinear CG parameter (FR, PR, HS, DY) collapses to the single linear CG coefficient , the residual becomes the negative gradient , and the closed-form step becomes a line search; the -conjugacy that the matrix supplied for free degrades on a nonquadratic surface and must be reasserted by restarts, which is the structural reason nonlinear CG restarts where linear CG never needs to.

  • Line-search methods: Wolfe conditions and global convergence 44.03.01 supplies the machinery without which nonlinear CG has no theory: the strong Wolfe conditions are what make the Fletcher-Reeves direction a descent direction (the Al-Baali bound needs ), and Zoutendijk's summability is the engine of the global-convergence proofs for FR and DY here. The division of labour that unit establishes — line search owns globalisation, the direction owns the rate — is exactly what splits the FR/DY descent guarantees from the -choice that governs practical speed.

  • Quasi-Newton (BFGS/DFP) and limited-memory L-BFGS methods 44.03.04 are the alternative low-memory family that nonlinear CG competes with at large scale: both avoid storing a full Hessian, CG carrying a single direction of curvature memory and L-BFGS carrying secant pairs, and the same strong/weak Wolfe line search underlies both. The trade-off — CG's storage against L-BFGS's and faster asymptotic convergence — is the choice a practitioner makes for a given memory budget, and the hybrid Hestenes-Stiefel / PR+ methods such as CG_DESCENT sit at the aggressive-memory-economy end of that spectrum.

Historical & philosophical context Master

The conjugate gradient method was introduced for linear systems by Hestenes and Stiefel in 1952 [Hestenes, M. R. & Stiefel, E. — Methods of Conjugate Gradients (1952)]. Its extension to general nonlinear functions is due to Roger Fletcher and Colin Reeves, whose 1964 paper Function minimization by conjugate gradients replaced the residual by the gradient and the closed-form step by a line search, producing the first nonlinear conjugate gradient method [Fletcher, R. & Reeves, C. M. — Function minimization by conjugate gradients (1964)]. The alternative parameter now bearing their names was given independently by Elijah Polak and Gérard Ribière in 1969 and by Boris Polyak in the same year; in practice Polak-Ribière converged faster, though its convergence theory proved more delicate [Polak, E. & Ribière, G. — Note sur la convergence de méthodes de directions conjuguées (1969)].

The theoretical picture sharpened over the following decades. M. J. D. Powell exhibited in 1984 a smooth function on which Polak-Ribière with exact line search cycles without converging, showing that the faster method lacked a global guarantee; Jean-Charles Gilbert and Jorge Nocedal then proved in 1992 that the truncated variant PR+ is globally convergent under a sufficient-descent line search. Mehiddin Al-Baali had established in 1985 the descent and global-convergence property of Fletcher-Reeves under the strong Wolfe conditions with . Yu-Hong Dai and Yaxiang Yuan introduced in 1999 a parameter converging under the weak Wolfe conditions, completing the spectrum from the strongest to the weakest line-search requirement [Dai, Y. H. & Yuan, Y. — A nonlinear conjugate gradient method (1999)]. William Hager and Hongchao Zhang's 2006 survey and their CG_DESCENT method unified the family and supplied a line search guaranteeing sufficient descent independently of the objective [Hager, W. W. & Zhang, H. — A survey of nonlinear conjugate gradient methods].

Bibliography Master

@article{FletcherReeves1964,
  author  = {Fletcher, Roger and Reeves, Colin M.},
  title   = {Function minimization by conjugate gradients},
  journal = {The Computer Journal},
  volume  = {7},
  number  = {2},
  year    = {1964},
  pages   = {149--154}
}

@article{PolakRibiere1969,
  author  = {Polak, Elijah and Ribi\`{e}re, G\'{e}rard},
  title   = {Note sur la convergence de m\'{e}thodes de directions conjugu\'{e}es},
  journal = {Revue Fran\c{c}aise d'Informatique et de Recherche Op\'{e}rationnelle},
  volume  = {3},
  number  = {16},
  year    = {1969},
  pages   = {35--43}
}

@article{Polyak1969,
  author  = {Polyak, Boris T.},
  title   = {The conjugate gradient method in extremal problems},
  journal = {USSR Computational Mathematics and Mathematical Physics},
  volume  = {9},
  number  = {4},
  year    = {1969},
  pages   = {94--112}
}

@article{AlBaali1985,
  author  = {Al-Baali, Mehiddin},
  title   = {Descent property and global convergence of the Fletcher-Reeves method with inexact line search},
  journal = {IMA Journal of Numerical Analysis},
  volume  = {5},
  number  = {1},
  year    = {1985},
  pages   = {121--124}
}

@article{Powell1984,
  author    = {Powell, M. J. D.},
  title     = {Nonconvex minimization calculations and the conjugate gradient method},
  booktitle = {Numerical Analysis (Dundee 1983)},
  series    = {Lecture Notes in Mathematics},
  volume    = {1066},
  publisher = {Springer},
  year      = {1984},
  pages     = {122--141}
}

@article{GilbertNocedal1992,
  author  = {Gilbert, Jean-Charles and Nocedal, Jorge},
  title   = {Global convergence properties of conjugate gradient methods for optimization},
  journal = {SIAM Journal on Optimization},
  volume  = {2},
  number  = {1},
  year    = {1992},
  pages   = {21--42}
}

@article{DaiYuan1999,
  author  = {Dai, Yu-Hong and Yuan, Yaxiang},
  title   = {A nonlinear conjugate gradient method with a strong global convergence property},
  journal = {SIAM Journal on Optimization},
  volume  = {10},
  number  = {1},
  year    = {1999},
  pages   = {177--182}
}

@article{HagerZhang2006,
  author  = {Hager, William W. and Zhang, Hongchao},
  title   = {A survey of nonlinear conjugate gradient methods},
  journal = {Pacific Journal of Optimization},
  volume  = {2},
  number  = {1},
  year    = {2006},
  pages   = {35--58}
}

@book{NocedalWright2006ncg,
  author    = {Nocedal, Jorge and Wright, Stephen J.},
  title     = {Numerical Optimization},
  edition   = {2},
  publisher = {Springer},
  year      = {2006}
}

@book{Fletcher1987,
  author    = {Fletcher, Roger},
  title     = {Practical Methods of Optimization},
  edition   = {2},
  publisher = {Wiley},
  year      = {1987}
}