Manuscript Offprint
arXiv:2610.24314Vertex Ordering for Exact Triangle Listing: Concave Geometry and Certified Rounding
Abstract
Exact forward triangle listers orient each edge of a graph by a vertex order. The order does not change the output, but it changes the work. For the adaptive lister, which scans the smaller of the two forward neighborhoods, the number of candidate tests is a known sum of minima of forward degrees, but how to optimize it had not been characterized. We show that this work is a concave function of the forward degrees, so choosing an order is concave minimization over the orientation polytope, whose vertices are the forward-degree vectors of orders. A single sort therefore rounds any point of the polytope, including the out-degree vector of any orientation, to an order with no more work, with a computable lower bound on the improvement. Minimizing the work is nevertheless NP-hard and APX-hard on triangle-free graphs of maximum degree three, and under the Unique Games Conjecture it has no polynomial-time constant-factor approximation. We also analyze logistic score relaxations and the large-graph limit of degree-based orders; on random cubic graphs, the expected work of every degree-based order is asymptotically at least 2.43 times the expected optimum. Tangent refinement followed by iterated local search reduces the work by 14.83% on average on nine held-out networks fixed by a pre-registered protocol, and by 7.22% in a supplementary rescoring, specified in advance, against a stronger reference that adds the published Neigh local search. The gains are in candidate tests; we observe no reproducible wall-clock speedup.
1 Introduction
Listing all triangles of a graph is a basic primitive in graph mining [10, 21, 48, 73] and in graph learning, where subgraph counts, which message-passing networks cannot in general capture [20], enrich node and graph features [16]. In network biology, triangles define clustering coefficients [86], form the skeletons of closed three-node motifs such as the feed-forward loop [5, 60, 75], and enter graphlet analyses of brain and protein networks [72, 77]. In molecular simulations whose three-body terms require all three pairwise distances within a cutoff [69], the admissible triplets are exactly the triangles of the cutoff graph; our guarantees apply to this enumeration, but we do not evaluate simulation runtime.
Motif analysis repeats triangle listing on many randomized copies of a network [60], so the cost of listing is incurred many times. Even a single listing of a large graph can be costly, motivating parallel, distributed, and external-memory listers [22, 39, 76, 81]. Fast exact listers orient every edge from its earlier to its later endpoint under a vertex order and intersect the resulting forward neighborhoods [21, 66]. The output does not depend on the order, but the work does. On Wiki-Talk (2.4M vertices), the adaptive lister studied here (defined below) performs 4.6 times more candidate tests under the reverse of the degeneracy order than under ascending degree (Appendix G).
Problem. Let be a simple undirected graph with vertices and edges, and let be a strict total order of . The forward degree is the number of neighbors of that come after in , and these neighbors form its forward neighborhood . The adaptive forward lister [88] handles each edge by scanning the smaller of the forward neighborhoods of its two endpoints. Each scanned vertex is tested for membership in the other neighborhood, and we call each such test a candidate test. The total number of candidate tests is
which we call the work of (Proposition 1). The sum itself was given by Yu et al. [88]; what had not been characterized is its dependence on the order. We study the ordering problem and write when the graph matters. For listers that always scan the forward neighborhood of one fixed endpoint, two related costs are NP-hard to minimize [50].
Prior work and open questions. In practice, vertices are ordered by degree or by degeneracy [21, 57, 66]. Lécuyer et al. [50] designed tailored orders, Split and Check, and a local search, Neigh, that can beat degeneracy orders, but for two non-adaptive costs that differ from . Differentiable relaxations of permutations [12, 23, 59] offer another route: optimize a smooth surrogate and round. What has been missing is an understanding of the objective itself: its structure, how to round without increasing the work, its hardness, why gradient-based optimization can fail, and how much degree information alone can capture.
Our results. We show that depends on the order only through the vector of forward degrees and is a concave function of it. The fractional forward-degree vectors, which split one unit per edge between its two endpoints, form the orientation polytope of G. Its vertices are exactly the forward-degree vectors of orders, so the ordering problem is concave minimization over this polytope (Section 3). Our main contributions are:
-
Geometry and rounding. A single sort, the tangent step, rounds any point of the polytope, including the out-degree vector of any orientation, to an order whose work is no larger, with a computable lower bound on the improvement; iterating it gives tangent refinement. The same geometry gives an exact mixed-integer program without acyclicity constraints, displayed in Eq. (2) (Theorem 2, Corollary 3, Propositions 4 and 5).
-
Complexity. Through an exact correspondence with Max-Cut on subdivided graphs, we show that minimizing is NP-hard and APX-hard even on triangle-free graphs of maximum degree three, and under the Unique Games Conjecture (UGC) it has no polynomial-time constant-factor approximation (Theorem 6). A Min UnCut connection with the same UGC consequence was known for the non-adaptive cost [49, §5.3.3]; ours is for the adaptive cost and rests on an exact identity for the optimum on 2-subdivisions.
-
Relaxation landscape. Pairwise-logistic (Bradley–Terry) relaxations orient each edge softly by a logistic function of unconstrained vertex-score differences at a fixed temperature. Every finite stationary point of an objective that is concave in the resulting soft forward degrees is a global maximizer. Our smoothed work is strictly concave in them on the affine hull of the polytope, so it has no finite local minimum, yet its infimum is hard to approximate, and its minimizing sequences saturate the score differences, where small gradients certify nothing about the score-sorted order (Theorem 7).
-
Random graphs. On configuration-model random graphs with bounded degrees, the expected work per vertex of every degree-based order, which places vertices in consecutive blocks determined only by their degrees, has an explicit large-graph limit; in this limit the best layouts we found are V-shaped and do 8.7–21.4% less work than ascending degree, depending on the degree law. Yet on large random cubic graphs, the expected work of every degree-based order is at least 2.438 – o(1) times the expected optimum (Theorem 8, Proposition 9).
-
Algorithms and evaluation. Iterated local search reaches the optimum on all 27 small instances on which a solver certifies the optimum of the program. Our method, tangent refinement followed by iterated local search (T+ILS), reduces work on 32 public development graphs by 5.70% on average relative to the best of standard and tailored reference orders in both directions, improving on every graph. On nine held-out networks whose selection was pre-registered, it reduces work by 14.83% on average relative to the pre-registered reference. In a supplementary rescoring that was specified in advance but is not part of the original pre-registration, the same orders reduce work by 7.22% against a stronger reference that adds the published local search Neigh, improving on all nine; rerun from this stronger reference, T+ILS needs fewer candidate tests than the gradient-based relaxation DOVE (Section 4.1) on all nine (Section 6). The ablations attribute most of the gain to the plateau moves and kicks of the local search, not to the tangent prefix (Sections 6.3 and 6.5).
All gains are in candidate tests. The geometric-mean listing time changes by at most a few percent, not reproducibly across machines, and ordering costs more than it saves, even when orders are reused across related graphs (Section 6.4), so we claim no end-to-end speedup. Table 16 in Appendix O separates prior ingredients from new results.
Orientations and concave minimization. The set of fractional out-degree vectors is the graphical zonotope, whose vertices correspond to acyclic orientations [32, 70, 78] and whose integral points are the out-degree vectors of orientations [35]. It is the base polytope of a submodular

orders = vertices
cyclic orientations
:
solid: level sets of (concave), min at vertices
dashed: level sets of (convex), min at center
Figure 1: Acyclicity is free for concave costs. The orientation polytope lies in the plane ; its vertices are the forward-degree vectors of the six orders, and its center is the out-degree vector of both cyclic orientations. Concave costs such as (solid level sets) attain their minimum at vertices (Corollary 3); the convex (dashed level sets) attains it at the center (Proposition 4).
function, so linear functions over it are minimized by sorting [26], and with this linear minimization oracle, successive linearization, a classical method for concave minimization [38, 56, 67], coincides with a Frank–Wolfe step of full step size [28, 43]. Convex separable costs of out-degrees are minimized over orientations by path reversal [15, 36], and minimum-entropy orientation is a related concave degree objective [19]. What is new is that is concave over this polytope, which makes the tangent step an exact rounding to an order with certified non-increasing work and removes the need for acyclicity constraints in our exact program.
Continuous relaxations and evaluation. Differentiable sorting, ranking and permutation operators relax global permutation structure [12, 23, 33, 59, 68, 71, 80], and gradient-based methods have been applied to algorithmic decisions such as join ordering [74]. Closest in spirit, Nerem et al. [63] construct differentiable extensions with rounding guarantees over permutations; our rounding instead follows from the concavity of and applies to any point of the orientation polytope. Pairwise logistic comparisons are classical [17, 18, 41]. Deng et al. [25] optimize topological orders by discrete swaps, and learned orderings for other exact algorithms [47, 61, 85, 89] optimize different objectives. Because weak baselines inflate reported gains [7, 53, 58] and evaluation references can themselves be unreliable [30], we evaluate published orders in both directions, compare against the strongest published local search available to us, and pre-register the held-out analysis [65].
3 The Work of Ordered Listing
We write for the degree of v and for the set of triangles of G; an order orients each edge from its earlier to its later endpoint.
Proposition 1 (Exact output and work). For every , adaptive forward listing outputs each triangle exactly once and performs exactly candidate tests; hence .
3.1 Degree-space geometry
Write for the unit vectors of . The orientation polytope is the Minkowski sum
Each point splits one unit per edge between its endpoints, and the integral points of are exactly the out-degree vectors of orientations of , acyclic or not [35]. The vertices of are exactly the out-degree vectors of acyclic orientations, i.e., of orders [32, 78], as Figure 1 illustrates for . Define
a concave function on with .
Theorem 2 (Certified tangent rounding). Let be concave on an open convex set containing , let , and let be a supergradient of at . Let sort by ascending , breaking ties by vertex label, and set
Then and . For , (Proposition 4) and (Section 4.1), computing a and takes time and computing takes time.
Each edge contributes to at least , which attains, and the supergradient inequality at gives the bound (Appendix A). The step is one Frank–Wolfe iteration with full step size, with the linear minimization over solved by sorting [26], and is its Frank–Wolfe gap [43]. Because is concave, the gap lower-bounds the improvement rather than the suboptimality.
Corollary 3 (Acyclicity is free for concave costs). If F is concave on an open convex set containing , then
and any orientation or point of is converted to an order of no larger cost, in time for .
For at an integral , a supergradient is , where each edge gives weight one to its endpoint with the smaller value of , zero to the other, and one half to each at ties. Iterating while strictly decreases defines tangent refinement (T), a successive-linearization method [56] with an exact integer objective. It terminates because is a nonnegative integer, but it need not reach a global optimum (Appendix A gives a example).
3.2 Three scan rules, three costs
The forward kernel handles an oriented edge by intersecting with (we drop the subscript ); its three natural scan rules give the three cost models in the literature.
Proposition 4 (Cost models and curvature). Scanning the smaller set costs ; always scanning costs ; always scanning costs . As functions of , and are concave and is strictly convex. Consequently Corollary 3 applies to and , while for the minimum over all orientations can be strictly smaller than over orders (on , 3 versus 5). That orientation minimum is computable in polynomial time by path reversal [15, 36] and is a certified lower bound for orders.
3.3 Lower bounds, complexity and an exact program
Proposition 5 (Certificates). (a) for every , where is the minimum number of edges whose deletion makes bipartite; if and only if is bipartite.
(b) For integral , with . Hence equals the optimum of the mixed-integer program (2), which has no acyclicity constraints.
To state the program, name the endpoints of each edge as in a fixed but arbitrary way and let . A continuous split assigns the share of edge to and to , binary variables encode in unary, and indicates that both endpoints of lie in the level set :
(2)
For a graph without isolated vertices it has continuous splits, binary variables, continuous indicators, equations, monotonicity constraints and linking constraints. Because the objective coefficients are positive, every optimal solution sets , and the monotone binaries force , which gives the layer identity; the integral point need not come from an acyclic orientation, and Corollary 3 shows that this costs nothing. From any incumbent we read off , round it to an order by one tangent step, and recompute the work of that order exactly, so every reported upper bound is the exact integer work of an order. Appendix A gives the proof and valid triangle and odd-cycle cuts.
To show hardness, we use the 2-subdivision of a graph , which replaces every edge by a path through two new vertices. It has no triangles, so all of its work is excess work beyond the output. For any graph , , the minimum number of edges that a cut of leaves uncut (Min UnCut). Recall that is the work of on and its minimum.
Theorem 6 (Complexity). For every graph , , and linear-time maps convert orders of into cuts of and back without increasing the objective value. Consequently, minimizing is NP-hard and APX-hard even on triangle-free graphs of maximum degree three, and under the UGC no polynomial-time algorithm approximates within any constant factor, even on triangle-free graphs.
Proof sketch. The lower bound follows from Proposition 5a together with . For the upper bound, a cut of colors so that one color class is independent and each uncut edge of leaves exactly one monochromatic edge; placing last, with original vertices first, makes exactly these edges cost one. The cut-to-order map preserves the objective exactly, and the order-to-cut map does not increase it. Consequently the optima coincide, and approximation guarantees transfer in the required direction, so the hardness of Max-Cut on cubic graphs [3] and of Min UnCut under the UGC [44, 45] carries over (Appendix B).
The NP-hardness reductions of Lécuyer et al. [50] for the non-adaptive costs, from Set Cover and NAE-3SAT, do not give inapproximability. For , the Min UnCut connection discussed by
Lécuyer [49, §5.3.3] does, with the same UGC consequence as Theorem 6. Our contribution is the corresponding result for the adaptive cost , through a different construction: the exact identity , which also gives APX-hardness on subcubic triangle-free graphs and shows that the bound of Proposition 5a is attained on 2-subdivisions. Because is additive, Max-Cut approximation ratios do not transfer.
4 Optimizing Orders
4.1 Smooth relaxation and its landscape
Scores and a temperature define soft edge directions , where is the logistic function. As , tends to one when precedes in the order that sorts by ascending score. The soft forward degrees are , where is the set of neighbors of . To smooth the minimum, we use , which satisfies . With , the relaxed work is . Both and its exact gradient can be evaluated in time, and as for scores that are distinct on every edge (Appendix A).
Our gradient-based baseline, DOVE (differentiable ordering via edges), minimizes J with Adam [46], anneals the temperature, and standardizes the scores after each step. It starts from a given order and returns the best exact work of seen during the run.
Theorem 7 (Score landscape). Let have at least one edge, fix , and let be the weighted Laplacian with edge weights . (i) The map is onto the relative interior relint and is injective modulo adding a constant on each connected component. (ii) If is concave and differentiable, every finite stationary point of maps to a global maximizer of on . (iii) With and the smallest nonzero eigenvalue of ,
Part (i) is the exponential-family mean map for edge orientations [2, 84]. Part (ii) follows from : stationarity makes a constant on components, and concavity then gives a global maximum. It holds for any differentiable objective that is concave in the soft degrees, for example , and minimum-entropy orientation [19] (Appendix L).
As is strictly concave on the affine hull of , has no finite local minimum. Minimizing sequences drive score gaps to infinity, where and the bound (iii) on the gap of the tangent order becomes vacuous. A small gradient also says nothing about the score-sorted order : take scores that are distinct on every edge and sort to an arbitrary, possibly poor order, and scale them by . The weights tend to zero, so , while stays the same order and . The infimum is nevertheless hard to reach: one tangent step turns any scores into an order with , so for finding scores within of inf is NP-hard, and under the UGC no constant-factor approximation of inf is possible on non-bipartite graphs (Corollary 10, Appendix B). These statements assume that soft degrees are evaluated and compared exactly (a real-RAM model of the relaxation); a finite-precision version would need a representation of scores and a robust rounding rule. Absence of spurious local minima thus does not make the problem tractable; the difficulty lies at infinity.
The theorem fixes and leaves scores unnormalized, whereas DOVE anneals and standardizes scores, so its weaker empirical performance is a separate finding (Appendices H, C and K give a fixed-temperature diagnostic, a monotone mirror step and budget variations).
4.2 Tangent refinement with iterated local search
Our practical method, T+ILS (Algorithm 1 in Appendix F), runs tangent refinement, then iterated local search (ILS) [54] over insertion moves, and finally one additional tangent pass. A move picks a random edge and reinserts immediately before or after ; re-evaluating only the edges at vertices whose forward degree changes gives the exact change in work. Plateau moves ( ) are accepted with probability , and after chunks of 256 proposals without improvement the search restarts from the incumbent with random moves (a kick); was selected on six synthetic development graphs. The initial tangent phase uses at most 10% of the time budget, and the final pass is reserved within the budget (Appendix F). The exact incumbent ensures that T+ILS is never worse than its starting order. The geometry supplies the guaranteed rounding and refinement steps, while the ablations show that the plateau moves and kicks account for most of the search improvement (Section 6.3). The initial tangent phase turns out to be neutral (Section 6.5); we keep it because it is part of the pre-registered configuration, and the final pass is cheap and never increases work.
5 Random-Graph Limits
How much can degree information alone achieve, and does optimizing beyond degree help on large graphs?
Let be the configuration model [14, 62, 64, 83] with i.i.d. degrees of law on and mean . Let be the size-biased degree law seen along a random edge. A degree-based order places degree classes (the sets of vertices of equal degree), or fixed fractions of them, as consecutive blocks with uniformly random order inside each block. For example, Split, which places vertices alternately at the two ends, splits each degree class between the two ends. The layout (the sequence of blocks and their fractions) is fixed as grows, and the assignment of vertices to blocks depends only on degrees and vertex labels, not on the pairing (Appendix D handles loops, multi-edges and odd degree sums). In the limit, the normalized position (rank divided by ) of a degree- vertex is a random variable determined by the layout, and a neighbor of a vertex at position is later with probability
Theorem 8 (Mean-field work). Let and be i.i.d., with and conditional on . Let . For every degree-based order sequence as above,
The formula describes a uniformly random edge whose earlier endpoint has forward degree , where the 1 counts the other endpoint, and whose later endpoint has forward degree . Local tree-likeness makes the two asymptotically independent (proof in Appendix D). The limit depends only on the block layout and takes milliseconds to evaluate, so we can search over layouts numerically.
Consequences. Table 1 evaluates the limit. Sampled graphs with , averaged over graph seeds, agree with it to within 1%. (1) Ascending degree, the common default, is not optimal: the best layouts found have 8.7–21.4% less work. (2) The best layouts found are V-shaped (Figure 2),
Table 1: Mean-field limit of for degree-based orders. on ; Poisson(): conditioned on , truncated at . Best: lowest value among Split and the layouts found by local search (not certified optimal); last column: its reduction relative to ascending degree.
| Law | Ascending | Descending | Split | Best vs. asc. | |
|---|---|---|---|---|---|
| Poisson(4) | 2.415 | 2.615 | 2.071 | 2.071 | 14.3% |
| Poisson(8) | 9.899 | 10.400 | 8.807 | 8.807 | 11.0% |
| Poisson(16) | 40.980 | 41.956 | 37.395 | 37.395 | 8.7% |
| PL2.1 | 9.380 | 14.682 | 8.626 | 8.080 | 13.9% |
| PL2.5 | 3.679 | 4.928 | 3.039 | 2.975 | 19.1% |
| PL3.0 | 1.498 | 1.684 | 1.177 | 1.177 | 21.4% |

