Iterating, instead of factorising

Aggregating what the matrix calls strong

The depth phase measured every method it had on the 45°-rotated anisotropic operator — 0.784, 0.883, 0.844 — and diagnosed the failure as being in the discretisation rather than in the hierarchy. Smoothed aggregation is the standard answer to anisotropy. It returns 0.789.

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

The depth phase ended the anisotropy field on a failure and a diagnosis. Four methods on the 45°-rotated anisotropic operator — a point smoother, a line smoother, semi-coarsening, and classical algebraic multigrid — returning convergence factors of 0.784, 0.883 and 0.844, none of them usable. And the reason, measured before any solver ran: the standard nine-point discretisation of the rotated operator has axis couplings of −0.5005 and a coupling along the strong direction of −0.2498, so the matrix does not contain the anisotropy the equation has.

That diagnosis makes a prediction, and the prediction is the reason this essay exists. If the information was lost in the discretisation, then no better hierarchy can recover it, because every algebraic method reads the matrix. Smoothed aggregation is the standard answer to anisotropy — the method a practitioner reaches for after classical AMG — so it is the sharpest available test of a claim about where the failure lives.

It fails, at 0.789, on the operator where it returns 0.193 unrotated.

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. 1 The aggregates the matrix chooses at ε = 10⁻³ on a 15×15 grid, one square per unknown, tinted by owner. The couplings are 10⁻³ along x and 1 along y, so the strong direction is y — and the aggregates come out 2.82 points tall on average and 1.00 wide. Nothing in the method knows what a grid is. Drag ε to 1 and the runs become blobs.

The method, in four steps, and only one of them matters

Strength. The same graph classical AMG builds: j is strong for i when −aᵢⱼ is at least θ times the largest off-diagonal magnitude in row i. Reused rather than rewritten, so the two methods disagree about the hierarchy and not about the matrix.

Aggregation. Cover the points with disjoint aggregates. Vaněk’s two passes: seed an aggregate at any point whose whole strong neighbourhood is still free, then hand each leftover point to the neighbouring aggregate it is most strongly attached to. Where classical AMG chooses a subset of the points to keep, this chooses a partition of them — which is the difference the two names are about. That the result is a partition is checked rather than assumed: every point appears in exactly one aggregate on all three operators, and the tentative prolongator’s columns are orthonormal to 10⁻¹².

A tentative prolongator. One column per aggregate, holding a normalised constant. A constant is what these operators annihilate, and an interpolation that cannot represent it cannot represent the error a smoother leaves behind.

And one weighted Jacobi sweep applied to the columns of that prolongator, with ω = 4/(3ρ(D⁻¹A)). This is the method.

The sweep is the method

The same aggregates, with and without the prolongator smoothing (ε = 1)Relative residual against V-cycle on a logarithmic vertical axis. Both hierarchies are built from the identical aggregation of the same matrix. Without the smoothing sweep the convergence factor is 0.8133; with it the factor is 0.3529, reached in 18 cycles. The smoothed hierarchy stores 1.34 times the fine matrix against 1.26.036912151810⁻¹¹10⁻⁹10⁻⁷10⁻⁵10⁻³10⁻¹V-cyclerelative residualpiecewise constantsmoothedone sweep on the columns of Pfactor, unsmoothed0.81factor, smoothed0.35operator complexity, smoothed1.3the same aggregates in bothand one sweep between them
Fig. 2 Two convergence histories from the same aggregation of the same matrix. Without the prolongator smoothing the convergence factor is 0.813 — a legitimate method, and not a multigrid one. With it, on the identical aggregates, it is 0.353. The price is a denser hierarchy: operator complexity 1.34 against 1.26.

Same aggregates, same cycle, same smoother, same number of levels. One weighted Jacobi sweep applied to each column of P, and a factor of 2.3 in the convergence rate.

What the sweep does is widen the columns. A piecewise constant that is one on an aggregate and zero on its neighbour becomes a function that decays across the boundary — so the coarse space contains something with a gradient in it, and the error a smoother leaves behind has gradients. Unsmoothed aggregation asks a piecewise-constant space to represent a smooth error, and 0.813 is what that costs.

