The answer that depends on the machine

The seed stops mattering first

A randomised low-rank approximation's error moved by 31 per cent between draws and by 10⁻¹⁵ between partitionings of one draw, so a seeded method was called reproducible in the term that matters by a factor of 10¹⁴. That is true at no power iterations. Each pass cuts the spread between draws by a fixed factor and leaves the partitioning's spread where it was, so the two lines cross: at two passes on a decay of 0.7, at sixteen on 0.94. Past that point a recorded seed settles nothing a recorded machine does not, and a bitwise test is the only thing left that can tell two runs apart. The vectors take longer: at sixteen passes the error has settled to rounding while the leading subspace still differs between draws by 3·10⁻⁵.

Worth reading first: The variation that comes with a seed · A bound that holds with probability · The same program, twice.

The variation that comes with a seed set out to ask the reproducibility question of the one field whose answer already comes as a band. It ran a randomised SVD with a fixed seed across seven ways of partitioning a reduction, and found the machine’s contribution to be inside the width of the line. The error moves by 31 per cent between draws, and by 10−1510^{-15} between partitionings of one draw. “A seed fixes which random matrix was drawn and not how its products were summed, so a seeded randomised method is reproducible in the term that matters by a factor of 101410^{14} and irreproducible in the term that a bitwise test reads.”

That essay swept the rank, the size and the rate of decay, and each moved the gap without closing it. What it did not sweep was the one parameter every practical randomised SVD has, the number of power iterations. It ran with none. A power iteration replaces AA by AATAAA^{\mathsf T}A in the sampling step, and the literature recommends a pass or two whenever the spectrum decays slowly. Its job is to make the draw matter less. And that sets up a meeting which the original measurement could not have seen. If each pass reduces the seed’s contribution and leaves the machine’s alone, then the two have to cross.

One line falls and one line stays

The problem is the earlier one: a 120-by-60 matrix with geometrically decaying singular values at rank 8, five columns of oversampling. Six draws give the seed’s spread, and six partitionings of a single draw, in which every inner product is summed in a different number of blocks, give the machine’s. Both spreads are of the rank-8 error’s size, relative to its smallest value. The rates of decay run from 0.7 to 0.94 and the power iterations from none to 32, with the columns reorthogonalised between passes.

The relative spread of a randomised low-rank approximation's error over six draws, and over six partitionings of one draw, against the number of power iterations, at a singular value decay of 0.82Over draws: 3e-1 at 0, 9e-5 at 1, 1e-8 at 2, 3e-12 at 3, 5e-15 at 4, 1e-15 at 6, 1e-15 at 8, 1e-15 at 12, 1e-15 at 16, 1e-15 at 24, 7e-16 at 32. Over partitionings: 1e-15, 8e-16, 2e-15, 4e-16, 1e-15, 8e-16, 1e-15, 1e-15, 1e-15, 5e-16, 1e-15.04812162024283210⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²1power iterationsrelative spread of the errorover six drawsover six partitionings120 × 60 · rank 8 · decay 0.82the machine is under the seed until it is not
Fig. 1 The relative spread of the error over six draws (red) and six partitionings of one draw (blue), against the number of power iterations. The dial sets the rate of decay.

At a decay of 0.82 the red line starts at 31 per cent, the earlier essay’s number, and falls off a cliff: 9⋅10−59 \cdot 10^{-5} at one pass, 10−810^{-8} at two, 3⋅10−123 \cdot 10^{-12} at three and 5⋅10−155 \cdot 10^{-15} at four. After that it is level with the blue line, 10−1510^{-15} and thereabouts, for as far as the measurement goes. The blue line has not done anything at all. It starts at 10−1510^{-15} and it is still there at 32 passes, since each new pass adds new roundings and removes none of the old contribution. It is the machine’s noise in a stable computation, and it is exactly as flat as a stable computation should be.

