The thread: Measured, not assumed — page 21
One nonzero is a birthday problem
A sketched preconditioner's quality is one number, how well the sketch preserves one subspace, and the sketch that ships has one nonzero in each column. It was said to supply the needed distortion at its own width. On an incoherent basis its own width is everyone else's: at four times the dimension CountSketch, uniform sampling and a Gaussian all read κ of 2.6. Put each direction of the basis on a single row and CountSketch is singular on 14 draws of 16 at the same width, by the formula for shared birthdays, and needs the dimension squared to escape it. Two nonzeros reduce that to three draws in sixteen at twice the dimension and none at four. Four nonzeros are a Gaussian for this purpose, at about a sixteenth of its cost to apply.
When the problem arrives againA kept vector buys one iteration
A kept Cholesky factor with a drift of rank r in the matrix takes exactly r + 1 iterations at every member, at any drift rate, because the preconditioned matrix is the identity plus a rank-r term. The run has found those directions and throws them away. Keep some from one member to the next and each one removes exactly one iteration: keep sixteen on a drift of rank sixteen and every later member takes one. Each vector also costs half an iteration a member, so the saving is half what it looks like, and past the rank it is all cost. On a drift across half the spectrum there is no rank to reach: sixteen vectors halve the iterations and save a fifth of the work, and rebuilding the factor still wins until a rebuild costs more than a hundred iterations.
Sparsity, and what elimination costsA count of fill is not a size
The fill of a sparse factor can be counted from the graph alone, before any arithmetic runs, and the count is exact: on a grid Laplacian not one of the entries the graph marks is zero. But a count holds every entry at one number. In the natural order, three quarters of the fill of a 20-by-20 grid is below a hundredth of its column's diagonal, and fifteen per cent is below 10⁻⁴. The better orderings remove exactly that part: under nested dissection almost nothing is that small. So the count's ranking stops meaning what it says once a factor is dropped. Minimum degree has the least fill of the four orderings, and at a threshold of a tenth it takes 20 iterations on more kept entries than the reverse Cuthill–McKee factor takes 14.
Orthogonality, measuredA repeated rotation drifts in a straight line
Composing rotation matrices drifts away from orthogonality, which is why graphics and robotics code re-orthonormalises. Rounding errors have no preferred sign, so a product of k rotations should lose orthogonality like the root of k, and it does when every factor is new: slope 0.52 over a million products. Multiply by the same factor every step, as a fixed-step integrator does, and the slope is 1.00. The factor's own rounding is one defect met in the same direction every time. At a million products in binary32 that is 622,000 units of roundoff against 2,400, a loss of 3.7 per cent. One polar step removes it at any period from ten products to ten thousand, the error in the rotation falling twenty times and hardly moving with how often it is run. Gram–Schmidt every ten products is six times worse, and for a reason that is not rounding.
Least squares, and the road not to takeWhere QR pays the square
The road through the normal equations squares the condition number, and the road through QR keeps every step orthogonal, so the condition number is untouched. That is true of the triangular system QR ends in, and it is not a statement about the answer. Measured against the exact solution of the stored data, QR's error in a least-squares solution goes as the square of the condition number too, once the data lie well away from the column space: 2·10⁻⁴ at κ = 10⁷ and a tangent of one, five orders above the condition number's own reading. The residual does not pay it. And the normal equations' famous disadvantage is seven decades on a consistent system, one decade at a tangent of one, and nothing at all at a thousand.
Elimination, and the swapThe test that made the answer small
Solving by a computed inverse was measured twelve orders of magnitude less backward stable than solving by LU at a condition number of 10¹⁴, on a right-hand side built as b = Ax from a random x. That construction is how a known answer is arranged, and it makes the answer about as small as it can be. On a random right-hand side the inverse route's backward error is 2·10⁻¹⁷, the same as LU's, at every condition number measured. The backward error is about a tenth of the roundoff over ρ, the answer's size over its largest possible, and across 200 random right-hand sides ρ never falls below 0.016. The instability is real, and it belongs to right-hand sides whose answers are small, which is a class that includes most tests and many applications.
Structure, and the solver that cannot see itWhat the commuting family was hiding
A Sylvester solve's structured backward error climbed 26,000 times above its residual while its forward error did not move, on a family built so that X commutes with A and B. Replace X by a random matrix with the same singular values, and the backward error is within a factor of eleven of the residual at every setting, on both routes. The structured product and the residual's estimate agree too, within 45 and 9 times the forward error. So that gap, the prediction said, was the family's geometry, and it was. But the perturbation's share on C does not fall below a half as predicted: it rises to 88 and 99 per cent. And a residual in the Schur bases that costs nothing is not the residual: it is a twentieth of it, because what is left is the Schur factorisations' own rounding.
Two errors, and whose fault they areThe sign is the last digit to go
The number that decides nothing allowed the determinant one use: its sign, which it called a clean integer with no error term, and a fact wherever the input is exact. The input to the classic orientation test is exact, and on a grid of adjacent doubles the sign comes back wrong on 1,712 of 2,304 points, mostly as zero. But a sign does have an error term. A bound costing three multiplications certifies every random triple down to thirty-six bits from the line and is never wrong on anything measured, and on a matrix of order four the sign is right on every draw at forty-five bits from singular, where the value has lost all but two digits. The value goes a digit at a time, and the sign is the last digit.
When the index is a tupleA chain grown from its ends gets lost
A tensor of eight indices in train format stores 72 numbers in one order and 8,322 in another, and a greedy chain built from cheap pairwise slices had found the good order on every tensor tried. Searching all 20,160 orders confirms that 72 and 180 are the true least on the two earlier tensors. But on a tensor of two pairs and a chain of four, placed on the indices six different ways, the least is 108 every time and the greedy chain finds it on three placements and stores 396 on the other three. The six are one tensor with its indices renamed, so the chain's success depended on the names. A rule that links the strongest couplings into paths, from the same table, finds 108 on all six.
The matrix a constraint makesOn a block with room, the residual was honest
Conjugate gradients stopped at a relative residual inside a block preconditioner had delivered energy errors ten to a billion times below its tolerance, and a stop on the estimated energy error changed almost nothing, because blocks of a dozen unknowns converge by orders at their last step. The prediction for a block of 400 unknowns with evenly spread eigenvalues was that the energy stop would land within a factor of three of its target and the residual stop at least ten times below. The energy stop does, on every draw. So does the residual stop, within a factor of five, in the same number of steps. On an even spectrum the residual is already an estimate of the energy error. A geometric spectrum is where the two part, and there the cheap energy estimate overshoots its target fourfold.
Reduction, and what a model is forA turn the size of the rounding
The product route to a model's Hankel singular values reads all ten to thirteen digits when the state coordinates are a diagonal change of balanced ones, and two digits when the same model is rotated. The prediction for the rotations between was that the product route would hold its digits until the angle reached the spread of the singular values, ten to the minus eight, and then lose them as the square of the angle. It holds until ten to the minus fifteen, which is the size of a turn the stored entries can just register. Within three decades of angle it has lost almost everything it will lose, and then it sits on a plateau, within a few hundred of the fully rotated error, for ten decades of angle. The grading the route relies on is not a neighbourhood with a width. It is a coincidence of coordinates that any visible turn destroys.
Neither sparse nor denseThe rule told where to look
Told the line its kernel is singular on, the admissibility rule stores within six per cent of the least any partition of its tree has, and keeps that margin as the matrix doubles while the untold rule's overpayment grows from 1.7 to 2.6. Its other failure was never the geometry: at η = 1, where two touching clusters first pass, it is the least itself on both kernels singular on the diagonal, and the textbook 0.8 was costing an eighth to a quarter. On a smooth kernel nothing rescues it, because the dense diagonal it always keeps is, by itself, the whole of the least. And a probe that reads each block's ends sees only its corners, which is where the diagonal touches a block and not where a line crosses one.
Eigenvalues, singular values, rankA good curve and a bad verdict
The diagonal of a column-pivoted R is famous for the one matrix it is wrong about. On that matrix it is right about thirty-nine of its forty entries — every |rₖₖ| within a factor of six of the σₖ it stands for — and wrong by 4·10⁶ at the fortieth, which is the only one a rank verdict ever reads.
Iterating, instead of factorisingAn iterate that must be made smaller
Applying a Kronecker-sum operator to a low-rank iterate multiplies its ranks by d and adding two of them adds their ranks, so a solver in a compressed format cannot keep what it produces. Every step is followed by a truncation — and whether that truncation is a floor on the residual depends on the right-hand side rather than on the truncation.
The arithmetic underneathEvery equal tail has a cliff
A scaled binary32 norm of one entry of size one and 4,095 entries of two to the minus twelve is wrong by 2,047 units of roundoff, and that was read as a depth: a square half a spacing below the running sum is lost. It is not a depth. An equal tail at 0.003, eight bits shallower, loses 1,965 units, and 88 per cent of all depths between four and twelve lose more than a hundred. The error is one addition's rounding repeated once per entry, so a test that counts small entries misses nearly all of it, and a spread tail does not average it away. Adding the same squares pairwise, with the same number of additions, leaves under five units on everything measured.
Methods that were designed apartThe lag belongs to the value it follows
Conjugate gradients on a blur, held off its first converged Ritz vector, parts from the reorthogonalised run a fixed lag after the second value converges, and the account offered was one clock per value with the blur setting the lag. Held off two vectors, it parts on the third value's clock on all 72 draws at every ratio measured, as predicted. Held off one, it meets the second value's clock only at the ratio the prediction named, and misses a third of the draws at two and at eight. The reason is that the lag is not the blur's: it is 11 steps after a second value that stands at 1.5 times the third and 4 after one at eight, on every blur, so lifting the second value moves the parting about twice as far as it moves the convergence.
Exact arithmetic, and what it costs insteadA cheap logarithm, and what vouches for it
Hadamard's bound budgets forty-six primes for a Pascal determinant of one, and the cheap repair predicted for it was one floating-point LU: the sum of the logarithms of its pivots, within ten bits of the truth everywhere except on Hilbert matrices above order 16. It is exact to a twentieth of a bit on four of six families at every order to 48. On Pascal matrices, which the prediction did not exempt, it is 42 bits high at order 24 and 1,041 at 48, and on Hilbert matrices it is already 22 bits high at 16. It is never low on any of them, but on the determinants built to fool a stop it meets a zero pivot and calls a nonsingular matrix singular. What tells the cases apart is the condition number binary64 computes alongside: below 50 bits, every estimate is exact.
Two errors, and whose fault they areA second small value costs the sign nothing
A determinant's sign computed by LU was found to fail only where the value's relative error reaches one, 45 to 51 bits from singular on a matrix one rank short. Give the matrix a second small singular value and the determinant shrinks by twice as many bits, and the prediction was that the sign would therefore fail at about half the distance, near 24 bits, because a condition number sees only one small value. It fails at 48 bits at order 4 with one small value and at 48 with two, and at 45 with three. The determinant loses one, two and three bits for every bit of distance; the value's error and the condition number lose one, whatever the count. The condition number was seeing exactly what the sign depends on, and the determinant's size was the wrong scale to read it on.
Orthogonality, measuredA rounding chosen once is still repeated
One binary32 rotation multiplied into itself a million times loses orthogonality in a straight line, 622,126 units of roundoff on the first of five rotations, because its rounding defect is the same every time. The prediction was that choosing the best of the factor's representable neighbours would cut that rate tenfold and leave the angle alone. The best of 512 neighbours cuts it by 1 to 5 per cent. A greedy search eight ulps wide cuts it at most by half, and where it does, it moves the factor off the rotation and multiplies the angle's error by up to five. What works is to stop repeating the rounding: rounded afresh at random each product, the same factor loses 1,717 to 3,377 units at a million, and its angle is two hundred times nearer the truth than any fixed choice.
Least squares, and the road not to takeRefining the solution alone refines nothing
QR's least-squares error at a tangent of one grows as the square of the condition number, against the exact solution of the stored data, and the prediction was that refinement in working precision would not help while a residual computed in twice the precision would take the term down by four decades. The first half holds. The second fails completely: refining the solution with an exactly computed residual leaves the error at 1.8 times ten to the minus four at a condition of ten to the seven, unchanged in every digit shown, and the slope stays at 1.95. The same exact residual used to refine the residual and the solution together, through the augmented system and the same QR, takes it to ten to the minus fourteen in one step and to the exact solution in two.
Elimination, and the swapThe other side was small too
An inverse formed by columns, from AX = I, leaves AX̂ − I at a tenth of a unit of roundoff, and that tenth turns out to be the constant in the law that put the inverse route's backward error at about u/ρ. Formed the mirror way, from the transpose, the two sides swap: X̂A − I goes to a tenth and AX̂ − I to almost seven units, so the backward error on a random right-hand side rises forty-fold, as predicted, and the forward error on b = Ax falls from fourteen times LU's to 1.7. LAPACK's way, U⁻¹ then W L = U⁻¹, was the form the prediction was about, and it does not trade at all: both sides stay under half a unit at every condition number, so it has the forward error of the one and nearly the backward error of the other. Partial pivoting keeps L at a condition number near two hundred whatever A is, and that is the only factor this form solves against on the side it did not ask for.
Where the flop count stopped predicting the timeThe preconditioner that knew how many
A coarse hierarchical preconditioner set at a hundredth loses to the direct solve after 20.8 right-hand sides on the easiest matrix at 512 unknowns. Choose its tolerance for the count instead and the best is a tenth for one or two, a hundredth for five or ten, 10⁻⁴ for twenty and fifty, and the full accuracy of the direct solve from a hundred on. Every best sits at the coarse edge of a plateau of equal step counts, because steps are whole numbers and nothing else falls as the tolerance tightens. Tuning moves the crossing from 21 to 32, and on the harder matrix from 7 to 16. It does not make the two routes one: the cheapest step of an iteration is a coarse solve and a product with the operator, and the product is half a solve, so the iteration's floor is 1.49 direct solves a right-hand side and it loses from about thirty on, however it is tuned.
The matrix that is a graphEvery bridge is a coupon
On a row of cliques joined by single edges, sampling edges until the graph is connected is a coupon collector over the bridges. Uniform sampling needs m ln 10(c − 1) samples for nine draws in ten, to within one per cent at 32 cliques, and connects under one draw in a hundred at q = m. Exact resistance needs n ln 10(c − 1). The gap between them is m over n, 3.6 at every length of chain, and it widens with the size of the cliques instead: 1.6, 3.6, 7.3 and 13.4 at cliques of 4, 8, 16 and 32. The two-solve sketch does not fail on the chain, because a random projection of a bridge's resistance is exact, to rounding, at any number of solves; what it pays for is inside the cliques. And counting common neighbours, which needs no solve, beats the exact resistance on every chain, until the clusters have no triangles in them, where it is uniform sampling under another name.
Sparsity, and what elimination costsThe band is cheap only while it is rough
An incomplete Cholesky factor can be bounded by level of fill, keeping each entry by how many eliminations it took to create, instead of by its size. On a 20-by-20 Laplacian, Cuthill–McKee at one level keeps 1,521 entries for 15 iterations where minimum degree keeps 1,828 for 18, as predicted, and it stays ahead at every level up to five, at three sizes of grid. Then it falls behind and does not recover: minimum degree reaches six iterations on 3,280 entries and the band on 3,550, four on 3,677 against 4,964, and its complete factor needs 63 per cent of the band's. The prediction said the band would hold until minimum degree was complete. It holds for the rough factors, and where it stops moves to more iterations as the grid grows. At level zero, the same 1,160 entries in each ordering, minimum degree takes half again as many iterations as the band.
Structure, and the solver that cannot see itThe size of the data, not its rank
A Lyapunov equation with rank-one data reopened a gap of thousands between a Sylvester solution's backward error and its residual, where random equations had shown under a dozen. Its data had two unusual features, low rank and a small size against the operator. Separated, the size does all of it. Rank-one data as large as AX can be keeps the ratio under 2.3 at every spread of the coefficients' eigenvalues; rank-one data along their smallest directions, at a size of 10⁻⁶ against the operator, puts it at 1 to 2·10⁵; and full-rank data of the same small size opens the gap just as wide. On every equation of these kinds, the Gramian's included, the ratio is between 0.07 and 0.5 times one over that size, and one plus one over the size is a ceiling no equation can pass. The earlier commuting family sits far under it, which says what else the gap needs. The forward error does not notice any of it.
When the index is a tupleA jump is two numbers
On smooth coefficients, the iterations a separable preconditioner leaves follow the pointwise spread between the coefficient and its fit. A coefficient that jumps by 10⁴ breaks that rule twice. Along an axis the jump is exactly separable, the fit has a spread of one, and the preconditioner still takes 21 and 23 iterations on two grids of four, because it averages its face values across the interface; read at the faces, it takes one. Across the diagonal the logarithm's fit takes 446 to 827 iterations, as predicted more than twice what a constant takes, but the constant takes three, at every jump from ten to a million, with a spread equal to the jump. A two-valued coefficient preconditioned by a constant leaves all but one row of eigenvalues at two values, and on the diagonal the rest at a third. A fit turns those values into a range.
The eigenvalue problem that is not linearThe angles belonged to the coordinates
A route through μ = λ + 1/λ kept a palindromic quadratic's eigenvalues on the unit circle to 2·10⁻¹⁶ and their angles nine decades better than a general solver's. The construction had A = CᵀC with C an orthogonal matrix times a diagonal, and that A is diagonal: its off-diagonal entries are 4·10⁻¹⁶ of its diagonal ones at every condition number. The prediction was that a B unrelated to A would cost the route its angles. It does not; a random B on the same diagonal A leaves the angles at 3·10⁻¹⁵. Rotate A into a full matrix with the same singular values and the angles go, on either B, as κ(C)²: 1.6·10⁻⁶ and 5.5·10⁻⁶ at 10⁶, against a general solver's 2.6·10⁻⁶ and 1.3·10⁻⁵. What survives every construction is the circle. The nine decades were a diagonal scaling, which the route undoes for free and the general solver does not.
The answer that depends on the machineThe four belongs to the norm
A randomised low-rank approximation's error stops varying between draws about four times as fast, per power pass, as its leading subspace does, and stationarity explains only two of the four. The prediction was that the rest came from room for the truncation inside an oversampled range, so that with no oversampling the factor would be two and at forty columns it would stay near four. Both numbers hold: 1.94 and 1.90 with none, 3.52 and 3.34 at forty. The mechanism does not. Measured in the Frobenius norm, the same error on the same draws settles at twice the subspace's rate at every oversampling from none to forty. The second factor of two belongs to the spectral norm, which counts only the largest of what is left, and which an oversampled range has already pinned.