Iterating, instead of factorising

The formula that was already optimal

Ask for the interpolation that minimises the energy of its own columns and the answer is the classical AMG formula — to zero at every row of the one-dimensional Laplacian, and to four digits in two dimensions. On the operator rotated to 45° the two part company, and the gap between them is a diagnostic that needs no reference solution.

Worth reading first: The coarse grid the matrix chooses · A direction the smoother cannot see · The error smoothing cannot reach.

This site has built a coarse space three ways.

The classical algebraic hierarchy derives each interpolation weight from one row of the matrix, by assuming the error is smooth along strong connections and solving that row for the fine value. Smoothed aggregation partitions the points, builds a piecewise-constant prolongator, and applies one Jacobi sweep to its columns.

The third way asks a question instead of following a recipe: which P, over a given sparsity pattern, minimises the energy of its own columns?

minimise Σⱼ PⱼᵀAPⱼ, optionally subject to P reproducing a near-null-space vector exactly

Written out that is a quadratic in the nonzeros of P with linear equality constraints — one saddle-point system, solved once. It is the deferral the depth phase wrote down and the synthesis phase left.

The classical interpolation's energy against the minimum, as the operator turnsFour quantities against the angle of the strong direction. The ratio of the classical interpolation's energy to the least any interpolation on its own sparsity pattern can have is 1.0000 on the aligned operator and 1.2029 at 45°. The three convergence factors below it are what each interpolation achieves.081624324000.250.50.7511.25angle of the strong direction (degrees)ratio, and convergence factorenergy ratio of oneenergy ratioclassicalminimiserwith the constraintwhere the formula is optimalenergy ratio at 0°1energy ratio at 45°1.2classical rate at 45°0.35the minimiser's rate there0.28a ratio of exactly one while the assumption holdsand a diagnostic when it stops
Fig. 1 The classical interpolation’s energy against the least any interpolation on its own pattern can have, as the operator’s strong direction turns away from the grid. The dashed curve is exactly one until it is not.

The first answer is that there is no third way

On the one-dimensional Laplacian, with the coarsening the classical method chooses, the energy minimiser and the classical formula produce the same matrix. Not to a tolerance — the worst difference over every row and every column is zero, and both reach an energy of 15.000000 and a two-level convergence factor of 0.06126.

Two derivations with nothing in common. One is local, algebraic and row-by-row: take row i of A, assume the error at the fine point is a weighted average of its strong neighbours, solve. The other is global and variational: 30 unknowns, a quadratic form, a linear solve of the whole thing at once.

That is a two routes to a number result of an unusual kind, because the two routes are not two arithmetics for one formula — they are two derivations that were never supposed to meet.

It survives into two dimensions on the operators the row-wise assumption is right about:

operator classical energy minimum energy classical rate minimiser’s rate
isotropic 347.00 347.00 0.0606 0.0606
anisotropic, aligned 105.315 105.315 0.0608 0.0611

Energies agreeing to six digits and convergence factors to three.

The linear term, which the first version dropped

The objective has a piece that is easy to leave out, and leaving it out produces a coherent, wrong, and interesting-looking answer — which is worth recording because it took a check to notice.

A coarse point interpolates itself, so its row of P is the identity and is not a variable. That means every column of P already contains a one before any variable is chosen, and the energy has cross terms between that fixed entry and every variable in the same column: the objective is a quadratic plus a linear term, not a pure quadratic.

Dropped, the free minimum of a positive-definite quadratic with no linear term is P = 0. Every fine row comes back empty, the method looks useless, and the constrained version looks like the only one worth having — which is exactly the story one expects to find, and is why it survived a first reading.

With the linear term in place the free minimum is the classical interpolation, and the whole essay changes shape.

The interpolation the matrix derived, on 63 pointsTwo rows of points, the coarse one above the fine one, joined by lines. Each dropped fine point is joined to two kept ones, and each kept point to itself.coarsefineweights: 1 to itself, ½ to each neighbour — derived, not giventhe geometric answer, from the entrieskept points, no two adjacent31worst weight disagreement0‖P·1 − 1‖ on the interior0tridiagonal(−1, 2, −1), θ = 0.25no grid was consulted
Fig. 2 What the classical formula produces on the one-dimensional Laplacian: the weights ½ 1 ½ and a worst error of exactly zero, from the matrix entries alone. The energy minimisation returns the same numbers from a completely different computation.