So the factor of 101410^{14} held at one setting, and at that setting it is correct. By four passes at this decay it has gone. A second recorded seed adds nothing, since all six draws now agree to rounding. If two runs of this method differ, the seed is not why.

Turn the dial for the range. At a decay of 0.7 the lines meet in two passes, and at 0.94 they take sixteen, because a slow decay offers a single pass only a small gap to work with.

The number of power iterations at which the spread of the error over draws comes within ten times its spread over partitionings, at each rate of singular value decaydecay 0.7: 2 passes; decay 0.78: 3 passes; decay 0.82: 4 passes; decay 0.88: 8 passes; decay 0.94: 16 passes.08162432decay 0.72decay 0.783decay 0.824decay 0.888decay 0.9416power iterations to the crossingwithin ten times the partitionings' spreadthe spectrum sets it
Fig. 2 The number of power iterations at which the spread over draws comes within ten times the spread over partitionings, at each rate of decay.

The crossing is at 2, 3, 4, 8 and 16 passes as the decay runs through 0.7, 0.78, 0.82, 0.88 and 0.94. Note how practical those counts are. Two is about what a careful user runs by default; four is common; a code solving a hard problem with a slowly decaying spectrum may well run more. None of them is a limit of theoretical interest only.

How many times its spread over partitionings an error's spread over draws is, against the number of power iterations, at five rates of singular value decaydecay 0.7: 4e+13, 3e+6, 9e+0, 9e+0, 3e+0, 1e+0, 9e-1, 4e-1, 6e-1, 1e+0, 2e+0; decay 0.78: 3e+14, 3e+9, 8e+4, 8e+0, 7e+0, 4e+0, 5e+0, 1e+0, 2e+0, 8e-1, 3e+0; decay 0.82: 3e+14, 1e+11, 6e+6, 8e+3, 5e+0, 2e+0, 1e+0, 1e+0, 1e+0, 2e+0, 6e-1; decay 0.88: 1e+14, 4e+12, 2e+10, 6e+7, 3e+5, 1e+1, 6e-1, 3e+0, 1e+0, 2e+0, 9e-1; decay 0.94: 6e+13, 8e+13, 1e+13, 1e+12, 9e+10, 2e+8, 1e+6, 6e+1, 9e-1, 2e+0, 1e+0 at 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32 passes.04812162024283210⁻¹10¹10³10⁵10⁷10⁹10¹¹10¹³10¹⁵power iterationsdraws' spread over partitionings' spreaddecay 0.7decay 0.78decay 0.82decay 0.88decay 0.94floored at a tentha factor of 10¹⁴ is one setting
Fig. 3 How many times its spread over partitionings an error’s spread over draws is, against the number of power iterations, at five rates of decay.

Read together, the five decays make one picture. At no passes every curve starts between 101310^{13} and 101510^{15}: that is the original essay’s finding, confirmed across the range. From there each curve falls in a straight line until it reaches a ratio of about one and then stays there. So the ratio’s top value is a property of the unsharpened method and its fall is the only thing the spectrum controls. A statement about how much a seed matters, on this method, has to name the number of passes.

The rate is the gap, and the error’s rate is four times it

The straight lines have slopes that can be predicted. The theory of subspace iteration says the error in the range found falls per pass by the square of the ratio of the singular value just outside it to the one that defines the target. Here the range has 13 columns and the target rank is 8. The relevant ratio is σ14/σ8\sigma_{14}/\sigma_8, or the decay rate to the sixth, and squared it is the rate to the twelfth.

How many decades the spread over draws falls per power iteration, for the error and for the leading subspace, at each rate of singular value decaydecay 0.7: error too quick to fit, subspace 1.66; decay 0.78: error 4.88, subspace 1.17; decay 0.82: error 3.73, subspace 0.95; decay 0.88: error 2.44, subspace 0.61; decay 0.94: error 1.08, subspace 0.30.02468decay 0.78the error's spread4.88the subspace's spread1.17decay 0.82the error's spread3.73the subspace's spread0.95decay 0.88the error's spread2.44the subspace's spread0.61decay 0.94the error's spread1.08the subspace's spread0.30decades per passin the range clear of roundingfour times the subspace's rate
Fig. 4 How many decades the spread over draws falls per power iteration, for the error and for the leading subspace, at each rate of decay.

