The seed stops mattering first
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 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 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 by 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.
At a decay of 0.82 the red line starts at 31 per cent, the earlier essay’s number, and falls off a cliff: at one pass, at two, at three and at four. After that it is level with the blue line, and thereabouts, for as far as the measurement goes. The blue line has not done anything at all. It starts at 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 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 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.
Read together, the five decays make one picture. At no passes every curve starts between and : 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 , or the decay rate to the sixth, and squared it is the rate to the twelfth.
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- 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 decay of 0.94 and sixteen passes the error has reached rounding: its spread is . At that point the draws’ leading subspaces still differ by in the Frobenius norm of the difference of their projectors. At 32 passes that is . Meanwhile the machine’s contribution to the subspace sits at about 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 . 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 falls as 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 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 after one pass and at rounding after two. At twenty it starts at 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 and , 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.
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 on the fastest, at 0.82 and two per cent at 0.94. Two passes give at 0.82 and at 0.94, and four give 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.
- Accuracy and agreement are different properties — both name bitwise reproducibility, reduction order, run-to-run variation
- An inner product with no fixed sign — both name bitwise reproducibility, reduction order, run-to-run variation
- Sketching what is never unfolded — both name oversampling, randomised svd, seeded generator
- The fifth author — both name bitwise reproducibility, reduction order, run-to-run variation
- The length that changes the kernel — both name bitwise reproducibility, reduction order, run-to-run variation
- The tolerance that buys no agreement — both name bitwise reproducibility, reduction order, run-to-run variation
Named objects
A flat tag is an object no other essay names yet.
Bitwise reproducibilityOversamplingRandomised SVDReduction orderRun-to-run variationSeeded generator