Where they part company

Rotate the anisotropic operator so its strong direction runs at 45° to the grid — the problem the depth phase’s line smoother and semi-coarsening return 0.967 on, and smoothed aggregation returns 0.789 on.

energy two-level rate
classical 117.47 0.5265
energy minimiser 96.57 0.3445
minimiser, constrained to reproduce a constant 103.27 0.2600

The classical interpolation is 22% above the minimum energy over its own sparsity pattern, and converges at 0.527 where the minimiser converges at 0.345.

So the agreement in the first half of this essay is not a theorem. It is a statement about the operators the row-wise assumption is correct for, and the assumption is exactly the one the rotated stencil breaks: the error is smooth along strong connections, and the rotated stencil’s axis couplings are −0.5005 against a diagonal coupling of −0.2498, with two of the four diagonal entries positive — which no strength measure on this site reads correctly.

The energy gap is a diagnostic

That is the practically useful part, and it is worth separating from the comparison.

Computing the energy of a given P costs a triple product and no reference solution. Computing the minimum over the same pattern costs one saddle-point solve. The ratio of the two is then a number that says whether the interpolation in hand is the best one available on the pattern it occupies — and it needs no exact answer, no known spectrum, and no second method to compare against.

angle of the strong direction energy ratio
1.0000
15° 1.05
30° 1.17
45° 1.22

A ratio of one says the classical formula has nothing left to give on this pattern; the way to improve is to widen the pattern. A ratio of 1.22 says the formula’s derivation has stopped applying and a different P on the same pattern would do better.

Every other diagnosis of this failure on this site has needed something extra: the depth phase read it off the stencil coefficients by hand, the synthesis phase predicted it from a strength measure and then checked it against a solve. This one is a quotient of two numbers computed from A and P.

Smoothed aggregation against the angle of the anisotropy (ε = 0.001)Convergence factor against the rotation angle, with the stencil's largest axis coupling and its diagonal coupling on the same axis. Aligned, the factor is 0.1935. At 45° it is 0.7894, and the reason is beside it: the axis couplings are 0.5005 while the coupling along the direction the anisotropy runs in is 0.2497. The matrix does not contain the anisotropy.-213284300.250.50.751rotation of the anisotropy (degrees)factor / couplingusableconvergence factoraxis couplingdiagonal couplingthe standard answer, and the anglefactor at 0°0.19factor at 45°0.79axis ÷ diagonal coupling at 45°2the hierarchy reads the matrixand the matrix lost the direction
Fig. 3 The failure the ratio detects, from the synthesis phase: an algebraic method that discovers semi-coarsening from the matrix entries and still fails at 45°, because the rotated stencil no longer contains the anisotropy the equation has.

The pattern is the other half, and it is the bigger half

Every number above is a minimum over a fixed sparsity pattern — the one the classical formula occupies, which is each fine point’s coarse neighbours. That pattern is a decision too, and it is usually made without comment.

Widen it: allow each fine row to reach the coarse points two steps away in the matrix graph. On an 11×11 grid that takes P from 165 nonzeros to 365.

operator nonzeros energy two-level rate
aligned, narrow pattern 165 55.1649 0.06146
aligned, wide pattern 365 55.1649 0.06150
rotated, narrow pattern 255 54.131 0.2843
rotated, wide pattern 561 53.123 0.1602

On the aligned operator, doubling the storage buys nothing — the same energy to six digits and the same convergence factor. The optimum over the narrow pattern is already the optimum over the wide one, which is a sharper statement than the classical formula is good enough: there is no interpolation on twice the pattern that does better.

On the rotated operator it buys a factor of 1.8 in the convergence factor.

And it buys that for a 2% fall in energy. That pair is the honest limit of the diagnostic proposed above: energy and convergence move together in sign and not in size, so a small energy gap can hide a large difference in what the method does. The ratio says something is wrong here; it does not say how much.

What it would cost to do this for real

The measurements above solve a dense saddle-point system of size (nonzeros of P) + (fine rows) — 702 unknowns for a 225-point grid, and cubic in that. Nobody does this.

What the practical methods do instead is take a few steps of a Krylov method on the constrained problem, starting from the classical interpolation, and stop long before convergence. That is worth noticing in the light of the first finding: if the classical interpolation is the unconstrained minimiser, then starting there and taking a few constrained steps is a method for imposing the constraint rather than for minimising anything — the minimisation is already done before the first step.

