Papers
Topics
Authors
Recent
Search
2000 character limit reached

Uniform Sampling of Proper Graph Colorings via Soft Coloring and Partial Rejection Sampling

Published 5 Apr 2026 in cs.DS, cs.CC, and math.PR | (2604.03947v1)

Abstract: We present a new algorithm for the exact uniform sampling of proper (k)-colorings of a graph on (n) vertices with maximum degree~(Δ). The algorithm is based on partial rejection sampling (PRS) and introduces a soft relaxation of the proper coloring constraint that is progressively tightened until an exact sample is obtained. Unlike coupling from the past (CFTP), the method is inherently parallelizable. We propose a hybrid variant that decomposes the global sampling problem into independent subproblems of size (O(\log n)), each solved by any existing exact sampler. This decomposition acts as a {\em complexity reducer}: it replaces the input size~(n) with (O(\log n)) in the component solver's runtime, so that any improvement in direct methods automatically yields a stronger result. Using an existing CFTP method as the component solver, this improves upon the best known exact sampling runtime for (k>3Δ). Recursive application of the hybrid drives the runtime to (O(L{\log* n}\cdot nΔ)), where (L) is the number of relaxation levels. We conjecture that (L) is bounded independently of~(n), which would yield a linear-time parallelizable algorithm for general graphs. Our simulations strongly support this conjecture.

Authors (2)

Summary

  • The paper introduces γ-soft coloring and PRS to achieve parallel exact uniform sampling of proper graph colorings.
  • It decomposes the global coloring task into smaller, independent subgraphs of size O(log n) for efficient concurrent resolution.
  • Empirical results show up to two orders of magnitude improvement with bounded γ-levels, ensuring robust performance for dense graphs.

Uniform Sampling of Proper Graph Colorings via Soft Coloring and Partial Rejection Sampling

Introduction and Motivation

The paper addresses the challenge of perfect, exact uniform sampling of proper kk-colorings on general graphs with nn vertices, maximum degree Δ\Delta, and coloring constraint kf(Δ)k \geq f(\Delta), aiming for practical, parallelizable algorithms. Traditional approaches such as Coupling From The Past (CFTP) [PW96, MH96] are fundamentally sequential, posing a significant barrier to exploiting parallel computation architecture. Partial rejection sampling (PRS) [GJL17] offers inherent parallelizability but degenerates into naïve rejection sampling when applied directly to coloring due to the lack of any always-'safe' states. The current work overcomes this barrier by introducing a novel "soft coloring" relaxation, yielding the first genuinely parallelizable, practical PRS-based method for exact uniform sampling of proper colorings on general graphs.

γ\gamma-Soft Coloring: Framework and Algorithmic Structure

The central innovation is the definition of γ\gamma-soft coloring: each vertex is augmented with a continuous auxiliary variable UvUnif(0,1)U_v \sim \mathrm{Unif}(0,1). New "passive states" are defined such that UvγdvU_v \leq \gamma^{d_v} for vertex vv of degree dvd_v, ensuring that certain vertices cannot ever become 'bad' (i.e., their coloring will not lead to a coloring constraint violation). This property was unattainable in standard, ‘hard’ coloring formulations. The parameter nn0 interpolates between the trivial measure (nn1; unconstrained) and the hard coloring constraint (nn2; exact proper coloring).

The sampling approach combines PRS applied at a chosen nn3-level, iteratively reducing nn4 whenever a configuration is not yet proper, with recursive or hybrid decompositions of the coloring space. Each iteration constructs a resampling set expanded from bad vertices only through non-passive vertices, which are proved to form small, independent connected components for appropriate nn5. This enables genuinely concurrent resolution using any existing (potentially sequential) perfect coloring sampler restricted to subgraphs of size nn6.

Theoretical Properties and Computational Complexity

The nn7-soft PRS scheme's critical advantage is its decomposition of the global coloring task into independent subproblems of logarithmic size in nn8. If a component solver requires nn9 time for a subgraph of Δ\Delta0 vertices, the total time is reduced to Δ\Delta1 per level. Any future breakthrough in the component solver thus immediately yields a better global sampler via this framework. Applied to the celebrated BC20 CFTP method (best known for Δ\Delta2) [BC20], the hybrid achieves Δ\Delta3 expected time, versus direct CFTP's Δ\Delta4, an improvement by a factor of Δ\Delta5.

