A count of fill is not a size
Worth reading first: The factor is not sparse · A factorisation with nothing to pivot for.
The factor is not sparse began this line of argument with a count. A sparse matrix’s factor has entries the matrix does not, and elimination’s new entries can be counted from the graph alone before any arithmetic runs. The fill that is not independent and the cliff behind the count then looked inside a block of that fill and found it dense in entries and low in rank, with singular values falling off a cliff. So the fill’s rank is one thing a count leaves out. There is a plainer one still: the count gives every entry the weight of one, and none of them weighs one.
Whether this matters depends on what the count is for. If it is budgeting memory for an exact factor, each entry occupies a word regardless, and the count is exactly what is needed. If it is ranking orderings for a preconditioner, or deciding how much of a factor might be left out, the entries’ sizes are the whole question. This essay reads them on the plainest possible case: the five-point Laplacian on a 20-by-20 grid, 400 unknowns, factored exactly, under the four orderings the field has been comparing.
None of it is zero
One thing should be settled first. A symbolic count is an upper bound in general, since accidental cancellation can make a predicted entry zero. On this matrix it never happens: every one of the entries the graph marks is nonzero in the computed factor, under all four orderings, in every case measured. So the count really is exact here, and what follows concerns how large those nonzeros are and not whether they exist. The word “size” has a meaning that has to be chosen: an entry is measured relative to the diagonal of its own column, which is the size it has when the factor is used in a triangular solve.
In the natural order the factor has 8,019 entries, 6,859 of them fill. Of that fill, 95.5 per cent is below a tenth of its column’s diagonal. 74.7 per cent is below a hundredth, 39.4 per cent below a thousandth, and 14.8 per cent below . Even at one per cent of the fill remains. The factor that was budgeted at 8,019 words is largely a set of small numbers, and a large part of it is much smaller than any tolerance a preconditioner would use.
The picture for one column shows where these sizes come from.
The two entries the matrix already had, at distances one and twenty, stay large: 0.4 and 0.3 of the diagonal. Between them the fill runs down from next to the first, to a minimum of near the middle of the band, and back up to 0.1 next to the second. A band of twenty is what the natural order gives this grid: each row couples only to its neighbours in the row above and to its neighbours in its own, and a chain of elimination couples them further along. That decays smoothly away from the two neighbours, as one would expect from something like a discrete Green’s function, and it is why the count sees twenty entries where a reader sees two and a tail.
The orderings’ fill is a different kind of fill
Now turn the dial. Reverse Cuthill–McKee has a factor of 5,910 entries, and it has the same shape as the natural order: 70 per cent of its fill below a hundredth, 14.8 per cent below . Minimum degree has only 3,729 entries, and 35.7 per cent of its fill is below a hundredth, with 2.6 per cent below . Nested dissection has 5,129 entries, with 39.7 per cent below a hundredth and 0.4 per cent below .
Those numbers mean that an ordering which reduces fill mostly removes small fill. Going from the natural order to minimum degree removes 4,290 fill entries, and at the natural order has 2,700 entries below that threshold while minimum degree has 277. So a good share of what minimum degree saved was never very large, and what is left of its fill is the part that carries weight. An ordering’s count falls by more than its information does.
That also means the count overstates differences among orderings. Compare the entries at or above a thousandth, which are what a preconditioner at a fine threshold would keep. The natural order’s are 5,319 out of 8,019, Cuthill–McKee’s are 4,166 out of 5,910, and minimum degree’s are 3,452 out of 3,729, nested dissection’s 4,940 of 5,129. Those are a factor of 1.5 apart where the counts are a factor of 2.2. At a tenth of the diagonal the four are 1,466, 1,484, 1,599 and 1,242, all within about a quarter of each other.
What a dropped entry costs
The natural test is to drop. Take the exact factor, remove the entries below a threshold relative to the column’s diagonal, and use what is left to precondition conjugate gradients. This is not an incomplete factorisation, which would drop during elimination and would have to live with the consequences for later columns. It reads something simpler: how much of the finished factor is doing any work.
Without a preconditioner conjugate gradients takes 65 iterations to a residual of on this grid. Keeping everything takes one. In between, the threshold reads off like a dial. At the count is two or one, at three, at four, under all four orderings. So at a thousandth of the diagonal every ordering takes four iterations, and the natural order has thrown away a third of its 8,019 entries while nested dissection has dropped about a twentieth of its 5,129. At they read 8, 7, 7 and 8. So down to here the ordering is hardly visible at all. In the fine range the count of iterations reads the threshold, and nothing else.
Plotted against what is kept, these turn into a trade-off curve, and at the rough end the orderings part in an unexpected way. At a threshold of a tenth, Cuthill–McKee keeps 1,484 entries and takes 14 iterations. The natural order keeps 1,466 and takes 15. Minimum degree keeps 1,599, more than either, and takes 20. Nested dissection keeps 1,242 and takes 26. So the two orderings with the least complete fill make the worst rough preconditioners, and the two with the most make the best.
The ranking by count has been reversed exactly where a preconditioner would be used. That result has a history: Duff and Meurant found in 1989 that the ordering matters very much to incomplete factorisations and that minimum degree does badly, with the band orderings holding up well. The measurement here adds a reading of why. A minimum-degree or dissection factor has few small entries left to drop, so a threshold strips out entries that were doing work. A band factor has a large tail of entries doing nothing, and dropping them costs nothing, so its rough factor is close to its whole factor in the sense that matters.
The natural-order row shows the whole argument. The graph’s count is 8,019. Keeping 2,898 costs 8 iterations in place of one, and keeping 1,466 costs 15. A code that had rejected this ordering for its fill was rejecting a large number that mostly does not matter. It is also a fact that nothing changes in the direct case: an exact factor must hold all its entries and the order decides the memory stands. A code that wants an exact factor should go on using the ordering with the least fill. These are two different problems with different answers, and the single word “fill” has concealed that.
Dropping as the factor is built
An exact factor with its small entries removed is a tidy thing to measure and an unusual thing to compute. A real incomplete factorisation drops entries as each column is finished, so that later columns are computed from an already altered factor, and an early drop can compound. So the same four orderings were run through a threshold incomplete Cholesky, at the same relative thresholds, on the same grid.
At a threshold of a tenth, all four take more iterations than dropping afterwards: 24, 24, 23 and 27, against 15, 14, 20 and 26. The rough end has been levelled. The band orderings have lost their lead there, since dropping during elimination takes away the small entries from which the later large ones would have been built. The kept counts are 1,160 for three of them and 1,543 for minimum degree, so on entries kept the band orderings are still ahead of it, by a third.
At a hundredth they read 10, 8, 8 and 10, on 2,440, 2,376, 2,718 and 3,113 entries. So Cuthill–McKee takes the same eight iterations as minimum degree on about an eighth fewer entries. Dissection pays most at this threshold, with the natural order’s iteration count on nearly a quarter fewer entries.
At a thousandth the result turns. Minimum degree takes four iterations on 3,436 entries, where Cuthill–McKee takes five on 3,688 and the natural order six on 4,681. So minimum degree, which was a poor rough factor, is the best fine one, by both measures at once. It has few entries left to drop at this threshold and very little to lose by dropping them. Nested dissection also takes four here, on 4,893.
So the ranking by count does not survive anywhere as a statement about iterations per entry, and neither does the reversal found above. What can be said is that the rough end prefers a band ordering by a modest margin, on the same grid and in both ways of dropping, and the fine end prefers a fill-reducing one. A preconditioner’s ordering should be chosen by the threshold it will be used at, which is a sentence no count could produce, since a count knows of no thresholds. And the iteration counts in this section are the ones that matter for a real code, because this is the factorisation it would compute: the tidy afterwards-dropped version overstated how well the band orderings do at the rough end, by about ten iterations out of twenty-four. At 784 unknowns the same pattern stands: at a tenth 31, 31, 30 and 36 on 2,296, 2,296, 3,149 and 2,296 entries, and at a hundredth 12, 11, 10 and 13.
It grows with the grid
Twenty points a side is small, and the share of tiny fill is not stable under refinement. Under the natural order the part below is 4.8 per cent at 100 unknowns, 9.1 at 196, 14.8 at 400 and 21.2 at 784. Reverse Cuthill–McKee tracks it closely. On a larger grid the band is longer, and the middle of the band sits further from the two large entries, so more of it is small. Under nested dissection the same share is about one per cent at the largest size measured, and minimum degree sits between. If this keeps going, a band ordering’s factor on a large grid is overwhelmingly tiny entries, which is another way of saying that its count, , has much less to do with the information in the factor than the count of a dissection ordering has.
That connects with the fill that is not independent in a straightforward way. The separator block there was dense and low in rank, and a block of low rank whose entries decay away from a line has a good share of small entries as well. Both descriptions are of the same object: a smooth Green’s function’s sampled values. Rank and size are different questions, though, and an entry’s being small is stronger than its being redundant, since a small entry can simply be removed without any basis to rebuild it.
What a count was for
The count has a defined job and does it with no error. It is what memory must hold if every entry is held. And since a triangular solve visits every stored entry, it also counts a solve’s cost. Two ends of the same arrow needed nothing more, because it was comparing a dense factor with an empty one. An ordering chosen to minimise it has a clear purpose in a direct solver, and the least fill there is studies exactly that.
What it does not do is measure how much of a factor carries weight, and a count that has become the only figure in an ordering’s report invites that reading. A code choosing an ordering for an incomplete factorisation, or for a drop-tolerance solver, or for a low-accuracy direct solve with refinement, needs the second number as well: not how many entries there will be, but how many at or above the tolerance it is going to use. Only a numerical factorisation can report that. It may be why a symbolic phase can only bound what is worth knowing about a factor, in a further sense than the one that essay measured. Here the bound is exact and it is still not the thing wanted.
There is a useful practical test that comes out of the same data, and it needs only one numerical factorisation at a coarse size. A factor whose fill has a large tail at is an advertisement for dropping, and the natural ordering is a good place to look for that. So the choice of ordering and the choice of threshold are not independent of each other. A code wanting a rough factor might begin from an ordering with a long band, which an exact solver would never use.
What these 400 unknowns cannot show
One model problem has been measured here, with constant coefficients, a five-point stencil, and well-separated scales. Anisotropy, or strongly varying coefficients, changes where the size of an entry goes, and how much direction there was to lose suggests that a dropped factor is a very different object on an anisotropic problem. Dropping from the finished factor is not what an incomplete factorisation does. And a threshold relative to the column’s diagonal is only one way of measuring size. A relative measure against the row, or against the norm of the column, gives different shares, and it would change the percentages if not their ordering.
Nor has any coefficient but one been used anywhere on this page, and a code with a strongly varying coefficient cannot read these counts across. These iteration counts also come from a single right-hand side, and conjugate gradients on a preconditioned Laplacian has a small enough variation that this is unlikely to matter, though nothing here measures that.
Still open: dropping during elimination, and a grid on which it has room
A level of fill instead of a threshold. A code’s other way of bounding a factor is a structural one, keeping entries by how many eliminations it took to create them. The prediction with a sign is that at one level of fill Cuthill–McKee keeps fewer entries and takes no more iterations than minimum degree, since the band’s first level is the large part of its fill, and that this holds up to the level at which minimum degree’s factor is complete.
The rough end on a larger grid. The prediction is that at 900 unknowns and a threshold of a tenth, the natural order and Cuthill–McKee keep about the same share of a much larger factor and take between 20 and 30 iterations, while nested dissection’s count at that threshold more than doubles, so that the band orderings’ rough factors keep improving their position as the grid grows, in step with the tiny fraction’s own growth.
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.
- 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.
CholeskyElimination orderFill-inFill-reducing orderingNested dissectionSymbolic factorisation