A floor with a cliff at one
Worth reading first: The accuracy that is thrown away · A stopping test is a race.
One line that buys a quarter of the run found a line inside the adaptive forcing rule of inexact Newton that no published statement of the rule carries. Newton’s method solves each linear step only approximately, to a relative residual η chosen from the ratio of the last two nonlinear residuals, and the line puts a floor under it: never ask for an η below , with . The reasoning is that the outer loop will stop when falls below tol, so accuracy past that point is accuracy nobody reads. Measured, the floor saved 9 to 27 per cent of the inner work and cost 23 to 2,600 times the forward error — accuracy the stopping test never asked for, and both runs passed the test.
The essay’s open questions were about the half. It is arbitrary. Swept, would the saving and the accuracy lie on one curve with a knee — a value of c past which the saving stops growing and the accuracy keeps falling — or on a straight line? And is the accuracy premium, the factor by which the unfloored run is more accurate, stable enough across problems for a caller to plan on?
The curve has no knee. It has a cliff, and it is at one.
The constant, swept
The problem is the one the forcing essays have used throughout: Newton’s method on with 200 unknowns, symmetric positive definite at condition number and λ = 3, each step solved by conjugate gradients. The adaptive rule runs with the floor at nine values of c, from 0.01 to 10, and without it; every count is a count of matrix–vector products, and the forward error is measured against the known root.
At an outer tolerance of , the unfloored run takes 1,109 inner iterations and reaches a forward error of 1.2·10⁻⁹. With the floor at c = 0.01 it takes 983 and is 44 times less accurate; at 0.1, 897 and 331 times; at 0.5 — the constant in use — 822 and 2,636 times; at 1, 782 and 4,979 times. Each decade of c costs about a decade of forward error, and buys eight to ten per cent of the inner work.
That is a trade with no knee in it. The error is linear in c because the floor sets the last step’s relative residual, and the error of a well-conditioned root is proportional to the residual it was stopped at. The saving is logarithmic in c because conjugate gradients spends a roughly constant number of iterations per decade of residual — the fact a guess worth two per cent found limiting what any starting guess can buy — so a floor ten times coarser saves one decade’s worth of the last step’s iterations and nothing else. Neither curve bends. Choosing c on this range is choosing a point on a straight line in log–log coordinates, and nothing about the line says where.
Then c = 3. The inner work falls a little further, to 774 — and the run takes 79 outer steps, the cap, without meeting the tolerance. At c = 10 the same. Turn the dial to other tolerances and the pattern repeats: at the run at c = 3 reaches the tolerance only in 39 outer steps and at c = 10 not at all; at and , both stall at the cap.
All of it is the last step
The saving is not spread over the run. At the unfloored run spends 371 of its 1,109 inner iterations on its last step. With the floor at c = 0.01 the last step takes 245; at 0.1, 159; at 0.5, 84; at 1, 44. Every other step is identical, iteration for iteration, and the difference in the total is exactly the difference in the last step. That is the floor doing what its comment says — it only binds when the ratio rule has asked for an accuracy below the one the stopping test needs, which happens once, at the end — and it is why the saving is bounded: the most it can ever save is the unfloored run’s last step, a third of the run here.
It also says why the forward error is so sensitive to it. The last step is the one that places the iterate. Everything before it moves the iterate towards the root at Newton’s quadratic rate, and the last step’s inner tolerance decides where, inside the final basin, it comes to rest. Solved to the ratio rule’s own forcing term — 371 iterations, a relative residual far below the test — it lands almost on the root. Solved to the floor, it lands wherever the floor allows. A stopping test is a race described the general shape: two tolerances, one on the inner solve and one on the outer loop, and a run whose outcome depends on which is crossed first. Here the floor fixes the order of the race, and c sets the margin.
The same trade at 10⁻¹²
At the tightest tolerance the shape is the same and the numbers are larger. The unfloored run takes 1,657 inner iterations, 548 of them on its last step, and reaches a forward error of 5.3·10⁻¹³. With the floor at 0.01 it takes 1,346 and is eleven times less accurate; at 0.1, 1,262 and 92 times; at 0.5, 1,206 and 377 times; at 1, 1,168 and a thousand times. At 3 and 10 the run stalls at the cap, each stalled step costing a single inner iteration: the floor at those constants asks for so little that conjugate gradients meets it in one product, and the outer loop takes a step that barely moves.
That last detail is the stall seen from inside. A run past the cliff is not expensive — its seventy-nine steps cost about as much inner work as the converging runs’ ten — it is futile. Each step solves a linear problem to an accuracy that cannot produce a residual below the test, and the loop has no way to learn that from anything it measures. It is the mirror image of the refinement run in the residual turns before the error doubles, which also failed to stop — but there the failure to stop was information, the signature of a saddle, and here it is only a floor set above the line it was meant to sit under. A loop that reports “did not converge” cannot tell a caller which of the two it is, and a residual history that has gone flat at a level just above the tolerance is the one sign that it is the second: a floor-induced stall sits a little above the tolerance step after step — 1.4 and 4.4 times it at c = 3 and 10 on the standing problem at 10⁻⁸ — where a genuinely hard problem’s residual wanders.
Why the cliff is at one
The floor asks each step for a relative residual no smaller than . A step solved exactly to that relative residual reduces the nonlinear residual to about , plus the second-order error of the linearisation. The stopping test wants . So with c below one, a step solved to the floor lands below the test’s threshold and the loop stops; with c above one, a step solved to the floor lands above it, the next step’s floor is recomputed from the new, slightly smaller residual and asks for about the same absolute accuracy again, and the iteration crawls towards the threshold by whatever the conjugate-gradients solve overshoots its tolerance by. It may arrive after many steps, or not before the cap.
Across five problems — conditioning , and , nonlinearity λ from 0.3 to 30 — the outer step count at is flat from c = 0.01 to c = 1 on every one: 10, 8, 9, 9 and 9 steps, the same as without the floor except for one extra step on the worst-conditioned problem at c = 1. At c = 3 four of the five run to the cap and the fifth needs 22 steps where it needed 8. At c = 10 all five stall.
So the floor’s constant has a hard upper limit, and the limit is not a tuning choice: it is where the floor stops being below the stopping test. The half in use sits a factor of two inside it. A code that raised it to buy more saving — the natural thing to try, given that the saving grows with c — would lose nothing detectable until c crossed one, and then lose convergence entirely.
The premium is not a planning number
The earlier essay’s last open question was whether the accuracy the floor gives up is stable enough to be relied on — in which case a caller could decide once whether the floor is worth it — or varies enough to be useless.
It is useless. At c = ½, over twenty runs — five problems at tolerances , , and — the error with the floor is between 1.00 and 48,000 times the error without it, and the saving between 0.0 and 37.7 per cent. The two do not track each other. On the worst-conditioned problem at the floor saves 37.7 per cent of the inner work and costs nothing at all, a factor of 1.02, because on that problem the forward error is set by the conditioning and the extra inner accuracy cannot improve it. On the best-conditioned problem at it saves 31.7 per cent and costs a factor of 48,000, because there the unfloored run’s last step lands the iterate to near machine precision and the floored run’s does not. On the standing problem the premium moves from 32 to 2,636 to 23 to 376 as the tolerance goes from to , not monotonically.
The reason is the one the earlier essay gave for the extra accuracy existing at all, and it is the gap between a residual and an error that a small residual is not a small error measured on a linear system: the unfloored rule solves the last step to a residual set by the ratio of the last two nonlinear residuals, which under quadratic convergence is tiny, and whether that lands the iterate far below the tolerance depends on where the previous step happened to leave it. That is a property of the sequence of residuals on the particular run, not of the problem’s class or the tolerance’s size. A premium that depends on where one iterate happened to fall is a premium no caller can anticipate.
What a caller should do with this
The measurement narrows the earlier essay’s advice. It said the floor is a trade between a residual and an error, and that whether it is a saving depends on which of the two the caller meant. Both halves stand, with two additions.
If the caller meant the residual, the floor is right and its constant should stay well below one. A half is a reasonable choice and a tenth costs little more work; anything at or above one risks a run that never stops. There is no benefit to tuning between a tenth and a half beyond a few per cent of inner work, and the whole of the risk is on one side.
If the caller meant the error, the floor should not be there, and no constant repairs it. The forward error it costs is proportional to c, so a smaller constant costs less, but how much less depends on the run and cannot be predicted: at c = 0.01 the standing problem at still loses a factor of 44. A caller who wants a forward error should ask for one, which means either a tolerance on the step size, as the accuracy that is thrown away measured for the inner solves, or a residual tolerance divided by an estimate of the condition number — the amplification the condition number is an amplifier measures — the floor from a forward target the earlier essay proposed and nobody has measured.
Where the rule’s other safeguard stands
The forcing rule a tolerance that reads its own residual described has two safeguards, and this measurement touches only one. The other stops the forcing term from falling faster than the residuals justify: if the previous η was not small, the new one may not be much smaller. It governs the early steps, where the floor is inactive; the floor acts only at the end, where the ratio rule asks for a tiny forcing term. On these problems the two act at different ends of the run, which is why every run here with c at or below one takes the same number of outer steps as the unfloored run, and the cliff is entirely the floor’s.
It is worth noticing that the second safeguard’s constant has a meaning the first’s does not. The first safeguard’s constants are Eisenstat and Walker’s, fitted to make the rule converge well on test problems. The floor’s constant is a ratio between two tolerances in the same units, and one is the only value at which it changes kind. That makes it the rarer sort of tuning parameter: one with a region that is safe for a reason, a boundary that can be stated, and a default that is safe by a factor of two.
What this does not settle
One family of nonlinear problems — a symmetric positive definite matrix plus a cubic diagonal term — at 200 unknowns, conjugate gradients as the inner solver, and the second of Eisenstat and Walker’s two forcing rules. A problem whose Newton iteration converges more slowly than quadratically near the root would reach the last step with a larger forcing term and give the floor less to do; the cliff at one should survive, since it is an inequality between the floor and the test, but where the premium lies would move. Each of the twenty premiums is one run on one problem; a seeded family of right-hand sides would turn each into a distribution, and the spread measured across problems here says that distribution would be wide, but not how wide.
The cap of eighty outer steps is a choice. With no cap, some of the stalled runs would eventually creep below the threshold, since each conjugate-gradients solve overshoots its tolerance by a random amount; the measurement shows that the crawl, when it happens, takes more steps than the whole of a converging run, which is the practical meaning of a cliff.
Still open: a floor from a forward target, and the same line in the first forcing rule
The floor a forward target implies. If the caller wants the forward error below some δ, the last step’s relative residual should be about δ divided by the condition number, and the condition number can be estimated from quantities the Krylov solves already produce. A floor set that way would give up only the accuracy the caller said they did not want, and the measurement is what it costs against the unfloored run on the five problems here — and whether a Lanczos estimate of the condition number, which conjugate gradients carries for free, is good enough to set it.
Eisenstat and Walker’s first rule. Their first choice of forcing term is built from the difference between the new residual and the linear model’s prediction of it, not from a ratio of norms. It has no published floor either. Whether it produces the same late over-solving that the floor removes, and whether a floor on it has the same cliff at one, is the comparison that would say whether the line is a property of one rule or of the idea of an adaptive forcing term.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- The part of a solver that may be rounded — both name conjugate gradients, forward error, residual, stopping criterion
- The reading that never moves — both name conjugate gradients, forward error, residual, stopping criterion
- A run that is over at step five — both name conjugate gradients, residual, stopping criterion
- A stopping rule that follows the run it is given — both name conjugate gradients, residual, stopping criterion
- Bracketing an error nobody can measure — both name forward error, residual, stopping criterion
- The active set before the digits — both name forward error, newton iteration, stopping criterion
Named objects
A flat tag is an object no other essay names yet.
Conjugate gradientsForcing termForward errorInexact newtonNewton iterationQuadratic convergenceResidualStopping criterion