The constant is worth a sentence because this site has met it from the other side. ω = 4/(3ρ) is Vaněk’s choice and it damps the top two thirds of the spectrum; on the one-dimensional Laplacian, ρ(D⁻¹A) = 2 and 4/(3ρ) is exactly — which is the smoother weight the multigrid field measured as optimal, where its optimum is exactly ⅓ and a 2,000-point search misses it and reports 0.3335.

What the aggregates know

With ε = 10⁻³ the x-couplings are 10⁻³ and the y-couplings are 1, so the strength test sees the y direction and nothing else. Measured on a 31×31 grid: the aggregates’ mean extent is 2.82 points in y and 1.00 in x, over 341 aggregates.

That is semi-coarsening — every grid column kept whole or dropped whole — derived from the entries of the matrix, by a method with no coordinate in it anywhere. The depth phase found the same thing for classical AMG and recorded it as the phase’s organising sentence: the algebraic method rediscovers what the geometric one was told. It survives the change of method, which is what makes it a property of the strength graph rather than of one coarsening algorithm.

Which direction counts as strong is read from coefficients(ε, 0) rather than assumed, and that is not pedantry: the two-dimensional operator’s coefficients are a = ε along x and c = 1 along y, so ε ≪ 1 makes y the strong direction, and the first version of this measurement asserted the extents the other way round and failed. A measurement of the right number attached to the wrong axis is the easiest mistake in this field to make and the hardest to see afterwards.

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 y210rows kept or dropped whole1515×15 grid, θ = 0.25the coarse grid, from the matrix alone
Fig. 3 The graph both methods read, from the algebraic hierarchy’s own essay. Everything above is downstream of it: the aggregates are its connected neighbourhoods, and the failure at 45° below is a property of this graph rather than of what either method does with it.

And the interpolation carries a constant, in the interior

P₀ carries a constant exactly by construction — the coarse vector whose entries are √(aggregate size) maps to the all-ones vector, checked to 1.1·10⁻¹⁶.

The smoothed P does not, quite, and the measurement is worth reporting rather than glossing: (I − ωD⁻¹A) applied to a constant leaves it alone wherever the row sum of A is zero, which is every interior row, and changes it where the row sum is not — the boundary. Measured: the deviation from one is 1.1·10⁻¹⁶ over the interior points and 0.34 at the worst boundary point.

So the near-null-space property the method rests on is exact where the operator is homogeneous and broken at the edge, by an amount that is a boundary effect. That is the same shape as the finding two essays away in the structure field, where a clustering result thins because its exception set is the boundary of the grid — and it is worth noticing that two unrelated methods have their one-dimensional exactness spoiled by the same geometric fact.

The rotation, and the prediction it tests

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. 4 The convergence factor against the angle the anisotropy is turned through, with the stencil’s largest axis coupling and its diagonal coupling drawn beside it. Aligned: 0.193. At 45°: 0.789. And the reason is on the same axes — the axis couplings are 0.5005 and the coupling along the direction the anisotropy actually runs in is 0.2498.

The rotated operator’s coefficients are a = c = (ε + 1)/2 = 0.5005 and b = (ε − 1)/2 = −0.4995, so the stencil has four axis entries of −0.5005 and four diagonal entries of ∓0.2498. Two consequences, and both of them break the strength test rather than the solver:

The largest off-diagonal in every interior row is an axis coupling. The strength test compares −aᵢⱼ against the largest in the row, so it marks the axis directions strong and the diagonal directions weak — and the diagonal directions are where the anisotropy runs.

And two of the four diagonal entries are positive. Every classical strength measure ignores positive off-diagonals entirely, for a good reason amg.js states: for a matrix with zero row sums, a positive off-diagonal is a coupling that pushes two values apart rather than together, and treating it as strong produces interpolation weights of the wrong sign. So half of the couplings along the strong direction are not merely under-weighted, they are invisible.

A method reading that matrix has no way to find the direction, because the direction is not in the matrix. Smoothed aggregation reads that matrix. It returns 0.789.

What a failure that was predicted is worth

Two things, and it is worth separating them from the disappointment.