Figure 2: Degree-based layouts in the configuration model with on (PL2.5): degree of the vertex at each normalized position in the order, with mean-field limits of (Theorem 8) in the legend. The best layout found is V-shaped, like Split.
with large degrees at both ends and small degrees in the middle. Split [50] is such a V. It matches the best layout found for the Poisson and PL3.0 laws but is 2–7% worse for heavier tails. (3) Optimizing beyond degree retains a large gain at the sizes we tested. From the best-found degree-based order at , T removes another 19.8–28.8% of the work, DOVE 22.4–38.0%, and T+ILS, with about five times DOVE's time, 27.8–57.9%. The T+ILS values change by -0.2 to +0.9 percentage points from (Table 22, Appendix O).
Degree is not enough. On cubic graphs, where every degree is three, a degree-based order behaves like a uniformly random order, and Theorem 8 gives the limit 59/60 per vertex. The next result makes this exact for finite cubic graphs and bounds the optimum, where denotes the independence number.
Proposition 9 (Degree is not enough on cubic graphs). Let be a cubic graph with vertices and triangles, and let be a uniformly random order. Then and . Hence, if is triangle-free, while . On the uniformly random cubic graph, every order chosen independently of the edges, in particular every degree-based order, has , whereas asymptotically almost surely. Hence .
Proof idea. For an edge in no triangle, the forward degrees of its endpoints depend only on the relative order of six distinct vertices, and averaging over the 720 patterns gives 59/90 per edge. For the bound, place a maximum independent set last and orient the paths and cycles induced by the other vertices alternately, so that each remaining edge costs at most two; the bounds on are due to Staton [79] and Frieze and Suen [29] (Appendix B). In the limit, the optimum has over 58% less work than any degree-based order in expectation, a constant-factor gap. At , T+ILS reaches (Table 4, Appendix B).
6 Experiments
Protocol. All work values are recomputed from exported orders, and triangle counts are checked to be order-invariant; these checks passed for all 192 development and 54 held-out saved orders. The reference of a graph is the lowest- order among up to eight candidates, namely Natural, a seeded Random order, ascending Degree, core ordering, smallest-last degeneracy [57], Split, Check and Neigh. On the four public development graphs used for ablations (Bitcoin-Alpha, P2P-Gnutella05, Loc-Brightkite and GitHub), Neigh is run with five seeds; on the 32 development graphs, we use the stored best of five seeds. Every candidate is evaluated in both directions, because Split, Check and Neigh target the reversal-invariant , while their values can differ under reversal. Reversal lowers the best forward-direction reference by up to 1.85%. Neigh minimizes , not , so the comparisons below show that optimizing directly improves on the evaluated orders; they do not compare diversified search with an equally strong deterministic local search for itself.
In the pre-registered held-out run, the Neigh binary was unavailable on the evaluation machine, so the held-out excludes Neigh. A supplementary comparison declared in advance adds Neigh, giving the stronger reference (Section 6.5). Every optimization method starts from the applicable reference, keeps an exact incumbent, and is charged all of its time. DOVE runs its default 200-step schedule, and T+ILS receives the same wall-clock time. The reduction of an order relative to a reference is in %. Means over graphs are unweighted means of these per-graph reductions, not reductions of the total work of a pooled workload, so we also report geometric-mean work ratios . Differences between reductions are reported in percentage points (Appendix F). Table 2 summarizes the references and metrics.
6.1 Distance to optimality
We solve the program (2) with HiGHS 1.15.1 [40], without warm starts and with a time limit of 60s for and 120s for , on 49 instances of seven random-graph families with . The solver runs on one thread with a relative gap tolerance of zero and otherwise default tolerances, and the model includes all the valid cuts of Appendix A. HiGHS reports a proven optimum on 27 of the 49 instances. We call these optima solver-certified: the certificate rests on the solver's floating-point feasibility, integrality and optimality-gap tolerances and was not checked independently. As a check of the formulation, the program matches brute force on all graphs with at least one edge and at most seven vertices (Appendix O).
On the 27 solver-certified instances (Table 17, Appendix O), with 0.2 s per heuristic run and three seeds, tangent refinement alone is 21% above the optimum on average, strict insertion (insertion moves accepting only improvements) 10%, and orientation-space search (edge flips and path reversals, Corollary 3) 2%. Iterated local search reaches the optimum on all 27. The certified instances are the easier ones. On the 22 others, the relative bound width (UB - )/UB, where UB is the work of the best order found and LB the solver's lower bound, is 8–56% (median 26%; Table 25). It
Table 2: Methods, references and metrics used in the experiments.
| Symbol | Meaning |
|---|---|
| Work (candidate tests) of on , Eq. (1), and its minimum over orders. is the set of triangles. | |
| T | Tangent refinement: repeated tangent steps while the work strictly decreases (Section 3). |
| ILS, T+ILS, ILS-T | Iterated local search over insertion moves; T+ILS runs T, then ILS, then a final T pass (Section 4.2); ILS-T omits the initial T phase. |
| DOVE | Gradient-based relaxation baseline (Section 4.1). |
| Lowest-work order among Natural, Random, Degree, Core, smallest-last, Split, Check and, on the 32 development graphs, stored Neigh orders, each in both directions. Used for the 32 development graphs and, without Neigh, for the pre-registered held-out graphs. | |
| Held-out plus five Neigh runs in both directions; supplementary analysis (Appendix J). | |
| Reduction | without Neigh, recomputed on each sample of a null-model chain (Section 6.4). in % relative to the stated reference ; differences in percentage points; means unweighted over graphs. |
| Work ratio | , aggregated by the geometric mean over graphs. |
| Listing time | Time of the lister given an order (kernel time); ordering time is reported separately and is charged to the method. |
| Gap | Relative bound width of the program, (Section 6.1). |
upper-bounds the shortfall from optimality as a fraction of the best order's work, ; it does not estimate the actual shortfall.
6.2 Public networks
32 development graphs. These SNAP graphs [51] have up to 1.1M vertices and 2.0M edges and form three groups used at successive stages of development: development, validation and audit (a final check during development). All 32 informed the method; only the graphs below are held out. Table 20 in Appendix O lists every graph. On 31 of them, the reference is a stored Neigh order (reversed on 12). T+ILS reduces work by 5.70% on average (95% bootstrap interval [3.95, 7.67]%; improved/tied/regressed 32/0/0; geometric-mean work ratio 0.941), against 4.36% for DOVE and 4.43% for T. Against DOVE, T+ILS has wins/ties/losses 31/1/0 (two-sided sign test, ), and against T, 31/1/0.
Pre-registered held-out graphs. Because the graphs above informed development, we fixed ten unused SNAP graphs, together with the methods, budgets, seeds and metrics, before downloading any of them; two share data sources with development graphs (Appendix G). Facebook page-page failed to download and was reported as missing, not replaced. On the 9 of 10 graphs completed, T+ILS reduces work by 14.83% on average (95% bootstrap interval [9.53, 20.93]%; improved/tied/regressed 9/0/0; geometric-mean work ratio 0.847), against 10.61% for DOVE and 7.71% for T. Against DOVE, T+ILS has wins/ties/losses 9/0/0 (two-sided sign test, ), and against T, 9/0/0 (Table 3). Some runs ended slightly after their budget, and our runs did not log timestamped incumbents. A conservative analysis that scores each run by the last saved order known to exist at the deadline retains a mean reduction of 14.17%, with 8/0/1 wins/ties/losses against DOVE; this is a rescoring of saved orders, not a rerun with an enforced deadline (Appendix F).
Table 3: Pre-registered held-out graphs: reference work and reduction (%) relative to ; T+ILS: mean±SD over three seeds. Means are unweighted over graphs.
| Graph | n | m | T | DOVE | T+ILS | |
|---|---|---|---|---|---|---|
| Email-Eu-core | 986 | 16.1k | 230.1k | 5.19 | 5.81 | 9.52±0.04 |
| CollegeMsg | 1.9k | 13.8k | 69.0k | 8.17 | 21.05 | 21.29±0.01 |
| LastFM-Asia | 7.6k | 27.8k | 96.0k | 5.44 | 6.07 | 8.45±0.05 |
| Deezer-Europe | 28.3k | 92.8k | 225.5k | 5.82 | 7.04 | 9.34±0.00 |
| Facebook page-page | download failed (excluded) | |||||
| Amazon0302 | 262.1k | 899.8k | 1.376M | 3.17 | 4.67 | 8.73±0.00 |
| Wiki-Talk | 2.39M | 4.66M | 57.386M | 11.48 | 10.97 | 13.04±0.02 |
| com-Youtube | 1.13M | 2.99M | 21.995M | 19.59 | 21.22 | 24.43±0.00 |
| web-Google | 875.7k | 4.32M | 16.783M | 1.85 | 2.22 | 5.16±0.00 |
| roadNet-CA | 1.97M | 2.77M | 861.6k | 8.66 | 16.39 | 33.50±0.09 |
| Mean | 7.71 | 10.61 | 14.83 | |||
The pre-registered held-out reference lacks Neigh. In the supplementary rescoring against the stronger reference , which was specified before any held-out Neigh order existed but is not part of the original pre-registration, the same T+ILS orders reduce work by 7.22% on average (geometric-mean work ratio 0.926) and still improve on all nine networks. When rerun from on a second machine, T+ILS reaches 7.50% (geometric-mean work ratio 0.923) and needs fewer candidate tests than DOVE and T on all nine networks, also when scored conservatively by the orders known to exist at the deadline (7.43%). One of these graphs reuses the original run, so these paired comparisons mix machines and do not establish hardware-independent superiority (Appendix J).
6.3 What drives the gains
Table 21 (Appendix O) isolates the components at fixed budgets. Diversification is the main ingredient: plateau moves and kicks add 5.7, 2.4 and 0.5 percentage points over strict insertion on the synthetic development graphs (fresh instances of the tuning families), the synthetic graphs generated after tuning, and the four public development graphs. In this ablation (16 non-bipartite graphs, budgets of 1 and 10 s), orientation-space search loses to iterated local search on 15 graphs and wins on one by 0.05 points. A final tangent pass cannot increase work and lowers it in 108 of the 123 public-graph runs, by 0.10 percentage points on average.
6.4 Reusing orders along null-model chains
Consecutive samples of the double-edge-swap chains used in motif analysis [60] are related graphs. In a pre-registered study (Appendix N), we ran such chains from the degree sequences of eight graphs at five spacings that change 0.2–94.8% of the edges between samples (40 settings), against the reference without Neigh, , recomputed on each sample. Tangent refinement of (Cheap+T) removes 4.5–12.0% of its work in all 40 settings. Repairing the previous sample's optimized order by tangent refinement (Reuse+T) beats Cheap+T only at 0.2% change per sample (10.1% vs. 8.4%, within 0.7 percentage points of fresh T+ILS at less ordering time); at 94.8% it is worse (4.0%), so the pre-registered reuse hypothesis failed. Reuse+T never lowers the time per sample, which is 1.50–9.75 times that of ascending degree: it would pay off only above 13–422 ns per candidate test, whereas we measure at most 8.5 ns, and at low drift, updating the triangle count incrementally [55] is cheaper still when counts rather than listings are needed.
6.5 Secondary analyses (not pre-registered)
The first three analyses use all 41 public graphs (Appendix I), with wins/ties/losses of each variant against T+ILS. Greedy-coloring orders are far weaker than ( for the best of eight), ILS started from them does not help (7.62% vs. 7.71% for T+ILS; 16/1/24), and ILS without the tangent prefix reaches 7.70% (19/1/21), so the prefix is neutral.
Listing time. With a Numba port of the adaptive lister, the geometric-mean listing-time ratio of T+ILS orders to over the 41 graphs is 0.9905 (95% interval [0.982, 0.999]) against a work ratio of 0.9197; the held-out listing-time ratio of 0.9615 ([0.938, 0.984]) was not reproduced on a second machine (1.0138), and against it is 1.0102 ([0.9954, 1.0245]); ordering takes seconds, listing milliseconds (Table 8).
Neigh in the held-out reference. The supplementary run declared in advance (Appendix J) lowers the held-out reference on 8 of 9 graphs, by 8.33% on average and at most 18.82%. Rerun from this stronger reference on a second machine, T, DOVE and T+ILS reach 4.66%, 4.32% and 7.50% (Table 9).
Other kernels. For k-cliques, tangent refinement speeds up an adaptive lister by 20–27% on Loc-Brightkite for (two implementations), but kClist [24] remains faster (Appendix E), so the objective must match the lister's cost model.
7 Conclusion
Vertex ordering for adaptive triangle listing is concave minimization over the orientation polytope. This view gives certified rounding, an exact mixed-integer program, and a reason why unconstrained score relaxations at a fixed temperature saturate. Separately, our random-graph analysis shows that degree information alone can lose a constant factor. Since minimizing the work is NP-hard and hard to approximate, we pair certified rounding with diversified discrete search, which reduces work on every public graph tested, including against the stronger Neigh-inclusive reference. In practice, orders designed for reversal-invariant costs should be evaluated in both directions, and discrete heuristics should finish with a tangent pass. For minimizing candidate tests, diversified discrete search outperformed score-based gradient optimization in all our comparisons; for one-off wall-clock listing, the simple degree and degeneracy orders remain the practical choice with our implementations.
Limitations. The gains are in candidate tests: with our implementations, listing time changes little and not reproducibly across machines, and ordering, even with reuse, costs more than it saves. An optimized order pays for its extra ordering time only after listings, and only if the denominator is positive; on the held-out graphs, the evaluation-machine timings of Table 8 give no break-even on Email-Eu-core and roughly to listings on the others, and this listing-time gain was not reproduced on a second machine. Optimality is solver-certified only on small instances, the hardness results are worst-case, Theorem 8 assumes bounded degrees and concerns expectations, and the degree gap is proved for cubic graphs only. Generalization rests on nine held-out networks; against the Neigh-inclusive reference, the held-out gain is 7.22% (7.50% in reruns).
Future directions. Open questions include approximation algorithms for min (Min UnCut admits an approximation [1]), concentration and the optimality of V-shaped layouts, degree gaps on heavy-tailed and geometric graphs, such as the adjacency graphs of the Voronoi tessellations formed by bacterial communities [31], annealed relaxations, k-cliques and other concave objectives (Appendices E and L), and molecular cutoff graphs [69].
Code and Data Availability
The code, protocols, run logs and per-graph results of the pre-registered evaluation, the secondary analyses and the Neigh-inclusive held-out run are available at https://github.com/Mirsohi/triangle-ordering. All graphs are public SNAP datasets [51]; the repository downloads and preprocesses them rather than redistributing them.
AI Use Statement
Generative AI tools were used to assist with manuscript preparation and code debugging. The authors reviewed, verified, and take full responsibility for all content presented in this work.
References
[1] Amit Agarwal, Moses Charikar, Konstantin Makarychev, and Yury Makarychev. approximation algorithms for Min UnCut, Min 2CNF Deletion, and directed cut problems. In Proceedings of the 37th Annual ACM Symposium on Theory of Computing (STOC), pages 573–581, 2005. doi: 10.1145/1060590.1060675.
[2] David J. Aldous and Brett Kolesnik. To stay discovered: On tournament mean score sequences and the Bradley–Terry model. Stochastic Processes and their Applications, 150:844–852, 2022. doi: 10.1016/j.spa.2019.10.011.
[3] Paola Alimonti and Viggo Kann. Some APX-completeness results for cubic graphs. Theoretical Computer Science, 237(1–2):123–134, 2000. doi: 10.1016/S0304-3975(98)00158-3.
[4] Noga Alon, Raphael Yuster, and Uri Zwick. Finding and counting given length cycles. Algorithmica, 17(3):209–223, 1997. doi: 10.1007/BF02523189.
[5] Uri Alon. Network motifs: Theory and experimental approaches. Nature Reviews Genetics, 8(6):450–461, 2007. doi: 10.1038/nrg2102.
[6] Shaikh Arifuzzaman, Maleq Khan, and Madhav Marathe. PATRIC: A parallel algorithm for counting triangles in massive networks. In Proceedings of the 22nd ACM International Conference on Information and Knowledge Management, pages 529–538, 2013. doi: 10.1145/2505515.2505545.
[7] Timothy G. Armstrong, Alistair Moffat, William Webber, and Justin Zobel. Improvements that don’t add up: Ad-hoc retrieval results since 1998. In Proceedings of the 18th ACM Conference on Information and Knowledge Management, pages 601–610, 2009. doi: 10.1145/1645953.1646031.
[8] Vladimir Batagelj and Matjaž Zaveršnik. An algorithm for cores decomposition of networks. arXiv preprint cs/0310049, 2003.
[9] Amir Beck and Marc Teboulle. Mirror descent and nonlinear projected subgradient methods for convex optimization. Operations Research Letters, 31(3):167–175, 2003. doi: 10.1016/S0167-6377(02)00231-6.
[10] Austin R. Benson, David F. Gleich, and Jure Leskovec. Higher-order organization of complex networks. Science, 353(6295):163–166, 2016. doi: 10.1126/science.aad9029.
[11] Andreas Björklund, Rasmus Pagh, Virginia Vassilevska Williams, and Uri Zwick. Listing triangles. In Automata, Languages, and Programming (ICALP), volume 8572 of Lecture Notes in Computer Science, pages 223–234. Springer, 2014. doi: 10.1007/978-3-662-43948-7_19.
[12] Mathieu Blondel, Olivier Teboul, Quentin Berthet, and Josip Djolonga. Fast differentiable sorting and ranking. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 950–959. PMLR, 2020. URL https://proceedings.mlr.press/v119/blondel20a.html.
[13] Marián Boguñá, Romualdo Pastor-Satorras, and Alessandro Vespignani. Cut-offs and finite size effects in scale-free networks. The European Physical Journal B, 38(2):205–209, 2004. doi:10.1140/epjb/e2004-00038-8.
[14] Béla Bollobás. A probabilistic proof of an asymptotic formula for the number of labelled regular graphs. European Journal of Combinatorics, 1(4):311–316, 1980. doi: 10.1016/S0195-6698(80)80030-8.
[15] Glencora Borradaile, Jennifer Iglesias, Theresa Migler, Antonio Ochoa, Gordon Wilfong, and Lisa Zhang. Egalitarian graph orientations. Journal of Graph Algorithms and Applications, 21(4):687–708, 2017. doi: 10.7155/jgaa.00435.
[16] Giorgos Bouritsas, Fabrizio Frasca, Stefanos Zafeiriou, and Michael M. Bronstein. Improving graph neural network expressivity via subgraph isomorphism counting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(1):657–668, 2023. doi: 10.1109/TPAMI.2022.3154319.
[17] Ralph Allan Bradley and Milton E. Terry. Rank analysis of incomplete block designs: I. The method of paired comparisons. Biometrika, 39(3/4):324–345, 1952. doi: 10.2307/2334029.
[18] Chris Burges, Tal Shaked, Erin Renshaw, Ari Lazier, Matt Deeds, Nicole Hamilton, and Greg Hullender. Learning to rank using gradient descent. In Proceedings of the 22nd International Conference on Machine Learning, pages 89–96, 2005. doi: 10.1145/1102351.1102363.
[19] Jean Cardinal, Samuel Fiorini, and Gwenaël Joret. Minimum entropy orientations. Operations Research Letters, 36(6):680–683, 2008. doi: 10.1016/j.orl.2008.06.010.
[20] Zhengdao Chen, Lei Chen, Soledad Villar, and Joan Bruna. Can graph neural networks count substructures? In Advances in Neural Information Processing Systems, volume 33, pages 10383–10395, 2020. URL https://proceedings.neurips.cc/paper/2020/hash/75877cb75154206c4e65e76b88a12712-Abstract.html.
[21] Norishige Chiba and Takao Nishizeki. Arboricity and subgraph listing algorithms. SIAM Journal on Computing, 14(1):210–223, 1985. doi: 10.1137/0214017.
[22] Shumo Chu and James Cheng. Triangle listing in massive networks and its applications. In Proceedings of the 17th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 672–680, 2011. doi: 10.1145/2020408.2020513.
[23] Marco Cuturi, Olivier Teboul, and Jean-Philippe Vert. Differentiable ranking and sorting using optimal transport. In Advances in Neural Information Processing Systems, volume 32, pages 6861–6871, 2019.
[24] Maximilien Danisch, Oana Balalau, and Mauro Sozio. Listing k-cliques in sparse real-world graphs. In Proceedings of the 2018 World Wide Web Conference (WWW), pages 589–598, 2018. doi: 10.1145/3178876.3186125.
[25] Chang Deng, Kevin Bello, Bryon Aragam, and Pradeep Kumar Ravikumar. Optimizing NOTEARS objectives via topological swaps. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 7563–7595. PMLR, 2023. URL https://proceedings.mlr.press/v202/deng23a.html.
[26] Jack Edmonds. Submodular functions, matroids, and certain polyhedra. In Combinatorial Structures and Their Applications, pages 69–87. Gordon and Breach, 1970.
[27] David Eppstein, Michael T. Goodrich, Michael Mitzenmacher, and Manuel R. Torres. 2-3 cuckoo filters for faster triangle listing and set intersection. In Proceedings of the 36th ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems (PODS), pages 247–260, 2017. doi: 10.1145/3034786.3056115.
[28] Marguerite Frank and Philip Wolfe. An algorithm for quadratic programming. Naval Research Logistics Quarterly, 3(1–2):95–110, 1956. doi: 10.1002/nav.3800030109.
[29] Alan M. Frieze and Stephen Suen. On the independence number of random cubic graphs. Random Structures & Algorithms, 5(5):649–664, 1994. doi: 10.1002/rsa.3240050504.
[30] Melika Gorgi and Kourosh Mirsohi. Auditing Bayesian graph alignment: Diagnostic comparisons and reference failure. arXiv preprint arXiv:2609.23232, 2026.
[31] Melika Gorgi, Summer J. Kasallis, Calvin Trinh, Lizett Ortiz de Ora, Travis J. Wiles, and Albert Siryaporn. Geometric ordering in bacterial communities. Proceedings of the National Academy of Sciences, 123(20):e2526643123, 2026. doi: 10.1073/pnas.2526643123.
[32] Curtis Greene and Thomas Zaslavsky. On the interpretation of Whitney numbers through arrangements of hyperplanes, zonotopes, non-Radon partitions, and orientations of graphs. Transactions of the American Mathematical Society, 280(1):97–126, 1983. doi: 10.1090/S0002-9947-1983-0712251-1.
[33] Aditya Grover, Eric Wang, Aaron Zweig, and Stefano Ermon. Stochastic optimization of sorting networks via continuous relaxations. In International Conference on Learning Representations, 2019. URL https://arxiv.org/abs/1903.08850.
[34] Aric A. Hagberg, Daniel A. Schult, and Pieter J. Swart. Exploring network structure, dynamics, and function using NetworkX. In Gaël Varoquaux, Travis Vaught, and Jarrod Millman, editors, Proceedings of the 7th Python in Science Conference (SciPy 2008), pages 11–15, Pasadena, CA, USA, 2008.
[35] S. L. Hakimi. On the degrees of the vertices of a directed graph. Journal of the Franklin Institute, 279(4):290–308, 1965. doi: 10.1016/0016-0032(65)90340-6.
[36] Nicholas J. A. Harvey, Richard E. Ladner, László Lovász, and Tami Tamir. Semi-matchings for bipartite graphs and load balancing. Journal of Algorithms, 59(1):53–78, 2006. doi:10.1016/j.jalgor.2005.01.003.
[37] Christopher Carl Heckman and Robin Thomas. A new proof of the independence ratio of triangle-free cubic graphs. Discrete Mathematics, 233(1–3):233–237, 2001. doi: 10.1016/S0012-365X(00)00242-9.
[38] Reiner Horst and Hoang Tuy. Global Optimization: Deterministic Approaches. Springer, Berlin, third edition, 1996. doi: 10.1007/978-3-662-03199-5.
[39] Xiaocheng Hu, Yufei Tao, and Chin-Wan Chung. Massive graph triangulation. In Proceedings of the 2013 ACM SIGMOD International Conference on Management of Data, pages 325–336, 2013. doi: 10.1145/2463676.2463704.
[40] Qi Huangfu and J. A. Julian Hall. Parallelizing the dual revised simplex method. Mathematical Programming Computation, 10(1):119–142, 2018. doi: 10.1007/s12532-017-0130-5.
[41] David R. Hunter. MM algorithms for generalized Bradley–Terry models. The Annals of Statistics, 32(1):384–406, 2004. doi: 10.1214/aos/1079120141.
[42] Alon Itai and Michael Rodeh. Finding a minimum circuit in a graph. SIAM Journal on Computing, 7(4):413–423, 1978. doi: 10.1137/0207033.
[43] Martin Jaggi. Revisiting Frank-Wolfe: Projection-free sparse convex optimization. In Proceedings of the 30th International Conference on Machine Learning, volume 28 of Proceedings of Machine Learning Research, pages 427–435. PMLR, 2013.
[44] Subhash Khot. On the power of unique 2-prover 1-round games. In Proceedings of the 34th Annual ACM Symposium on Theory of Computing (STOC), pages 767–775, 2002. doi:10.1145/509907.510017.
[45] Subhash Khot, Guy Kindler, Elchanan Mossel, and Ryan O'Donnell. Optimal inapproximability results for MAX-CUT and other 2-variable CSPs? SIAM Journal on Computing, 37(1):319–357, 2007. doi: 10.1137/S0097539705447372.
[46] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015.
[47] Kenneth Langedal and Fredrik Manne. Graph neural networks as ordering heuristics for parallel graph coloring. In Proceedings of the Symposium on Algorithm Engineering and Experiments (ALENEX), pages 56–67. SIAM, 2025. doi: 10.1137/1.9781611978339.5.
[48] Matthieu Latapy. Main-memory triangle computations for very large (sparse (power-law)) graphs. Theoretical Computer Science, 407(1–3):458–473, 2008. doi: 10.1016/j.tcs.2008.07.017.
[49] Fabrice Lécuyer. Ordering nodes to scale to large real-world networks. PhD thesis, Sorbonne Université, 2023. URL https://fabrice.lecuyer.me/public/pdf/Lecuyer_2023_Thesis.pdf.
[50] Fabrice Lécuyer, Louis Jachiet, Clémence Magnien, and Lionel Tabourier. Tailored vertex ordering for faster triangle listing in large graphs. In Proceedings of the Symposium on Algorithm Engineering and Experiments (ALENEX), pages 77–85. SIAM, 2023. doi: 10.1137/1.9781611977561.ch7.
[51] Jure Leskovec and Andrej Krevl. SNAP datasets: Stanford large network dataset collection. https://snap.stanford.edu/data, 2014.
[52] Rong-Hua Li, Sen Gao, Lu Qin, Guoren Wang, Weihua Yang, and Jeffrey Xu Yu. Ordering heuristics for k-clique listing. Proceedings of the VLDB Endowment, 13(11):2536–2548, 2020. doi: 10.14778/3407790.3407843.
[53] Zachary C. Lipton and Jacob Steinhardt. Troubling trends in machine learning scholarship. Queue, 17(1):45–77, 2019. doi: 10.1145/3317287.3328534.
[54] Helena R. Lourenço, Olivier C. Martin, and Thomas Stützle. Iterated local search. In Fred Glover and Gary A. Kochenberger, editors, Handbook of Metaheuristics, volume 57 of International Series in Operations Research & Management Science, pages 320–353. Kluwer Academic Publishers, 2003. doi: 10.1007/0-306-48056-5_11.
[55] Devavret Makkar, David A. Bader, and Oded Green. Exact and parallel triangle counting in dynamic graphs. In Proceedings of the 24th IEEE International Conference on High Performance Computing (HiPC), pages 2–12. IEEE, 2017. doi: 10.1109/HiPC.2017.00011.
[56] O. L. Mangasarian. Solution of general linear complementarity problems via nondifferentiable concave minimization. Acta Mathematica Vietnamica, 22(1):199–205, 1997. URL https://math.ac.vn/public/uploads/files/9701199.pdf.
[57] David W. Matula and Leland L. Beck. Smallest-last ordering and clustering and graph coloring algorithms. Journal of the ACM, 30(3):417–427, 1983. doi: 10.1145/2402.322385.
[58] Gábor Melis, Chris Dyer, and Phil Blunsom. On the state of the art of evaluation in neural language models. In International Conference on Learning Representations, 2018.
[59] Gonzalo Mena, David Belanger, Scott Linderman, and Jasper Snoek. Learning latent permutations with Gumbel-Sinkhorn networks. In International Conference on Learning Representations, 2018.
[60] Ron Milo, Shai Shen-Orr, Shalev Itzkovitz, Nadav Kashtan, Dmitri Chklovskii, and Uri Alon. Network motifs: Simple building blocks of complex networks. Science, 298(5594):824–827, 2002. doi: 10.1126/science.298.5594.824.
[61] Yimeng Min and Carla P. Gomes. Unsupervised ordering for maximum clique. arXiv preprint arXiv:2503.21814, 2025.
[62] Michael Molloy and Bruce Reed. A critical point for random graphs with a given degree sequence. Random Structures & Algorithms, 6(2–3):161–180, 1995. doi: 10.1002/rsa.3240060204.
[63] Robert R. Nerem, Zhishang Luo, Akbar Rafiey, and Yusu Wang. Differentiable extensions with rounding guarantees for combinatorial optimization over permutations. In Advances in Neural Information Processing Systems, volume 38, pages 117299–117338, 2025. doi: 10.52202/085713-3535.
[64] Mark E. J. Newman, Steven H. Strogatz, and Duncan J. Watts. Random graphs with arbitrary degree distributions and their applications. Physical Review E, 64(2):026118, 2001. doi:10.1103/PhysRevE.64.026118.
[65] Brian A. Nosek, Charles R. Ebersole, Alexander C. DeHaven, and David T. Mellor. The preregistration revolution. Proceedings of the National Academy of Sciences, 115(11):2600–2606, 2018. doi: 10.1073/pnas.1708274114.
[66] Mark Ortmann and Ulrik Brandes. Triangle listing algorithms: Back from the diversion. In Proceedings of the Sixteenth Workshop on Algorithm Engineering and Experiments (ALENEX), pages 1–8. SIAM, 2014. doi: 10.1137/1.9781611973198.1.
[67] Panos M. Pardalos and J. Ben Rosen. Methods for global concave minimization: A bibliographic survey. SIAM Review, 28(3):367–379, 1986. doi: 10.1137/1028106.
[68] Felix Petersen, Christian Borgelt, Hilde Kuehne, and Oliver Deussen. Differentiable sorting networks for scalable sorting and ranking supervision. In Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pages 8546–8555. PMLR, 2021. URL https://proceedings.mlr.press/v139/petersen21a.html.
[69] José Alfonso Pinzón Escobar, Markus Mühlhäuser, Hans-Joachim Bungartz, and Philipp Neumann. Linked cell traversal algorithms for three-body interactions in molecular dynamics. arXiv preprint arXiv:2510.21230, 2025.
[70] Alexander Postnikov. Permutohedra, associahedra, and beyond. International Mathematics Research Notices, 2009(6):1026–1106, 2009. doi: 10.1093/imrn/rnn153.
[71] Sebastian Prillo and Julian Martin Eisenschlos. SoftSort: A continuous relaxation for the argsort operator. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 7793–7802. PMLR, 2020. URL https://proceedings.mlr.press/v119/prillo20a.html.
[72] Nataša Pržulj. Biological network comparison using graphlet degree distribution. Bioinformatics, 23(2):e177–e183, 2007. doi: 10.1093/bioinformatics/btl301.
[73] Thomas Schank and Dorothea Wagner. Finding, counting and listing all triangles in large graphs, an experimental study. In Experimental and Efficient Algorithms (WEA), volume 3503 of Lecture Notes in Computer Science, pages 606–609. Springer, 2005. doi: 10.1007/11427186_54.
[74] Tim Schwabe and Maribel Acosta. Gradient-based join ordering. In Proceedings of the Thirty-Fifth International Joint Conference on Artificial Intelligence, pages 2346–2354, 2026. doi:10.24963/ijcai.2026/261. URL https://www.ijcai.org/proceedings/2026/261.
[75] Shai S. Shen-Orr, Ron Milo, Shmoolik Mangan, and Uri Alon. Network motifs in the transcriptional regulation network of escherichia coli. Nature Genetics, 31(1):64–68, 2002. doi:10.1038/ng881.
[76] Julian Shun and Kanat Tangwongsan. Multicore triangle computations without tuning. In Proceedings of the 31st IEEE International Conference on Data Engineering, pages 149–160, 2015. doi: 10.1109/ICDE.2015.7113280.
[77] Olaf Sporns and Rolf Kötter. Motifs in brain networks. PLoS Biology, 2(11):e369, 2004. doi:10.1371/journal.pbio.0020369.
[78] Richard P. Stanley. Decompositions of rational convex polytopes. In Combinatorial Mathematics, Optimal Designs and Their Applications, volume 6 of Annals of Discrete Mathematics, pages 333–342. North-Holland, 1980. doi: 10.1016/S0167-5060(08)70717-9.
[79] William Staton. Some Ramsey-type numbers and the independence ratio. Transactions of the American Mathematical Society, 256:353–370, 1979. doi: 10.1090/S0002-9947-1979-0546922-6.
[80] Łukasz Struski, Michał B. Bednarczyk, Igor T. Podolak, and Jacek Tabor. LapSum – one method to differentiate them all: Ranking, sorting and top-k selection. In Proceedings of the 42nd International Conference on Machine Learning, volume 267 of Proceedings of Machine Learning Research, pages 56990–57007. PMLR, 2025. URL https://proceedings.mlr.press/v267/struski25a.html.
[81] Siddharth Suri and Sergei Vassilvitskii. Counting triangles and the curse of the last reducer. In Proceedings of the 20th International Conference on World Wide Web, pages 607–614, 2011. doi: 10.1145/1963405.1963491.
[82] Charalampos E. Tsourakakis. Fast counting of triangles in large real networks without counting: Algorithms and laws. In Proceedings of the 8th IEEE International Conference on Data Mining, pages 608–617, 2008. doi: 10.1109/ICDM.2008.72.
[83] Remco van der Hofstad. Random Graphs and Complex Networks, Volume 1. Number 43 in Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 2016. doi: 10.1017/9781316779422.
[84] Martin J. Wainwright and Michael I. Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends in Machine Learning, 1(1–2):1–305, 2008. doi:10.1561/2200000001.
[85] Hanchen Wang, Ying Zhang, Lu Qin, Wei Wang, Wenjie Zhang, and Xuemin Lin. Reinforcement learning based query vertex ordering model for subgraph matching. In Proceedings of the 38th IEEE International Conference on Data Engineering (ICDE), pages 245–258, 2022. doi:10.1109/ICDE53745.2022.00023.
[86] Duncan J. Watts and Steven H. Strogatz. Collective dynamics of ‘small-world’ networks. Nature, 393(6684):440–442, 1998. doi: 10.1038/30918.
[87] Hao Wei, Jeffrey Xu Yu, Can Lu, and Xuemin Lin. Speedup graph processing by graph ordering. In Proceedings of the 2016 International Conference on Management of Data (SIGMOD), pages 1813–1828, 2016. doi: 10.1145/2882903.2915220.
[88] Michael Yu, Lu Qin, Ying Zhang, Wenjie Zhang, and Xuemin Lin. AOT: Pushing the efficiency boundary of main-memory triangle listing. In Database Systems for Advanced Applications, volume 12113 of Lecture Notes in Computer Science, pages 516–533. Springer, 2020. doi:10.1007/978-3-030-59416-9_31.
[89] Kangfei Zhao, Yu Rong, Jeffrey Xu Yu, Wenbing Huang, Junzhou Huang, and Hao Zhang. Graph ordering: Towards the optimal by learning. In Web Information Systems Engineering – WISE 2021, volume 13080 of Lecture Notes in Computer Science, pages 423–437. Springer, 2021. doi: 10.1007/978-3-030-90888-1_33.
Contents of the Appendices
A Proofs
B Complexity, cubic graphs and stability
C A monotone mirror step
D Mean-field limit
E k-clique listing
F Methods and protocol, including Algorithm 1 and the budget accounting
G Pre-registered held-out evaluation
H Fixed-temperature landscape diagnostic
I Secondary analyses on public graphs (not pre-registered)
J Held-out reference with Neigh (supplementary analysis)
K Budget curve
L A second concave objective: minimum-entropy orientation
M Degree-preserving null ensembles
N Reusing orders along a null-model chain
O Additional tables, including the 32 development graphs (Table 20)
A Proofs
Proposition 1. Fix a triangle with . Then and , so the intersection for edge finds . For edge the third vertex is not in , and for edge the vertex is in neither forward set; hence each triangle is found exactly once. On edge the kernel scans the smaller forward set and tests each element for membership in the other, which costs tests. Summing over edges gives Eq. (1), and every output is a successful test.
Theorem 2. Write with . Then , so . Under the earlier endpoint of each edge has the smaller coefficient (ties give equal coefficients), so . Concavity gives for all in the domain. With this becomes . For , a supergradient at is with if for the other endpoint , 0 if , and at ties. For the gradient is . For , . Each costs one edge scan, and needs one sort.
Corollary 3. Order degree vectors are orientation out-degree vectors, which lie in . This gives . Conversely, Theorem 2 maps every to an order with . Apply it at a minimizer, which exists by compactness and continuity.
Proposition 4. For the third vertex of any triangle lies in . Scanning costs per incoming edge of , hence . Scanning costs per outgoing edge of , hence . Taking the minimum per edge gives , which is concave as a sum of minima of linear functions. is a sum of concave quadratics, and is a sum of strictly convex quadratics. On the cyclic orientation has out-degrees and , while every order gives and . By Borradaile et al. [15] (stated there for in-degrees) and Harvey et al. [36], an orientation minimizes for every strictly convex (the same at every vertex) if and only if no directed path leads from to with . Path reversal finds such an orientation in polynomial time. Its value lower-bounds because orders are orientations.
Proposition 5. (a) The triangle bound is Proposition 1. Let be the vertices with . Two vertices of are never adjacent, because the earlier endpoint of an edge has positive forward degree. Every edge inside has both forward degrees at least one and costs at least one. Deleting leaves the bipartite graph , so . If is bipartite, placing one side first gives every edge an endpoint with and zero work. Conversely, zero work forces . (b) For integers , ; summing over edges gives the layer identity. In the program (2), monotone binaries with sum force , and the optimal . The optimum is therefore over integral points of . This set contains every order degree vector, and on all of by Corollary 3; hence the optimum equals . Valid cuts, which hold at every integral feasible point: ; for every edge (as ); for every odd cycle (the vertices with are independent, so an odd cycle has an edge with both endpoints of degree at least one); and for any certified lower bound on . The runs of Section 6.1 use all of them: the cycle cuts for every triangle and for each cycle of a greedy packing of edge-disjoint odd cycles (triangles first, then shortest odd cycles), and equal to the number of packed cycles, which is a lower bound on because deleting edges to make bipartite removes an edge from each packed cycle and the packed cycles share no edges. For maximum degree at most two, the minimum work equals the number of odd-cycle components: paths and even cycles are bipartite, and an odd cycle with first and the odd vertices last has work one.
Smooth relaxation: complexity, consistency and finite-temperature error. One edge scan computes all and accumulates ; a second computes and the degree adjoints ; a third applies . This takes time and memory. If scores are distinct on every edge, as , and with . Let and . Each soft direction is within of its hard value, so . Since is 1-Lipschitz in , .
Theorem 7. Put and . Then is the mean of the product distribution that orients each edge independently, and is a Laplacian with positive weights . Let be the vectors with zero sum on every connected component. (i) is positive definite on , so is strictly convex there and is injective on . Every finite gives positive probability to every orientation, so . For surjectivity, fix . A ball of radius in the affine hull around lies in , and , so on . The minimizer exists and satisfies . Both vectors have the same component sums, the edge counts, so . (ii) By the chain rule with . If this vanishes, is constant on components. Every with lies in , so . (iii) , so . Moreover . For with , is strictly concave on the affine hull of , so a finite stationary score, if one exists, is unique modulo adding a constant on each connected component and is a strict maximum modulo these shifts, which leave unchanged.
Counterexamples. On with parts , , the order has forward degrees and work 6. Its doubled supergradient is ; sorting it returns the same order with , although the optimum is 0. On the five-cycle 01, 12, 23, 34, 40, the order
(0, 1, 4, 2, 3) has work 3 and every adjacent swap has zero change, whereas the optimum is 1. Neither a zero tangent gap nor adjacent-swap optimality certifies a global optimum.
B Complexity, Cubic Graphs and Stability
Theorem 6. Let , where the path replacing is with a adjacent to .
Orders to cuts . Fix an order of , let be the set of vertices with and . As in Proposition 5a, is independent and , and is bipartite with sides and . Let be the set of edges of whose path contains an edge of , so . A cycle of length in maps to a cycle of length in , so , and hence , is even; thus is bipartite. A 2-coloring of , computed by breadth-first search, is a cut of whose uncut edges all lie in . Hence the cut leaves at most edges uncut, in linear time.
Cuts to orders (min ). Fix a cut of with uncut edges; color with 1 and with 0. For each path : if is cut, set and (no monochromatic edge); if , set (only is monochromatic); if , set , (only is monochromatic). Then the class of color 0 is independent, and there are exactly monochromatic edges, all inside the class of color 1. Order the original vertices of , then the subdivision vertices of , then . Every vertex of is a sink, so every edge meeting costs 0. In each monochromatic edge the later endpoint is a subdivision vertex whose other neighbor lies in (for this holds for both endpoints; for , comes after the original vertex ), so ; the earlier endpoint has after it, so the edge costs exactly one. Hence , and an optimal cut gives . (For the order matters: if preceded , the edge could cost two.)
Consequences. has maximum degree and girth , so it is triangle-free and all of its work is excess work beyond the output. Max-Cut is APX-complete on cubic graphs [3], so is NP-hard on triangle-free graphs of maximum degree three. The cut-to-order map preserves the objective exactly, and the order-to-cut map does not increase it; the latter can be strict (for , is the 9-cycle, which has orders with , whereas every cut of leaves at most three edges uncut). Hence the optima are equal, and an order with yields a cut with at most uncut edges. Since , a -approximation for yields a cut of size at least ; a polynomial-time approximation scheme for on subcubic triangle-free graphs would therefore give one for Max-Cut on cubic graphs, so is APX-hard. Under the Unique Games Conjecture it is hard, for every small , to distinguish from [45], i.e. from ; the ratio is unbounded as , so Min UnCut, and with it , has no constant-factor approximation [44]. These statements are worst-case. Because the correspondence is additive , approximation ratios for Max-Cut do not transfer, and whether admits, for example, an approximation as Min UnCut does [1] is open. For the non-adaptive cost , Lécuyer [49, §5.3.3] discusses a Min UnCut connection, attributed there to Makarychev, with an approximation and the same UGC consequence; Theorem 6 is the corresponding result for , obtained through the exact identity on 2-subdivisions.
Checks. On 38 graphs (cycles , , , , paw, bowtie, , the wheels on 5 and 6 vertices, , , prism, octahedron, Petersen, Möbius-Kantor, three random cubic graphs and 14 random graphs with at most 7 vertices and 10 edges), the forward map gives for every cut (all cuts, or 500 random cuts when ), and the back map satisfies on 300 random orders per graph. On the 36 graphs where an exact method finished, (values 0–4) by up to three independent methods: enumeration of all orders, enumeration of all orientations (Corollary 3), and an order-space integer program with transitivity constraints, for which the solver proves the optimum 3 for the Petersen graph ( ) in 205 s.
Hardness of the relaxation
Corollary 10 (Relaxation). Fix and , and let . Then , and one tangent step at maps any scores to an order with . Hence finding scores with is NP-hard, and under the Unique Games Conjecture no polynomial-time algorithm achieves for a constant on all non-bipartite graphs.
Proof. By Theorem 7i, ranges over relint , and is continuous, so . Write ; the bracket lies in , so . By Corollary 3, , which gives the first claim. Theorem 2 for at gives . If , then , and Theorem 6 applies. If on a non-bipartite graph ( ; bipartiteness is tested in linear time), then , contradicting Theorem 6 under the Unique Games Conjecture.
The reduction evaluates and compares soft degrees exactly (real-RAM model of the relaxation). A statement in the Turing model would also need a representation of the scores and a precision model for the logistic evaluations and the comparisons in the rounding step, so the corollary is the idealized, exact-arithmetic consequence of Theorem 6 for score optimization; the discrete NP-hardness of Theorem 6 does not depend on it. The corollary says that the absence of finite local minima (Theorem 7) does not make the relaxation tractable: the difficulty sits at infinity, where Theorem 7iii shows that gradients certify nothing.
Proposition 9. Random order. Let uv be an edge in no triangle. The two other neighbors of u and the two other neighbors of v are four distinct vertices, distinct from u and v, so is a function of the relative order of six distinct vertices, which is uniform over patterns. Enumerating them gives , and . At most 3t edges lie in triangles, and for each of them both the true and the assumed contribution lie in , so the error is at most 9t. Upper bound. Let I be a maximum independent set and . Since I is maximal, every vertex of C has a neighbor in I, so has maximum degree two and is a union of paths and cycles. Orient every C-I edge towards I, and orient each path and cycle of alternately, so that every vertex is a source or a sink within C; an odd cycle , with even-indexed vertices as sources, keeps one defect edge . The orientation is acyclic, so it is induced by an order (any topological order). Vertices of I are sinks, so edges at I cost 0. An edge of whose endpoint w is a sink within C costs at most ; the defect edge costs at most (one edge to , one to I). Hence . Consequences. Triangle-free subcubic graphs have [37, 79], so . The uniformly random cubic graph has a law invariant under relabeling, so for an order chosen independently of the edges, , and [14]. Asymptotically almost surely [29], so a.a.s. Since always, also , and therefore . For degree the upper-bound argument fails ( can have degree ; Table 4 reports 4-regular graphs numerically only (random-order limit , from per edge by the same enumeration over 8! patterns).
Checks. Exact enumeration gives 59/90 per edge for (137/140 for ); the mean of over all 8! orders of the cube is exactly 118/15 = . On 32 random cubic graphs with , exact OPT (orientation enumeration) of the construction in all cases. Table 4 gives large random cubic graphs.
Edge edits. Let and be graphs on the same vertex set, , , , , and fix an order . For let
Lemma 11 (Stability). (a) If , then and . (b) . (c) , and the optimality gap satisfies ; tangent refinement on does not increase .
Proof. Let and under ; then , where counts the edges of whose earlier endpoint is . Write . Each bracket lies in , which gives monotonicity, and summing over gives at most . With and this gives (a). Both and lie in , which gives (b). For (c), let minimize ; then , and symmetrically; and . Theorem 2 gives the last claim.
The bound in (b) sharpens . itself is computable exactly in time, so the lemma's use is on the optimum and gap side: an order that is near-optimal for stays near-optimal after few edits, with a cheap localized certificate. Checks. No violation of (a)–(b) or of over all 98,304 pairs of labeled 4-vertex graphs with all 24 orders, all 6.76M combinations of 5-vertex graph pairs differing in at most two edges with all 120 orders, and 2,000 random and hub-heavy graph pairs ( ); no violation of (c) on 3,000 pairs of 6-vertex graphs with exact optima. The worst observed ratio of actual change to bound is for , for , and 1 (attained) for the localized bound. Along the swap chains of Appendix N, none of the bounds is violated (0 violations in 1,600 frame transitions), but they are loose: the median ratio of bound to actual change is 44 for the localized bound and 872 for , so they are worst-case guarantees, not predictions.
Table 4: Work per vertex on random regular graphs (NetworkX [34], three graph seeds each; meanSD). The construction row applies the proof of Proposition 9 to a greedy, not a maximum, independent set . Random-order limits (Proposition 9): for and for ; for the optimum is at most a.a.s. T+ILS uses per edge (seed 1). For only numerics are available.
| Order | cubic | ||
|---|---|---|---|
| Uniformly random order (5 per graph) | |||
| Greedy independent-set construction | |||
| its bound | |||
| T from the random order | |||
| T+ILS from the construction / random order | |||
| T+ILS from the random order | |||
| Limit / bound | |||
C A Monotone Mirror Step
With and as in Appendix A, and for a differentiable concave , set for and . For an edge let and .
Proposition 12. , with strict decrease unless is constant on every component, in which case maximizes . If , sorting in descending order yields an order with .
Proof. Summing the Bernoulli identity over the edges gives , and the supergradient inequality gives the first claim. For the second, an edge with has new logit gap , so precedes , and the edgewise linear minimum is attained. Concavity then applies as in Theorem 2.
This is entropic mirror descent [9] specialized to the edge marginals. In tuned, time-matched comparisons on 19 graphs, measured against a reference without reversed orders, standalone mirror steps trailed tuned Adam and insertion search in all three graph groups, and mirror plus insertion was within 0.4 points of tangent plus insertion; we therefore do not use it in the main experiments.
D Mean-Field Limit
Proof of Theorem 8. If is odd, the degree of vertex is increased by one, as is standard [83]; this changes one degree by one, the bounds below then hold with in place of , and the limit is unaffected. is evaluated on the simple graph obtained by deleting loops and multi-edges. Let bound the degrees. Fix the layout, and let block membership and within-block ranks depend only on degrees, labels and independent randomness, not on the pairing (vertex-level Split with identifier ties is of this form and converges to two half-blocks per class). (1) In the expected numbers of self-loops and multi-edges are . Removing one edge changes at most two forward degrees by one and by , which is negligible after division by . (2) Pick a uniformly random edge . With probability the neighborhoods of and at distance one are disjoint and contain no further edges among themselves. Their other half-edges attach to distinct vertices whose degrees are, up to total variation , i.i.d. with law , and deg , deg are themselves i.i.d. [83]. (3) Given the degree sequence, the ranks inside each block form a uniformly random permutation (for label-based ranks this holds in distribution because configuration-model labels are exchangeable), and the block boundaries converge because the class frequencies converge to . Hence the normalized positions of a bounded number of distinct vertices converge jointly to independent draws from their block laws, and every neighbor of other than is later than independently with limiting probability . (4) Conditioned on , and in the limit, independently. Symmetrizing over which endpoint is earlier gives . (5) Given the degree sequence , the number of edges is fixed, and for a uniformly random edge , up to the correction of step (1). Steps (2)–(4) hold conditionally on whenever its empirical degree law converges to , which happens almost surely, and the minimum is bounded by , so the conditional expectation of the minimum converges to the expectation under the limit law. Since almost surely and , bounded convergence applied to gives the limit. Finally, for independent nonnegative integers. For unbounded degrees with we expect the same limit via uniform integrability, since , but we do not claim it.
Computation and search. Table 1 reports per non-isolated vertex. Positions inside each block are integrated with midpoint nodes, and suffix sums give time for nodes in total and at most binomial terms. Values at differ from those at by at most 0.05%. Block layouts are searched by first-improvement insertion over class sequences, with random and structured restarts. Splitting each class into two blocks changes the best value found by at most 0.3%. The best layouts found are V-shaped; for PL3.0 roughly every other class lies on the descending front arm and the rest on the ascending back arm.
Validation on sampled graphs. At (two graph seeds), sampled of ascending, descending and optimized degree orders lies within 0.1–0.7% of the limit for ER8 and PL2.1/2.5/3.0. Split lies within 0.2–0.8% of its predicted value (ER8 8.791 vs. 8.807 for Poisson(8); PL2.5 3.021 vs. 3.039). An independent reimplementation reproduced the limit values to four decimals and the sampled comparisons to within 0.85%. Individual heavy-tailed graphs fluctuate by 2–3%, so Table 18 compares methods on the same graphs. Coloring orders are greedy colorings with vertices processed in reverse smallest-last order (SL) or by descending degree (DEG), with color classes as blocks in ascending or descending color order (four variants; Table 23). At the best of the four is 4.8–42.5% below the best-found degree-based order (PL2.1 lowest); SL-desc is best on ER8, PL2.5 and PL3.0, and SL-asc on PL2.1. Both descending variants are worse than that order on PL2.1.
E k-Clique Listing
In kClist-style listing [24], a partial clique Q carries the candidate set of common later neighbors. Extending Q by computes . With adaptive intersection, the exact work is
The level is exactly , so ; the two one-sided rules give and at , as in Proposition 4. Because the sinks of an acyclic orientation are determined by its out-degrees, peeling shows that an acyclic orientation is determined by its out-degree vector. Every order functional is therefore formally a function of , but has no local form in degrees for . In two graphs whose triangle has forward degrees under the identity order, the level-2 term is 2 in one and 1 in the other. Hence the tangent step of Theorem 2 does not transfer to .
End-to-end benchmark. All orders were computed in C++ with full cost charged, five interleaved repetitions, , on the four public development graphs and a random geometric graph ( , radius 0.025). Clique counts matched NetworkX [34] on 2,400 checks. Findings:
-
For a kClist-style lister, smallest-last is fastest per call and end-to-end on every expensive cell; tangent and T+ILS orders list 7–50% slower.
-
For the adaptive lister, tangent refinement from smallest-last lists 22–27% faster than smallest-last on Loc-Brightkite (k = 6–8), at 0.09 s extra ordering time, i.e., break-even within one call; an independent reimplementation measured 20–25%.
• The adaptive lister remains slower than the kClist-style lister with smallest-last.
F Methods and Protocol
Reference orders. Natural is the input order after dense remapping; Random uses seed 7; Degree is ascending by degree with identifier ties; core ordering sorts by core number; smallest-last repeatedly removes a vertex of minimum remaining degree [57]. These last two differ, and smallest-last is the stronger baseline for and k-clique listing. Split and Check follow Lécuyer et al. [50]. Neigh uses the published VOLT implementation with threshold 0.01 and seeds 1–5. Every candidate is evaluated in both directions, and is the minimum exact . The reduction of an order is , and 0 (a tie) when ; every certified optimum in Table 17 is positive.
DOVE. Scores start at , where is the rank of in the reference order. Adam (learning rate 0.08, moments (0.9, 0.999)) minimizes for 200 steps with and . Scores are standardized after each step, and the exact work of the sorted scores is checked every five steps to keep the best incumbent.
Tangent refinement and T+ILS. T iterates Theorem 2 with the supergradient and identifier tie-breaking until work stops strictly decreasing, for at most 100 rounds. ILS proposes a uniformly random edge, one of its endpoints , and a side (before or after the other endpoint ), and moves to that position. Only edges between and vertices it passes change direction, and the work change is computed exactly from edges incident to vertices whose forward degree changes. Proposals come in chunks of 256. Moves with negative delta are accepted, zero-delta moves with probability , and after consecutive chunks without improvement the state resets to the incumbent and applies random moves. The grid , with was evaluated on six synthetic development graphs, giving mean gains of 9.8, 15.2, 10.8, 16.6, 10.9 and 17.0% for , , , , , ; was selected. T+ILS spends at most 10% of its budget on the initial T phase and ends with a charged T pass.
Algorithm 1 Tangent refinement with iterated local search (T+ILS)
Require: graph G, reference order , time budget , parameters
1:
2: repeat ; ;
3: if then
4: until no strict decrease, or 10% of used
5: ;
6: while time < minus the reserved final pass do
7: draw 256 moves ( next to a neighbor ); apply if , or if w.p.
8: if then ; else
9: if then with random moves;
10: final tangent pass on (lines 2–3 until no strict decrease, at most 100 rounds, without the 10% limit; time reserved in line 6, charged)
11: return
Orientation-space search. Using Corollary 3, we searched over orientations with edge flips and directed-path reversals of length up to four, which move one unit of out-degree between the path's endpoints. Exact deltas were verified on 13,937 random moves by one implementation and on 6,016 by a second, independent one. The search used plateau moves, kicks and periodic tangent rounding. In a separate tuning comparison of path variants on 18 graphs, adjoint-guided and longer paths were slightly worse than single flips, and even the best post-hoc path configuration per graph lost to ILS on every graph (by 0.65–14.9 points). This comparison differs from the ablation of Section 6.3, which runs the selected configuration on 16 non-bipartite graphs at budgets of 1 and 10 s.
lower bound tightness. On all 1,245 non-isomorphic graphs with two to seven vertices and at least one edge, the path-reversal bound equals on 72 graphs; the mean relative gap is 17.3% and the maximum 40% (). On the four public development graphs, smallest-last is within 0.42–2.12% of the bound; on non-regular synthetic graphs within 0.57–8.4%; on 4-regular graphs within 10.6%, where an Eulerian orientation attains the bound but no order can.
Licenses. SNAP datasets are distributed for research use by their maintainers [51]. VOLT, which provides Neigh, is GPL-3.0 licensed; a small build patch leaves its ordering objective and update rule unchanged, and VOLT is not redistributed. Our code, protocols, run logs and per-graph results are at https://github.com/Mirsohi/triangle-ordering; Table 5 maps its folders to the paper. Saved orders are not included because of their size; the drivers regenerate them from the seeds stored with each result.
Table 5: Contents of the code repository https://github.com/Mirsohi/triangle-ordering.
| Folder | Contents (sections of the paper) |
|---|---|
| 0_dove_baseline_and_kernels | DOVE, reference orders, C++ exact lister, VOLT setup and patch (Section 4.1, Appendix F) |
| 1_preregistered_eval, | Pre-registration and its SHA-256, evaluation pipeline, tests, |
| 1_preregistered_eval_results | per-graph results, run plans, environment record and run log for the 32 development graphs and the held-out graphs (Section 6, Appendices F and G) |
| 2_secondary_analyses, | Secondary analyses, kernels and per-graph results (Section 6.5, |
| 2_secondary_analyses_results | Appendix I) |
| 3_heldout_with_neigh | Protocol, hashes, protocol history, driver and results of the Neigh-inclusive held-out analysis (Appendix J) |
| 4_exact_small_instances | Exact optima of 26 graphs with at most seven vertices by enumerating all orders, validation and geometry checks |
Graphs and timing. Development synthetic graphs come from six families (Erdős–Rényi, Barabási–Albert, Watts–Strogatz, powerlaw-cluster, stochastic block, core–periphery; n = 145–270); the prospective group (bipartite, random geometric, random regular) was generated after all tuning, and the small certified instances use seven families (Erdős–Rényi, Barabási–Albert, Watts–Strogatz, powerlaw-cluster, stochastic block, geometric, regular). The four public development graphs are Bitcoin-Alpha, P2P-Gnutella05, Loc-Brightkite and GitHub. Small-instance, ablation and random-graph experiments ran on a Linux machine (Intel Xeon 2.1 GHz, 2 vCPUs; Python 3.11, NumPy 2.4, SciPy 1.17, Numba 0.67, HiGHS 1.15, GCC 13) with one thread per run. The 32-graph and held-out evaluations ran on a Windows machine (AMD Ryzen 5 3600; Python 3.11.9, NumPy 2.1, SciPy 1.15, Numba 0.61). In the small-instance, ablation and random-graph experiments, a candidate counts only if it is exported and checked before the deadline.
Budget accounting in the public-graph runs. In the 32-graph and held-out runs, the T+ILS clock starts before any array is built and stops when the final order is returned, so it covers the initial tangent phase, ILS and the final pass; verification and export are not charged to any method. ILS stops once the elapsed time reaches , where is the time reserved for the final pass (the first protocol amendment, Appendix G); the last batch of proposals is not interrupted. The final pass then runs until no strict decrease (at most 100 rounds), and any time beyond is reported as overrun. The main (returned-order) analysis therefore permits these reported overruns, whereas the capped analyses below rescore the saved orders so that no run uses time beyond ; the two estimate different quantities, and neither is a rerun with an enforced deadline. Averaged over runs, T+ILS used 0.5% less than on the held-out graphs and 0.1% less on the 32 development graphs. Of the 123 runs (41 graphs, three seeds), 44 ended after : 38 by less than 1% of , five by 1.1–1.6% on the 32 development graphs with budgets below 0.3 s, and one by 3.7% (Wiki-Talk, where the final pass hit 100 rounds). On sub-second budgets the last ILS batch can itself end a few milliseconds after (23 runs, at most 6 ms). The final pass lowers work in 108 of 123 runs, by 0.10 points of reduction on average (0.05 on the 32 development graphs, 0.28 on the held-out graphs, at most 1.02). Of the total, the initial tangent phase accounts for 4.43 (32 development graphs) and 7.71 (held-out) points and ILS for 1.22 and 6.84; without the prefix, ILS alone reaches the same level (Section 6.5). In the 44 over-budget runs, the returned order did not yet exist at . Our runs do not log timestamped incumbents, so the strict rule is a lower bound for a hard-capped implementation, not an estimate of it; logging the incumbent at would settle this. Two capped scores bound the effect of overruns. Dropping the final pass in every over-budget run gives means of 5.69% (32 development graphs) and 14.78% (held-out), with T+ILS against DOVE at 31/1/0 and 9/0/0. The strict rule, the conservative analysis of Section 6, counts only saved orders known to exist at B (the ILS incumbent if ILS ended by B, otherwise the order after the initial tangent phase), and may therefore miss a better incumbent that existed at B but was not saved. It gives 5.57% and 14.17% (95% bootstrap intervals [3.79, 7.52]% and [9.07, 20.36]% and 27/1/4 and 8/0/1; the losses come from runs whose ILS phase ended at most 6 ms late on budgets below 2 s and fall back to the tangent-phase order.
G Pre-Registered Held-Out Evaluation
The protocol was fixed and hashed before any held-out graph was downloaded. On Wiki-Talk, the candidate orders of the reference span a factor of 4.6 in work: ascending degree gives 57,386,025 candidate tests (the reference), the input order 257,969,291, and the reversed smallest-last (degeneracy) order 264,800,723.
Graphs. Email-Eu-core, CollegeMsg, LastFM-Asia, Deezer-Europe, Facebook page-page, Amazon0302, Wiki-Talk, com-Youtube, web-Google and roadNet-CA (communication, social, product, web and road networks), all from SNAP [51]. None of these files was used before the protocol was fixed; two share sources with the 32 development graphs (Amazon0302 and Com-Amazon are different crawls of Amazon co-purchasing data; Email-Eu-core and Email-EuAll are different datasets of email at a European research institution). The first two columns of each file are read, comments and headers are skipped, and the common preprocessing is applied: remove self-loops, symmetrize, deduplicate and remap non-isolated vertices densely. A graph that fails to download or parse is reported as missing and never replaced. In the executed run, Facebook page-page was missing (HTTP 404 on all five attempts); no VOLT binary was available, so Neigh did not enter the held-out reference; there was no other deviation. Two amendments were made before any held-out file was downloaded: one fixed the time reserved for the final tangent pass inside the budget, and one added the bootstrap interval and sign test to the reported statistics.
Methods and metrics. The reference, T, DOVE and T+ILS are as above; T+ILS receives DOVE's measured time on each graph and uses seeds 1–3. Neigh enters the reference only if the VOLT binary is available on the evaluation machine, and this is reported. We report per-graph reduction relative to , the mean, median, improved/tied/regressed counts, the geometric-mean work ratio, and paired wins/ties/losses of T+ILS against DOVE and T. Exact work and triangle counts are recomputed for every saved order. Graphs with more than 20M edges would be skipped for optimization; none of the listed graphs is that large.
Record and its limits. The repository contains the protocol (1_preregistered_eval/PREREGISTRATION.md, which records its writing time as 2026-09-28 05:58 UTC), its SHA-256, the evaluation code, which refuses to start the held-out part if the hash differs, and the run log, which records the hash check at 07:44 UTC, before the first download. These records were produced by our own scripts and made public after the run, and the protocol was not deposited with an independent registry. A checksum identifies a file but does not by itself show when the file existed, so these records document the protocol and its execution without independently timestamping them. The Neigh-inclusive analysis (Appendix J) has its own hashed protocol and protocol history, the reuse study (Appendix N) was frozen with a checksum before its full run, and all analyses labeled secondary or post hoc are exploratory.
H Fixed-Temperature Landscape Diagnostic
Theorem 7 concerns unnormalized scores at a fixed temperature, whereas DOVE anneals and standardizes the scores after every step. To separate the two effects, we ran gradient descent and Adam on with and fixed for 20,000 steps, from ascending degree, on an Erdős–Rényi graph (largest component: , ) and a Barabási–Albert graph ( , four edges per new vertex, ); Figure 3 shows the ER graph. Without standardization, Adam saturates as predicted on both graphs: falls by more than eight orders of magnitude, the score range grows from 2 to 14.1 and 17.4, 99% of the edges have , and the Rayleigh quotient of the numerically computed Fiedler vector is below . This value is a floating-point estimate, not a certified bound: saturated weights can underflow (at a score gap of , rounds to 1 in double precision although the exact weight is positive), and a rigorous upper bound would evaluate directly, project the test vector onto the zero-sum subspace of each component, and control the rounding error. Theorem 7 itself is exact; gradient descent behaves the same way on the ER graph (five orders of magnitude) but had not converged on the BA graph. With per-step standardization the score range stays bounded and levels off at 0.3–3.9, so the iterates are not stationary points of and part (ii) does not apply to them: gradient descent approaches stationary points of the norm-constrained problem, while Adam keeps moving. In every variant, including the annealed schedule, the order exported from the scores ends 14–20% above the work that iterated local search reaches on the same graph, and a final tangent pass recovers at most 0.6%.
(a)

(b)
Figure 3: Erdős–Rényi graph (n = 1998 after taking the largest component, m = 7938), fixed , unless annealed. (a) per step. (b) Exact work of the sorted scores, in % above the best order found by iterated local search on the same graph; dotted: tangent refinement from the start order. Solid: unnormalized scores; dashed: scores standardized after each step.
I Secondary Analyses on Public Graphs (Not Pre-Registered)
These comparisons were run after the pre-registered analysis, from the saved results and cached graphs, without modifying them. Coloring orders are greedy colorings with vertices processed in reverse smallest-last order (SL) or by descending degree (DEG), with color classes as blocks in ascending or descending color order. A descending order induces the same orientation as the reversal of the ascending one, so the eight orders have at most four distinct work values. ILS-T is ILS from without the tangent prefix, followed by the final tangent pass, with the same budget, seeds and parameters as T+ILS. C+ILS-T is ILS-T started from a coloring order, with its construction charged. Kernel times are medians of seven alternating repetitions of a Numba port of the adaptive-forward lister; they are not the C++ bitmap kernel of our baseline code (0_dove_baseline_and_kernels in the repository). The intervals in Section 6.5 are percentile bootstraps over graphs of the per-graph ratio of median times (seed-1 orders); per-graph intervals paired over the seven repetitions lie entirely below 1 on 15 of 41 graphs (7 of 9 held-out) and above 1 on 9 (1 held-out). Tables 6–8 list the held-out graphs; the corresponding tables for the 32 development graphs are in the repository (2_secondary_analyses_results).
Table 6: Held-out graphs: coloring orders, reduction of work relative to (%; negative = more work), the best variant (rev.: reversed), and the construction time of DEG-desc (s).
| Graph | SL-asc | SL-desc | DEG-asc | DEG-desc | Best | ||
|---|---|---|---|---|---|---|---|
| Email-Eu-core | 230.1k | -9.84 | -26.70 | -5.80 | -28.83 | DEG-asc | 0.00 |
| CollegeMsg | 69.0k | -82.40 | -81.51 | -47.35 | -68.41 | DEG-asc | 0.00 |
| LastFM-Asia | 96.0k | -15.83 | -33.35 | -13.95 | -46.58 | DEG-asc | 0.01 |
| Deezer-Europe | 225.5k | -15.85 | -23.98 | -18.59 | -32.83 | SL-asc | 0.03 |
| Amazon0302 | 1.376M | -22.95 | -17.36 | -22.13 | -24.58 | SL-asc, rev. | 0.35 |
| Wiki-Talk | 57.386M | -1.53 | -316.27 | -1.84 | -324.29 | SL-asc | 1.81 |
| com-Youtube | 21.995M | -16.54 | -76.42 | 2.11 | -89.04 | DEG-asc | 1.29 |
| web-Google | 16.783M | -24.38 | -27.60 | -9.65 | -30.41 | DEG-asc | 3.39 |
| roadNet-CA | 861.6k | 9.76 | 9.71 | -11.11 | -11.03 | SL-asc | 1.01 |
Table 7: Held-out graphs: reduction (%) relative to of T+ILS, ILS without the tangent prefix (ILS-T), and ILS-T started from a coloring order (C+ILS-T); mean±SD over seeds 1–3.
| Graph | T+ILS | ILS-T | C+ILS-T (DEG-desc) | C+ILS-T (best) |
|---|---|---|---|---|
| Email-Eu-core | 9.52 | 9.61±0.07 | 9.56±0.05 | 9.76±0.01 |
| CollegeMsg | 21.29 | 21.29±0.00 | 21.18±0.08 | 21.26±0.02 |
| LastFM-Asia | 8.45 | 8.46±0.03 | 8.72±0.02 | 8.38±0.31 |
| Deezer-Europe | 9.34 | 9.39±0.15 | 9.33±0.16 | 9.05±0.17 |
| Amazon0302 | 8.73 | 8.82±0.04 | 8.50±0.02 | 8.73±0.05 |
| Wiki-Talk | 13.04 | 12.26±0.13 | 11.09±0.02 | 11.86±0.09 |
| com-Youtube | 24.43 | 24.63±0.02 | 26.21±0.37 | 28.21±0.00 |
| web-Google | 5.16 | 5.18±0.00 | 3.67±0.06 | 4.46±0.00 |
| roadNet-CA | 33.50 | 33.72±0.01 | 33.10±0.00 | 35.85±0.06 |
Table 8: Held-out graphs: median kernel time of (ms), kernel-time ratios to , and ordering times (s).
| Graph | ms | T | DOVE | T+ILS | |||
|---|---|---|---|---|---|---|---|
| Email-Eu-core | 0.47 | 1.017 | 1.019 | 1.007 | 0.002 | 0.3 | 0.3 |
| CollegeMsg | 0.30 | 0.982 | 0.935 | 0.929 | 0.001 | 0.2 | 0.2 |
| LastFM-Asia | 0.68 | 1.011 | 0.998 | 0.992 | 0.003 | 0.4 | 0.4 |
| Deezer-Europe | 2.36 | 1.014 | 0.993 | 0.990 | 0.011 | 1.9 | 1.9 |
| Amazon0302 | 21.13 | 0.995 | 0.988 | 0.985 | 0.172 | 34.1 | 34.0 |
| Wiki-Talk | 305.94 | 0.984 | 1.006 | 0.974 | 28.890 | 228.8 | 230.5 |
| com-Youtube | 136.12 | 0.941 | 0.927 | 0.912 | 4.567 | 124.1 | 121.6 |
| web-Google | 260.61 | 0.994 | 0.938 | 0.961 | 5.231 | 168.6 | 165.0 |
| roadNet-CA | 46.34 | 0.969 | 0.959 | 0.909 | 0.489 | 130.4 | 130.2 |
J Held-Out Reference with Neigh (Supplementary)
Protocol. This run is not part of the pre-registration. Its analyses were fixed in a protocol file (3_heldout_with_neigh/SUPP_PROTOCOL.md, hashed in SHA256SUMS.txt) before any held-out Neigh order existed, and it only reads the original results. An amendment, also recorded before any held-out Neigh order existed, moved its execution from the Windows evaluation machine to the Linux machine of the synthetic experiments (2 vCPUs, one thread per run). There, VOLT [50] is built by the route of our baseline code (scripts/setup_volt.sh: a pinned VOLT commit and a reproducibility patch); this build reproduces all 20 stored Neigh orders of the four public development graphs exactly. The graphs are the caches written by the original run and are checked against it (dense-edge SHA-256 and the work of every saved order). A Windows build route prepared for the evaluation machine is documented in the repository but was not used. Neigh uses threshold 0.01 and seeds 1–5 (45 of 45 runs succeeded), each order in both directions. The strengthened reference is the lowest-work order among the original and these ten orders (ties keep ).
Reruns. If , T, DOVE and T+ILS are rerun from with the pre-registered code, seeds and budget rule: T+ILS receives the new DOVE time, measured on the Linux machine. For the five largest changed graphs this time is 21–46% shorter than on the evaluation machine, which likely explains why the reruns from end below the original T+ILS orders on Deezer-Europe, Amazon0302 and roadNet-CA. If , the original runs are reused (1 graph, Wiki-Talk, where every Neigh order is worse). Every new order is verified as in the main run (passed for all 130 supplementary orders).
Results. Against , the original orders reach -1.08% (T), 2.40% (DOVE) and 7.22% (T+ILS; 95% bootstrap interval [3.86, 11.09]%, improved/tied/regressed 9/0/0). The reruns give 4.66% (T), 4.32% (DOVE, which returns its start order on Amazon0302, web-Google and roadNet-CA) and 7.50% (T+ILS; [3.95, 11.53]%; improved/tied/regressed 9/0/0). Wins/ties/losses of T+ILS against DOVE and against T are 9/0/0 and 9/0/0 (sign tests, p = 0.0039 each); Table 9 lists the graphs. Of the 27 T+ILS runs scored against (reruns and reused original runs), 7 ended after B (largest overrun 3.7%, Wiki-Talk). Rescoring them conservatively by a saved order known to exist at B gives 7.43% ([3.91, 11.42]%), and T+ILS still beats DOVE and T on all nine graphs (9/0/0 each, two-sided p = 0.0039); dropping only their final pass gives 7.44%. As in Appendix F, these are rescorings of saved orders, not reruns with an enforced deadline.
Interpretation. Rescoring the original orders isolates the effect of the stronger reference (14.83% → 7.22%). The reruns additionally change the start order, the machine and the budgets, so the difference between 7.22% and 7.50% does not estimate the benefit of restarting from Neigh, and these comparisons do not establish hardware-independent superiority of a time-limited optimizer. A per-run table in the repository (3_heldout_with_neigh/results_linux/supp_runs.csv) marks each record as original-order rescoring, Linux rerun or reused evaluation-machine run; each T+ILS run scored against also lists its budget, times and strict-cutoff incumbent.
Kernel time. Kernel times were measured on the Linux machine (21 alternating repetitions; geometric mean over graphs of the per-graph paired ratios). T+ILS relative to : 1.0102 ([0.9954, 1.0245]; work ratio 0.9229). The original T+ILS orders relative to the original : 1.0138 ([0.9751, 1.0561]; work ratio 0.8466), whereas the evaluation machine measured 0.9615 ([0.938, 0.984]) for the same orders (Section 6.5). The held-out kernel-time gain was therefore not reproduced on a second machine, and there is none against .
Table 9: Supplementary held-out run with Neigh (not pre-registered). : winning reference candidate; Gap: reduction of relative to the original (%); Original: original T+ILS orders relative to ; Rerun: methods rerun from (%), relative to ; T+ILS mean±SD over three seeds). Reruns on the Linux machine; : , original evaluation-machine runs reused.
| Graph | Original | Rerun from | ||||
|---|---|---|---|---|---|---|
| Gap | T+ILS | T | DOVE | T+ILS | ||
| Email-Eu-core | Neigh3 | 6.51 | 3.22 | 3.17 | 3.26 | 3.50±0.01 |
| CollegeMsg | Neigh4-rev | 18.82 | 3.04 | 2.86 | 2.75 | 3.07±0.00 |
| LastFM-Asia | Neigh2 | 2.74 | 5.88 | 4.22 | 4.57 | 6.01±0.19 |
| Deezer-Europe | Neigh5 | 4.34 | 5.23 | 3.25 | 3.53 | 4.92±0.02 |
| Amazon0302 | Neigh1-rev | 6.18 | 2.72 | 0.39 | 0.00 | 2.39±0.05 |
| Wiki-Talk | Degree | 0.00 | 13.04 | 11.48 | 10.97 | 13.04±0.02 |
| com-Youtube | Neigh3-rev | 13.61 | 12.52 | 15.61 | 13.78 | 16.14±0.01 |
| web-Google | Neigh3-rev | 4.08 | 1.13 | 0.93 | 0.00 | 1.39±0.00 |
| roadNet-CA | Neigh3-rev | 18.72 | 18.18 | 0.05 | 0.00 | 17.07±0.00 |
| Mean | 8.33 | 7.22 | 4.66 | 4.32 | 7.50 | |
K Budget Curve
To check that the advantage of T+ILS does not depend on the single 200-step schedule, we ran, on the four public development graphs, DOVE with 25, 50, 100, 200 and 400 steps (the temperature is annealed over the steps) from the same , and gave T+ILS the measured DOVE time at each step count (DOVE: one run, seed 7; T+ILS: three seeds; Linux machine, one thread; Table 10). T+ILS is ahead at every budget on every graph and seed, and T+ILS with the 25-step budget (one sixth to one eighth of the default time) is ahead of DOVE with 400 steps on all four graphs. DOVE is not monotone in its schedule (GitHub: 4.15% at 200 steps, 2.38% at 400).
Table 10: Budget curve: reduction (%) relative to with DOVE at 25–400 steps and T+ILS at the matched measured time (mean of three seeds).
| Graph | 25 | 50 | 100 | 200 | 400 | |
|---|---|---|---|---|---|---|
| Bitcoin-Alpha | DOVE | 6.02 | 8.30 | 8.86 | 9.07 | 9.10 |
| T+ILS | 9.30 | 9.40 | 9.45 | 9.49 | 9.51 | |
| (s) | 0.04 | 0.08 | 0.15 | 0.29 | 0.60 | |
| P2P-Gnutella05 | DOVE | 2.31 | 2.77 | 2.86 | 2.83 | 2.87 |
| T+ILS | 3.74 | 4.27 | 4.60 | 4.85 | 4.85 | |
| (s) | 0.08 | 0.16 | 0.32 | 0.64 | 1.23 | |
| Loc-Brightkite | DOVE | 5.93 | 7.75 | 8.39 | 8.62 | 8.66 |
| T+ILS | 9.05 | 9.13 | 9.33 | 9.43 | 9.52 | |
| (s) | 0.62 | 0.94 | 1.91 | 3.68 | 7.28 | |
| GitHub | DOVE | 0.00 | 3.53 | 4.01 | 4.15 | 2.38 |
| T+ILS | 6.36 | 6.37 | 6.39 | 6.40 | 6.42 | |
| (s) | 0.62 | 1.31 | 2.46 | 4.84 | 9.59 |
L A Second Concave Objective: Minimum-Entropy Orientation
Minimum-entropy orientation [19] assigns each edge to one endpoint and minimizes the entropy (in bits) of the load distribution . With the forward-degree vector of an order, the objective is with and . It is continuous and concave on , so some order attains the minimum. Its derivative is finite for but , and every order has vertices of forward degree zero (its sinks), so Theorem 2, which needs a finite supergradient, does not apply as stated. The following boundary extension restricts the tangent step to the face on which zero loads stay zero.
Proposition 13 (Tangent step with zero loads). Let with continuous and concave on and differentiable on . Let for an order , , and for . Let list by ascending , followed by in -order, and let
Then and .
Proof. Z is independent, because the earlier endpoint of any edge has positive forward degree. In every vertex of Z comes after all its neighbors, so has , each edge between U and Z is charged to its endpoint in U, and each edge inside U is charged to its endpoint with smaller a. Hence equals the two sums subtracted in . This is the minimum of over the face , on which every edge between U and Z puts its whole unit on its endpoint in U and every edge inside U contributes at least ; x lies on this face, so . For , concavity of f on and differentiability at give for all . Summing over U and using gives .
No infinite quantity enters . Our implementation realizes by giving zero-load vertices the key and breaking ties by the current rank, and it accepts a step only on a strict decrease of . For the relaxation, after isolated vertices are removed, every finite score vector gives positive soft degrees, where is differentiable, so Theorem 7(ii)–(iii) apply on this open domain; (ii) yields a global maximizer over by continuity. The greedy algorithm analyzed by Cardinal et al. [19] (additive error at most bits, which is tight; they also give a different linear-time algorithm within one bit) repeatedly takes the vertex covering most uncovered edges, which is itself an order. We compare random orders, tangent refinement from them, greedy, tangent refinement from greedy, and Adam on the unconstrained pairwise-logistic relaxation at fixed (3000 steps, learning rate 0.05, initial scores i.i.d. ), rounded by sorting and then refined; three seeds.
As Theorem 7 predicts, the relaxation only saturates. With initial scores and it starts nearly saturated (on Bitcoin-Alpha, seed 1, numerical estimates of are at step 0 and at the end; see Appendix H for their limits); on all four graphs the gradient norm falls by more than three orders of magnitude while the score range keeps growing, and the rounded orders end 0.05–0.14 bits above greedy, which tangent refinement barely changes. From near-uniform scores ( , Bitcoin-Alpha, three seeds) the dynamics are visible: the estimate of falls from 0.18 to within 100 steps and below numerical resolution afterwards, the gradient norm falls from 0.92 to , and the rounded order (8.356 bits, 8.355 after refinement) is as good as greedy (8.357). Saturation thus says nothing about the quality of the rounded order, in either direction, which is the content of Theorem 7(iii). Tangent refinement alone brings random orders to within 0.06–0.19 bits of greedy in 9–19 sorts, and the greedy order is a fixed point of this step on every graph: and exactly (a zero gap is not a certificate of global optimality; Appendix A). These comparisons concern the interpretation of gradients and certificates; they do not establish a better entropy optimizer than greedy.
Table 11: Minimum-entropy orientation: entropy of the load distribution (bits; lower is better), mean of three seeds where random. +T: after tangent refinement of the order to its left; Relax.: relaxation from initial scores, rounded by sorting.
| Graph | n | m | Random | +T | Greedy | +T | Relax. | +T |
|---|---|---|---|---|---|---|---|---|
| Bitcoin-Alpha | 3,783 | 14,124 | 9.87 | 8.46 | 8.357 | 8.357 | 8.423 | 8.419 |
| P2P-Gnutella05 | 8,846 | 31,839 | 12.14 | 11.50 | 11.311 | 11.311 | 11.455 | 11.453 |
| GitHub | 37,700 | 289,003 | 13.15 | 11.33 | 11.270 | 11.270 | 11.319 | 11.316 |
| Loc-Brightkite | 58,228 | 214,078 | 13.89 | 12.88 | 12.766 | 12.766 | 12.845 | 12.839 |
M Degree-Preserving Null Ensembles
Network-motif analysis compares the number of triangles and other small subgraphs in a network with an ensemble of randomizations that preserve every vertex degree [5, 60]. For each of the four public development graphs we drew five such randomizations by double-edge swaps (10m successful swaps, at most 100m attempts, NetworkX [34]; degree sequences checked) and measured the work of ascending and descending degree, Split (better direction), smallest-last, and T+ILS with a 1 s budget from the best of these orders (seed 1; Linux machine). Table 12 also reports the limit of Theorem 8 for ascending and descending degree, evaluated for the empirical degree distribution (4 quadrature nodes per class), although these distributions violate its bounded-degree assumption. This analysis is exploratory and not pre-registered; ten successful swaps per edge and five randomizations need not give equilibrated, independent samples from the uniform null, and the graphs are not biological networks.
The limit matches the sampled work to within 0.3% on P2P-Gnutella05 and 4.3% on Loc-Brightkite, but overestimates it by 18–26% on Bitcoin-Alpha and 29–97% on GitHub. The error grows with the ratio of the maximum degree to the structural cutoff [13], beyond which a simple graph cannot keep the degrees of adjacent vertices independent, as the configuration model assumes. The V-shaped Split order beats ascending degree by 9.8% on P2P-Gnutella05, as the limit predicts (V layout: 9.4% below ascending), but by only 0.5% on Bitcoin-Alpha and 1.6% on Loc-Brightkite, and it is 1.9% worse on GitHub. On every ensemble, T+ILS removes 16.5–31.4% of the work of the best degree-based or degeneracy order, so the gain from looking beyond degree is not an artifact of the structure of the original networks. Here each randomization is optimized separately; Appendix N tests whether one optimized order can be reused along a chain of randomizations.
Table 12: Degree-preserving null ensembles (five randomizations): mean work () of ascending (Asc) and descending (Desc) degree, sampled and limit (MF) values, Split (better direction), smallest-last (SL), and T+ILS with 1 s (reduction relative to the best of the standard orders, %). .
| Graph | r | Asc | MF | Desc | MF | Split | SL | T+ILS |
|---|---|---|---|---|---|---|---|---|
| Bitcoin-Alpha | 3.04 | 87.8 | 104.0 | 152.4 | 191.8 | 87.4 | 95.4 | 68.1 (21.9) |
| P2P-Gnutella05 | 0.35 | 98.5 | 98.7 | 120.9 | 121.2 | 88.9 | 128.9 | 61.0 (31.4) |
| Loc-Brightkite | 1.73 | 1,407.5 | 1,456.4 | 2,466.2 | 2,571.9 | 1,384.8 | 1,491.3 | 1,040.8 (24.8) |
| GitHub | 12.44 | 3,563.8 | 4,606.4 | 6,409.5 | 12,655.8 | 3,632.3 | 3,707.2 | 2,977.6 (16.5) |
N Reusing Orders along a Null-Model Chain
Design (pre-registered). Motif analysis lists triangles on many samples of a degree-preserving null model [60]; consecutive samples of a double-edge-swap chain are related graphs with fixed vertex identities. The protocol (hypotheses, claim rules, policies and analysis) was frozen with a checksum before any full run; an earlier pilot on three of the graphs is disclosed in it. For each of eight graphs (Bitcoin-Alpha, P2P-Gnutella05, Loc-Brightkite, GitHub, and the held-out Email-Eu-core, CollegeMsg, LastFM-Asia, Deezer-Europe, i.e., the four held-out graphs with at most 100k edges; only their degree sequences are used, and the pre-registered held-out analysis is unaffected) and two chain seeds, we run 10m successful swaps of burn-in and then 20 frames (samples) separated by successful swaps, , which change on average 0.2, 2.0, 18.0, 83.1 and 94.8% of the edges per frame (80 runs, 1,600 frames). Frame 0 is optimized once by T+ILS (100 s per edge, 2–60 s), which removes 5.0–13.3% of the work of the fresh cheap reference (the best of Natural, Random, Degree, Core, smallest-last, Split and Check, each in both directions; all of its construction and evaluation time is charged). On frames we compare: ascending degree (Asc); (Cheap); Cheap followed by tangent refinement (Cheap+T); the frame-0 order unchanged (Frozen); the previous frame's order repaired by tangent refinement (Reuse+T); the same repaired by ILS without tangent passes for exactly the time Reuse+T took, at least 1 ms (Reuse+ILS); fresh T+ILS from (10 s per edge, at least 0.5 s); and fresh Neigh, with and without T (frames 5, 10, 15, 20). As an incremental counting comparison, which maintains the number of triangles rather than listing them and so serves only count-based applications, we maintain the triangle count along the chain, updating it for each swap from the common neighborhoods of the four affected edges (Inc) [55]. The metric is , averaged over 20 frames and both seeds. Every order is checked by listing: the number of candidate tests equals and the triangle counts agree across all orders and with Inc in all 1,600 frames. Ordering times of the deterministic policies, build and listing times (the marker kernel, a Numba port of the adaptive lister that holds one forward set in a marker array, median of five alternating repetitions; and a kernel whose candidate test is an open-addressing hash probe, median of three) come from a separate single-process timing pass on the saved orders.
Work. Table 14, Figure 4. (H1, passed) Tangent refinement of a fresh cheap order reduces work in all 40 configurations (4.5–12.0%, mean 8.4%). (H2, failed) Reuse beats it only when very few edges change: at s = 0.001 Reuse+T is better on 8/8 graphs (one-sided sign test, as the protocol specifies, p = 0.0039; two-sided p = 0.0078; 10.1% vs. 8.4%), but at s = 0.01 only on 1/8, and at it is more than half a point worse on every graph (4.0% vs. 8.4% at s = 10): repairing a stale order by tangent refinement stops at a worse fixed point than refining a fresh cheap order, and the gap accumulates along the chain. The frozen order decays quickly and is worse than itself from on. (H3, passed) At Reuse+T is within 0.7 points of fresh T+ILS on all eight graphs at lower ordering time. (H4, passed) Over all frames and spacings, the per-graph median ordering time of Reuse+T is 0.07–0.21 times that of computing . (P2) At matched time, tangent repair beats ILS repair in all 40 configurations (wins/ties/losses 40/0/0); in the time a tangent repair takes, ILS gets only 1–143 chunks of 256 proposals (median 7). Fresh Neigh gains only 1.7% over on these samples (8.6% after T).
Time. Table 15. (H5) No configuration shows a wall-clock gain: per frame, ordering plus building plus listing with Reuse+T takes 1.50–2.55 times as long as with ascending degree at and up to 9.75 times at , so the frame-0 optimization never pays off. With the marker kernel the listing time barely depends on (within-frame slope at most 6.0 ns per candidate test; within on Bitcoin-Alpha, Loc-Brightkite and GitHub and on Email-Eu-core and CollegeMsg); with a hash-probe test it is 4.3–8.5 ns over individual graph-spacing configurations (Table 15 gives per-graph medians). Ordering beyond a degree sort would pay off only if a candidate test cost more than the break-even of 13–69 ns (Reuse+T, ; up to 422 ns at ; 546–3109 ns for Cheap+T). (H6) Updating the count incrementally costs 0.09 (median) of one listing at and 0.71 at , but 4.28, 38.72 and 382.93 times a listing at , 1 and 10: when few edges change, incremental counting is cheaper than relisting. Peak memory per run was at most 459 MB.
Stability. For the carried order, the change of between consecutive frames never exceeded the bounds of Lemma 11 (0 violations in 1,600 transitions), but the bounds are loose (median ratio of bound to actual change 44 for the localized and 872 for the uniform bound).
Post hoc (not pre-registered). Keeping on each frame the better of Reuse+T and Cheap+T and carrying it forward costs 2–14% more time than Cheap+T and gains 1.7, 0.5 and 0.0 points over Cheap+T at , 0.01 and 0.1 (none at , where the reused order is never better).
Table 13: Summary of the order-reuse study. Changed edges: mean fraction of edges changed per frame. : reduction of (%) relative to , mean over the eight graphs of per-graph means. Fresh: fresh T+ILS. Reuse+T/Cheap time: median over the eight graphs of the per-graph ratio of the median ordering time of Reuse+T to that of computing . Inc/list: median over the eight graphs of the per-graph median time of an incremental triangle-count update relative to one listing. Time per frame with Reuse+T is never lower than with ascending degree (Table 15).
| changed edges (%) | Cheap+T | Frozen | Reuse+T | Fresh | Reuse+T/Cheap time | Inc/list | |
|---|---|---|---|---|---|---|---|
| 0.001 | 0.2 | 8.4 | 10.0 | 10.1 | 10.4 | 0.02 | 0.09 |
| 0.01 | 2.0 | 8.4 | 5.6 | 8.2 | 10.3 | 0.06 | 0.71 |
| 0.1 | 18.0 | 8.3 | -8.1 | 5.3 | 10.3 | 0.11 | 4.28 |
| 1 | 83.1 | 8.4 | -12.7 | 4.1 | 10.3 | 0.14 | 38.72 |
| 10 | 94.8 | 8.4 | -12.7 | 4.0 | 10.4 | 0.15 | 382.93 |
Table 14: Order reuse along degree-preserving swap chains: reduction of relative to the fresh cheap reference , mean over 20 frames and two chain seeds; median ordering time per frame (ms); and the median time of the incremental count update relative to one listing (Inc/list). : swaps per frame divided by (0.2%, 2.0% and 94.8% of edges changed per frame on average). Neigh: frames 5, 10, 15, 20 only.
| Graph | ordering (ms) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Cheap+T | Frozen | Reuse+T | Fresh | Neigh | Cheap | Reuse+T | Fresh | Inc/list | ||
| Bitcoin-Alpha | 0.001 | 11.4 | 12.5 | 12.7 | 12.5 | 0.9 | 39.3 | 0.56 | 537 | 0.11 |
| Gnutella05 | 0.001 | 7.0 | 11.5 | 11.7 | 12.4 | 5.7 | 92.4 | 1.73 | 593 | 0.07 |
| Brightkite | 0.001 | 12.0 | 12.6 | 12.7 | 12.9 | -0.4 | 774.9 | 20.56 | 2862 | 0.08 |
| GitHub | 0.001 | 12.0 | 12.2 | 12.3 | 12.1 | -0.5 | 903.2 | 45.61 | 3726 | 0.12 |
| Email-Eu | 0.001 | 4.5 | 5.2 | 5.2 | 5.3 | 1.3 | 27.6 | 0.82 | 527 | 0.16 |
| CollegeMsg | 0.001 | 7.3 | 8.0 | 8.1 | 8.3 | 1.3 | 28.8 | 0.60 | 528 | 0.12 |
| LastFM-Asia | 0.001 | 7.0 | 9.0 | 9.3 | 9.7 | 2.1 | 83.3 | 1.68 | 578 | 0.07 |
| Deezer | 0.001 | 6.0 | 8.9 | 9.2 | 9.9 | 3.1 | 331.7 | 6.90 | 1244 | 0.05 |
| Bitcoin-Alpha | 0.01 | 11.1 | 8.8 | 10.8 | 12.2 | 0.1 | 38.6 | 1.36 | 538 | 0.77 |
| Gnutella05 | 0.01 | 6.8 | 4.4 | 8.0 | 12.1 | 6.0 | 92.2 | 4.06 | 594 | 0.54 |
| Brightkite | 0.01 | 12.0 | 9.3 | 11.6 | 12.8 | -0.4 | 773.7 | 48.54 | 2872 | 0.64 |
| GitHub | 0.01 | 12.0 | 10.2 | 11.5 | 12.2 | -0.4 | 892.8 | 102.87 | 3760 | 1.03 |
| Email-Eu | 0.01 | 4.6 | 2.9 | 4.5 | 5.4 | 1.2 | 28.1 | 2.72 | 526 | 1.03 |
| CollegeMsg | 0.01 | 7.1 | 5.1 | 7.0 | 8.1 | 1.4 | 30.5 | 1.84 | 528 | 0.85 |
| LastFM-Asia | 0.01 | 7.2 | 2.9 | 6.3 | 9.6 | 1.5 | 80.0 | 3.52 | 583 | 0.57 |
| Deezer | 0.01 | 6.0 | 1.4 | 5.5 | 9.8 | 3.3 | 323.7 | 16.23 | 1240 | 0.46 |
| Bitcoin-Alpha | 10 | 11.6 | -1.7 | 9.2 | 12.9 | 0.9 | 38.4 | 3.61 | 537 | 412.69 |
| Gnutella05 | 10 | 6.8 | -30.1 | -1.8 | 12.0 | 6.1 | 93.2 | 9.70 | 591 | 232.53 |
| Brightkite | 10 | 11.9 | -5.9 | 8.8 | 12.7 | -0.3 | 780.2 | 141.45 | 2886 | 353.18 |
| GitHub | 10 | 12.0 | 3.5 | 10.8 | 12.1 | -0.5 | 882.1 | 248.15 | 3711 | 673.69 |
| Email-Eu | 10 | 4.5 | -6.1 | 2.5 | 5.4 | 1.4 | 28.8 | 6.66 | 526 | 715.64 |
| CollegeMsg | 10 | 6.9 | -6.8 | 4.4 | 8.0 | 1.3 | 30.0 | 5.25 | 529 | 460.66 |
| LastFM-Asia | 10 | 7.1 | -22.5 | 1.1 | 9.7 | 1.8 | 79.8 | 10.01 | 581 | 243.14 |
| Deezer | 10 | 6.1 | -32.4 | -2.8 | 9.9 | 2.7 | 332.6 | 38.86 | 1244 | 226.31 |
Table 15: Listing time and break-even probe cost. List: median listing time of the Asc and Reuse+T orders (marker kernel). : within-frame slope of listing time on (ns per candidate test; within in parentheses), median over the five spacings, for the marker and the hash-probe kernel. : median break-even cost per candidate test at which Reuse+T's extra ordering time equals its saved tests. Last columns: mean per-frame time (ordering, building and listing) of Reuse+T relative to Asc, with a 95% bootstrap interval, as the protocol specifies, from resampling the 40 frames (20 per chain, two chains) individually; consecutive frames of a chain are correlated, so these intervals can understate the uncertainty.
| Graph | list (ms) | (ns) | (ns) | time Reuse+T / Asc | ||||
|---|---|---|---|---|---|---|---|---|
| Asc | Reuse+T | marker | hash | s=0.001 | s=10 | s=0.001 | s=10 | |
| Bitcoin-Alpha | 0.42 | 0.43 | -0.0 (0.01) | 6.7 (0.62) | 24 | 216 | 1.60 [1.52, 1.70] | 4.69 [4.40, 4.98] |
| Gnutella05 | 1.10 | 0.93 | 5.3 (0.84) | 7.3 (0.74) | 40 | 338 | 1.50 [1.43, 1.58] | 4.52 [4.34, 4.73] |
| Brightkite | 8.10 | 8.29 | -0.1 (0.00) | 4.9 (0.60) | 50 | 416 | 1.98 [1.88, 2.10] | 7.99 [7.52, 8.49] |
| GitHub | 11.83 | 12.13 | -0.2 (0.01) | 8.4 (0.70) | 69 | 422 | 2.55 [2.40, 2.70] | 9.75 [9.30, 10.21] |
| Email-Eu | 0.60 | 0.58 | 0.4 (0.14) | 7.3 (0.76) | 13 | 122 | 1.77 [1.67, 1.88] | 6.73 [6.24, 7.30] |
| CollegeMsg | 0.48 | 0.47 | 0.6 (0.19) | 6.1 (0.68) | 16 | 174 | 1.60 [1.51, 1.71] | 5.99 [5.56, 6.46] |
| LastFM-Asia | 1.00 | 0.88 | 3.5 (0.79) | 6.1 (0.69) | 37 | 273 | 1.53 [1.47, 1.59] | 5.24 [4.96, 5.57] |
| Deezer | 3.60 | 3.03 | 5.7 (0.86) | 6.9 (0.69) | 52 | 391 | 1.60 [1.53, 1.67] | 4.99 [4.80, 5.19] |

Figure 4: Reduction relative to the fresh cheap reference versus the fraction of edges changed per frame (log scale), for the eight swap chains. Frozen values below are clipped.
O Additional Tables
Table 16: What is prior or classical and what is new.
| Result | Source |
|---|---|
| Adaptive lister; its candidate-test count is , Eq. (1) (time with constant-time membership tests) | Yu et al. [88] |
| Non-adaptive costs: NP-hardness, orders | Lécuyer et al. [50] |
| : Min UnCut connection, UGC inapproximability; over orientations | Lécuyer [49, §5.3.3] |
| Polytope vertices are the orders | Stanley [78] |
| Linear minimization by sorting | Edmonds [26] |
| Tangent step as linearization | Mangasarian [56] |
| Logistic map onto interior (Thm. 7i) | Wainwright and Jordan [84] |
| concave in forward degrees; certified rounding (Thm. 2) | new |
| ; hardness and inapproximability for (Thm. 6) | new |
| Program without acyclicity (Prop. 5b) | new |
| Stationary points are maxima (Thm. 7ii) | new |
| Limit of degree-based orders (Thm. 8) | new |
| Degree loses a constant factor (Prop. 9) | new |
| V-shapes; repair (Sec. 5, App. N) | new, empirical |
Further random-graph results. On the random graphs of Table 18 at , DOVE ends 5.4–19.9 percentage points of reduction short of T+ILS; there T+ILS has about five times DOVE's time, so this shows attainable improvement, not equal-compute dominance. From to the T+ILS reductions fall by 4–5 points on the power laws (Table 22). Greedy-coloring orders never match T+ILS; starting ILS from the pre-declared DEG-desc coloring adds 0.1–1.1 points at (Table 22) but not on public graphs (Section 6.5).
Tables. Table 16 separates prior ingredients from new results. Table 17 gives the excess work over the certified optimum (Section 6.1) and Table 18 the random-graph comparison of Section 5. As a correctness check, the program of Proposition 5(b) matches brute force on all 1,245 unlabeled graphs with at least one edge on two to seven vertices. Table 20 lists the 32 development graphs, Table 19 summarizes them by group (development, validation and audit), and Table 21 gives the ablation of Section 6.3. Tables 22 and 23 give all columns of the random-graph comparison, and Table 24 the per-seed dispersion of the public-graph ablation: without the tangent prefix, ILS differs by +0.10 points, with per-graph seed SDs of up to 0.33; the differences between insertion variants (0.1–0.5 points) are carried mostly by P2P-Gnutella05.
Table 17: Excess work over the solver-certified optimum on 27 small instances (0.2 s per heuristic run, three seeds). Mean and maximum excess are taken over instances of the seed-mean excess. # optimal: instances on which the seed-mean work equals the optimum, that is, every seed reached it.
| Method | Mean excess | Max excess | # optimal |
|---|---|---|---|
| Reference | 26.0% | 120% | 1 |
| Tangent refinement (T) | 21.1% | 120% | 2 |
| Strict insertion | 10.1% | 80% | 11 |
| T+strict insertion | 10.5% | 80% | 10 |
| Orientation-space search | 2.1% | 25% | 21 |
| Iterated local search (ILS) | 0.0% | 0% | 27 |
Table 18: Reduction of (%) relative to the best-found degree-based order on sampled graphs with (ER: ; PL: erased configuration model with on ), meanSD over five graph seeds; all methods start from that order. T+ILS uses s per edge (about the time of DOVE). Col.: best of four greedy-coloring orders, without search. Table 22 gives , and further variants.
| T | DOVE | T+ILS | Col. | |
|---|---|---|---|---|
| ER8 | ||||
| PL2.1 | ||||
| PL2.5 | ||||
| PL3.0 |
Table 19: Mean work reduction (%) relative to on the 32 development graphs, by group (unweighted means over graphs); T+ILS receives DOVE's measured time on each graph. I/T/R: improved/tied/regressed for T+ILS. All three groups informed the method; none is held out.
| Group | Graphs | DOVE | T | T+ILS | I/T/R |
|---|---|---|---|---|---|
| Development | 13 | 1.67 | 1.63 | 2.20 | 13/0/0 |
| Validation | 11 | 5.09 | 5.22 | 6.11 | 11/0/0 |
| Audit | 8 | 7.72 | 7.88 | 10.83 | 8/0/0 |
| All | 32 | 4.36 | 4.43 | 5.70 | 32/0/0 |
Table 20: The 32 development graphs, all from SNAP [51]; Ego-k is the ego network of user in ego-Facebook. Names follow the repository. Group: stage of development at which the graph was used (all groups informed the method). : reference work; : winning candidate (Neigh-si: stored Neigh order of seed ; rev.: reversed). T, DOVE, T+ILS: reduction (%) relative to ; T+ILS: mean±SD over three seeds. Unweighted means: 4.43 (T), 4.36 (DOVE) and 5.70 (T+ILS).
| Graph | Group | n | m | T | DOVE | T+ILS | ||
|---|---|---|---|---|---|---|---|---|
| CA-CondMat | Development | 23,133 | 93,439 | 316,262 | Neigh-s4, rev. | 3.07 | 3.16 | 4.23±0.00 |
| CA-GrQc | Development | 5,241 | 14,484 | 54,867 | Neigh-s2 | 0.91 | 0.85 | 1.45±0.01 |
| CA-HepPh | Development | 12,006 | 118,489 | 3,821,951 | Neigh-s2 | 2.29 | 2.18 | 2.53±0.00 |
| Ego-0 | Development | 333 | 2,519 | 16,307 | Neigh-s5, rev. | 2.89 | 2.96 | 3.99±0.00 |
| Ego-107 | Development | 1,034 | 26,749 | 624,726 | Neigh-s4, rev. | 1.58 | 1.68 | 1.82±0.01 |
| Ego-1684 | Development | 786 | 14,024 | 201,862 | Neigh-s4 | 1.88 | 2.04 | 2.38±0.01 |
| Ego-1912 | Development | 747 | 30,025 | 1,095,493 | Neigh-s2, rev. | 1.11 | 1.24 | 1.32±0.00 |
| Ego-3437 | Development | 534 | 4,813 | 31,251 | Neigh-s5 | 1.58 | 1.82 | 2.35±0.01 |
| Ego-348 | Development | 224 | 3,192 | 34,870 | Neigh-s4 | 1.83 | 1.87 | 1.98±0.00 |
| Ego-3980 | Development | 52 | 146 | 221 | Neigh-s2 | 1.36 | 1.36 | 1.36±0.00 |
| Ego-414 | Development | 150 | 1,693 | 12,871 | Neigh-s5 | 0.64 | 0.66 | 0.99±0.00 |
| Ego-686 | Development | 168 | 1,656 | 11,657 | Neigh-s5, rev. | 1.66 | 1.96 | 3.17±0.01 |
| Ego-698 | Development | 61 | 270 | 748 | Neigh-s1 | 0.40 | 0.00 | 1.02±0.08 |
| CA-AstroPh | Validation | 18,771 | 198,050 | 2,502,046 | Neigh-s4 | 3.90 | 3.99 | 4.41±0.01 |
| CA-HepTh | Validation | 9,875 | 25,973 | 53,365 | Neigh-s2 | 2.47 | 2.64 | 3.87±0.06 |
| Cit-HepTh | Validation | 27,769 | 352,285 | 4,212,943 | Neigh-s1, rev. | 2.53 | 1.72 | 2.91±0.00 |
| Com-Amazon | Validation | 334,863 | 925,872 | 1,084,032 | Neigh-s5, rev. | 0.57 | 0.00 | 2.44±0.00 |
| Com-DBLP | Validation | 317,080 | 1,049,866 | 3,556,614 | Neigh-s4, rev. | 3.71 | 3.52 | 4.80±0.00 |
| Email-Enron | Validation | 36,692 | 183,831 | 2,158,516 | Neigh-s1 | 10.39 | 10.38 | 10.79±0.00 |
| P2P-Gnutella31 | Validation | 62,586 | 147,892 | 203,725 | Neigh-s2 | 4.23 | 4.75 | 7.62±0.00 |
| Soc-Epinions1 | Validation | 75,879 | 405,740 | 7,985,079 | Neigh-s4 | 12.21 | 11.64 | 12.33±0.00 |
| Soc-Slashdot0811 | Validation | 77,360 | 469,180 | 4,906,888 | Neigh-s4 | 11.21 | 11.32 | 11.55±0.00 |
| Web-NotreDame | Validation | 325,729 | 1,090,108 | 9,563,275 | Neigh-s1, rev. | 0.30 | 0.00 | 0.49±0.00 |
| Wiki-Vote | Validation | 7,115 | 100,762 | 1,891,565 | Neigh-s4 | 5.96 | 6.00 | 6.04±0.00 |
| AS-Caida | Audit | 26,475 | 53,381 | 131,589 | Neigh-s2 | 16.72 | 16.18 | 17.53±0.01 |
| Bitcoin-OTC | Audit | 5,881 | 21,492 | 115,800 | Neigh-s1 | 10.08 | 10.40 | 10.79±0.00 |
| Cit-HepPh | Audit | 34,546 | 420,877 | 3,972,842 | Neigh-s1, rev. | 2.85 | 2.94 | 3.43±0.03 |
| Email-EuAll | Audit | 265,009 | 364,481 | 1,276,904 | Degree | 19.76 | 19.28 | 21.07±0.00 |
| Loc-Gowalla | Audit | 196,591 | 950,327 | 8,631,304 | Neigh-s5 | 10.10 | 9.55 | 10.62±0.00 |
| P2P-Gnutella04 | Audit | 10,876 | 39,994 | 73,280 | Neigh-s2 | 2.98 | 3.38 | 5.09±0.05 |
| RoadNet-PA | Audit | 1,088,092 | 1,541,898 | 395,391 | Neigh-s4, rev. | 0.05 | 0.00 | 17.48±0.12 |
| Web-Stanford | Audit | 281,903 | 1,992,636 | 12,284,557 | Neigh-s1, rev. | 0.54 | 0.00 | 0.63±0.00 |
Table 21: Ablation on the four public development graphs and the synthetic graphs: mean reduction (%) relative to after a final tangent pass; five seeds. Public: 4 graphs, 10 s; synthetic development: 6 graphs, 1 s; synthetic prospective: 9 graphs generated after tuning (3 bipartite with optimum 0), 1 s. The six tuning graphs are separate instances of the development families.
| Method | Public | Synth. dev. | Synth. prosp. |
|---|---|---|---|
| T+strict insertion | 7.48 | 10.82 | 9.68 |
| Strict insertion | 7.37 | 11.06 | 9.52 |
| Orientation-space search | 7.15 | 12.32 | 11.02 |
| ILS | 7.85 | 16.72 | 11.92 |
| T+ILS | 7.75 | 16.51 | 11.75 |
Table 22: Sampled graphs: reduction (%) of the search methods relative to the best-found degree-based order, mean±SD over graph seeds (ER: ). ILS-T: ILS without the tangent prefix. C+ILS-T: ILS-T (Numba kernel, 100 s per edge, one ILS seed per graph) from the DEG-desc coloring order (pre-declared) or from the per-graph best coloring order of Table 23 (selection cost charged); construction charged to the budget.
| C+ILS-T from | |||||
|---|---|---|---|---|---|
| T+ILS | ILS-T | DEG-desc | best coloring | ||
| ER8 | |||||
| PL2.1 | |||||
| PL2.5 | |||||
| PL3.0 | |||||
Table 23: Sampled graphs: reduction (%) of greedy-coloring orders relative to the best-found degree-based order, without search; mean±SD over graph seeds. Greedy coloring with vertices in reverse smallest-last (SL) or descending-degree (DEG) order, color classes ascending or descending (each has the same work as the reversal of the other direction). Best: best of the four by exact work.
| SL-asc | SL-desc | DEG-asc | DEG-desc | Best | ||
|---|---|---|---|---|---|---|
| ER8 | ||||||
| PL2.1 | ||||||
| PL2.5 | ||||||
| PL3.0 | ||||||
Table 24: Public graphs at 10s: reduction (%) relative to after a final tangent pass, mean±SD over five seeds. SI: strict insertion; T+SI: tangent prefix then strict insertion; Orient.: orientation-space search. : ILS minus T+ILS, paired by seed (mean±SD of the five per-seed differences, percentage points).
| Graph | T+SI | SI | Orient. | ILS | T+ILS | |
|---|---|---|---|---|---|---|
| Bitcoin-Alpha | ||||||
| P2P-Gnutella05 | ||||||
| Loc-Brightkite | ||||||
| GitHub | ||||||
| Mean |
Table 25: The 22 small instances without a certified optimum (HiGHS, no warm start; 60s for , 120s otherwise). LB: solver lower bound; MIP UB: solver incumbent objective; MIP order: exact work of the order obtained from the incumbent by tangent rounding; best heuristic: lowest work of any heuristic run (0.2 s, seeds 1–3); ILS: seed mean. Gap: relative bound width ()/, with the lower of the MIP order and the best heuristic run. It upper-bounds the shortfall from optimality as a fraction of the best order's work, ()/; it does not estimate the actual shortfall. Rounding LB up is valid for an exact lower bound because the optimum is an integer; for the solver's floating-point bound it assumes that the numerical error does not cross an integer.
| Instance | LB | MIP UB | MIP order | Best heuristic. | ILS mean | Gap | ||
|---|---|---|---|---|---|---|---|---|
| ws-24-2024 | 24 | 72 | 74.7 | 90 | 90 | 89 | 89.0 | 15.7% |
| ws-32-2032 | 32 | 96 | 81.0 | 113 | 111 | 110 | 110.0 | 26.4% |
| sbm-32-2032 | 32 | 100 | 83.3 | 114 | 114 | 114 | 114.0 | 26.3% |
| geometric-32-2032 | 32 | 84 | 92.0 | 104 | 104 | 104 | 104.0 | 11.5% |
| ws-48-1048 | 48 | 144 | 109.0 | 159 | 159 | 158 | 158.0 | 31.0% |
| sbm-48-1048 | 48 | 253 | 288.0 | 662 | 609 | 562 | 565.7 | 48.8% |
| geometric-48-1048 | 48 | 139 | 157.0 | 199 | 199 | 199 | 199.0 | 21.1% |
| er-48-2048 | 48 | 151 | 120.7 | 169 | 169 | 168 | 168.3 | 28.0% |
| ws-48-2048 | 48 | 144 | 116.3 | 157 | 156 | 154 | 154.0 | 24.0% |
| sbm-48-2048 | 48 | 260 | 259.0 | 698 | 641 | 592 | 594.0 | 56.2% |
| geometric-48-2048 | 48 | 127 | 142.0 | 157 | 155 | 155 | 155.0 | 8.4% |
| er-64-1064 | 64 | 224 | 126.5 | 332 | 302 | 273 | 274.0 | 53.5% |
| ws-64-1064 | 64 | 192 | 160.7 | 224 | 219 | 203 | 203.0 | 20.7% |
| powerlaw-cluster-64-1064 | 64 | 181 | 97.0 | 185 | 185 | 184 | 184.3 | 47.3% |
| sbm-64-1064 | 64 | 457 | 666.0 | 1892 | 1713 | 1450 | 1450.0 | 54.1% |
| geometric-64-1064 | 63 | 206 | 273.0 | 335 | 330 | 317 | 317.0 | 13.9% |
| regular-64-1064 | 64 | 128 | 47.5 | 54 | 54 | 54 | 54.0 | 11.1% |
| er-64-2064 | 64 | 210 | 132.5 | 258 | 254 | 221 | 221.0 | 39.8% |
| ws-64-2064 | 64 | 192 | 163.6 | 234 | 225 | 209 | 209.0 | 21.5% |
| powerlaw-cluster-64-2064 | 64 | 183 | 135.7 | 186 | 186 | 186 | 186.0 | 26.9% |
| sbm-64-2064 | 64 | 454 | 707.0 | 1929 | 1675 | 1505 | 1505.7 | 53.0% |
| geometric-64-2064 | 64 | 185 | 225.0 | 278 | 274 | 267 | 267.0 | 15.7% |