Methods that were designed apart

A parameter that counts steps

The regularisation field's knob is a positive real number chosen by one of three rules. The iterative field's is an integer nobody called a knob — where to stop. On the same problem the best step is 20 and the best λ is 0.025, and they reach 0.1426 and 0.1406.

Worth reading first: When the answer is a choice · The rate the condition number predicts.

Two fields on this site end on a knob, and only one of them calls it that.

The regularisation field’s is λ, a positive real number multiplying a penalty, and choosing it is a subject with a literature: three published rules, scored here against an oracle that requires the exact answer, landing at 1.00, 1.06 and 2.29 times its error.

The iterative field’s is when to stop. It appears in every account of every method in that field as a tolerance — a number small enough that the residual falling below it means the work is done. It is not presented as a modelling decision, and on the problems that field is built on it is not one: the model problem has an exact answer, the iteration converges to it, and stopping early costs accuracy in a way stopping later would fix.

Put the second knob on the first field’s problem and it stops being a tolerance. It becomes the regularisation parameter, it has an optimal value that is not the smallest available, and running past it destroys the answer — while every quantity the method can compute says the run is going well.

Conjugate gradients on an ill-posed problem at 1.0% noiseTwo curves against the step count on a logarithmic vertical axis. The relative residual falls at every one of the 120 steps without exception. The error against the true signal falls to 0.1426 at step 20 and then climbs, reaching 6.02 by the end — 42.2 times its best value.015304560759010512010⁻²10⁻¹110¹steprelative sizeleast error: 20discrepancy stop: 7errorresidualthe knob is an integerleast error, at step20error there0.14error at step 1206the residual falls at every stepthe error turns and keeps rising
Fig. 1 Conjugate gradients on the normal equations of a 64-point deconvolution at 1% noise. The relative residual falls at every one of the 120 steps, without exception. The error against the true signal falls to 0.1426 at step 20 and then climbs to 6.02 — forty-two times worse. Drag the noise: the minimum moves, and the shape does not.

The method, and the one thing about it that is not standard

CGLS is conjugate gradients applied to AᵀAx = Aᵀb with AᵀA never formed. That distinction matters more here than anywhere else on the site, because the road that squares the problem is what forming it costs: κ(AᵀA) = κ(A)², and below ε = √u the product of a matrix with itself comes out exactly singular. The iteration touches A and Aᵀ separately, so its arithmetic is done at κ(A) while its convergence behaves as though the operator were AᵀA.

Every iterate is kept, because the whole subject is which one to hand back. A routine that returned only the last would have thrown away the question.

Semi-convergence, and the two curves that make it

Read the hero figure as two claims rather than one.

The residual falls at every step. Not on average, not in trend: at every one of the 120 steps, and this is asserted step by step rather than between the ends, because a quantity that falls throughout is the whole of what a solver can see. Conjugate gradients minimises ‖b − Ax‖ over a space that grows by one dimension per step, so the minimum over the larger space cannot be worse than the minimum over the smaller one. This is a theorem, and the figure is it.

The error turns. It falls for twenty steps, reaches 0.1426, and then climbs through two orders of magnitude. Nothing has gone wrong with the arithmetic — the run at step 120 is exactly what the recurrence produces — and nothing has gone wrong with the method. What has happened is that the iteration has started fitting the noise, and the noise is the part of b that has no answer behind it.

The mechanism is the one the previous field measured. The singular values of this operator decay exponentially with no gap anywhere; the coefficients uₖᵀb of the exact right-hand side decay faster; the coefficients of the noisy one flatten at the noise floor and stop. Every term of the solution past that flattening is noise divided by a σ of 10⁻¹⁰ or less. The early iterations reconstruct the components where the signal is; the later ones reconstruct the components where it is not.

So the site’s oldest sentence — a small residual is not a small error — arrives here with a stopping rule attached, and the stopping rule is the regularisation.

The filter, and why it is a claim rather than a change of coordinates