The diagnosis is confirmed rather than repeated. The depth phase’s claim was that the failure at 45° belongs to the discretisation. Its evidence was that four methods failed and that the stencil’s couplings pointed the wrong way. Adding a fifth failing method is weak evidence on its own; adding the one method whose entire purpose is anisotropy, which succeeds on the same anisotropy when it is axis-aligned, is much stronger. The variable that changed is the rotation and not the method.

And the fix is now locatable. If the information is missing from the matrix, the repair has to put it back before any solver sees it — which means the discretisation. A nine-point stencil aligned with the anisotropy rather than with the grid, or a mesh that follows the flow, or a stabilisation that knows the direction, all do that; a better hierarchy cannot. That is a conclusion about where to spend effort, and it is the kind of conclusion a failure is good for.

This is the same move the previous essay makes in the convection field, and the two are worth reading together: there, a scheme succeeds spectacularly because the answer’s shape was built into it, and fails on the problem next door. Here, a method fails because the operator’s shape was lost before it arrived. Both are the depth phase’s sentence — where a method’s competence was put into it by hand — measured from the two sides.

What it costs when it works

The honest accounting, since a method that converges at 0.193 is not free:

unsmoothed smoothed
convergence factor 0.813 0.353
operator complexity 1.26 1.34

Operator complexity is the total nonzeros across the hierarchy divided by the fine matrix’s, and it is the quantity that decides whether an optimal-complexity method is actually cheap. The smoothing widens P, which densifies every coarse operator below it, and 1.34 is a good number — classical AMG on the same grid runs higher, and the depth phase measured 17.7 on a graph Laplacian, with one level of forty-one unknowns entirely dense.

So this method is cheaper than classical AMG per cycle and converges more slowly per cycle, which is the standard trade between them and is measured here rather than repeated.

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 classical method costs on a problem with no grid behind it, from the depth phase: grid complexity 3.05, operator complexity 17.7, and a middle level that is entirely dense. The 1.34 above is what aggregation buys by choosing a partition rather than a subset, and it is the reason the method exists alongside the other one.
Smoothing factor against anisotropy, at ω = 0.667Three curves of the smoothing factor against the anisotropy parameter on a logarithmic axis. One rises to one as the anisotropy grows; the other two coincide and stay near a third.10⁻⁴10⁻³10⁻²10⁻¹100.250.50.751anisotropy εsmoothing factor μpoint + fully-line + fullpoint + semi-y⅓, the one-dimensional answertwo routes, three curvesgap between the repairs2.2·10⁻¹⁶scan against closed form2.2·10⁻¹⁶the dashed curve lies on the solid one beneath itone repair, written two ways
Fig. 6 The smoothing factor this hierarchy is built to compensate for. A point smoother on an anisotropic operator damps the modes along the strong direction and leaves the others, which is what makes the aggregation’s shape the right one — and what makes the rotated case hopeless for both.
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 parameter both algebraic methods share, and the one place they can be tuned: the strength threshold, which the depth phase measured as a switch rather than a dial and located at θ = ε.
V-cycle convergence factor against problem size, ε = 0.001Three flat curves of convergence factor against the number of unknowns on a logarithmic axis. At small anisotropy one sits near one and the others near a tenth.10²10².⁵10³10³.⁵00.250.50.751unknownsresidual reduction per cyclepointy-linesemi-yy-line spread, 4× in size1.1·10⁻⁴point at the largest grid0.97y-line at the largest grid0.03715×15, 31×31, 63×63 interior gridsflat in the size, whatever the anisotropy
Fig. 8 The geometric method on the same operator, for scale: what a hierarchy built from a grid achieves when somebody has told it which direction is strong. The aggregation above finds that direction rather than being told it, and reaches a comparable factor.
Three schemes at ε = 0.005, cell Péclet number 3.13The computed solution of each scheme against position, with the exact solution drawn as a dashed line. The tuned scheme's values lie on it — the largest nodal difference is 2.4·10⁻¹⁷. Upwinding is smooth and 0.136 away at its worst. Central differencing oscillates and leaves the interval [0, 1] at 16 of the 31 points.00.250.50.75100.51xuexact & tunedupwindcentralone of these is exacttuned, worst nodal error2.4·10⁻¹⁷upwind, worst nodal error0.14central, points outside [0, 1]16exact at every nodeand only at the nodes
Fig. 9 The other essay in this phase about competence put in by hand — a discretisation exact on the problem it was derived from and harmful on the one beside it. Here the hand-supplied information is a direction; there it is the shape of the answer.

