The degree the history chooses
Worth reading first: The problem that arrives again · A warm start is degree zero · A parameter that counts steps.
A straight path has nothing for a parabola to fit drew a map. On a sequence of nonlinear solves whose roots move along a straight line, the line through the last two answers is the better starting point for the next member at every tolerance; bend the path by as little as a part in a hundred thousand and the parabola through the last three wins once the tolerance is tight enough. The map has a boundary and a code running a sequence does not know which side of it the sequence is on.
It does have a history. The previous answers are already stored — they have to be, to form either start — and each member’s inner iteration left a trail of corrections behind it. That essay closed by naming two rules that could read that history and choose. This one scores them.
Two rules and what each reads
The residual rule forms both starts, evaluates the nonlinear residual at each, and keeps the one with the smaller residual. It chooses by the very quantity the solve is stopped on, so it should be right whenever the two starts differ by more than a step’s worth. Its price is one residual evaluation per member beyond the one the iteration makes anyway: on this family a residual is a matrix–vector product and a cubic term, about multiply-adds, and an inner chord step is a residual plus two triangular solves, about . So each choice costs a quarter of a step.
The free rule reads no residual. It forms both starts, measures the distance between them, and compares that distance with the size of the last correction the previous member took. If the gap is more than θ times the correction it takes the parabola, otherwise the line. The motivating arithmetic was the earlier essay’s: the gap between the two starts is the second difference of the stored answers, which contains the line’s truncation error; the last correction is a proxy for the error the stored answers carry; and the parabola’s larger amplification, against , should be worth paying once the truncation error exceeds about times that stored error. So θ = 2.1.
The first figure is both rules on every run at a drift of 0.02. The residual rule matches the better degree on 29 runs of 30 and is one step behind on the thirtieth — and every one of its violet squares sits four and a half steps above zero, which is eighteen extra residuals at a quarter of a step each. The free rule matches on 26 runs, and on the four it misses it is one to five steps behind. The wrong fixed choice, for comparison, costs up to 35 steps.
What the free rule is actually reading
The rule works better than its motivation deserves, and the reason is in the quantity it reads.
Several of those values are exactly one, which no estimate of a truncation error would produce. The algebra explains it. Suppose member s started from the line, − , and took corrections , …, . Then its answer is = − + + … + , and the second difference − + — the gap the rule measures at member s + 1 — is exactly + … + . The gap is the sum of the corrections the previous member needed. Divided by the last correction, the ratio is one if the member took one step, nearly zero if it took none, and large if it took several, each smaller than the one before.
So the free rule is not estimating curvature against stored error. It is asking whether the previous member, started from the line, needed more than one correction — the observation a guess worth two per cent makes from the other side, that a starting point is worth a count of iterations and not a share of them. On this family a chord step gains a little under a decade, so a member that needed three steps has corrections shrinking by about a sixth each, and the sum over the last is a few tens — which is the band the bent path sits in. The motivating threshold of 2.1 falls in the empty space between one step and several, and so, on this grid, does any threshold from just above one to sixteen.
The totals say the same. At every θ from 2.1 to 16 the rule’s total is 1,224 steps, identical: the ratios on these runs cluster at or below one and above that range, so moving the threshold inside it changes no choice. At θ = 64 it starts sending bent runs to the line and rises to 1,297. Below one it starts sending straight runs to the parabola — five of them at θ = 0.25 — and at θ = 1 it reaches 1,208, which is below the 1,213 of choosing the better degree per run with the answers known. A rule that decides member by member can beat an oracle that decides once per run, because the better degree can change within a run at the edge of the map.
The rule is still a good rule, and its derivation explains less of that than it claims. A rule that reads a step count is a stopping-test argument rather than a truncation argument, the same kind a rule that reads only its own probes makes from the samples it has already drawn: the evidence is something the computation produced for another purpose, and it is free because it was paid for already.
The mistakes are not the same size
The first figure’s open circles are the cost of the wrong fixed degree, and their heights are lopsided. On the straight path the wrong choice — the parabola — costs 4 to 6 steps. On the bent paths at tight tolerances the wrong choice — the line — costs 23 to 35.
That asymmetry decides the whole comparison. At a drift of 0.02, choosing the better degree per run costs 1,213 steps. Always the line costs 1,669, which is 456 more. Always the parabola costs 1,246, which is 33 more. A code that knows nothing about its path and always takes the parabola gives up 33 steps in 1,246; one that always takes the line gives up 456. The free rule recovers 22 of the parabola’s 33. The residual rule recovers 32 of them and spends 135 on evaluations.
The pattern holds at the other two drifts, with one exception worth reporting. At 0.04 the line costs 504 more than the better choice and the parabola 51; the free rule matches the better choice exactly at 2,170; the residual rule is 8 behind and 143 behind with its evaluations. At 0.01 the line costs 398 more and the parabola 26 — and here the free rule, at 849, is worse than always the parabola at 839. At the smallest drift the stored answers are closest together, the line’s start is good enough on more members to take a single step, and a likely reading is that the rule sends those members to the line on runs where the parabola would have taken none; the measurement does not separate that from the rebuild schedule below.
Why the asymmetry: a start that is too close to need a step can only save the step it did not need, while a start that is too far costs a step for every decade it is short. The parabola’s penalty on a straight path is its twice-amplified stored error, a factor of about two in distance, which costs at most a step here and there. The line’s penalty on a bent path is a fixed floor that the tolerance keeps asking to go below, which costs a step per member per decade. One mistake is bounded and the other grows with the accuracy asked for.
Where the free rule misses
The runs the free rule gets wrong at 0.02 are on the edges of the map, and this bend holds two of them. At 10⁻⁸ the parabola needs 18 steps and the line 23, but the line’s start is still good enough that most members take one correction, the ratio reads one, and the rule keeps the line. The truncation floor is there — the parabola’s five-step lead says so — but it has not yet made any single member take a second step. The rule reads effects, and a small effect spread thinly across members is invisible to a rule that looks at one member at a time.
That is the regime in which reading the residual earns its keep. The residual at the two starts differs even when both starts need one correction, so the residual rule picks the parabola there and gets the five steps. It is simply that five steps is less than the four and a half it pays on every run.
The same trail, read by two rules
The free rule is not the only reader of the previous member’s corrections. The factorisation schedule is another. A factorisation kept past its date found that rebuilding when the observed contraction between successive corrections degrades beats every fixed rebuild period, and that rule reads the same sequence of correction sizes the free rule sums.
The two readings can be confused with each other. A member that takes several corrections does so either because it was started far from its root or because the factorisation it is using has aged and each correction gains less. The free rule attributes every extra correction to the start and reaches for the parabola; a rebuild rule attributes a slow contraction to the factorisation and rebuilds. On the runs here the factorisation is rebuilt every four members on a fixed schedule, so the fourth member of each block works with the oldest factorisation, and the ratio the free rule reads can be inflated there for reasons that have nothing to do with the path.
That this does not show up as wrong choices on the straight path is because a straight path’s line start is so close that even an old factorisation finishes in one correction. It is a plausible contributor to the misses at the edges of the map, where a member’s step count is balanced between one and two, and this measurement does not separate the two causes. It also says something about combining the rules: a sequence that runs both has two controllers reading one signal, and whether they help each other or fight is a question the order of a batch makes sharper — the order a batch arrives in showed that shuffling a sequence multiplies its rebuilds, and a shuffled path is a bent one.
What a residual has to cost
The residual rule’s verdict depends entirely on one ratio: what a residual evaluation costs against an inner step. On a dense chord iteration that ratio is a quarter. It is not a quarter everywhere.
The rule beats always the parabola only if a residual costs less than about a seventeenth of a step, and beats the free rule only below about a fiftieth. On a dense chord iteration neither holds. But the inner step here is cheap because a factorisation has been paid for in advance. On a problem solved with a preconditioned Krylov method, an inner step is many matrix–vector products plus a preconditioner application, and a residual is one product; a ratio of a fiftieth is an ordinary inner iteration of a few dozen products. There the residual rule’s accuracy is worth having, and its 29 of 30 is the number to quote.
So the choice between the two rules is not about which is smarter. It is the same accounting a warm start is degree zero made about the extrapolation itself — a handful of vector operations against the thing they save — pushed one level further: what the evidence for choosing costs against what choosing saves. It is also the question a stopping test is a race asks of any test that has to be computed before it can be passed: a check is part of the cost of the thing it checks.
What a code should do
Three recommendations, in the order the measurements support them.
Keep three answers and extrapolate with the parabola if nothing is known about the path. On this grid it costs between 26 and 51 steps over thirty runs more than knowing the better degree, against 398 to 504 for the line, and it needs no rule at all. The one thing that can make it the wrong default is a drift so large that the parabola’s start fails to converge where the line’s does, and the earlier measurement found drifts at which the parabola’s start and the previous answer both stopped converging while the line’s did not.
Add the free rule if a few per cent matters. It costs a vector subtraction a member and recovers two thirds to all of what the parabola gives up at drifts of 0.02 and 0.04, with the understanding that what it reads is how many corrections the previous member needed, and that its threshold is anything comfortably between one and ten.
Use the residual rule only where a residual is much cheaper than an inner step. On a dense factorised chord iteration it loses to both; on an iterative inner solve it is the most reliable of the three.
What this rests on
The family of the earlier essay: 120 unknowns, a condition number of ten thousand, a cubic term; paths bent by c·sin 3t along a second random direction for c = 0 and 10⁻⁵ to 10⁻¹; tolerances 10⁻⁶ to 10⁻¹⁴; twenty members from t = 0.4 with a factorisation rebuilt every four. Drifts of 0.01, 0.02 and 0.04; at 0.08 the chord iteration with this rebuild schedule fails on every run and nothing can be scored. Costs are counted in inner steps with a residual at a quarter of one, which is exact for the dense arithmetic here and an assumption for anything else; the factorisations, which are the same for every strategy, are left out of every total.
The claim that has to fail
The claim is the natural one after the first figure: that a rule right on 29 runs of 30 pays for itself. At a drift of 0.02 it needs 1,214 inner steps and makes 540 extra residual evaluations, 135 steps’ worth on a dense chord iteration, for 1,349 against always the parabola’s 1,246. The refusal is fed the claim that the rule’s total is no larger and fails.
Still open: more than three answers, a path whose bend changes, and the two controllers together
Higher degrees, and fits rather than interpolants. The parabola is the last interpolant worth trying on this family: a cubic’s coefficients (4, −6, 4, −1) have norm , so it would need a third derivative the stored error cannot hide. A least-squares fit of a line or a parabola to four or five stored answers trades the other way — smaller amplification for a bias — and which of the two the asymmetry above favours is unmeasured.
A path whose bend varies along the run. Every path here has one bend for its whole length. A continuation through a turning point, or a sweep that crosses from a linear regime into a nonlinear one, would put the map’s boundary inside a single run, which is where a member-by-member rule should beat any fixed degree by more than the handful of steps it does here — and where the free rule’s blindness to thinly spread effects would matter most.
The degree rule and the rebuild rule on one sequence. Both read the previous member’s corrections, one to choose a start and one to decide a factorisation’s age. Running them together, on a path whose members arrive out of order, would say whether a correction count can be attributed to the right cause — two of the five things the problem that arrives again listed as carried between members, never yet measured as one decision.
What links here
Computed from the collection, not written here: the essays that point at this one.
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 flop count, newton iteration, stopping criterion, warm start
- One line that buys a quarter of the run — both name exact ground truth, flop count, newton iteration, stopping criterion
- What a rebuild is worth — both name cholesky factorisation, flop count, stopping criterion, warm start
- A test with no tolerance in it — both name exact ground truth, flop count, stopping criterion
- The accuracy that is thrown away — both name exact ground truth, flop count, newton iteration
- The penalty for keeping it is a ratio — both name cholesky factorisation, flop count, warm start
Named objects
A flat tag is an object no other essay names yet.
Cholesky factorisationExact ground truthExtrapolationFlop countNewton iterationStopping criterionWarm start