A jump is two numbers
Worth reading first: An index that is a pair · Changing the condition number on purpose.
The nearest product is not the nearest operator used separability as a preconditioner. The operator on a grid is a Kronecker sum, and so solvable by one eigendecomposition per axis, only when . For any other coefficient, the nearest separable one can be found, either from the first singular triple of the coefficient’s samples or by fitting its logarithm as , and the separable operator built from it preconditions the real one. That essay found that the first singular value’s share predicts nothing about the iterations, and that the pointwise spread does: the largest over the smallest ratio of the coefficient to its fit, whose square root rose with the iterations at a correlation above 0.95 on two smooth families. On a ridge along the diagonal, which has no separable part, a constant beat every fit.
It closed with a prediction in a sharper form. A coefficient that jumps by across an interface parallel to an axis is exactly separable; across the diagonal it is not. On the axis, the logarithm’s fit should take under 20 iterations at every grid. On the diagonal it should take more than a constant does by a factor of at least two, “since its spread is then larger than the jump itself”.
Each half comes out as signed at most grids, and each for a reason other than the one given. A jump turns out to be a different kind of object from a smooth coefficient, and the pointwise spread that predicted everything on the smooth families predicts nothing on it.
The jumps, and what each route is given
The coefficient is one on one side of an interface and on the other, with from 10 to , on square grids of 16 to 48 interior points a side. Three interfaces: the line , parallel to an axis; the diagonal ; and a tilted line . The operator is the earlier essay’s five-point stencil with the coefficient sampled at the cell faces. Conjugate gradients runs to a relative residual of from one random right-hand side, preconditioned three ways: by a constant coefficient, the coefficient’s mean, solved by sine transforms; by the nearest separable coefficient in the norm; and by the nearest in the logarithm. The separable preconditioners are solved by the earlier essay’s fast diagonalisation, which works from the fit’s values at the grid points and averages neighbouring points to get the values at the faces between them.
At the dial’s diagonal stop, the logarithm’s fit takes 27 iterations at a jump of ten, 80 at a hundred, 229 at a thousand, 628 at and 1,637 at , and at it does not finish within 3,000. The fit in the norm is worse at every jump below . The constant takes three iterations at every jump. Unpreconditioned, the same systems take over a thousand. So on the diagonal the prediction’s factor of two is a factor of two hundred, and the interesting number in the figure is not the fits’ climb but the constant’s three.
Along an axis: an exact fit, and a preconditioner that is not exact
Turn the dial to the axis interface. The coefficient there is , a function of alone, so both fits recover it exactly: the pointwise spread between the coefficient and either fit is on every grid and at every jump. On the earlier essay’s rule, an exact fit with a spread of one should be an exact preconditioner, and conjugate gradients should take one iteration.
It takes 21 iterations on the 16-point grid, 3 on the 24- and 32-point grids, and 23 on the 48-point grid. So the prediction, under 20 at every grid, fails at two grids of four. The fit is not the cause; the fit is exact. The cause is the step from fitted values to an operator. The fast solver takes the fit at the grid points and makes each face value the average of the two points beside it, which is exact for a smooth coefficient to second order and wrong for a jump by half the jump: the column of faces that straddles gets where the operator has or one. Whether that matters depends on where the interface falls between grid points, which is why the count jumps between grids. Built from the coefficient read at the faces, the same fit is the operator exactly, and conjugate gradients takes one iteration on every grid.
This is a small point about discretisation and a large point about the earlier rule. A pointwise spread compares the coefficient with its fit at the grid points. The preconditioner is built from faces. For a smooth coefficient the two agree closely enough that the spread predicts the preconditioner; for a coefficient that is discontinuous between two grid points, the spread can be exactly one and the preconditioner still wrong along a whole line of the grid.
Across the diagonal: three iterations
On the diagonal the separable fits grow worse with the grid: the logarithm’s from 446 to 827 iterations between 16 and 48 points a side, the norm’s from 567 to 2,124. The constant takes three on every grid. The prediction’s reason was that the fit’s spread would be larger than the jump, and it is not: the logarithm’s fit has a spread of 5,600 to 8,300 at a jump of , smaller than the jump, while the constant’s spread is the jump itself, exactly . On the earlier rule the fit should have been the better preconditioner by a factor of about the square root of the ratio, and it is two hundred times worse.
The tilted interface sits between the two. Its constant takes 15 to 24 iterations across the jumps, its logarithmic fit 39 at a jump of ten and 2,822 at , its fit in the norm 38 to 477. A constant wins there at every jump, by a factor of two and a half at a jump of ten and about twenty at the largest.
Why a constant sees no jump
Conjugate gradients converges in as many steps as its preconditioned operator has distinct eigenvalues, in exact arithmetic, and the figure counts them. On a 12-by-12 grid with a jump of , preconditioned by a constant , 132 of the 144 eigenvalues sit at or to within one per cent. They belong to functions that live entirely on one side of the interface, where the operator is the Laplacian times one or times and the preconditioner is the Laplacian times . The other twelve, as many as there are grid points along the interface, belong to functions that straddle it. On the axis interface those twelve take twelve distinct values between 1,478 and 4,121 times . On the diagonal every one of them is the same number, times , because the diagonal staircase meets every row and column of the grid in the same way, and each straddling function sees exactly one cell of each kind. So on the diagonal the preconditioned operator has three distinct eigenvalues, and conjugate gradients finishes in three steps, at any jump and any grid. On the axis it has , fourteen on this grid, and the counts of 13 to 22 measured on grids of 16 to 48 points sit below there because the tolerance is met before every straddling eigenvalue has been resolved. This is the same polynomial argument that a kept vector buys one iteration rests on, where a preconditioned matrix equal to the identity plus a term of rank took exactly steps: here the identity is replaced by two clusters and the rank by the length of the interface.
The smooth bump of the earlier essay, at a contrast of , preconditioned by the same kind of constant, has no clusters at all: its eigenvalues spread continuously over a factor of 272, and conjugate gradients pays for the spread. That is the regime in which the earlier rule holds. A jump is not a large spread; it is two numbers and an interface, and a preconditioner that leaves the two numbers intact leaves an operator conjugate gradients can solve in a handful of steps however far apart the numbers are.
A separable fit across the diagonal does the opposite. Fitting the logarithm of a step function along both axes produces a smooth ramp, and the coefficient over the ramp is no longer two values but every value between them. The clusters dissolve, the spectrum becomes a continuum of width about the spread, and conjugate gradients is back in the regime where the spread governs it, at a spread of several thousand.
The rule, and where it stops
On one axis, the measurements of this essay and the earlier one show two regimes. The smooth coefficients with separable fits lie on one rising line, the earlier essay’s rule: iterations grow with the spread, about as its square root. The jumps under a separable fit lie on the same line, from 27 iterations at a spread of about nine to 2,822 at a spread of , because the fit has made them smooth. The jumps under a constant lie on two flat lines, at three iterations on the diagonal and 13 to 22 along the axis, across five decades of spread. The rule is a rule about spectra that are continuous, and a two-valued coefficient preconditioned by something that keeps it two-valued does not have one.
For a program, the consequence is that a piecewise-constant coefficient, the common case in layered media, composite materials and anything assembled from parts, should be preconditioned by something that respects its pieces before anything that smooths it. A constant does that by accident, and a preconditioner built from the pieces themselves, a different constant in each region, would do it by design. A separable fit, which a solve that is d decompositions makes so cheap and five indices are cheaper than two makes cheaper still in more dimensions, is the right tool for a coefficient that varies smoothly and the wrong one for a coefficient that jumps, unless the jump happens to run along an axis and the faces are read exactly.
What a method that reads the matrix would see
The separable preconditioners read the coefficient’s samples; a constant reads one number. A method that reads the matrix itself sees something neither does. Each off-diagonal entry of the five-point operator is a face value, so the entries across the interface are on one side, on the other, and a mixture of the two along the faces the interface crosses. Aggregating what the matrix calls strong built a hierarchy from exactly that kind of reading, grouping unknowns joined by large entries, and on a two-valued coefficient such a reading separates the two regions along the interface without being told where it is. The coarse grid the matrix chooses showed the same mechanism finding an anisotropy’s direction from the entries alone.
That is the third way of respecting the pieces, and it costs what algebraic coarsening costs. Measured here only by what the constant achieves by accident, the value of respecting the pieces is the difference between three iterations and several hundred, and it is the same at every jump. A program that knows its coefficient is piecewise constant can choose its preconditioner on that fact alone, before looking at a single number, and the earlier essay’s question of which fit is nearest does not arise.
There is a qualification that keeps this from being a recipe. The constant’s three iterations on the diagonal came from a coincidence, every straddling function alike, and its 13 to 22 along the axis from an interface that is short and straight. An interface that winds through the grid has as many distinct straddling eigenvalues as it has cells, and a constant preconditioner’s count would grow with its length. The interface sets the cost; the jump does not.
How this fits the separable story so far
An index that is a pair began this line with the Kronecker product as a way of writing two-dimensional operators in one-dimensional pieces, and the earlier essays built from it a fast solver and a preconditioner. Every step assumed the coefficient varied smoothly enough that its samples at the points stood for it everywhere. The two failures here are both failures of that assumption, at the discretisation level and at the spectral level. The first is cured by reading the coefficient where the operator reads it. The second is not a failure of the separable preconditioner at all: it is the discovery that for a jump, the best preconditioner is not the nearest operator in any norm, but the one whose preconditioned spectrum has the fewest distinct values. The nearest product is not the nearest operator found the first singular value’s share misleading on smooth coefficients; on jumps, nearness in any sense is misleading. The count of distinct eigenvalues is what conjugate gradients pays for, and the first count names the rank found a program reading that count off its first solve along a sequence; a solve on a jump coefficient reports its interface the same way.
What straight interfaces and one equation cannot settle
The interfaces are straight lines and the coefficient takes two values. A curved interface meets the grid irregularly, so its straddling functions would take many distinct values, as the tilted line’s do, and a constant would cost more there; a coefficient with three or more values has as many clusters. The diagonal’s three iterations are a coincidence of geometry, a staircase that meets every row alike, and should not be taken as typical; the axis interface’s fourteen are. The operator is the five-point stencil with arithmetic face values; a harmonic average at the faces, which many codes use for jumps, changes the straddling functions’ eigenvalues and is not measured. And the iterations are from one right-hand side; a right-hand side with no component along some straddling functions would converge in fewer steps. The spectra were computed on a 12-by-12 grid, where a dense symmetric eigensolve is cheap, and the iteration counts on grids of 16 to 48; that the cluster structure carries from the small grid to the large ones is an inference from the counts, which behave as it predicts, and not a separate measurement.
Still open: one constant a region, and a curved interface
A constant for each piece. If the preconditioner is the Laplacian with the coefficient replaced by its value on each side, solved by a fast method on the whole grid only where it is separable, the clusters are kept and the interface modes are moved. The prediction with a sign is that on the tilted interface a preconditioner that is exact on each side and averaged across the interface takes at most as many iterations as a constant at every jump, and fewer than ten at every jump from to on a 24-by-24 grid, so that the cost of a jump is set by its interface and not by its size.
A circle. A circular interface of radius a quarter, centred, meets the grid irregularly. The prediction is that a constant then takes between 30 and 60 iterations on a 24-by-24 grid at every jump from to , flat in the jump as here but several times the straight interfaces’ counts, because the straddling functions take as many distinct values as the interface has cells, and that the logarithmic separable fit is worse than the constant by at least a factor of five at a jump of .
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 conjugate gradients, preconditioning, separability
- Six steps were six eigenvalues — both name conjugate gradients, preconditioning, separability
- The part a circulant can cancel — both name conjugate gradients, preconditioning, separability
- The staircase a separable kernel builds — both name conjugate gradients, preconditioning, separability
- The symbol that builds the staircase — both name conjugate gradients, preconditioning, separability
- Where the drift lands — both name conjugate gradients, eigenvalue, preconditioning
Named objects
A flat tag is an object no other essay names yet.
Conjugate gradientsDiscrete laplacianEigenvalueKronecker sumPreconditioningSeparability