The regularisation field writes both of its standard methods as one expression with different weights:

x_reg  =  Σₖ fₖ · (uₖᵀb / σₖ) · vₖ

with fₖ = 1 or 0 for a truncation and fₖ = σₖ²/(σₖ² + λ²) for Tikhonov. The claim about conjugate gradients is that the mth iterate has the same form, with

fₖ  =  1 − Π_j (1 − σₖ²/θⱼ)

where the θⱼ are the Ritz values of AᵀA after m steps — a polynomial in σ² of degree m, with its roots where the iteration has converged.

There is an obvious way to check that and it proves nothing. The vₖ are an orthonormal basis of the whole space, so any vector can be written as a filtered sum: measure fₖ = σₖ(vₖᵀx_m)/(uₖᵀb), substitute it back, and the sum reproduces x_m exactly. That is a change of coordinates wearing the clothes of a theorem, and this file’s first version of the check did precisely it.

What makes it a claim is that the polynomial route never looks at the iterate. Conjugate gradients and Lanczos are the same process written twice, so the α and β of the recurrence are the entries of the Lanczos tridiagonal of AᵀA, and its eigenvalues are the θⱼ. The predicted factors are then a function of σ alone, determined by m numbers. The measured factors are sixty-four independent coordinates of a vector, constrained to be nothing at all.

The filter 16 conjugate gradient steps apply, measured and predictedFilter factors against the singular-value index. The factors measured off the iterate and the polynomial predicted from the recurrence coefficients agree to 1.2·10⁻¹¹ and are drawn as one curve. It rises above one — 1.203 at its largest — and changes direction several times. Tikhonov's filter at the matching cutoff is monotone and never exceeds one.081624324048566400.250.50.7511.25index kfilter factoronezeroCG, both routesTikhonovone of these is not a weightlargest CG factor1.2measured vs predicted1.2·10⁻¹¹largest Tikhonov factor1two routes to the same curveand a curve that goes above one
Fig. 2 The filter after sixteen steps, obtained twice. The points are measured off the iterate; the curve is the polynomial with its roots at the Ritz values, computed from the recurrence coefficients. They agree to 1.2·10⁻¹¹ and are drawn as one line. Tikhonov’s filter at the matching cutoff is the dashed curve — monotone, and never above one.

What the shape says

Two properties of the measured curve are not shared by any Tikhonov filter at any λ, and both follow from what the polynomial has to do.

It goes above one. The largest factor at step 16 is 1.2035. A filter factor above one means the method has overcorrected that component — put back more of it than the data contains. For Tikhonov that is impossible: σ²/(σ² + λ²) is below one for every positive λ, by construction.

It is not monotone. The measured factors change direction eight times. A polynomial that is one at the converged Ritz values and small far below them cannot descend steadily in between; it oscillates around one in the region it has resolved and falls off past it.

Neither is a defect. The overshoot is where the method is ahead of the smooth filter at the same effective cutoff, which is part of why a handful of steps competes with a factorisation. But it settles a question the field’s vocabulary invites: conjugate gradients is a spectral filter in the same sense Tikhonov is, and it is not the same filter, and no λ makes it one.

And the identity has an expiry date

Now run the two routes further apart and watch them separate.

The filter description, and the orthogonality it rests onTwo quantities against the step count on a logarithmic vertical axis. The disagreement between the measured filter factors and the polynomial predicted from the recurrence stays at the level of rounding for the first dozen steps and then rises through ten orders of magnitude, tracking the loss of orthogonality in the Lanczos basis underneath it. The vertical line marks the step at which the error is least, which is step 20.2610141822263010⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹stepsizeleast error: 20‖QᵀQ − I‖filter disagreementan identity with an expiry datedisagreement at step 1210⁻¹³disagreement at step 300.35least error at step20exact while the basis is orthogonaland false where the method is best
Fig. 3 The disagreement between the measured and the predicted filter factors, against the loss of orthogonality in the underlying Lanczos basis. They stay at the level of rounding for a dozen steps and then rise together through ten orders of magnitude. The vertical line is the step at which the error is least.
step worst factor disagreement ‖QᵀQ − I‖ of the basis
4 6.2·10⁻¹⁴ 4.2·10⁻¹⁴
8 6.9·10⁻¹⁴ 3.7·10⁻¹³
12 1.0·10⁻¹³ 1.3·10⁻¹²
16 1.2·10⁻¹¹ 1.7·10⁻⁹
20 4.4·10⁻⁴ 0.269
24 0.144 2.41