The hybrid can be recursively nested, using itself as the component solver. After Δ\Delta6 recursions, the coloring problem size is reduced to Δ\Delta7 per component, for any fixed Δ\Delta8. At the limit Δ\Delta9, the number of recursion levels, the total time is kf(Δ)k \geq f(\Delta)0. If, as conjectured and strongly evidenced by simulation results, the number of kf(Δ)k \geq f(\Delta)1 levels kf(Δ)k \geq f(\Delta)2 is kf(Δ)k \geq f(\Delta)3 independent of kf(Δ)k \geq f(\Delta)4, this grants linear-time, scalable, parallel exact uniform sampling for general graphs.

Numerical Results and Strong Claims

The empirical results highlight:

  • With the hybrid scheme, for dense graphs (kf(Δ)k \geq f(\Delta)5), the number of effective kf(Δ)k \geq f(\Delta)6-levels (kf(Δ)k \geq f(\Delta)7) remains bounded, generally between 1 and 20, invariant with kf(Δ)k \geq f(\Delta)8.
  • The majority of PRS work is completed in a small window of kf(Δ)k \geq f(\Delta)9-values directly above the percolation threshold.
  • The size of resampling components stabilizes at γ\gamma0, enabling scalable parallelization.
  • When using CFTP or NRS as component solvers, the hybrid PRS uses up to two orders of magnitude fewer resampling steps than direct rejection sampling or non-hybrid PRS, even for dense graphs and large γ\gamma1.
  • For large γ\gamma2, convergence is rapid, and the method remains robust as γ\gamma3 approaches the critical coloring threshold.

The paper conjectures that γ\gamma4 can be bounded independently of γ\gamma5—if true, this implies γ\gamma6 time parallelizable perfect coloring, an unprecedented outcome for such a general class of graphs.

Structural Implications and Open Questions

The main practical implication is that this PRS-based approach is inherently parallelizable and modular. The method automatically benefits from any advances in sequential perfect sampling for small graphs and is directly applicable on high-performance computing systems. Theoretically, it synthesizes the Lovász Local Lemma's local independence structure and percolation theory with Moser-Tardos-type PRS, establishing a new approach to uniform sampling for hard combinatorial constraints.

The crucial theoretical open problem is the uniform boundedness of the number of necessary γ\gamma7-levels γ\gamma8 as γ\gamma9 and, equivalently, whether, above the percolation threshold, PRS finds a proper coloring with positive probability uniformly in γ\gamma0 and γ\gamma1, for γ\gamma2 (for some constant γ\gamma3). The simulation results strongly support a positive answer.

Prospects and Future Developments

Potential directions include:

  • Rigorous confirmation of bounded γ\gamma4, yielding an unconditional linear-time parallel perfect sampler.
  • Extension of the method to other constraint satisfaction and Markov random field models.
  • Optimization of the γ\gamma5-sequence or component selection to accelerate practical convergence.
  • Leveraging the modular nature for hybrid parallel-distributed architectures in large-scale scientific, AI, or statistical applications.

The work connects advances in local-to-global decomposable sampling, percolation-theoretic cutoff analysis, and algorithmic Lovász Local Lemma into a unified and practical framework for a fundamental problem in both theoretical computer science and AI.

Conclusion

This paper introduces a PRS-based parallel algorithm for perfect uniform γ\gamma6-coloring sampling on general graphs, enabled by the concept of γ\gamma7-soft coloring. The method achieves logarithmic-scale decomposition of the sampling problem and strong runtime improvements, with simulations supporting an unprecedented path toward linear-time, parallel uniform coloring sampling. If the main conjecture holds, the algorithm would resolve a central question at the intersection of randomized algorithms, sampling, and combinatorics. A Python implementation is publicly available, facilitating further investigation and practical adoption.

References:

  • (2604.03947)
  • [BC20]
  • [GJL17]
  • [MH96]
  • [PW96]
  • [FGY22]
  • [JSS21]

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.