The band is cheap only while it is rough
Worth reading first: The factor is not sparse · The zero you are allowed to write.
A count of fill is not a size took a 20-by-20 grid Laplacian’s Cholesky factor apart entry by entry and found that the orderings’ ranking by fill, which every sparse direct code relies on, says little about an incomplete factor. Three quarters of the natural order’s fill is below a hundredth of its column’s diagonal. Drop by size and reverse Cuthill–McKee, the ordering with nearly the most fill, reaches fifteen iterations of preconditioned conjugate gradients on fewer entries than minimum degree, the ordering with the least, reaches twenty. Drop during elimination and the ranking holds at a threshold of a hundredth and turns at a thousandth.
Size is one way a code bounds an incomplete factor. The other is structural: give every entry of the matrix level zero, give an entry created by elimination a level one more than the sum of the levels of the two entries that created it, and keep only entries up to a chosen level . That is IC(), and its appeal is that the pattern is decided before any number is computed, as a complete factorisation’s is. The earlier essay predicted, with a sign, how the orderings would compare under it: at one level of fill, Cuthill–McKee would keep fewer entries and take no more iterations than minimum degree, “since the band’s first level is the large part of its fill”, and this would hold up to the level at which minimum degree’s factor is complete.
The first half holds at every size measured. The second fails, at a level far below the one the prediction named.
Keeping entries by their ancestry
The setting is the earlier essay’s: the five-point Laplacian on a grid, ordered four ways, with the same random right-hand side and conjugate gradients to a relative residual of . The factorisation works column by column. Each candidate entry’s level is found first, as the least over every path that creates it, and only then are the numbers formed, on the kept pattern alone. A grid Laplacian is an M-matrix, so the incomplete factorisation exists at every level and the pivots never fail. At a high enough level the incomplete factor is the complete one, and conjugate gradients converges in one iteration.
Each curve starts at the same point on the horizontal axis, 1,160 entries on the 20-by-20 grid, which is the matrix’s own lower triangle, kept at level zero whatever the ordering. It ends where the ordering’s complete factor ends: 3,729 entries for minimum degree, 5,129 for nested dissection, 5,910 for Cuthill–McKee and 8,019 for the natural order. In between, each point is a level. The band’s curve is the lowest at the left of the figure and minimum degree’s the lowest at the right, and they cross between six and eight iterations. Turning the dial to the 14-by-14 and 30-by-30 grids moves the crossing and keeps the shape.
The prediction’s first half
At level one the band keeps 1,521 entries and takes 15 iterations, and minimum degree keeps 1,828 and takes 18. The prediction asked for fewer entries and no more iterations, and gets both. It goes on getting both at levels two to five: 1,863 against 2,039 entries, 2,187 against 2,458, 2,493 against 2,647, 2,782 against 2,873, with the band never behind on iterations. On the 14-by-14 and 30-by-30 grids the same holds at every level from one to five.
The figure shows why. A banded ordering of a grid creates fill in a band of fixed width, and each level fills in the next diagonal of that band, a few hundred entries a level, at a steady rate. Minimum degree eliminates the vertices with fewest neighbours first, which on a grid are scattered, and its first levels connect neighbours of neighbours across the whole graph: it adds 668 entries at level one where the band adds 361. After that its additions shrink quickly, because its complete factor is small, while the band keeps adding at the same rate all the way to level 37, where its last entry appears.
The other two orderings, and what a level is in each
The natural order and nested dissection fill in the picture from either side. The natural order is a band too, of width twenty on this grid, and for its first two levels it keeps exactly the entries Cuthill–McKee keeps, 1,521 and 1,863, with the same 15 iterations at the first and one more at the second. At level three it adds 665 entries where Cuthill–McKee adds 324, and from there it keeps adding between five and six hundred a level until it is complete at level twenty with 8,019 entries, the largest factor of the four. Cuthill–McKee’s band, which runs along the grid’s anti-diagonals, is narrower in the middle and wider nowhere, which is why its additions per level stay near three hundred: 361, 342, 324, 306, 289 and 272 over the first six. A level of the band is one more diagonal of a band that does not change width, and costs about the same each time.
Nested dissection is the case where the measure by level is most unkind. Its first level adds 525 entries, its second 630, its third 731, because it eliminates the interiors of small boxes first and their separators last, and the separators’ fill appears at low levels across every box at once. Its iterations at each level are the worst or second-worst of the four, 19 at level one and 15 at level two, and its curve in the first figure lies above the band’s and the natural order’s until near its end. It is complete at level twenty with 5,129 entries, between minimum degree and the band. On the measure a direct solver uses it is a good ordering; as the source of a rough incomplete factor it is the poorest measured, and the order decides the memory is the reminder that which ordering is good depends on which memory is being decided.
Minimum degree’s additions per level are irregular: 668, 211, 419, 189, 226, 149. They reflect its order of elimination, which jumps across the graph, picking vertices whose current degree is least and so creating fill wherever the last eliminations left a dense patch. The first level is the expensive one because it is the first time any of that fill is allowed, and it is spread across the whole grid. The pattern of fill is fixed by the symbolic phase in every case, as what the symbolic phase can only bound established for a complete factor; a level bound simply reads that pattern with an extra number attached to each entry.
Where the band falls behind
At level six minimum degree keeps 3,022 entries to the band’s 3,054, and from level eight on it keeps fewer at every level: 3,280 against 3,550 at eight, 3,538 against 4,363 at twelve. Its iterations fall steeply over the same range, to 6 at level eight and 3 at sixteen, and it is complete at level 26 with 3,729 entries. The band is still adding a diagonal of its band a level at level 26, and needs eleven more levels and 2,200 more entries to finish. So the prediction’s second half fails at level six, twenty levels before the one it named.
Read against levels, the two orderings are hard to compare, because a level is not an amount: one level of minimum degree is a different number of entries from one level of the band, and the number changes from level to level. The fair comparison is the one the first figure makes, iterations against entries kept, and there the question is how many entries each ordering needs to reach a given number of iterations.
What each ordering pays for a given accuracy
On the 20-by-20 grid, fifteen iterations cost the band 3.8 entries an unknown and minimum degree 5.1. Eight cost 6.2 and 7.2. Six cost 8.9 and 8.2, the first count at which minimum degree is cheaper. Four cost 12.4 and 9.2, and one iteration, the complete factor, 14.8 and 9.3. So there are two regimes. A rough preconditioner, one that leaves conjugate gradients eight or more iterations, is cheapest on the band. A fine one, which leaves six or fewer, is cheapest on minimum degree, and increasingly so.
The boundary between them moves with the grid. On the 14-by-14 grid the band is cheaper down to six iterations and minimum degree takes over at four. On the 30-by-30 grid the two are level at eight, 9.5 entries an unknown each, and minimum degree is cheaper below that. The complete factors’ ratio moves the same way: minimum degree’s is 73 per cent of the band’s at 196 unknowns, 63 per cent at 400, and 54 per cent at 900. Minimum degree’s advantage in the complete factor is a property of large problems, as the factor is not sparse found for the fill itself; the band’s advantage in rough factors is a property of every size measured. As the grid grows the region where the band wins narrows toward the roughest preconditioners.
That is also the opposite of what the earlier essay predicted for a threshold on a larger grid, that “the band orderings’ rough factors keep improving their position as the grid grows”. For a level of fill they do not, and the reason is the steady rate of the band’s growth: its band widens with the grid, so each of its levels costs more entries on a larger grid, while minimum degree’s first levels cost about the same per unknown.
Level zero, where only the order differs
The first point of every curve is the cleanest comparison in the whole measurement, because every ordering keeps exactly the same entries, the matrix’s own, and differs only in the order the elimination visits them. On the 20-by-20 grid conjugate gradients then takes 24 iterations under the natural order and Cuthill–McKee, 27 under nested dissection and 36 under minimum degree. On the 14-by-14 grid it is 18, 18, 20 and 24; on the 30-by-30, 32, 33, 40 and 52. Minimum degree’s level-zero factor is the worst at every size, by half again, although its complete factor is the smallest. Duff and Meurant reported this in 1989 for incomplete factorisations of model problems, and it is still the result that surprises: the ordering that does least damage when nothing is dropped does most when everything is.
The mechanism is the same as the band’s slow and steady growth, seen from the other side. A level-zero factor drops every entry elimination would have created, and the error it leaves is the sum of what was dropped. Minimum degree’s early eliminations create fill between distant vertices, entries of a discrete Green’s function that are not small, and dropping them discards large numbers. A banded ordering creates its fill next to the band, where the entries are the decaying ones the earlier essay measured, and dropping them discards small numbers. A level is a count of ancestors, and it is blind to the size of the entry; the orderings differ in whether their low-level entries happen to be the large ones. This matters in practice more than any other point on the curves, because level zero is the default incomplete factorisation in most iterative libraries, chosen because it needs no memory beyond the matrix’s own. A program that reorders its matrix with minimum degree for the sake of a direct solver elsewhere, and then calls the library’s default preconditioner on the reordered matrix, pays half again in iterations for an ordering it chose for a different reason, and nothing in the iteration count alone would tell it why.
What a program choosing a preconditioner should take from this
The cliff behind the count and the fill that is not independent both found that a factor’s structure, read alone, misleads about its numbers. This adds a rule a program can act on without reading any numbers at all. If the preconditioner is meant to be rough, a level of one to four with conjugate gradients doing the rest, order the matrix by bandwidth: it keeps fewer entries for the same iterations at every size measured. If it is meant to be nearly exact, a high level or a nearly complete factor, order by minimum degree, whose complete factor is half the size of the band’s at nine hundred unknowns and whose fine incomplete factors share that advantage. The choice of ordering should follow the choice of level, and the two are usually made by different parts of a code. A program solving a sequence of related systems, which the order that was right last time priced for direct factorisations, has the same decision to make once per sequence: the ordering its first factorisation used is right for its later incomplete ones only if they are about as fine.
It also says something about the measure the earlier essays used. Two ends of the same arrow and the least fill there is ranked orderings by the fill of a complete factor, which is the right measure for a direct solver and the one minimum degree is built to minimise. An incomplete factor has a different measure, the entries needed for a given number of iterations, and the two measures agree only at the fine end. A program that inherits its ordering from its direct solver and then drops to level one has chosen the ordering for the wrong job.
What three grids and one equation cannot settle
One operator, the five-point Laplacian, on square grids of three sizes; a variable coefficient or an anisotropy would change which entries are large, and so whether a level picks the large ones. One right-hand side, which matters only for the iteration counts and moves them by one at most between draws in the earlier essay’s measurements. Minimum degree is one implementation of a family, and an approximate minimum degree would order differently in detail. The levels are swept on a grid of sixteen values, so the fewest entries for a given number of iterations is the fewest on that grid, and the crossings are read to within a level. And entries kept is a proxy for cost: a factor’s cost to apply is its entries, but its cost to build depends on the updates it performs, which a level bound limits differently from a threshold. On a machine where the triangular solves of an incomplete factor run at a fraction of the speed of a product with the matrix, as they often do because they are sequential, the iterations and the entries trade at a different rate, and the crossing would move toward the band; how far is a question about the machine and is not measured here. The iteration counts are small integers, so a crossing read from them is coarse by construction: between six and eight iterations on the middle grid means somewhere in a range of two.
Still open: levels against thresholds, and an anisotropic grid
A level against a threshold, at equal entries. At a hundredth, the earlier essay’s threshold factor under Cuthill–McKee kept 2,376 entries for 8 iterations, close to level four’s 2,493 for 8. The prediction with a sign is that at every number of entries from 1,500 to 4,000 a threshold factor under Cuthill–McKee takes no more iterations than a level factor under the same ordering, and that under minimum degree the threshold factor takes at least two fewer iterations at 2,000 to 2,500 entries, because minimum degree’s low levels hold the large entries a threshold would have kept and its high levels hold small ones it would have dropped.
An anisotropic grid. With the coupling in one direction a hundred times the other, the large entries of the factor line up with the strong direction. The prediction is that a band ordered along the strong direction then beats minimum degree at every level and every number of iterations at 400 unknowns, so that the crossing measured here is a property of an isotropic operator, while a band ordered across the strong direction is worse than minimum degree from level one.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- The depth that is worse than both ends — both name fill-in, fill-reducing ordering, nested dissection, symbolic factorisation
- The halves were the price — both name fill-in, fill-reducing ordering, nested dissection, symbolic factorisation
- A clique has no order — both name fill-in, fill-reducing ordering, nested dissection
- An order fixed before the numbers — both name fill-in, fill-reducing ordering, symbolic factorisation
- An ordering that buys processors, not time — both name fill-reducing ordering, nested dissection, symbolic factorisation
- Pieces ordered blind — both name fill-in, fill-reducing ordering, nested dissection
Named objects
A flat tag is an object no other essay names yet.
Conjugate gradientsFill-inFill-reducing orderingIncomplete factorisationNested dissectionSymbolic factorisation