The polynomial description of conjugate gradients is exact while the recurrence stays orthogonal and false after it. That is not surprising once stated — the whole derivation runs through a Krylov basis that is orthogonal in exact arithmetic and is not in floating point, which is the ghosts essay’s subject in another field.

What is worth having is where it breaks. On this problem the basis loses orthogonality between steps 16 and 20, and the error is least at step 20. The textbook description of the method stops being true at exactly the step anybody would want to stop at. Both halves of that are asserted rather than reported, because an assertion that the routes always agree would be false and one that quietly stopped checking past step 16 would be hiding the interesting half.

‖QᵀQ − I‖ at every step of a Lanczos run, n = 40The departure from orthogonality of the Lanczos basis, against the step, on a logarithmic vertical axis. It sits at the level of rounding for 13 steps and then climbs by a factor of about seventeen a step for ten steps running, twelve orders of magnitude, before saturating. The dashed line marks the step at which the first Ritz value converged, which is step 11.051015202530354010⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹step‖QᵀQ − I‖first Ritz value converges√uno reorthogonalisationfullthe two events are one eventstep orthogonality crosses √u14step the first Ritz value converges11consecutive steps at ≥5× growth10a drift would grow like a square rootthis grows like a geometric series and then stops
Fig. 4 The same loss, from the field that studies it. Orthogonality in a Lanczos basis decays geometrically over about ten consecutive steps and then saturates — and it arrives with the first converged Ritz value rather than at a fixed step count. That is why the filter identity above expires when it does.

The knob is an integer, and that changes what a mistake costs

The discrepancy principle is the one parameter-choice rule that needs to be told the noise level, and the standard criticism is that nobody knows it. In the λ field the criticism has teeth: told a noise level ten times too small the rule returns λ = 10⁻⁸ and an error of 10,449 against a truthful 0.112 — five orders of magnitude, from a factor of ten.

Applied to a step count, the same rule and the same lie behave differently:

told stops at step error
the truth 7 0.1488
ten times too much noise 2 0.1745
ten times too little 120, the end of the run 6.02

Overstating costs 17%. Understating costs a factor of forty — bad, and bounded by the run, because the rule cannot ask for more steps than are taken. A continuous knob has no such floor: λ can be made arbitrarily small, and the answer it produces is unbounded.

That is a genuine difference between the two parameters and it points the other way from the usual one. The integer is coarser, so it cannot be tuned as finely; and it is coarser, so a wrong noise estimate below a certain size changes nothing at all, because the stopping step is the same integer either way.

Twenty steps against a factorisation

The comparison the whole essay is for. On this problem:

method parameter error
Tikhonov at the oracle’s λ 0.02512 0.1406
CGLS at its best step 20 0.1426

A ratio of 1.014. The λ needed a singular value decomposition, or a QR of a 2n×n stacked matrix; the step count needed twenty products with A and twenty with Aᵀ, and neither the matrix nor its factorisation was ever formed.

This is where the two fields stop being two fields. What the regularisation field measures as a choice about a penalty, the iterative field can produce as a choice about a budget — and on a problem where A is a convolution and its products cost n log n, the second is available at sizes where the first is not.

