Regularisation, and the answer that is chosen

The share read twice moves the middle

Leave-one-out's noise estimate, with the fit's degrees of freedom taken out, was nearly unbiased in the median and low on a third of 960 draws, down to 0.645 of the noise. The prediction was that the low draws are those whose leave-one-out λ sat furthest left of the oracle's, so that the degrees of freedom were read too high, and that reading them again at the discrepancy principle's own λ would lift every one above 0.85 without moving the median by more than two per cent. Nine of the twelve lowest draws do sit far left; three sit six decades to the right. One more reading lifts the lowest to 0.783 and leaves seven draws under 0.85, not none. And it moves the median by up to 6.2 per cent, because it lowers the share it takes out from every draw, not only the low ones. The rule told the new estimate is no better on any cell.

Worth reading first: When the answer is a choice · Choosing without knowing · A parameter that counts steps.

The excess is what the fit spent estimated the noise level of a deconvolution problem by leave-one-out cross-validation and found the estimate high by exactly the fit’s own share: its square was the noise’s times m/(m−df)m/(m - \mathrm{df}), where df\mathrm{df} is the trace of the fit’s hat matrix at the λ leave-one-out chose. Multiplying the square by 1−df/m1 - \mathrm{df}/m took the excess out. The median over the true noise fell to between 1.005 and 1.073 on every cell, and the estimate was below the noise on 344 of 960 draws, as low as 0.645, which an unbiased estimate is about a third of the time. The discrepancy principle told the corrected estimate did as well as told the true noise.

Its lowest draws, at 0.65 to 0.75 of the noise, were all at 1.25 to 2 samples per unknown, where the fit spends the largest share of the samples. That suggested a mechanism, and the essay signed a prediction from it. The correction reads df\mathrm{df} at the λ leave-one-out chose. If that λ sat well to the left of the oracle’s, at a smaller λ, the fit there spends more degrees of freedom than it should, the correction takes out too much, and the estimate comes out low. Reading df\mathrm{df} instead at the λ the discrepancy principle picks when told the corrected estimate, iterating once, would then lift every one of those draws above 0.85 and move the median by no more than two per cent.

The low draws, and where their λ sat

The draws are the earlier essay’s: Tikhonov regularisation of a deconvolution problem on grids of 24 to 96 unknowns, at 1.25, 1.5, 2 and 4 samples per unknown and noise of a hundredth, a thousandth and a ten-thousandth, sixteen draws for each grid, 960 in all. For each, the oracle λ is the grid point with the smallest true error, and the offset is how many decades leave-one-out’s λ sits to the left of it.

The corrected leave-one-out noise estimate over the true noise against how many decades leave-one-out's λ sat left of the oracle's, on the 720 draws at 1.25 to 2 samples per unknown: the lowest and median draw in each decade, before and after a second reading of the fit's shareLowest corrected estimate by decade of offset: 0.741 at -6.5, 0.951 at -5.5, 1.032 at -1.5, 0.798 at -0.5, 0.647 at 0.5, 0.648 at 1.5, 0.645 at 2.5, 0.899 at 3.5, 0.762 at 4.5, 0.923 at 5.5. After a second reading: 0.783 at -6.5, 1.014 at -5.5, 1.055 at -1.5, 0.834 at -0.5, 0.784 at 0.5, 0.862 at 1.5, 0.931 at 2.5, 1.042 at 3.5, 0.993 at 4.5, 1.056 at 5.5.-6-4-20240.60.70.80.911.11.2decades leave-one-out's λ sits left of the oracle'sestimate over the true noisecorrected once, lowestcorrected once, medianread again, lowestright of zero: λ too small, df read too highlow at both ends
Fig. 1 The corrected estimate over the true noise against how many decades leave-one-out’s λ sat left of the oracle’s, on the 720 draws at 1.25 to 2 samples per unknown: the lowest (red) and median (amber) draw in each decade of offset, and the lowest after a second reading (blue).