So the cost of the exact answer is what makes the exact answer worth computing once, on a small problem, as a measurement rather than as a method. Which is the position this whole site takes about its exact ground truths: exact.js solves in BigInt rationals nobody would use in production, so that the float answer has something to be wrong against.

The constraint is the modelling

The near-null-space constraint — every row of P sums to one, so a constant is interpolated exactly — is what energy-minimising interpolation is usually described as being for. Measured on its own, it is a decision with a price in both directions.

operator minimiser constrained what the constraint does
isotropic 0.0606 0.0863 costs a factor of 1.42
anisotropic, aligned 0.0611 0.2939 costs a factor of 4.81
rotated 45° 0.3445 0.2600 buys a factor of 1.32

On the two problems the unconstrained minimiser handles well, forcing the constant makes the method up to five times worse. On the one it handles badly, the same constraint is worth a third.

The cost has a location. These are Dirichlet problems, so the constant is not in the operator’s near-null space: the rows next to the boundary do not sum to zero, and forcing P to reproduce a constant there forces the wrong vector. Fifty-six rows of 225 in two dimensions, and that is enough to cost a factor of five.

And the benefit has a location too. On the rotated operator the near-null space is precisely what the classical formula has lost, so an assumption that puts it back — even the wrong one, even at the boundary — is worth more than it costs.

Two-level convergence factor for three interpolations, at ε = 0.001Three bars per operator: the classical formula, the unconstrained energy minimiser, and the minimiser constrained to reproduce a constant. On the isotropic and aligned operators the constraint costs a factor of 4.8; on the rotated one it buys a factor of 1.33.lower is better; each bar is the factor the error falls by per two-level cycleisotropic, classical0.0609isotropic, minimiser0.0609isotropic, constrained0.0848aligned, classical0.0612aligned, minimiser0.0615aligned, constrained0.2933rotated 45°, classical0.3464rotated 45°, minimiser0.2843rotated 45°, constrained0.2131what the constraint is worthconstraint at isotropic1.4constraint at aligned4.8constraint at rotated 45°0.75the constraint costs where the method worksand buys where it does not
Fig. 4 Three interpolations on three operators. The constraint is the difference between the second and third bar of each group, and its sign changes between the second group and the third.

What this says about the near-null space

The reading the measurements support is sharper than supply a good near-null-space vector.

The near-null-space constraint is not an approximation to be improved. It is a statement about the problem, it is either right or wrong, and where it is wrong it costs a factor of five while looking exactly as principled as where it is right.

And the classical formula already encodes one. Its row-wise derivation — the error is smooth along strong connections — is a near-null-space assumption written in a different notation, and where that assumption holds the formula is optimal without any constraint being imposed. The two methods are not a heuristic and an optimisation; they are two ways of stating the same modelling, and they differ exactly where the statements differ.

Stored entries per row at each level, 400 unknowns and 1192 edgesA rising curve of stored entries per row against level in the hierarchy, beside a flat one for a geometric hierarchy on a grid.01234567110¹10²levelstored entries per rowalgebraicgeometrictwo complexities, one hierarchygrid complexity3.1operator complexity18geometric, for comparison1.5a ring plus random chords — nothing is anywherelevel 6 is 100% dense
Fig. 5 What the algebraic hierarchy costs when it is given a problem with no geometry: grid complexity 3.05, operator complexity 17.7, and one level of forty-one unknowns entirely dense. An energy-minimising interpolation on the same pattern would have the same complexities, because the pattern is what the storage is.

What was actually solved

The minimisation is a saddle-point system and it is worth saying exactly which one, because the answer depends on choices that are easy to leave implicit.

The variables are the nonzeros of P’s fine rows. A coarse point interpolates itself, so its row is the identity and is fixed — not a variable, not a constraint, simply given. The objective is Σⱼ PⱼᵀAPⱼ with P assembled from the fixed rows and the variables, which makes it a quadratic plus a linear term in the variables. The constraints, when present, are one equality per fine row.

Two of those choices are load-bearing.

Fixing the coarse rows is what makes the problem well posed. Left free, they minimise too, and the free minimum sets them to zero — a P with no identity in it, a singular coarse operator, and a two-level method that cannot be run at all.

