The accuracy that is thrown away
Worth reading first: The problem that arrives again · The rate the condition number predicts.
Newton’s method for F(x) = 0 does one thing per step: it replaces F by its tangent at the current point and solves the linear problem exactly. Everything anybody knows about the method — that it doubles the correct digits, that it needs a good starting point, that it converges quadratically near a simple root — is a statement about that replacement rather than about the linear solve.
At the sizes where any of this is expensive, the linear solve is iterative and it stops when a tolerance says so. So there is a number to choose, it is called the forcing term, and the natural instinct is that it should be small: the step is what the method is made of, and a step computed badly is a bad step.
The instinct is wrong, and it is wrong by a factor that can be measured rather than argued about.
The plateau
The measurement is direct and needs no theory to state. Take an iterate 3.719·10⁻² from the root of the model problem — a root that is known exactly, because the right-hand side was built from it. Solve the Newton system at that point to a relative residual of 10⁻³, and the point it steps to is 2.4966·10⁻³ from the root, at 354 conjugate gradient iterations. Solve the same system to 10⁻¹⁴, and the point it steps to is 2.4967·10⁻³ from the root, at 1,126.
Eleven decades of inner accuracy. Four parts in ten thousand of difference in the answer. A factor of 3.2 in work.
That is the whole essay and the rest of it is about why the floor is where it is, how far the effect extends, and what it costs to ignore.
Why there is a floor at all
A Newton step solves J(x)·s = −F(x), and s is the exact correction for the linearised problem. The real problem is not linear. Expanding F about x,
F(x + s) = F(x) + J(x)s + ½·F″(ξ)[s, s]
and the step is chosen to kill the first two terms exactly, so what is left is the second-order term — of size proportional to ‖s‖², which near the root is proportional to the distance from it, squared.
The step therefore cannot land closer than a constant times d², where d is where it started, however exactly the linear system is solved. Below that, the accuracy of the linear solve is being spent on a difference between two points that are both the wrong point by the same amount.
That is a derivation, and this collection’s habit is to measure the thing rather than take the derivation’s word for it. Five iterates, five plateaus:
| distance in | its square | where the plateau sits |
|---|---|---|
| 1.027 | 1.055 | 5.0714·10⁻¹ |
| 5.071·10⁻¹ | 2.572·10⁻¹ | 1.7869·10⁻¹ |
| 1.787·10⁻¹ | 3.193·10⁻² | 3.7187·10⁻² |
| 3.719·10⁻² | 1.383·10⁻³ | 2.4967·10⁻³ |
| 2.497·10⁻³ | 6.234·10⁻⁶ | 1.1999·10⁻⁵ |
Fitted on log axes, the plateau’s height against the distance it started at has a slope of 1.82, against a predicted 2. Not 1, which is what a floor set by the linear solve’s own error would give, and not 0, which is what a floor set by the arithmetic would give. The constant is between 0.5 and 1.9 across the five, which is order one — so the floor is the linearisation and it is not an artefact of the conditioning, which runs to 10⁵ on this problem and does not appear.
How much it costs to ignore
One step is not a solve. The forcing term is chosen once and applies to every step, so the interesting quantity is the total inner work for a complete run to a stated outer tolerance.
The curve is a U and both of its arms are worth naming.
The left arm is oversolving. At η = 10⁻¹⁴ the run takes 9 Newton steps and 9,358 inner iterations. At η = 10⁻⁶ it takes the same 9 Newton steps and 4,382. The outer iteration is doing exactly the same thing — the same number of steps, landing in the same places to within the plateau — and one of the two runs is paying twice as much for it.
The right arm is starving the outer loop. At η = 0.5 each step is nearly free, but the steps stop being Newton steps: the quadratic convergence goes, the run takes 30 outer steps instead of 9, and the total climbs back to 1,178.
The bottom is at η ≈ 0.1, at 980 iterations, which is a factor of 9.5 below the fully solved run. Nine and a half times the work, for a final answer whose residual is below the same tolerance.
The one thing the tight run does buy
An honest accounting has to say what the extra work is not wasted on, and there is one thing.
The run at η = 10⁻¹⁴ ends with a forward error of 2.79·10⁻¹⁰. The run at η = 0.1 ends with 2.43·10⁻⁸ — eighty-five times worse. Both satisfy the stopping test, which asks for a relative residual below 10⁻¹⁰, and neither is more correct than the other by that test.
The reason for the difference is not that the loose run was less careful. It is that a quadratically converging iteration overshoots its stopping test: the tight run’s last step lands at a residual of about 10⁻¹⁶, five orders of magnitude below what was asked for, because the step before it was at 10⁻⁸ and the next one squares that. All of that accuracy is free in the sense that it was not asked for, and it is expensive in the sense that the last inner solve is the most expensive one in the run.
So the tight constant is not buying nothing. It is buying digits nobody requested, at the highest price the run has to offer, on every step rather than on the last one.
That observation is what the essay on a rule that reads its own residual is about, and the shape of the answer is already visible here: what is wanted is a loose tolerance early and a tight one at the end, which no constant can be.
Where the plateau’s left edge is
The tolerance at which the inner solve stops mattering is not machine precision and it is not a fixed number either. It sits at about the square root of the plateau — which is to say at about the distance to the root — because that is where the linear solve’s own error stops being smaller than the linearisation’s.
That has a consequence worth stating plainly: the correct inner tolerance is proportional to how far from the root the iteration currently is, and the iteration knows that quantity to within a constant, because it is roughly the ratio of consecutive residuals.
At the first step of the run drawn here, the iterate is 2.95 away from the root and the plateau is at 1.80. Any tolerance below about 0.1 is spent on nothing. At the last step the iterate is 2.5·10⁻³ away and the plateau is at 1.2·10⁻⁵; there a tolerance of 10⁻² lands at 1.4669·10⁻⁵ against the plateau’s 1.1999·10⁻⁵, a genuine 22 per cent shortfall, and one more decade closes it entirely.
The demand a step can use rises by two decades for every decade the outer iteration gains, and a constant is by construction wrong at one end of that or the other.
What the sweep costs to make
It is worth saying what the U above is, because a curve of twelve points where each point is a whole solve is a different kind of object from a curve where each point is an evaluation.
Every point on it is a complete inexact Newton run on the same 200×200 problem to the same outer tolerance: nine to thirty outer steps, each with its own conjugate gradient solve, and the vertical coordinate is the sum of every inner iteration in the run. Nothing is estimated and no step count is extrapolated. The adaptive point drawn beside the curve is a thirteenth complete run under a different rule, and it is a point rather than a curve because it is not a constant and there is no axis it belongs on.
The reason to say so is that the two arms of a U are usually a fit through a model. These are measurements of runs, and the asymmetry between the arms is a measurement too: the left arm rises smoothly, because oversolving costs a predictable number of extra iterations per decade, and the right arm rises in jumps, because a Newton step either survives being solved that loosely or the run needs another whole step.
What this is not
Three readings to rule out, because each of them is available from the figure and each is wrong.
Not that the inner solve does not matter. It matters enormously; it is where all the work is. What does not matter is the part of its accuracy that lies below the linearisation error, and that part is most of the accuracy a default tolerance asks for.
Not that this is about conjugate gradients. The plateau is a property of the outer method. Any inner solver put in its place meets the same floor; what changes is how much a decade of tolerance costs, and that only moves the vertical distance between the points on the plateau, not the plateau.
Not that the effect is small on well-conditioned problems. It is invisible on well-conditioned problems, which is different: there the inner solve costs a handful of iterations at any tolerance, so the waste is real and cheap. The effect scales with how expensive the inner solve is, which is to say it is largest exactly where it is worth having.
Two numbers a solver could report and does not
The measurement suggests two things an inexact Newton implementation could print, neither of which is expensive and neither of which is usual.
The linearisation error of the step just taken, which is ‖F(x + s)‖ compared against what the linear model predicted. It costs nothing extra — the residual at the new point is evaluated anyway on the next step — and it is exactly the floor this essay is about. A solver that printed it would be telling its user how much inner accuracy the next step can use.
And the share of the inner solve that was spent below that floor, which is the difference between the tolerance asked for and the tolerance the floor justified. On the runs here that share is most of the work, and it is invisible in any log a solver currently writes.
Neither is a new algorithm and neither changes an answer. They are both the collection’s standing habit applied to somebody else’s code: a quantity that decides something should be printed beside the thing it decided, so that a reader can see whether the decision was a good one.
The refusal
The claim that a Newton step landing short of the root was solved too loosely is a claim about which of two quantities is the binding one, and it is fed here the case where the answer is the other one.
At the iterate 3.719·10⁻² from the root, the seven tolerances from 10⁻³ down to 10⁻¹⁴ land between 2.4966·10⁻³ and 2.4967·10⁻³. The assertion that the shortfall belongs to the inner solve is fed those numbers and required to fail, which it does. Then the same assertion is fed the first Newton step from a cold start — where the tolerance genuinely does move the answer, because the linearisation error there is the size of the iterate — and it passes, which is what makes the first result a measurement rather than a tautology.
What it means for the rest of the field
The plateau is the first of the four assets this field is about, and it is the one with no downside at all. A tolerance is not an object that has to be built, so choosing it badly costs nothing but work; there is no risk of a wrong answer, no cliff, and no case where being too loose destroys anything that cannot be recovered on the next step.
That is exactly why it is first. The other three — the factorisation, the preconditioner, the pivot order — are objects with a construction cost, and each of them adds a failure mode that a tolerance does not have.
Reads more easily once this is understood
Essays that name this one as worth reading first.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- A tolerance that reads its own residual — both name conjugate gradients, flop count, forcing term, inexact newton, krylov subspace, newton iteration, quadratic convergence
- A factorisation kept past its date — both name exact ground truth, flop count, newton iteration
- The vector was what was wanted — both name exact ground truth, flop count, krylov subspace
- A parameter that counts steps — both name conjugate gradients, krylov subspace
- A rate that is known in advance — both name conjugate gradients, krylov subspace
- An iteration that only multiplies — both name flop count, newton iteration
Named objects
A flat tag is an object no other essay names yet.
Conjugate gradientsExact ground truthFlop countForcing termInexact newtonKrylov subspaceLinearisationNewton iterationQuadratic convergence