The prediction’s mechanism is there, and it is not the only one. Over all 960 draws the corrected estimate and the offset have a correlation of −0.55-0.55: the further left leave-one-out’s λ sat, the lower the estimate tends to be. Among the twelve lowest draws, nine have an offset in the top eighth of all draws, from 0.4 to 4.7 decades to the left. But three of the twelve sit at the other end, six and a half decades to the right of the oracle, among the four per cent of draws furthest right. And the lowest draw in each decade of offset is below 0.8 at both ends of the picture: 0.741 at six and a half decades right, 0.645 at two and a half left. A λ six decades too large spends fewer degrees of freedom than the oracle’s, not more, so the correction there takes out too little rather than too much, and the estimate is low for another reason.

That reason is the estimate itself. Leave-one-out’s noise estimate is the cross-validation error at its minimum over the λ grid, and the minimum of a noisy curve is a low draw from it. The correction removes a bias that can be stated, the fit’s share; it cannot remove the sampling noise in the minimum, which on a draw where the cross-validation curve happens to dip pulls the estimate down whatever df\mathrm{df} is. An estimate that shares the dips’ luck met the same thing in a harsher form, an estimate read off the residual curve that inherits its dips. Here the dips are mild and the estimate is never more than 36 per cent low, but they are there.

One more reading, draw by draw

The 240 draws at 1.25 samples per unknown in order of their corrected leave-one-out noise estimate, that estimate and the estimate with the fit's share read a second time at the discrepancy principle's λ, over the true noiseAt 1.25 samples per unknown: corrected once, lowest 0.645, 13 draws under 0.85 and 80 under one; read again, lowest 0.784, 4 under 0.85 and 38 under one.040801201602002400.60.70.80.911.11.21.31.41.5draws, in order of the first estimateestimate over the true noisecorrected onceread again1.25 samples per unknown · 240 drawsthe bottom lifts, the middle rises
Fig. 2 The 240 draws at one ratio of samples to unknowns, in order of their corrected estimate (red line), with the estimate after the degrees of freedom are read a second time at the discrepancy principle’s λ (blue dots). The dial sets the ratio.

At 1.25 samples per unknown the second reading does what it was meant to do at the bottom. The lowest draw goes from 0.645 to 0.784; the draws under 0.85 fall from 13 to 4, and those under one from 80 to 38. But the blue dots sit above the red line everywhere, not only at its left end: the middle of the distribution moves up by four to seven per cent, and the highest draws rise with it. The dial shows the same shape at 1.5 and 2 samples per unknown, a smaller lift, and at four samples per unknown almost nothing moves, because there the fit spends a small share of the samples and the correction is small to begin with.

Over all 960 draws, one more reading leaves 175 below the noise instead of 344, seven below 0.85 instead of 19, and a lowest draw of 0.783. The prediction said every draw would be above 0.85, and seven are not. Iterating further, reading df\mathrm{df} at the λ the principle picks when told each new estimate until it stops moving, changes nothing that matters: the fixed point is within one per cent of the single second reading on every cell, so the seven are not a matter of stopping too soon.

Why the middle moves

The second reading moves every draw for a reason that has nothing to do with the low tail. The discrepancy principle chooses the largest λ whose residual is within the noise level it is told, and its λ is generally to the right of leave-one-out’s minimum, at a larger λ where the fit spends fewer degrees of freedom. Reading df\mathrm{df} there gives a smaller df\mathrm{df} on nearly every draw, so 1−df/m1 - \mathrm{df}/m is larger, and the estimate rises. On a low draw whose leave-one-out λ was too far left, that is the intended repair. On an ordinary draw whose leave-one-out λ was about right, it takes out less of a share that was being taken out correctly, and the estimate rises above the noise.