The subspace behaves as theory says. The distance between two draws’ leading rank-8 subspaces falls by 1.17, 0.95, 0.61 and 0.30 decades a pass at decays of 0.78, 0.82, 0.88 and 0.94, against a rate to the twelfth of 1.29, 1.03, 0.67 and 0.32. That is within about a tenth at each.

The error is another matter, and something here is not yet explained. Its spread falls at 4.88, 3.73, 2.44 and 1.08 decades a pass, which is 4.2, 3.9, 4.0 and 3.6 times the subspace’s rate. There is a reason to expect a factor of two: the rank-kk error is stationary at the best subspace, so its deviation from its minimum is second order in the subspace’s angle. A factor of four is not something that argument gives. Most likely the rank-8 truncation inside a 13-column range adds another second-order factor, since it is choosing the best eight directions inside a space that has already nearly contained them, but this is a reasoned guess and nothing here has tested it. What the measurement supports is the factor itself, about four, at four decays.

The vectors settle much later

That difference in rates has a practical side which can catch out a person reading only the error.

At a singular value decay of 0.94, the spread over draws of the error and of the leading subspace, and the spread over partitionings of the subspace, against the number of power iterationsThe error over draws: 7e-2, 7e-2, 1e-2, 1e-3, 1e-4, 4e-7, 2e-9, 1e-13, 2e-15, 3e-15, 1e-15. The subspace over draws: 3e+0, 2e+0, 8e-1, 3e-1, 2e-1, 3e-2, 6e-3, 4e-4, 3e-5, 2e-7, 9e-10. The subspace over partitionings: 1e-14, 1e-14, 9e-15, 1e-14, 2e-14, 9e-15, 8e-15, 9e-15, 9e-15, 7e-15, 1e-14, at 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, 32 passes.04812162024283210⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²1power iterationsspreadsubspace, over drawserror, over drawssubspace, over partitionings120 × 60 · rank 8 · decay 0.94the number settles before the vectors do
Fig. 5 At a decay of 0.94, the spread over draws of the error and of the leading subspace, and the spread over partitionings of the subspace, against the number of power iterations.

At a decay of 0.94 and sixteen passes the error has reached rounding: its spread is 2⋅10−152 \cdot 10^{-15}. At that point the draws’ leading subspaces still differ by 3⋅10−53 \cdot 10^{-5} in the Frobenius norm of the difference of their projectors. At 32 passes that is 9⋅10−109 \cdot 10^{-10}. Meanwhile the machine’s contribution to the subspace sits at about 10−1410^{-14} throughout, and is more than four decades below the draw’s at the end of this sweep. So a code that compares two runs by their approximation error will report that they agree to fifteen digits, while the singular vectors those runs return disagree in the fifth. Both statements are correct and a test can pass on the one and fail on the other.

For the subspace, the original essay’s factor is still far from closing at the end of this sweep: at 32 passes the ratio is about 10510^5. So the question has to be asked twice. How much of the answer the seed decides depends on whether the answer is a number or a basis. What a single draw cannot report has already warned that the spread itself deserves reporting alongside a mean, and this says that a reported spread must say what it is the spread of. And a person using the vectors for anything downstream, as a projection or a basis for a smaller problem, is in the regime in which seeds still matter, for many passes longer than the error alone would ever suggest.

Oversampling runs the same race

The extra columns are the other parameter a user sets, and they are in the rate as well: the ratio σk+p+1/σk\sigma_{k+p+1}/\sigma_k falls as pp rises, so that more columns should bring the crossing forward. The measurement at a decay of 0.82, with six draws at each setting, runs from two extra columns to twenty.