And the linear term is what makes the free minimum interesting. Without it the objective is a pure positive-definite quadratic whose minimum is P = 0, which is a coherent answer to a different question. The first version of this measurement asked that question, got that answer, and produced an essay in which energy minimisation only worked when constrained. Both the code and the conclusion were self-consistent and wrong.

The fourth method at 45°

This phase has now put four constructions on the same rotated operator, and the sequence is worth laying out because the last entry breaks it.

method aligned rotated 45°
geometric line smoother 0.0370 0.967
semi-coarsening 0.1074 0.966
smoothed aggregation 0.193 0.789
classical algebraic interpolation 0.061 0.527
energy-minimising, constrained 0.294 0.260

Convergence factors, from three phases of this site and this essay.

The first four have the same shape: excellent aligned, hopeless rotated. The fifth is the only one whose two columns are close together — and it gets there by being worse on the aligned problem, not by being better on the rotated one in isolation.

That is not a disappointing result. It is the trade stated plainly: the aligned methods are aligned methods, they encode a direction, and their aligned numbers are what the encoding buys. A method that encodes less does worse where the encoding was right and better where it was wrong, and the whole of what this essay measures is where the boundary between those two regions is.

What no method in the table does is be best in both columns. The nearest thing to a general recommendation the measurements support is that the diagnostic generalises even though the methods do not — the energy ratio is computable for any of them, on any operator, and it is one exactly when the method in hand has nothing left to give on the pattern it occupies.

Strong couplings and the points the matrix kept, ε = 0.001A grid of points with lines drawn between the pairs the matrix couples strongly, and the points the coarsening kept drawn larger. At small anisotropy only the vertical lines remain and whole rows are kept.the grid the operator came froman edge is a coupling the matrix calls strongkeptinterpolatedwhat the entries decidedcoupling ratio, x against y0.001strong couplings across x0strong couplings along y110rows kept or dropped whole1111×11 grid, θ = 0.25the coarse grid, from the matrix alone
Fig. 6 What the row-wise formula reads: the strong connections, from the matrix entries. Where that reading is right the formula is the energy minimiser, and where it is wrong the energy gap says so.
Convergence factor against the strength threshold, ε = 0.01A curve of convergence factor against the strength threshold on a logarithmic axis. It is flat at a high value to the left of a marked position and flat at a low value to the right of it.10⁻³10⁻²10⁻¹00.20.40.60.8strength threshold θresidual reduction per cycleθ = εsemi-coarseningkept whole rowsfull coarseningone parameter, two methodsbest factor above ε0.047best factor below ε0.46the ratio across the switch9.731×31 anisotropic operatora switch, not a dial
Fig. 7 The strength threshold as a switch rather than a dial. The same reading of the entries that decides the coarsening decides whether the interpolation built on it is optimal.
The aggregates the matrix chooses at ε = 0.001A 15×15 grid of unknowns, each tinted by the aggregate that owns it. The operator's couplings are 1.0e-3 along x and 1.000 along y, so the strong direction is y — and the aggregates come out 3.00 points tall on average and 1.00 wide. 75 aggregates cover 225 points, 75 of them opened by the first pass and 15 points handed out by the second.75 aggregates over 225 unknownsthe matrix chose thismean extent along y3mean extent along x1points adopted by pass two15no coordinate enters the methodand the shape follows the coupling
Fig. 8 The other construction of a coarse space, on the same operator. Aggregation and energy minimisation disagree about the rotated problem in the same direction and by different amounts.

What the drag does

The slider is the anisotropy, from a ratio of one to a thousand.

At a ratio of one the operator has no strong direction to lose, so rotating it changes nothing: the energy ratio is 1.0000 at every angle, and every interpolation converges at about 0.06. That is the negative control and it is a position of the slider rather than a sentence — the assertion is written in two halves so that the figure at that setting is required to show no gap.

As the anisotropy sharpens, the rotation has more to spoil, and the gap at 45° grows to 22%. What does not change at any position is the value at zero: the classical formula is the minimiser on an aligned operator whatever the anisotropy ratio, which is the half of this essay that is not about failure.

Named objects

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

A normAlgebraic multigridAnisotropyCoarse grid correctionConstrained minimisationEnergy minimisationGalerkin operatorInterpolationNear null spaceStrength of connection