The numbers are uniform. On every one of the 960 draws the principle’s λ is to the right of leave-one-out’s, by a median of 0.4 decades at every ratio: leave-one-out’s median offset from the oracle is −0.07-0.07 to −0.20-0.20 decades, already slightly right, and the principle’s is −0.47-0.47 to −0.60-0.60. At 1.25 samples per unknown the median share df/m\mathrm{df}/m falls from 0.447 at leave-one-out’s λ to 0.389 at the principle’s; at four it falls from 0.147 to 0.127. A share six hundredths smaller in 1−df/m1 - \mathrm{df}/m, with m/(m−df)m/(m - \mathrm{df}) near 1.8 at the smallest ratio, is the median’s rise of a few per cent, and it is applied to every draw alike.

The median corrected noise estimate over the true noise on each cell of 80 draws, corrected once at leave-one-out's λ and read again at the discrepancy principle's1.25 per unknown, noise a hundredth: 1.020 then 1.056; 1.25 per unknown, noise a thousandth: 1.051 then 1.103; 1.25 per unknown, noise a ten-thousandth: 1.073 then 1.140; 1.5 per unknown, noise a hundredth: 1.007 then 1.036; 1.5 per unknown, noise a thousandth: 1.026 then 1.063; 1.5 per unknown, noise a ten-thousandth: 1.046 then 1.081; 2 per unknown, noise a hundredth: 1.019 then 1.037; 2 per unknown, noise a thousandth: 1.022 then 1.042; 2 per unknown, noise a ten-thousandth: 1.032 then 1.048; 4 per unknown, noise a hundredth: 1.005 then 1.013; 4 per unknown, noise a thousandth: 1.009 then 1.015; 4 per unknown, noise a ten-thousandth: 1.011 then 1.016.11.041.081.121.161.25 samples per unknownnoise 10⁻²: once1.020noise 10⁻²: read again1.056noise 10⁻³: once1.051noise 10⁻³: read again1.103noise 10⁻⁴: once1.073noise 10⁻⁴: read again1.1401.5 samples per unknownnoise 10⁻²: once1.007noise 10⁻²: read again1.036noise 10⁻³: once1.026noise 10⁻³: read again1.063noise 10⁻⁴: once1.046noise 10⁻⁴: read again1.0812 samples per unknownnoise 10⁻²: once1.019noise 10⁻²: read again1.037noise 10⁻³: once1.022noise 10⁻³: read again1.042noise 10⁻⁴: once1.032noise 10⁻⁴: read again1.0484 samples per unknownnoise 10⁻²: once1.005noise 10⁻²: read again1.013noise 10⁻³: once1.009noise 10⁻³: read again1.015noise 10⁻⁴: once1.011noise 10⁻⁴: read again1.016median estimate over the true noiseone is unbiasedthe cure for the tail moves the middle
Fig. 3 The median estimate over the true noise on each cell of 80 draws, corrected once at leave-one-out’s λ (red) and read again at the discrepancy principle’s (blue).

The medians show it cell by cell. At 1.25 samples per unknown they go from 1.020, 1.051 and 1.073 at the three noise levels to 1.056, 1.103 and 1.140: rises of 3.5, 5.0 and 6.2 per cent. At 1.5 samples per unknown, from 1.007, 1.026 and 1.046 to 1.036, 1.063 and 1.081. At two, rises of 1.5 to 2 per cent. At four, under one per cent everywhere: 1.005 to 1.013, 1.009 to 1.015, 1.011 to 1.016. The prediction’s two per cent holds at two and four samples per unknown and fails at 1.25 and 1.5, exactly where the low draws it was aimed at live.

That is the general shape of a correction applied to every draw to fix a few. The earlier correction, 1−df/m1 - \mathrm{df}/m at leave-one-out’s λ, was nearly unbiased because it took out the right share on the typical draw. Any change to where df\mathrm{df} is read changes the share on the typical draw too, and a reading chosen to suit the low tail moves the median away from one. Lifting the bottom of a distribution by moving the whole of it is a trade between bias and tail, not a repair of either.

The rule does not notice

What the estimate is for is the discrepancy principle, and the earlier essay found that the principle told the once-corrected estimate already did as well as told the true noise on its worst draw at every ratio. The question is whether the second reading improves on that.