At two extra columns the error’s spread over draws is 100 per cent at no passes and it falls by 1.29 decades a pass, so that it is still at 5⋅10−85 \cdot 10^{-8} at six passes. Five columns is the case above, with 31 per cent at no passes and 3.73 decades a pass. At ten columns the spread starts at one per cent, is 5⋅10−105 \cdot 10^{-10} after one pass and at rounding after two. At twenty it starts at 4⋅10−64 \cdot 10^{-6} and is at rounding after one. So twenty columns alone take off five decades of the seed’s spread before any pass is run, and a pass then does the rest.

That is a much stronger effect of oversampling than the band of error alone suggests, and it reads differently from the rule of thumb. A rule that says five to ten extra columns usually suffice is a rule about accuracy. If the question is how much a run depends on its seed, those same ten columns are worth more than two power iterations and they cost far less, since one pass of a power iteration is two full products with AA and ATA^{\mathsf T}, and ten more columns add only ten more matrix-vector products once. The sketch that is not the answer reaches a similar end by another road, using a sketch as a preconditioner so that its seed’s influence on the answer falls to nothing at the cost of a few more iterations.

This sweep also bears on the factor of four. At two extra columns the error’s rate is 2.5 times the gap’s, where at five it is 3.6. So the multiple rises with the oversampling, as if the truncation inside a wider range were contributing, and a value near two is plausible for no oversampling at all.

How little of this the accuracy needed

There is a further thing to read from these passes, and it concerns what the sharpening was for. The error’s excess over its own limit is an accuracy question and not a reproducibility one.

How far the error of a randomised low-rank approximation lies above its limit, against the number of power iterations, at five rates of singular value decaydecay 0.7: 4e-3, 1e-9, 4e-15, -1e-15, -1e-15, 7e-16, -6e-16, -1e-16, -6e-16, -9e-16; decay 0.78: 3e-2, 5e-7, 5e-11, 6e-15, -3e-15, -4e-16, 7e-16, 4e-16, 0e+0, 0e+0; decay 0.82: 1e-1, 7e-6, 4e-9, 3e-12, 4e-15, 4e-16, 1e-15, 2e-16, 4e-16, 2e-16; decay 0.88: 3e-1, 3e-4, 2e-6, 2e-8, 2e-10, 2e-14, -9e-16, -2e-15, -3e-15, -7e-16; decay 0.94: 2e-1, 2e-2, 7e-4, 6e-5, 6e-6, 6e-8, 7e-10, 1e-13, 4e-16, 0e+0 at 0, 1, 2, 3, 4, 6, 8, 12, 16, 24 passes.0481216202410⁻¹⁶10⁻¹⁴10⁻¹²10⁻¹⁰10⁻⁸10⁻⁶10⁻⁴10⁻²1power iterationsrelative excess over the limitdecay 0.7decay 0.78decay 0.82decay 0.88decay 0.94one draw · the limit is at 32 passesa pass or two buys nearly all of it
Fig. 6 How far the error lies above its limit, against the number of power iterations, at five rates of decay, for one draw.

At no passes the excess is 0.35 per cent on the fastest decay and between 10 and 25 per cent on the others. One pass takes that to 10−910^{-9} on the fastest, 7⋅10−67 \cdot 10^{-6} at 0.82 and two per cent at 0.94. Two passes give 4⋅10−94 \cdot 10^{-9} at 0.82 and 8⋅10−48 \cdot 10^{-4} at 0.94, and four give 6⋅10−66 \cdot 10^{-6} on the slowest decay here. Nobody who is approximating a matrix needs more digits than that, which is to say that the usual reason for a pass is satisfied long before the crossing is reached. A code that stops at a sensible accuracy, at one or two passes on most matrices, is still well above the crossing at slow decays. The band between draws is smaller than it was, but it is there, and the original essay’s advice to report it stands.