What the two passes each do, in counts

The aggregation is two passes and the split between them is a measurement rather than an implementation detail — a method whose second pass is doing most of the work is a method whose first pass found little structure.

operator aggregates seeded by pass one adopted by pass two singletons
isotropic, ε = 1 43 43 27 0
aligned, ε = 10⁻³ 75 75 15 0
rotated, 45° 30 30 45 0

Read the last row against the first two. On the rotated operator the first pass opens thirty aggregates and the second pass has to place forty-five leftover points — half again as many as were seeded — where on the aligned operator it places fifteen. The strength graph the first pass walks is finding fewer clean neighbourhoods, because the couplings it can see are the axis ones and those do not agree about which points belong together.

That is a diagnostic available before any solve, and it is the second of the two the stencil supplies. A method whose aggregation is mostly second-pass adoption is a method operating on a graph that does not describe the problem.

The near-null space, and what “carries a constant” means precisely

The tentative prolongator carries a constant exactly: the coarse vector whose entries are √(aggregate size) maps to the all-ones vector, to 1.1·10⁻¹⁶. That is by construction — the columns are normalised indicators of a partition — and it is why the partition property is checked rather than assumed.

The smoothed prolongator does not, quite, and the measurement is worth stating rather than glossing. (I − ωD⁻¹A) applied to a constant leaves it alone wherever the row sum of A is zero, which is every interior row of these operators, and changes it where the row sum is not — the boundary. Measured on the aligned operator: the deviation from one is 1.1·10⁻¹⁶ over the interior and 0.34 at the worst boundary point.

So the property the method’s theory rests on is exact in the interior and broken at the edge by a bounded amount. Both halves are asserted, and the reason to assert the second is that it is the difference between a claim that is true of an infinite grid and a claim that is true of the matrix in front of the method.

That is the same shape as the structure field’s loss two fields away, where a clustering result weakens in two dimensions because its exception set is the boundary of the grid rather than the ends of a vector. Two unrelated methods, the same geometric fact.

What the aggregation would have to see

If the diagnosis is right — and the essay above is an experiment designed to test it rather than an argument for it — then the repair belongs in one of two places, and neither is the hierarchy.

A strength measure that sees positive couplings. Every classical measure compares −aᵢⱼ against the largest in the row and ignores positive off-diagonals, for a reason amg.js states: for a matrix with zero row sums a positive off-diagonal pushes two values apart. The rotated stencil has two positive diagonal entries per interior row, so half of the couplings along the anisotropy are not under-weighted but invisible. Affinity and algebraic-distance measures do see them, and whether they recover the 45° direction on this stencil is a measurement rather than an argument.

Or a discretisation that keeps the direction. The nine-point stencil used here is the standard one and it is where the information is lost. A stencil aligned with the anisotropy, or a mesh that follows it, would hand every method in this field a matrix that contains what the equation contains — and the measurement that matters is whether the four failing methods then return to the 0.19 they reach when the anisotropy happens to lie along an axis.

What is left

Energy-minimising interpolation, the other half of the depth phase’s deferral, which chooses P by minimising the energy of its columns subject to reproducing the near-null space rather than by applying one Jacobi sweep. It is the natural next step from the smoothing sweep above — a sweep is one iteration of exactly that minimisation — and it is the method most likely to do better on the rotated operator, because it is the least dependent on the strength graph.

A strength measure that sees positive couplings. The affinity and algebraic-distance measures do, and whether they find the 45° direction in this stencil is a measurement rather than an argument. If they do, this essay’s conclusion needs narrowing to classical strength measures; if they do not, the diagnosis is stronger than stated.

And the discretisation itself, which is where the fix has to go and which this whole field has so far treated as given. The nine-point stencil used everywhere here is the standard one, and the measurement that matters is whether a stencil built to align with the anisotropy restores any of the four methods — including this one — to the 0.19 they reach when the anisotropy happens to lie along an axis.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

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

Algebraic multigridAnisotropyInterpolation weightsNear null spaceOperator complexityRotated anisotropySmoothed aggregationStrength of connectionWeighted jacobi