The discrepancy principle told each estimate: its worst draw's error over the oracle's on each cell of 80 draws1.25 per unknown, noise a hundredth: 1.163 then 1.163; 1.25 per unknown, noise a thousandth: 1.114 then 1.118; 1.25 per unknown, noise a ten-thousandth: 1.050 then 1.050; 1.5 per unknown, noise a hundredth: 1.162 then 1.178; 1.5 per unknown, noise a thousandth: 1.112 then 1.137; 1.5 per unknown, noise a ten-thousandth: 1.049 then 1.049; 2 per unknown, noise a hundredth: 1.160 then 1.160; 2 per unknown, noise a thousandth: 1.141 then 1.141; 2 per unknown, noise a ten-thousandth: 1.107 then 1.107; 4 per unknown, noise a hundredth: 1.164 then 1.164; 4 per unknown, noise a thousandth: 1.094 then 1.109; 4 per unknown, noise a ten-thousandth: 1.063 then 1.065.11.051.11.151.21.25 samples per unknownnoise 10⁻²: once1.163noise 10⁻²: read again1.163noise 10⁻³: once1.114noise 10⁻³: read again1.118noise 10⁻⁴: once1.050noise 10⁻⁴: read again1.0501.5 samples per unknownnoise 10⁻²: once1.162noise 10⁻²: read again1.178noise 10⁻³: once1.112noise 10⁻³: read again1.137noise 10⁻⁴: once1.049noise 10⁻⁴: read again1.0492 samples per unknownnoise 10⁻²: once1.160noise 10⁻²: read again1.160noise 10⁻³: once1.141noise 10⁻³: read again1.141noise 10⁻⁴: once1.107noise 10⁻⁴: read again1.1074 samples per unknownnoise 10⁻²: once1.164noise 10⁻²: read again1.164noise 10⁻³: once1.094noise 10⁻³: read again1.109noise 10⁻⁴: once1.063noise 10⁻⁴: read again1.065worst error over the oracle'sthe rule's worst drawit does not notice
Fig. 4 The discrepancy principle’s worst draw’s error over the oracle’s on each cell of 80 draws, told the once-corrected estimate (red) and the estimate read again (blue).

It does not, on any cell. On seven of the twelve the worst draw is unchanged to three decimals: 1.163, 1.050, 1.049, 1.160, 1.141, 1.107 and 1.164. On the other five it is slightly worse, by 0.003 to 0.025, the largest at 1.5 samples per unknown and a thousandth, from 1.112 to 1.137. The rule’s worst draws are draws where the estimate was fine and the residual curve did something awkward near the noise level, and a second reading that raises the estimate by a few per cent moves the rule’s choice to a slightly larger λ there, which on those few draws costs a little.

So for the purpose the estimate serves, the once-corrected estimate is the better one. Its low tail, down to 0.645, does no harm the rule can see, as the earlier essay found, and the second reading that removes most of that tail costs a few per cent of bias and a little on the rule’s worst draws. Four folds feed one rule made the point that a noise estimate is to be judged by the rule it feeds rather than by itself, and the point holds here in both directions: an estimate a third low did no harm, and an estimate made less often low does no good.

The twelve lowest, one by one

