The nearest product is not the nearest operator
Worth reading first: An index that is a pair · Changing the condition number on purpose.
A solve that is d decompositions found what a Kronecker sum offers: eigenvectors that are Kronecker products, so a solve with 1,728 unknowns needs one decomposition of a 12-by-12 matrix and nothing else. Five indices are cheaper than two then priced that against the number of axes. All of it depends on the coefficients separating, as they do on a constant-coefficient Laplacian on a box. Almost no physical operator does. A diffusion coefficient that is not a product takes the whole structure away.
The standard response is to give up the exact solve and keep the structure in a preconditioner. Take the nearest separable coefficient to the true one, solve that exactly by fast diagonalisation, and iterate. Van Loan and Pitsianis wrote the nearest Kronecker product down in 1993 as a singular value problem: reshuffle the matrix, take the first singular triple. The size of the first singular value relative to the rest then seems to say how near the problem is to separable, and so how well this will work. That is the reading to measure. The operator is on a square grid of 24 points a side, with the five-point stencil, and coefficients of the form , where sets the contrast.
Three coefficients, three preconditioners
The function comes in three forms. A separable one, , makes an exact product of two functions. A bump in the middle of the square is not separable, but it comes close. A ridge along the diagonal has nothing separable about it at all. The preconditioners are a Laplacian scaled by the coefficient’s mean, which ignores everything about except its size; a separable problem fitted in the Frobenius norm, by the first singular triple of the coefficient’s grid values; and a separable problem fitted in the logarithm, of which more below.
The first stop on the dial is the case the method is made for, and the case for the method is overwhelming. On the separable coefficient, the fit takes 5, 6, 8, 10, 12 and 15 iterations as the contrast runs from a half to six, and a scaled Laplacian takes 25, 68, 427 and then fails to finish in 2,000 at a contrast of three, at which the coefficient varies by a factor of about . Plain conjugate gradients fails too. The result is better than a factor of a hundred. A count of 15 rather than one, on a coefficient that is exactly separable, comes from how the faces of the cells are averaged: a product at the nodes is not quite a product at the faces, and that discretisation mismatch falls as the grid is refined.
Turn it to the bump and the picture is not so clear. At a contrast of a half the fit in the norm takes 7 iterations against the Laplacian’s 9, a small advantage. At a contrast of four they tie at 50. At six, the fit in the norm takes 123 and the Laplacian 109, so the separable fit is now worse than a constant. On the ridge it is worse throughout, by about a quarter at contrast one, and by a factor of 2.5 at six. So a structured preconditioner is a long way from a free gain, and something is needed to say when it pays.
The share does not say
The obvious candidate is the first singular value’s share of the coefficient’s norm. On the ridge it behaves: as the contrast rises, the share falls from 0.97 to 0.17 and the iterations rise from 10 to 308. On the bump it goes wrong in an instructive way. The share falls from 0.996 at contrast one-half to 0.954 at two, and then it rises, to 0.971, 0.990 and 0.999 at contrast six. Over that last stretch the iterations rise from 17 to 29, 50 and 123. So the highest share of all, 99.9 per cent, sits on the worst iteration count for this coefficient, and the share and the iterations move in opposite directions.
The reason is what a Frobenius norm is. At a contrast of six, the bump’s peak has a coefficient of about , or 400, and everywhere else the coefficient is near one. A norm squared is dominated by the largest entries, and those lie on one small central region. Of course that region is nearly a rank-one matrix on its own, since a single peak is one. So the first singular triple fits the peak, the share is almost complete, and nothing has been said about how well the coefficient is fitted across the rest of the domain, where the entries are a four-hundredth the size.
What a preconditioner actually reads
A preconditioner does not read a norm. For two operators built from coefficients and on the same stencil, the quadratic forms are sums of or times squared differences, cell by cell. So the ratio of the two forms is bounded by the largest and smallest values of . That gives , whatever the grid. This is a very old bound, and it says a preconditioner’s quality is a pointwise ratio, measured uniformly across the domain, with no weight given to where the coefficient is large.
The picture shows what the norm’s fit has done. In the middle cross, where the peak is, it is right to within a factor of 1.4. In the corners of the domain, where the coefficient is about one and nobody cared in the norm, the coefficient is 167 times the fit. Its smallest ratio is 0.71, so the spread is 240. A preconditioner with those numbers is doing nothing useful in the outer part of the domain, and that part of the domain holds most of the unknowns.
That suggests the repair. If the misfit that matters is a ratio, then the fit should be made where ratios add, in the logarithm. So , by least squares, which is simply double centring of the grid values of : take row means and column means and subtract the grand mean. This costs additions and it uses no singular value at all. Its fit to the same bump is right within a factor of 3 almost everywhere, and over the whole grid the ratio runs from 0.26 to 10.1, a spread of 39, where the norm’s fit had 240.
The effect on the iterations appears in the first figure. At contrast six on the bump the fit in the logarithm takes 50 iterations, against 123 in the norm and 109 for the Laplacian. On a truly separable coefficient the two fits are the same, of course, as the logarithm of a product is exactly a sum. And on the ridge the logarithm’s fit is ahead of the norm’s too, 205 against 308 at six.
One number for all of it
The bound gives , and conjugate gradients’ iterations should go as its square root. Against the root of the spread of the pointwise ratio, four separate curves, for two coefficients with two fits at six contrasts each, fall on very nearly one line. The correlation in the logarithm is above 0.95. A spread of four gives about 17 iterations, a spread of forty about 50, and a spread of 1,500 about 200, on whichever curve reaches them. The slope is a little below one in the log-log plot, since the bound is not attained on all of the spectrum.
So that spread is what the singular share was meant to be. It costs a single pass over the coefficient’s grid values, needing no iteration, and it can be read before any factorisation is done. A code holding a coefficient and a candidate fit can compute it in operations and say roughly what the iteration count will be, and that includes saying that it should not use this fit at all. Changing the condition number on purpose makes the general case for preconditioning in terms of a spectrum. Here the spectrum’s spread has a closed form from the coefficient alone.
The bound also says the count should not depend on the grid, because a pointwise ratio does not. That holds for the most part. From 16 to 48 points a side, at a contrast of four, the fit in the logarithm takes 26, 30, 31 and 33 iterations on the bump, nearly flat. The separable case’s mismatch falls with refinement, so it takes 13, 12, 10 and 9. The ridge rises from 67 to 98, slowly, and so does the scaled Laplacian on the bump, from 39 to 67, because with a coarser fit less of the operator’s variation is captured as the sharp features become better resolved. A pointwise ratio bound is a statement about a limit in which all features are resolved, and a preconditioner with a smaller spread than its bound would suggest can lose that slack as the grid improves.
The norm that chose the fit
It is worth asking why the Frobenius norm is the reflex here, since the reasoning is not specific to this problem. A Frobenius-nearest structured approximation has a closed form, it is the projection onto a linear or nearly linear set, and its error is easy to report. That same reflex gives the optimal circulant of the circulant the problem did not contain, the nearest circulant to a Toeplitz matrix in the Frobenius norm, which works very well there. It works because a Toeplitz matrix’s entries are not spread over many decades, so a norm reads all of them. A coefficient that varies over two or three decades is a matrix for which a norm reads only the top decade, and the same formula then has a different meaning.
So nothing is wrong with the singular value decomposition. It has answered the question it was asked, with an optimal result, which is the fit that loses the least squared coefficient. That is simply not the question a preconditioner poses. What is needed is the fit that loses the least in the worst ratio, and that is a problem in the sup norm of the logarithm, for which double centring is a good cheap proxy rather than an exact answer. A sharper solution by alternating minimisation over the sup norm might improve on these counts by a modest amount. Since the iterations go as the root of the spread, a factor of two in spread would save about a third of the iterations, and the double-centred fit has already been obtained for additions.
A similar distinction turns up in how much direction there was to lose, where an operator with a strong direction can be fitted in a way that captures most of its norm and none of what makes it hard. In both cases a smaller number in the obvious measure conceals a much larger number in the one the iteration reads. The practice these results argue for is the same: state what the iteration reads, and measure the approximation in that.
When a constant is better
The last stop on the dial matters as much as the first. A ridge along the diagonal has no separable part. No function of times a function of can make a line along . Every fit is forced to place its peak as a compromise, a cross centred on the line, and its fit is then worse than having no opinion. At contrast six the scaled Laplacian takes 122 iterations, the fit in the logarithm 205, and the fit in the norm 308.
The spread says so in advance, and on the ridge it is what a person would need to see. A constant coefficient has a pointwise spread of , about 400 at contrast six. The logarithm’s fit has a spread of 1,500. So on a ridge the separable fit has actually increased the spread over what a constant gives it, and this is possible because the fit’s own variation, in directions the coefficient does not have, adds to the misfit elsewhere. That is the same result as the first figure on this page, read from the coefficient alone.
What this costs, and where it pays
The count of iterations leaves out a large thing. A five-point product is multiplications. The preconditioner, in the dense form used here, is four one-dimensional transforms costing . So one preconditioned iteration costs about twenty times one plain iteration on this grid. Counted in multiplications at contrast four on a 24-by-24 grid, the bump costs by plain conjugate gradients, with the logarithm’s fit and with the scaled Laplacian. The ridge costs , and . So on those two coefficients no preconditioner wins at this size and on this count, because a dense transform is not cheap and 241 plain iterations are not many.
The separable coefficient is the exception: plain conjugate gradients does not converge in 2,000 iterations, a scaled Laplacian costs and does not converge either, and the fit costs . That is what the structure is for. On a variable coefficient with little contrast, on a small grid, it is not needed at all. A variable-coefficient operator with an order of magnitude more points in each direction, where a plain iteration count grows with the grid and the preconditioned one does not, is where the fit should come into its own, and the crossing has not been measured here. A fast transform for constant coefficients, which an index that is a pair relies on, would cut the Laplacian’s apply far below the dense count, and no such transform exists for a general , so a one-dimensional eigendecomposition must be used and its transform stays dense.
There is also a fit that was not tried. A rank-two separable approximation, , is the next step in the sequence, and it no longer has a fast solver, since two such products are not simultaneously diagonalisable. So the rank-one fit sits at a real boundary. The rest of the singular values describe structure that a fast solver cannot use. Past this boundary lies what multigrid does, at a cost that does not depend on the coefficient’s structure and is proportional to the size.
What was left out
The grid is uniform and square and the stencil simple, in two dimensions. The bound is the same in any number of dimensions, and the fit generalises by centring along each index in turn, but nothing has been measured beyond two. Only three families are measured here, and no coefficient with a jump is among them. A discontinuous coefficient is the common hard case in practice, and there a smooth fit in the logarithm would have to compromise across the jump, with what result is not known from these numbers. Its boundary conditions are simple Dirichlet conditions on all sides. And a single random right-hand side is used, on a preconditioned count that is not sensitive to it.
Still open: a jump, three dimensions, and a rank that has a solver
A coefficient with a jump. An interface with a factor of across it, placed along a line parallel to one axis, is exactly separable, and one placed along a diagonal is not. The prediction with a sign is that on the axis-aligned jump the logarithm’s fit takes under 20 iterations at every grid, and on the diagonal jump it takes more than a constant does by a factor of at least two, since its spread is then larger than the jump itself, the same result as on the ridge in a sharper form.
Three dimensions. Centring along three indices costs additions and the fast solver three transforms. The prediction is that a bump at the same contrast in three dimensions has a pointwise spread that is the square of its two-dimensional one, in the logarithm’s fit, and that the iterations therefore rise by about the same factor as the root, so that the number of axes makes a fit’s advantage steadily worse on a non-separable coefficient, and not better as the cost arithmetic of five indices might suggest.
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.
- Four orders of conditioning, and four steps — both name kronecker product, preconditioning, separability
- Six steps were six eigenvalues — both name kronecker product, preconditioning, separability
- The part a circulant can cancel — both name kronecker product, preconditioning, separability
- The slopes were in the symbols — both name kronecker product, preconditioning, separability
- The staircase a separable kernel builds — both name kronecker product, preconditioning, separability
- The symbol that builds the staircase — both name kronecker product, preconditioning, separability
Named objects
A flat tag is an object no other essay names yet.
Discrete laplacianKronecker productKronecker sumModel problemPreconditioningSeparability