Sampling from Network Reliability in Near-linear Time

Xiaoyu Chen, Xinyuan Zhang, Zongrui ZouarXiv 2023 · OpenReview

Abstract

We give a $\widetilde{O}(n)$ time almost uniform sampler for independent sets of a matroid, whose ground set has $n$ elements and is given by an independence oracle. As a consequence, one can sample connected spanning subgraphs of a given graph $G=(V,E)$ in $\widetilde{O}(|E|)$ time. This leads to improved running time on estimating all-terminal network reliability. Furthermore, we generalise this near-linear time sampler to the random cluster model with $q\le 1$.

Introduction

Sampling from complex distributions is a cornerstone of modern computer science, particularly for estimating quantities that are hard to compute exactly, such as #P-hard problems. A prominent example is all-terminal network reliability: given a graph where edges fail with certain probabilities, what is the probability that the graph remains connected? This problem is equivalent to sampling from the independent sets of a matroid.

While recent breakthroughs in the theory of Markov chains established that "down-up" chains mix quickly—specifically in $O(n \log n)$ steps—the implementation of each individual step remained a computational bottleneck. Traditionally, a single transition required $O(n)$ queries to an independence oracle, leading to a total running time of $O(n^2 \log n)$. This paper bridges the gap between fast mixing and fast implementation, providing a near-linear time sampler.

The Complexity Bottleneck

In the context of a matroid with a ground set of $n$ elements, the goal is to sample from the distribution of independent sets. The state-of-the-art algorithms prior to this work required $O(rn \log n)$ time, where $r$ is the rank of the matroid. For large-scale networks, this quadratic-like behavior prevents scalability. The primary challenge was that at each step of the Markov chain, the algorithm had to evaluate the entire ground set to determine the next valid state.

Methodology

The authors achieve near-linear complexity through three primary innovations:

1. Polarization and Homogenization

Matroid independent sets vary in size, which makes the distribution non-homogeneous and difficult to analyze. The authors employ a technique called polarization to map the distribution onto a larger, homogeneous space by adding auxiliary variables. This transformation allows the application of the theory of strongly log-concave polynomials, which provides a rigorous guarantee that the Markov chain will mix in $O(n \log n)$ steps.

2. Fast Transition via Rejection Sampling

This is the core algorithmic innovation. Rather than checking all $O(n)$ possible elements for a valid move in each step, the authors design a rejection sampling procedure. They propose a move based on a simpler, easy-to-sample distribution and prove that the acceptance probability is bounded by a constant. Consequently, the expected time for a single transition step is reduced to $O(1)$ oracle queries, plus the overhead of the query itself.

3. Dynamic Data Structures

To ensure that the independence oracle queries do not become a new bottleneck, the authors utilize advanced dynamic data structures. For graphic matroids, they use dynamic graph connectivity structures that allow the algorithm to check if a set remains independent (e.g., if a graph remains connected) in polylogarithmic time.

Key Insights

  • Transition as a Sampling Task: The authors realized that the bottleneck was not the number of steps in the Markov chain, but the sampling problem within each step. By treating the transition itself as a task for rejection sampling, they bypassed the $O(n)$ overhead per step.
  • Constant Rejection Probability: A critical theoretical contribution is the proof that the rejection probability is upper-bounded by a constant related to the maximum weight ($\lambda_{max}$). This ensures the algorithm does not stall in long loops of rejected proposals.
  • Dual Matroid Efficiency: For network reliability, the authors apply their sampler to the co-graphic matroid (the dual). This allows for sampling connected spanning subgraphs in time proportional to the number of edges, $\widetilde{O}(|E|)$, a significant improvement over the previous $\widetilde{O}(|V||E|)$.

Results and Impact

The paper establishes several high-impact results:

  • Theorem 1: An almost uniform sampler for matroid independent sets in $\widetilde{O}(n)$ time, representing near-linear complexity relative to the ground set.
  • Network Reliability: For a graph with $n$ vertices and $m$ edges, the algorithm improves the running time for estimating reliability by a factor of $O(n)$.
  • Random Cluster Model: The sampler generalizes to the random cluster model for $q \le 1$ in near-linear time, provided a rank oracle is available.

Limitations and Future Work

While the algorithm represents a major step forward, some constraints remain. The running time depends on $(1 + \lambda_{max})$; if external field weights are extremely large, rejection sampling efficiency decreases. Additionally, the current near-linear sampler is restricted to the $q \le 1$ regime. Extending these techniques to $q > 1$, which includes the standard ferromagnetic Ising model, remains a significant open challenge. Finally, the authors suggest that the dependence on the failure probability $(1 - p_{max})^{-1}$ could potentially be improved from linear to logarithmic in future iterations.

Summary updated

Abstract

We give a $\widetilde{O}(n)$ time almost uniform sampler for independent sets of a matroid, whose ground set has $n$ elements and is given by an independence oracle. As a consequence, one can sample connected spanning subgraphs of a given graph $G=(V,E)$ in $\widetilde{O}(|E|)$ time. This leads to improved running time on estimating all-terminal network reliability. Furthermore, we generalise this near-linear time sampler to the random cluster model with $q\le 1$.
BibTeX
@misc{chen2023sampling,
  author = {Xiaoyu Chen and Xinyuan Zhang and Zongrui Zou},
  title = {{Sampling from Network Reliability in Near-linear Time}},
  year = {2023},
  eprint = {2308.09683},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.09683},
}
Figure