Four knobs on one problem at 1.0% noiseRelative error against the fraction of each method's own range, on a logarithmic vertical axis. A truncation, a Tikhonov parameter, a conjugate gradient step count and a randomised rank each have an interior minimum, and the four minima are 0.1445, 0.1406, 0.1426, 0.1449 — a spread of 3%. The horizontal line is the best of them.00.250.50.75110⁻¹110¹10²10³fraction of the method's own rangerelative errorfloor 0.141truncation KTikhonov λCGLS steprandomised rankfour methods, one floortruncation K0.14Tikhonov λ0.14CGLS step0.14randomised rank0.14four knobs from four fieldsand one obstruction underneath them
Fig. 5 Four knobs from four fields on this problem, drawn against the fraction of each one’s own range. They have interior optima and they land within a few per cent of each other. This essay is the third curve; the next one is about why the four agree.

The other half of the deferral: a penalty with a null space

Everything above penalises ‖x‖. The general form penalises ‖Lx‖ for some other matrix L, and with L a discrete derivative the change is not cosmetic: L₁ has a null space, and a vector in it is not penalised at all. assertTheNullSpaceIsTheDifference feeds it a constant vector and requires ‖L₁·(3.7…)‖ to be exactly zero, which it is.

That matters whenever the answer has a nonzero mean, and the size of it is measurable by raising the offset and watching the two forms diverge.

Two penalties on the same problem, against the offset in the signalBest relative error for each penalty at four offsets. With no offset the two are within 7% of each other. At an offset of 10 the derivative penalty is 1.85 times better, because a constant lies in its null space and costs it nothing, while the norm penalty pays for the whole offset at every λ.best relative error at each offset‖x‖, offset 00.2035‖L₁x‖, offset 00.1901‖x‖, offset 20.0572‖L₁x‖, offset 20.0524‖x‖, offset 50.0333‖L₁x‖, offset 50.0245‖x‖, offset 100.0240‖L₁x‖, offset 100.0129what the null space buysadvantage at offset 01.1advantage at offset 21.1advantage at offset 51.4advantage at offset 101.9the norm penalty pays for a constantthe derivative penalty does not
Fig. 6 Best achievable error for each penalty at four offsets, at 10% noise. With no offset the two are within 7% of each other. At an offset of ten the derivative penalty is 1.85 times better — and the reason is in the norms: at its best λ the norm penalty returns a solution 0.8% short of the truth’s length, and the derivative penalty’s is not short at all.
offset ‖x‖ penalty ‖L₁x‖ penalty advantage
0 0.2035 0.1901 1.07×
2 0.0572 0.0524 1.09×
5 0.0333 0.0245 1.36×
10 0.0240 0.0129 1.85×

The advantage is not a fact about derivative penalties being better. It is the offset, arriving in the answer, because a penalty on ‖x‖ shrinks — it prefers small answers, and a signal with a large mean is not small. The measured shortfall says so directly: the norm penalty’s solution is short of the truth’s length at every offset, and the derivative penalty’s is not.

And it is the one place where the filter-factor reading of this whole field stops. The general-form solution is not a weighted sum over A’s singular vectors; it is a weighted sum over the generalised singular vectors of the pair (A, L), which are a different basis. A routine that reported measured filter factors for it would be reporting sixty-four numbers that reconstruct the vector and mean nothing, which is exactly the trap the two-route check above exists to avoid — and it is one of the refusals this file runs.

What the two knobs turn out to have in common

Three things, and the third is what makes this a combination essay rather than a regularisation one.

Both have an interior optimum. Neither the smallest λ nor the largest step count is the right one, and in both cases the reason is the same trade: too little regularisation fits the noise, too much discards signal.

Neither optimum is computable from the data. The oracle in both fields requires the exact answer. Every practical rule is a heuristic, and the ones for the step count are the ones for λ transposed — the discrepancy principle, the L-curve, generalised cross-validation, each with the same weaknesses in the same places.

And the quantity that is easy to compute is monotone in both. The residual falls at every step and falls with every decrease in λ. A stopping rule that watches it and nothing else will always run to the end of whatever budget it is given, which is a correct implementation of a wrong idea — and it is the idea this essay’s refusal is fed.