That also explains why the spread falls so fast and seems to matter so little in practice. The seed’s influence on the error is an influence on an excess that was already small, and it falls with that excess. A bound that holds with probability is what stands over this at no passes. The band in that bound, and the band across draws here, both shrink at a known rate when power iterations are added, and the rate can be predicted from a computed gap. So a code that has computed a few singular values can say how many passes would make its draw immaterial. That is a good deal more useful than a rule of two.

What it does to a reproducibility policy

The same program twice and where the disagreement comes from are about a deterministic program, whose answer moves only with the machine. The earlier essay on seeds set up a contrast between those methods and randomised ones: there the machine was the only variation and here it was negligible. This measurement removes the contrast, at the setting a careful user chooses. A randomised SVD with enough passes is a deterministic method with a random start, which has converged to something independent of that start, and it has the same reproducibility problem as the deterministic algorithms, by the same mechanism.

So a regression tolerance has to depend on the passes too. What a regression test can ask for built a window from a measured distribution of machine variation. At no passes, a window for a randomised method is set by the seed’s spread, and the machine can be ignored. Past the crossing it has to be set by the machine’s spread, as it is for any other computation, and a window set from the seed’s early band would be too loose by a dozen decades. The boundary between the two windows is the crossing itself, so a suite that changes its number of passes has to change its tolerance with it, and a suite that keeps a tolerance through such a change is asking a different question without saying so. And a test that fixes a seed in order to compare two machines bitwise is testing the same term in either regime, at every setting.

The rank essay’s lesson about thread counts, a rank that depends on the thread count, may be reached here too. A rank chosen adaptively from a sharpened sketch is an integer read from a quantity whose spread is now machine-sized, and the rank will flip between partitionings wherever it would flip for a deterministic method. Nothing here measured that integer, and so it is left as a prediction.

What is left out

One matrix was used, at one size and rank, with a single set of singular vectors at each decay and exact geometric decay. A real spectrum with a plateau behaves differently, since the rate is set by the local gap at the target rank, and a target rank inside a cluster has a gap near one and would need very many passes. Six draws and six partitionings give spreads with a noticeable scatter: the machine’s value at a given pass moves by a factor of a few, and this is why the crossing is defined with a margin of ten. Only one rule was tested for partitioning, the blocked reduction used in the earlier essay, and an actual parallel machine has more ways of varying than that. The sketch’s own products are inside the varied arithmetic, and the reorthogonalisation and the small SVD are not.

Still open: the integer, a block Krylov method, and the factor of four

An adaptive rank. A rank chosen by a tolerance on the sharpened sketch’s singular values is a decision. The prediction with a sign is that at no passes it varies with the draw and never with the partitioning, as the earlier measurement of a band implies, and that past the crossing it stops varying with the draw and starts, at tolerances within a few hundred units of roundoff of a singular value, to vary with the partitioning, at the same rate the deterministic rank does on the same spectrum.

A block Krylov space. Keeping every pass’s columns rather than only the last accelerates the convergence, and a Krylov method’s rate is the square root of a power iteration’s in the exponent. The prediction is that the crossing falls from sixteen passes to about six at a decay of 0.94, that the machine’s line rises by about a factor of ten because a Krylov basis is more sensitive to rounding, and that the error’s rate per pass is still about four times the subspace’s.

The factor of four itself. The error’s rate is about four times the subspace’s on all the decays where it could be fitted at five columns of oversampling, and 2.5 times at two. Stationarity explains only a factor of two. The prediction is that with no oversampling at all the factor falls to 2.0 within a tenth, on every decay here, and that at 40 columns it stays near four rather than going on rising, since by then the truncation has all the room it can use.

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.

Named objects

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

Bitwise reproducibilityOversamplingRandomised SVDReduction orderRun-to-run variationSeeded generator