English

Subquadratic Counting via Perfect Marginal Sampling

Data Structures and Algorithms 2026-04-03 v1 Probability

Abstract

We study the computational complexity of approximately computing the partition function of a spin system. Techniques based on standard counting-to-sampling reductions yield O~(n2)\tilde{O}(n^2)-time algorithms, where nn is the size of the input graph. We present new counting algorithms that break the quadratic-time barrier in a wide range of settings. For example, for the hardcore model of λ\lambda-weighted independent sets in graphs of maximum degree Δ\Delta, we obtain a O~(n2δ)\tilde{O}(n^{2-\delta})-time approximate counting algorithm, for some constant δ>0\delta > 0, when the fugacity λ<1Δ1\lambda < \frac{1}{\Delta-1}, improving over the previous regime of λ=o(Δ3/2)\lambda = o(\Delta^{-3/2}) by Anand, Feng, Freifeld, Guo, and Wang (2025). Our results apply broadly to many other spin systems, such as the Ising model, hypergraph independent sets, and vertex colorings. Interestingly, our work reveals a deep connection between subquadratic\textit{subquadratic} counting and perfect\textit{perfect} marginal sampling. For two-spin systems such as the hardcore and Ising models, we show that the existence of perfect marginal samplers directly yields subquadratic counting algorithms in a black-box\textit{black-box} fashion. For general spin systems, we show that almost all existing perfect marginal samplers can be adapted to produce a sufficiently low-variance marginal estimator in sublinear time, leading to subquadratic counting algorithms.

Keywords

Cite

@article{arxiv.2604.02235,
  title  = {Subquadratic Counting via Perfect Marginal Sampling},
  author = {Xiaoyu Chen and Zongchen Chen and Kuikui Liu and Xinyuan Zhang},
  journal= {arXiv preprint arXiv:2604.02235},
  year   = {2026}
}
R2 v1 2026-07-01T11:51:26.027Z