The twelve draws with the lowest corrected noise estimate: where leave-one-out put λ against the oracle, and the estimate before and after a second reading of the fit's share1.25 per unknown, noise a thousandth, 40 unknowns: λ 2.33 decades left of the oracle's, 0.645 then 0.931; 1.25 per unknown, noise a hundredth, 24 unknowns: λ 0.40 decades left of the oracle's, 0.647 then 0.784; 1.25 per unknown, noise a ten-thousandth, 40 unknowns: λ 1.60 decades left of the oracle's, 0.648 then 0.862; 1.25 per unknown, noise a ten-thousandth, 40 unknowns: λ 1.53 decades left of the oracle's, 0.699 then 0.904; 1.25 per unknown, noise a thousandth, 40 unknowns: λ 2.27 decades left of the oracle's, 0.703 then 0.987; 1.5 per unknown, noise a hundredth, 24 unknowns: λ 0.60 decades left of the oracle's, 0.722 then 0.818; 1.25 per unknown, noise a hundredth, 24 unknowns: λ -6.47 decades left of the oracle's, 0.741 then 0.845; 2 per unknown, noise a hundredth, 24 unknowns: λ -6.53 decades left of the oracle's, 0.745 then 0.783; 1.25 per unknown, noise a ten-thousandth, 64 unknowns: λ 4.73 decades left of the oracle's, 0.762 then 0.993; 1.5 per unknown, noise a hundredth, 24 unknowns: λ -6.47 decades left of the oracle's, 0.782 then 0.856; 1.25 per unknown, noise a hundredth, 24 unknowns: λ 0.07 decades left of the oracle's, 0.784 then 0.983; 1.25 per unknown, noise a hundredth, 48 unknowns: λ 0.80 decades left of the oracle's, 0.788 then 0.875.0.60.70.80.850.911.11.25 per unknown, noise 10⁻³, n = 40, λ 2.3 decades left0.645 to 0.9311.25 per unknown, noise 10⁻², n = 24, λ 0.4 decades left0.647 to 0.7841.25 per unknown, noise 10⁻⁴, n = 40, λ 1.6 decades left0.648 to 0.8621.25 per unknown, noise 10⁻⁴, n = 40, λ 1.5 decades left0.699 to 0.9041.25 per unknown, noise 10⁻³, n = 40, λ 2.3 decades left0.703 to 0.9871.5 per unknown, noise 10⁻², n = 24, λ 0.6 decades left0.722 to 0.8181.25 per unknown, noise 10⁻², n = 24, λ 6.5 decades right0.741 to 0.8452 per unknown, noise 10⁻², n = 24, λ 6.5 decades right0.745 to 0.7831.25 per unknown, noise 10⁻⁴, n = 64, λ 4.7 decades left0.762 to 0.9931.5 per unknown, noise 10⁻², n = 24, λ 6.5 decades right0.782 to 0.8561.25 per unknown, noise 10⁻², n = 24, λ 0.1 decades left0.784 to 0.9831.25 per unknown, noise 10⁻², n = 48, λ 0.8 decades left0.788 to 0.875estimate over the true noise: from once to read againred: still under 0.85a negative offset is λ too large
Fig. 5 The twelve draws with the lowest corrected estimate: where leave-one-out put λ against the oracle, and the estimate before and after the second reading, red where it is still under 0.85.

Read one at a time, the twelve mostly sort into the two mechanisms. The draws whose λ sat one and a half decades or more to the left are lifted most: 0.645 to 0.931, 0.703 to 0.987, 0.762 to 0.993, 0.648 to 0.862. Those are the prediction’s draws, and on them it is right: df\mathrm{df} was read too high and reading it again fixes the estimate. The draws whose λ sat only a fraction of a decade left, or six decades right, are lifted least: 0.647 to 0.784 at 0.4 decades left, 0.722 to 0.818 at 0.6, 0.741 to 0.845 and 0.745 to 0.783 at six and a half decades right. On those, the low estimate came from the cross-validation minimum itself, and no reading of df\mathrm{df} reaches it. One draw does not fit either pattern: at a tenth of a decade left, 0.784 is lifted to 0.983, as much as the far-left draws, so the offset at the grid’s resolution does not tell the whole story of any single draw.

All four of the least-lifted are on the smallest grid, 24 unknowns at noise of a hundredth, where each draw’s cross-validation curve is built from 30 to 48 samples and its minimum is noisiest. That is consistent with the account of a low minimum, which predicts that the sampling noise in the estimate shrinks as the samples grow, and it is where more samples take the floor and leave the dip located the same kind of dip in a different estimate.

What a code should keep

