Up-Down Walk on Forests
- Up-Down Walk on Forests is a family of local Markov chains that uses an edge-addition and deletion process on acyclic graph subsets to efficiently sample spanning trees.
- The method leverages both component- and edge-constrained formulations using matroid exchange techniques to achieve provable mixing guarantees and near-linear sampling times.
- The Balanced Up-Down (BUD) walk extends the framework by enforcing strict population balance in redistricting, though its quantitative convergence rates remain an open challenge.
The up-down walk on forests is a family of local Markov chains on acyclic edge sets of a graph, typically realized by adding an edge and then deleting an edge so that the state remains a forest. In redistricting applications, the underlying graph encodes geographic building blocks, and random spanning trees or forests are split into connected subgraphs that serve as districts. The central difficulty is balance: districts must have nearly equal population, whereas naive rejection based on random tree splittings becomes exponentially inefficient in the number of parts. Recent work formulates a balance-preserving variant, the Balanced Up-Down (BUD) walk, while earlier matroidal analyses establish sharp mixing guarantees and near-linear-time implementations for unconstrained down-up walks on forest state spaces (Akitaya et al., 12 Feb 2026, Anari et al., 2020).
1. Formal state spaces and transition rules
One standard formulation fixes the number of connected components. For a connected graph with , let be the set of all spanning forests of with exactly connected components. Equivalently, these are bases of the rank- truncation of the graphic matroid. From a forest , the original Up-Down walk picks uniformly at random an edge , adds it to , obtains a unique cycle in 0, chooses uniformly at random an edge 1, and deletes 2. The resulting forest 3 again lies in 4. The one-step transition matrix satisfies
5
Because this is the usual basis-exchange walk on a matroid, it is irreducible and aperiodic on 6, reversible, and has the uniform distribution on 7 as its unique stationary distribution. In this formulation it mixes in 8 steps, and each step can be implemented in amortized 9 time, yielding an 0-time algorithm to sample a random forest in 1 (Akitaya et al., 12 Feb 2026).
A second formulation fixes the number of edges rather than the number of components. For a graph 2 with graphic matroid 3, let 4, the family of rank-5 independent sets of 6. The target law may be uniform or weighted: 7 and can also be extended to all forests by
8
The down-up chain on 9 removes a uniformly random edge 0, forming 1, then adds an edge 2 with probability proportional to 3 in the unweighted case and to 4 in the weighted case. Detailed balance is immediate, and the main spectral result gives 5, equivalently 6, with mixing time 7. Using dynamic forest data structures such as link-cut trees, each step can be implemented in 8 time, for total runtime 9; for spanning trees in a sparse graph this becomes 0 (Anari et al., 2020).
These formulations are closely related but not identical. The component-constrained walk is the one used most directly in balanced partition generation, while the edge-constrained walk is the setting in which the strongest general mixing and implementation guarantees are presently available.
2. Balanced splittability and the BUD walk
The balance constraint is imposed on spanning trees rather than arbitrary forests. Fix an integer 1 and tolerance 2. A spanning tree 3 of 4 is 5-balanced 6-splittable if there exist 7 edges whose removal produces 8 connected components, each with total population in
9
where 0 are vertex weights and 1. The state space of the Balanced Up-Down walk is denoted 2, the set of 3-balanced 4-splittable spanning trees (Akitaya et al., 12 Feb 2026).
From 5, the BUD kernel draws a uniformly random edge 6, forms the unique cycle 7 in 8, and then restricts deletion to those 9 for which 0 remains in 1. Among those admissible edges, 2 is chosen uniformly, and 3 becomes the next state. By symmetry,
4
so the uniform distribution on 5 is stationary; if the chain is irreducible, this stationary law is unique (Akitaya et al., 12 Feb 2026).
The motivation is algorithmic as well as statistical. In tree-based redistricting, one seeks a large ensemble of random graph partitions by drawing and splitting random spanning trees. Under exact or near-exact population balance, rejection sampling from unconstrained tree or forest walks becomes inefficient: the rejection rate needed to maintain balance grows exponentially with the number of parts. ReCom circumvents this barrier by merging and splitting pairs of districts at a time, which runs fast in practice, but it can have trouble exploring the state space. BUD addresses both issues by preserving splittability at every step and by sampling from a known invariant measure under exact balance (Akitaya et al., 12 Feb 2026).
A common misunderstanding is that balance can be appended as a minor accept-reject correction to any local forest walk without materially changing the chain. The available results point in the opposite direction: once balance is enforced, the admissible state space and the move set become the primary mathematical objects.
3. Stationarity, irreducibility, and mixing phenomena
For the unconstrained basis-exchange walk on 6, irreducibility and aperiodicity are automatic consequences of matroid exchange, and reversibility gives a uniform stationary distribution (Akitaya et al., 12 Feb 2026). The constrained BUD walk is more delicate. Under exact balance, 7, every tree 8 has a unique set of 9 split edges; writing this edge set as 0, two trees 1 with the same induced partition 2 satisfy an internal rearrangement lemma: one can go from 3 to 4 in at most 5 BUD steps while staying within 6 at each step (Akitaya et al., 12 Feb 2026).
Irreducibility is proved in several special cases. For 7 on simple grid graphs, if 8 is a simply connected subgraph of the square lattice whose boundary is a simple cycle and 9, then BUD is irreducible on the set of trees that split into components of sizes 0 and 1, and the diameter is 2. The proof sketch represents each tree by its “column-components,” eliminates “sandwiched leaves” by local BUD moves, and rotates the boundary transition until any two partitions coincide. For triomino tilings, if 3 is an 4 rectangle with 5 and 6, then BUD is irreducible on 7; the proof sketch reduces any 8-omino tiling to the all-horizontal tiling in 9 BUD moves by a finite case analysis on the first non-horizontal cell. At the same time, irreducibility fails in general: there exists an induced grid graph with holes and cut-vertices on which BUD is not irreducible, even for 0 (Akitaya et al., 12 Feb 2026).
No rigorous mixing-time bound is yet known for BUD. Empirically, its autocorrelation behavior is similar to the unconstrained Up-Down walk. This leaves a characteristic asymmetry in the theory: the invariant law is explicit, and irreducibility is established in several regimes, but general quantitative convergence remains open (Akitaya et al., 12 Feb 2026).
The literature therefore distinguishes sharply between two questions that are often conflated: whether the chain is connected on the constrained state space, and how rapidly it mixes once connected. For BUD, the former is partially resolved, the latter is not.
4. Deciding approximate splittability and the hardness of conditional sampling
The key algorithmic subroutine for BUD is the decision problem of whether a given tree is 1-balanced 2-splittable. In the formulation called TAPP, the input is a tree 3 with vertex weights summing to 4, an integer 5, and a tolerance 6; the question is whether 7. This decision problem is solvable in polynomial time (Akitaya et al., 12 Feb 2026).
The algorithmic basis is a dynamic program due to Ito–Uno–Zhou–Nishizeki (2008). Root 8 at an arbitrary vertex. For each vertex 9 and 00, define 01 to be the set of possible surplus weights of the partial district containing 02 if one partitions the subtree 03 into 04 valid districts plus one leftover piece. To keep these sets polynomially bounded, replace 05 by its 06-closure 07, which is a union of 08 intervals. The recursion combines children by taking Minkowski sums of their 09 sets, cropping to 10, and then applying 11-closure again. At the root, one checks whether 12. The naive runtime is 13 (Akitaya et al., 12 Feb 2026).
The improved analysis proves that for any 14, 15 has at most 16 connected components. Amortizing interval merges yields an 17 runtime in general, and 18 when 19. The underlying reason is that near leaves the number of connected components is proportional to subtree size, so expensive merges occur only near the root (Akitaya et al., 12 Feb 2026).
Counting and conditional sampling are harder. Fix 20 and an edge 21. Computing the probability that a uniformly random 22-balanced 23-partition of 24 cuts 25 is 26-complete. The proof reduces from counting 27 Knapsack solutions by constructing a caterpillar tree whose leaf branches have weights proportional to item sizes 28, together with two large root branches; then the probability that 29 is split equals
30
This hardness result explains why the natural edge-by-edge sampling strategy—deciding at each step whether to remove or contract an edge according to the correct conditional probability—does not yield an efficient exact sampler, even after splittability has been decided (Akitaya et al., 12 Feb 2026).
5. Empirical behavior on grids and redistricting instances
Empirical tests in the BUD study serve two distinct purposes: validating the invariant law on small instances and comparing autocorrelation behavior against alternative partition samplers on larger ones (Akitaya et al., 12 Feb 2026).
On the 31 grid with 32 under exact balance, BUD exactly recovers the uniform splittable-tree distribution. On the 33 grid with 34, where districts have size 35 or 36, the Cycle Walk fails to connect all partitions, but BUD mixes rapidly, with total-variation distance tending to 37. On the 38 grid with 39, under their respective natural target measures, BUD makes approximately 40 “internal” proposals, meaning proposals within a part, and 41 “external” proposals, meaning proposals spanning cuts. When the Cycle Walk is tuned to the same 42- versus 43-tree frequencies, BUD’s autocorrelation on key observables decays roughly twice as fast per non-internal step, and its effective sample rate is approximately 44 higher, although the per-iteration cost is approximately 45 larger in unoptimized code (Akitaya et al., 12 Feb 2026).
A separate comparison considers the unconstrained Up-Down walk and BUD on an 46 grid with 47, using tree diameter as the observable. Their autocorrelations and effective sample rates are nearly identical for this metric, despite BUD’s much smaller state space. This suggests that the balance constraint need not degrade local mixing behavior on all observables, although no theorem currently formalizes that observation (Akitaya et al., 12 Feb 2026).
In North Carolina redistricting with 48 districts and 49 tolerance, BUD, which is uniform on splittable trees, is compared with Linked-Forest ReCom, which is uniform on forests. The ordered distribution of 2020 Presidential vote share in each district is tracked. Both chains converge to similar marginals, and BUD has comparable mixing. Under its stationary measure, BUD tends to produce more cut edges, hence less “compact” trees, than uniform-forest ReCom; this is reported as expected from the stationary laws (Akitaya et al., 12 Feb 2026).
These experiments do not constitute a general mixing theorem, but they delineate the tradeoff that currently defines the method: stronger structural control over balance, at the cost of a more expensive move.
6. Dense random graphs, rejection sampling, and the ReCom comparison
A complementary line of work studies the up-down walk on balanced forests in dense random graphs. Here the state space is
50
From 51, the chain picks uniformly an edge 52 joining two distinct components of 53, adds it to obtain a forest with 54 components, then removes a uniformly random edge 55 from the resulting forest. There are no further Metropolis-Hastings rejections. The chain is irreducible and aperiodic on 56, and its unique stationary distribution is uniform over 57 (Gillman et al., 17 Jul 2025).
For fixed 58, the quoted mixing bound is
59
with spectral gap 60 for some absolute 61. This leads to a rejection sampler for balanced forests: run the chain for 62 steps to near stationarity, test whether each of the 63 connected components has exactly 64 vertices when 65, and restart otherwise. If
66
then the expected number of restarts is 67 (Gillman et al., 17 Jul 2025).
The key bridge to tree splittings is an equivalence between balanced 68-forests and 69-splittable spanning trees. Let
70
and let 71 denote the probability that a uniform random 72-forest under the up-down walk is balanced. For constant 73,
74
with explicit bounds
75
In the dense random graph model 76, with 77, 78, and 79, the splitting probability satisfies
80
and consequently 81. The same conclusion transfers to 82 under the same density assumption and conditioning on connectedness. In that regime, the rejection sampler runs in overall polynomial time (Gillman et al., 17 Jul 2025).
The comparison with ReCom is explicit. ReCom-style chains choose two adjacent districts, recombine them into one region, sample a uniform spanning tree of that region, and split it by removing one edge. The dense-random-graph analysis emphasizes three limitations: the state space can be disconnected when perfect balance is enforced, no general polynomial-time mixing-time bound is known, and even allowing slack of one node per district can lead to exponentially small acceptance probabilities when splitting. By contrast, the up-down walk on 83 is irreducible and aperiodic for every graph, and when balanced forests occur with inverse-polynomial probability—as they do in dense random graphs—it yields a provably polynomial-time approximate sampler for balanced forests under the spanning-tree weight (Gillman et al., 17 Jul 2025).
The resulting picture is nuanced rather than uniform. Unconstrained up-down walks on forest state spaces are among the best-understood local samplers in this area; balance-preserving variants such as BUD repair the rejection barrier and some irreducibility failures of pairwise recombination methods, but they shift the main open problems toward constrained connectivity and quantitative mixing.