Singular values and |uₖᵀb|, with and without 0.10% noiseThree curves against the index on a logarithmic vertical axis. The singular values fall exponentially to the level of rounding. With an exact right-hand side the coefficients fall faster and every term of the solution stays bounded. With noise they flatten at index 32, and from there on each term is noise divided by a σ of 6.8·10⁻⁴.081624324048566410⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹index kmagnitudethe floor: k = 32best truncation: k = 28σₖ|uₖᵀb| exact|uₖᵀb| with noisetwo different indicesthe crossing, from the data alone32the truncation that is actually best28relative error there0.11the exact coefficients never flattenthe noisy ones stop at ‖e‖/√n
Fig. 7 Where the data stops carrying signal, from the regularisation field. The crossing is computable from the data alone and the truncation that minimises the error is four to eleven indices earlier — which is the same overshoot the discrepancy stopping rule shows above, in a different currency.
Conjugate gradients at κ = 106, against the bound κ permitsA semi-logarithmic plot of the relative A-norm error against iteration count. The measured curve falls below a smooth dashed curve showing the classical condition-number bound.0408012016020024010⁻¹⁶10⁻¹³10⁻¹⁰10⁻⁷10⁻⁴10⁻¹iteration‖e‖_A / ‖e₀‖_Ameasuredκ bound252 steps40×40, spectrum spread evenly in logbound permits 14163
Fig. 8 The same method on a well-posed problem, where stopping late costs nothing and the only question is the rate. Every claim in this essay is about what changes when the problem has no answer in it.
The recovered signal at three λ, 0.10% noiseThree recovered signals against the truth. At the best λ the two bumps are recovered and the step is rounded off. Fifty times smaller and the answer is dominated by amplified noise; fifty times larger and the step has gone entirely. The step is the feature that costs the most to represent and it is the first thing any filter loses.0816243240485600.511.5positionvaluethe truthbest λtoo littletoo mucheither side of the bestbest λ, relative error0.11fifty times smaller0.73fifty times larger0.15the step is the first thing every filter losesand it does not come back
Fig. 9 What the answers actually look like. The regularised solutions recover the two bumps and blunt the step; the unregularised one is noise divided by a σ of 10⁻¹⁰. A step count chooses a point on that scale exactly as λ does.
The residual basis of conjugate gradients, at κ = 106A semi-logarithmic plot against iteration count showing the loss of orthogonality among the residual vectors rising while the relative residual falls.05101520253010⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²10¹iteration‖RᵀR − I‖ and ‖r‖/‖b‖step n‖RᵀR − I‖residual30×30, run for exactly n stepsexact arithmetic would end here
Fig. 10 The orthogonality the filter identity above rests on, measured in the iterative field: the residual basis of a conjugate gradient run is orthogonal in exact arithmetic and is not in floating point, and that is why the polynomial description has an expiry date.

What is left

The other Krylov regularisers. LSQR is CGLS in a numerically better arrangement and would change the step at which the two routes above part company; GMRES applied to a square ill-posed system regularises differently again, because its Krylov space is built from A rather than AᵀA. The comparison would be about the bases, which is a phase’s work.

Hybrid methods, where a Tikhonov problem is solved inside the Krylov space at every step, so the two knobs are turned together. That is the obvious next thing to build from this essay and it needs a figure this site does not have: a two-dimensional sweep over λ and m with the oracle drawn on it.

And the noise model. Everything here adds Gaussian noise of a stated size to b. Correlated noise, noise in A rather than in b, and a right-hand side that is not in the range of A at all are three different problems, and only the first is what “1% noise” is usually taken to mean.

What links here

Computed from the collection, not written here: the essays that point at this one.

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.

Named objects

A flat tag is an object no other essay names yet.

Conjugate gradientsDiscrepancy principleFilter factorsIterative regularisationKrylov subspaceReorthogonalisationRitz valuesSemi convergenceStopping criterionTikhonov regularisation