A code that estimates its noise level by leave-one-out and corrects it by the fit’s share has three choices on this evidence. It can read the share at leave-one-out’s λ, which gives the least biased estimate, a third of draws below the noise and none more than 36 per cent below. It can read it at the discrepancy principle’s λ, which halves the draws below the noise at the price of a median a few per cent high. Or it can iterate to the fixed point, which is the second choice again. For the discrepancy principle the first is at least as good everywhere, and for any other use of the noise level that penalises a low estimate more than a high one, the second might be preferred.

What a code should not expect is that re-reading the share removes the low tail. The tail has two sources, and only one of them is a misread share. The floor is the part the noise buried and the minimum on the right both found a parameter-choice criterion’s minimum to be a noisy object in its own right, and the leave-one-out minimum is no exception. An estimate that shares nothing with the fit removed the dependence by holding samples out of the fit altogether, at the cost of fitting on fewer; the correction here keeps every sample in the fit and pays instead with a minimum that is sometimes low by chance.

There is also a lesson about predictions of this shape. The earlier essay saw the low draws at small ratios and supposed one cause for all of them, and the cause it named is real: nine of twelve are explained by it. A prediction that all twelve would be lifted above 0.85 needed every one to have that cause, and three did not. A tail is usually made of more than one thing, and a repair aimed at one of them is measured fairly only on the draws that have it.

What was measured, and how far it reaches

Everything here is on the earlier essays’ problems: one family of deconvolution problems, Tikhonov regularisation, a λ grid of 121 points over eight decades, white Gaussian noise of known level for scoring, and sixteen draws per grid. The oracle is the grid point of least true error, which is available only because the true solution is. The second reading uses the discrepancy principle’s λ with its usual safety factor of 1.01, and a different factor would move that λ and so the second reading’s df\mathrm{df}, by an amount not measured. The account of the three right-hand low draws as a low cross-validation minimum is consistent with where they occur, on the smallest grid at the largest noise, but the minimum’s sampling distribution was not measured directly.

The offsets are counted in grid steps of a fifteenth of a decade, so an offset of a tenth of a decade is one or two grid points and indistinguishable from none; the correlation of −0.55-0.55 is over all 960 draws and would be weaker at four samples per unknown, where the estimate barely varies, and stronger at 1.25. And the leave-one-out estimate is computed by the hat-matrix identity rather than by refitting, which the earlier essay checked to agree with refitting to rounding at every λ.

What is firm is the comparison. Reading the degrees of freedom again at the discrepancy principle’s λ lifts the lowest draw from 0.645 to 0.783 and leaves seven under 0.85, moves the median up by as much as 6.2 per cent where the fit spends most, and makes the rule’s worst draw no better on any cell. Choosing without knowing is the reminder of why a noise level matters at all: the discrepancy principle told a level ten times too small fails catastrophically. Nothing here is near that, in either reading.

Still open: the minimum’s own noise, and an average in place of a minimum

How noisy the minimum is. If the remaining low draws come from the sampling noise in the cross-validation minimum, its spread should fall as the samples grow. The prediction with a sign is that over 64 draws per grid, the standard deviation of the uncorrected leave-one-out estimate over the noise falls as 1/m1/\sqrt{m} within a factor of 1.5 across the five grids at every ratio, and that the corrected estimate’s lowest draw rises above 0.85 on every grid of 64 unknowns or more, by either reading, so that the low tail is a small-sample effect the correction was never going to reach.

An average in place of the minimum. A noise estimate read at the minimum of a noisy curve is biased low by the selection. The prediction is that averaging the cross-validation error over the five grid points nearest the minimum, before correcting by 1−df/m1 - \mathrm{df}/m, raises the lowest of 960 draws above 0.8 while keeping every cell’s median within 1.08 of the noise, and leaves the discrepancy principle’s worst draw on every cell within a hundredth of the once-corrected estimate’s, so that removing the selection bias is cheaper than re-reading the share.

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.

Cross-validationDiscrepancy principleGeneralised cross-validationNoise levelParameter choiceTikhonov regularisation