betaFeedback

WorksComputer Science

Deterministic Approximation of the Total Variation Distance Between Spin Systems

Abstract

We study deterministic relative approximation of the total variation distance between two Gibbs distributions induced by spin systems on the same bounded-degree graph. For the hard-core model, we give a deterministic polynomial-time ε\varepsilon-relative-error approximation when both external-field vectors lie in [b,(1−η)λc(Δ)]V[b,(1-η)λ_{\mathrm c}(Δ)]^V, where b>0b>0 and η∈(0,1)η\in(0,1) are fixed and λc(Δ)λ_{\mathrm c}(Δ) is the hard-core uniqueness threshold. For the Ising model, we obtain deterministic polynomial-time algorithms in two settings: the ferromagnetic Lee–Yang regime and the antiferromagnetic correlation-decay regime. We develop a new deterministic framework that reduces this task to estimating suitably chosen partition functions.

Introduction

The total variation distance is a fundamental measure of the difference between two probability distributions. For distributions μ\mu and ν\nu on a finite set Ω\Omega, it is defined by

dTV(μ,ν)=12∑σ∈Ω∣μ(σ)−ν(σ)∣.d_{\mathrm{TV}}(\mu,\nu)=\frac{1}{2}\sum_{\sigma\in\Omega}|\mu(\sigma)-\nu(\sigma)|.

It can be evaluated in O(∣Ω∣)O(|\Omega|) time when both probability tables are given explicitly. The problem becomes interesting when both high-dimensional distributions admit succinct descriptions. This setting, however, already gives rise to strong complexity barriers. Sahai and Vadhan [SV03] proved that the statistical-difference problem for circuit-generated distributions is complete for statistical zero knowledge. Bhattacharyya et al. [4] showed that exact TV-distance computation is #P-complete even for Boolean product distributions, and that relative approximation is NP-hard for Bayesian networks. More recently, Bhattacharyya et al. [6] proved that, unless NP ⊆\subseteq RP, no FPRAS exists for the TV-distance problem over arbitrary Ising-model inputs.

These barriers make structured distribution families the natural setting in which to design approximation algorithms. Product distributions provide the first example: Bhattacharyya et al. [4] obtained an FPTAS for a restricted Boolean case. This restriction was later removed, first through an FPRAS for general product distributions [FGJW23] and then through an FPTAS [15]. For two Bayesian networks defined over the same DAG, Bhattacharyya et al. [5] reduced relative TV-distance approximation to probabilistic inference, yielding an FPRAS whenever exact inference is efficient. For mixtures of product distributions, Bhattacharyya et al. [6] gave a polynomial-time algorithm to decide whether the TV distance is zero, and Feng et al. [13] further gave an FPRAS for relative TV-distance approximation for a constant number of mixture components.

For spin systems, Feng et al. [16] reduced relative TV-distance approximation to sampling and approximate counting. The resulting FPRAS applies to the hard-core model throughout the constant-gap uniqueness regime and, under a constant marginal lower bound, to Ising models in the spectral, ferromagnetic consistent-field, and antiferromagnetic uniqueness regimes. Feng and Fu [12] gave randomized polynomial-time algorithms for relative approximation of several ff-divergences between Ising models in suitable parameter regimes.

In this paper, we study deterministic polynomial-time ε\varepsilon-relative-error approximation of the TV distance between two bounded-degree spin systems, including the hard-core model and the Ising model. Our framework reduces the problem to deterministically approximating suitable partition functions at real and complex activities.

Main results

Models and problems

Let G=(V,E)G=(V,E) be a finite simple graph, write n=∣V∣n=|V|, and set ΣV={−1,+1}V\Sigma_V=\{-1,+1\}^V. A binary spin system S on GG assigns a nonnegative weight wS(σ)w_S(\sigma) to each configuration σ∈ΣV\sigma\in\Sigma_V. If at least one configuration has positive weight, its partition function and Gibbs distribution are defined by

ZS=∑τ∈ΣVwS(τ),μS(σ)=wS(σ)ZS,σ∈ΣV.Z_S=\sum_{\tau\in\Sigma_V}w_S(\tau),\qquad\mu_S(\sigma)=\frac{w_S(\sigma)}{Z_S},\qquad\sigma\in\Sigma_V.

We consider the following two spin systems.

Hard-core model. Let λ=(λv)v∈V∈R≥0V\lambda=(\lambda_v)_{v\in V}\in\mathbb{R}_{\geq0}^V be a vector of vertex activities. For σ∈ΣV\sigma\in\Sigma_V, define

I(σ)={v∈V:σv=+1}.I(\sigma)=\{v\in V:\sigma_v=+1\}.

The configuration σ\sigma is feasible if I(σ)I(\sigma) is an independent set of GG. The hard-core model (G,λ)(G,\lambda) has weight function

wλ(σ)={∏v∈I(σ)λv,if I(σ) is an independent set of G,0,otherwise.w_\lambda(\sigma)= \begin{cases} \prod_{v\in I(\sigma)}\lambda_v, & \text{if }I(\sigma)\text{ is an independent set of }G,\\ 0, & \text{otherwise.} \end{cases}

Ising model. Let β>0\beta>0 be an edge activity and let λ=(λv)v∈V∈R>0V\lambda=(\lambda_v)_{v\in V}\in\mathbb{R}_{>0}^V be a vector of vertex activities. For σ∈ΣV\sigma\in\Sigma_V, let

DG(σ)={{u,v}∈E:σu≠σv}.D_G(\sigma)=\{\{u,v\}\in E:\sigma_u\ne\sigma_v\}.

The Ising model (G,β,λ)(G,\beta,\lambda) has weight function

wβ,λ(σ)=β∣DG(σ)∣∏v:σv=+1λv,σ∈ΣV.w_{\beta,\lambda}(\sigma)=\beta^{|D_G(\sigma)|}\prod_{v:\sigma_v=+1}\lambda_v,\qquad\sigma\in\Sigma_V.

For z∈CVz\in\mathbb{C}^V, the notation ZG(β,z)Z_G(\beta,z) denotes the same partition function polynomial with the vertex activities replaced by zz. Under this parametrization, the model is ferromagnetic for 0<β<10<\beta<1, has independent spins for β=1\beta=1, and is antiferromagnetic for β>1\beta>1.

We compare two systems of the same type on the same graph and consider the following two problems.

Problem 1.1 (Hard-core TV-distance approximation).

  • Input: A finite simple graph G=(V,E)G=(V,E), two activity vectors λμ,λν∈R>0V\lambda^\mu,\lambda^\nu\in\mathbb{R}_{>0}^V, and an error bound ε∈(0,1)\varepsilon\in(0,1). These specify two hard-core Gibbs distributions μ=μG,λμ\mu=\mu_{G,\lambda^\mu} and ν=μG,λν\nu=\mu_{G,\lambda^\nu}.

  • Output: A nonnegative real number d^\widehat d such that

(1−ε)dTV(μ,ν)≤d^≤(1+ε)dTV(μ,ν).(1-\varepsilon)d_{\mathrm{TV}}(\mu,\nu)\leq\widehat d\leq(1+\varepsilon)d_{\mathrm{TV}}(\mu,\nu).

Problem 1.2 (Ising TV-distance approximation).

  • Input: A finite simple graph G=(V,E)G = (V, E), an edge activity β>0\beta> 0, two vertex-activity vectors λμ,λν∈R≥0V\lambda^{\mu}, \lambda^{\nu} \in\mathbb{R}_{\ge0}^{V}, and an error bound ε∈(0,1)\varepsilon\in(0,1). These specify two Ising Gibbs distributions μ=μG,β,λμ\mu= \mu_{G,\beta,\lambda^{\mu}} and ν=μG,β,λν\nu= \mu_{G,\beta,\lambda^{\nu}}.

  • Output: A nonnegative real number d^\widehat{d} such that

(1−ε)dTV(μ,ν)≤d^≤(1+ε)dTV(μ,ν).(1-\varepsilon)d_{\mathrm{TV}}(\mu,\nu) \le\widehat{d} \le(1+\varepsilon)d_{\mathrm{TV}}(\mu,\nu).

Our results

Hard-core model. For Δ≥3\Delta\ge3, write

λc(Δ)=(Δ−1)Δ−1(Δ−2)Δ\lambda_{\mathrm{c}}(\Delta) = \frac{(\Delta-1)^{\Delta-1}}{(\Delta-2)^{\Delta}}

for the hard-core uniqueness threshold on the infinite Δ\Delta-regular tree.

Theorem 1.3 (Main theorem). Fix Δ≥3\Delta\ge3, η∈(0,1)\eta\in(0,1), and b>0b > 0, and let r=(1−η)λc(Δ)r = (1-\eta)\lambda_{\mathrm{c}}(\Delta). If b<rb < r, then there is a deterministic algorithm for Problem 1.1 on instances in which GG has maximum degree at most Δ\Delta and

λμ,λν∈[b,r]V.\lambda^{\mu},\lambda^{\nu} \in[b,r]^{V}.

Its running time is

poly⁡Δ,η,b(n,1ε),n=∣V∣.\operatorname{poly}_{\Delta,\eta,b}\left(n,\frac{1}{\varepsilon}\right), \qquad n = |V|.

An explicit running-time bound is given in (41). The output is 0 if and only if λμ=λν\lambda^{\mu} = \lambda^{\nu}.

Ising model. The first result for the Ising model uses the multivariate Lee–Yang zero-free region [LY52, LSS17].

Theorem 1.4 (Lee–Yang zero-free regime). Fix an integer Δ≥1\Delta\ge1 and constants $0 < \beta \le 1$ and 0<b<r<10 < b < r < 1. There is a deterministic algorithm for Problem 1.2 on instances in which $G has maximum degree at most Δ\Delta and either

λμ,λν∈[b,r]V\lambda^{\mu},\lambda^{\nu} \in[b,r]^{V}

or

λμ,λν∈[r−1,b−1]V.\lambda^{\mu},\lambda^{\nu} \in[r^{-1},b^{-1}]^{V}.

Its running time is

poly⁡Δ,β,b,r(n,1ε),n=∣V∣.\operatorname{poly}_{\Delta,\beta,b,r}\left(n,\frac{1}{\varepsilon}\right), \qquad n = |V|.

An explicit running-time bound is given in (24). The output is 0 if and only if λμ=λν\lambda^{\mu} = \lambda^{\nu}.

We next describe the antiferromagnetic parameter region. Fix Δ≥3\Delta\ge3 and β>1\beta> 1 with β≠Δ/(Δ−2)\beta\ne\Delta/(\Delta-2). Following Sinclair et al. [SST12] and Liu et al. [25], let

Uβ,Δ={(0,∞),1<β<ΔΔ−2,(0,λc(β,Δ)−1)∪(λc(β,Δ),∞),β>ΔΔ−2.\mathcal{U}_{\beta,\Delta} = \begin{cases} (0,\infty), & 1 < \beta< \dfrac{\Delta}{\Delta-2},\\ (0,\lambda_{\mathrm{c}}(\beta,\Delta)^{-1}) \cup(\lambda_{\mathrm{c}}(\beta,\Delta),\infty), & \beta> \dfrac{\Delta}{\Delta-2}. \end{cases}

be the strict correlation-decay region on the infinite Δ\Delta-regular tree, where λc(β,Δ)>1\lambda_{\mathrm{c}}(\beta,\Delta) > 1 is the critical external field in the second case. For the critical-field characterization, see [17 pp. 254–255] and its complete definition in [SST12].

Theorem 1.5 (Antiferromagnetic correlation-decay regime). Fix an integer Δ≥3\Delta\ge3 and a constant β>1\beta> 1 with β≠Δ/(Δ−2)\beta\ne\Delta/(\Delta- 2). Let [λ−,λ+][\lambda_{-},\lambda_{+}] be a fixed nonempty closed interval contained in one connected component of Uβ,ΔU_{\beta,\Delta}. There is a deterministic algorithm for Problem 1.2 on instances in which GG has maximum degree at most Δ\Delta and

λμ,λν∈[λ−,λ+]V.\lambda^\mu,\lambda^\nu\in[\lambda_{-},\lambda_{+}]^V.

Its running time is

poly⁡Δ,β,λ−,λ+(n,1ε),n=∣V∣.\operatorname{poly}_{\Delta,\beta,\lambda_{-},\lambda_{+}}\left(n,\frac{1}{\varepsilon}\right), \qquad n = |V|.

An explicit running-time bound is given in (64). The output is 0 if and only if λμ=λν\lambda^\mu= \lambda^\nu.

Related work

TV-distance approximation. Earlier work [7, 8, 21, 9] studied algorithms and hardness for additive-error approximation of TV distance, a weaker guarantee than relative accuracy when the distance may be small. A separate line of work [11, 1, 22, 2] obtained explicit estimates with fixed relative-accuracy guarantees for structured high-dimensional distributions.

Partition-function approximation. Our reduction uses deterministic partition-function approximation. For the hard-core model, Weitz [Wei06] introduced the self-avoiding-walk tree and correlation-decay method and obtained an FPTAS for uniform activity below λc(Δ)\lambda_{\mathrm{c}}(\Delta). Harvey et al. [18] gave a deterministic algorithm for complex external fields lying a fixed multiplicative distance inside the Shearer region; in particular, it applies when ∣zv∣≤(1−η)λs(Δ)|z_v| \le(1-\eta)\lambda_{\mathrm{s}}(\Delta) for every vertex and a fixed η>0\eta> 0. However, Bezáková et al. [3] showed that, for some complex activities with modulus between λs(Δ)\lambda_{\mathrm{s}}(\Delta) and λc(Δ)\lambda_{\mathrm{c}}(\Delta), approximating the hard-core partition function is #P\#\mathrm{P}-hard. More generally, Patel and Regts [PR17] showed how zero-free regions for a broad class of bounded-degree graph polynomials lead to deterministic approximation algorithms. Liu et al. [25] further connected real correlation decay with zero-freeness in scalar complex neighborhoods; the nonuniform complex approximation used here is obtained by the coordinatewise extensions developed in later sections.

For the Ising model, Jerrum and Sinclair [20] gave the classical FPRAS for the ferromagnetic partition function. Sinclair et al. [SST12] and Li et al. [23] developed deterministic correlation-decay algorithms for antiferromagnetic two-spin systems throughout the interior of the tree-uniqueness region. In the ferromagnetic setting, Liu et al. [24] used Lee–Yang zero-freeness to obtain a deterministic FPTAS on bounded-degree graphs away from zero field.

Technical overview

References

  1. [1]Jamil Arbas, Hassan Ashtiani, and Christopher Liaw. Polynomial time and private learning of unbounded Gaussian mixture models. In ICML, volume 202 of Proceedings of Machine Learning Research, pages 1018–1040. PMLR, 2023.
  2. [2]Ariel Avital and Aryeh Kontorovich. Sharp bounds on aggregate expert error. arXiv preprint arXiv:2407.16642, 2024.arxiv.org/abs/2407.16642
  3. [3]Ivona Bezáková, Andreas Galanis, Leslie Ann Goldberg, and Daniel Štefankovič. Inapproximability of the independent set polynomial in the complex plane. In Proceedings of the 50th annual ACM SIGACT symposium on theory of computing, pages 1234–1240, 2018.DOI
  4. [4]Arnab Bhattacharyya, Sutanu Gayen, Kuldeep S. Meel, Dimitrios Myrisiotis, A. Pavan, and N. V. Vinodchandran. On approximating total variation distance. In IJCAI, pages 3479–3487. ijcai.org, 2023.DOI
  5. [5]Arnab Bhattacharyya, Sutanu Gayen, Kuldeep S. Meel, Dimitrios Myrisiotis, A. Pavan, and N. V. Vinodchandran. Total variation distance meets probabilistic inference. In ICML, volume 235 of Proceedings of Machine Learning Research, pages 3776–3794. PMLR, 2024.arxiv.org/abs/2309.09134
  6. [6]Arnab Bhattacharyya, Sutanu Gayen, Kuldeep S. Meel, Dimitrios Myrisiotis, A. Pavan, and N. V. Vinodchandran. Computational explorations of total variation distance. In ICLR. OpenReview.net, 2025.arxiv.org/abs/2412.10370
  7. [7]Arnab Bhattacharyya, Sutanu Gayen, Kuldeep S. Meel, and N. V. Vinodchandran. Efficient distance approximation for structured high-dimensional distributions via learning. In NeurIPS, 2020.arxiv.org/abs/2002.05378
  8. [8]Taolue Chen and Stefan Kiefer. On the total variation distance of labelled Markov chains. In LICS, pages 33:1–33:10. ACM, 2014.arxiv.org/abs/1405.2852
  9. [9]Clément L. Canonne and Ronitt Rubinfeld. Testing probability distributions underlying aggregated data. In ICALP, volume 8572 of Lecture Notes in Computer Science, pages 283–295. Springer, 2014.arxiv.org/abs/1402.3835
  10. [10]Ronald A. DeVore and George G. Lorentz. Constructive Approximation, volume 303 of Grundlehren der mathematischen Wissenschaften. Springer, Berlin, 1993.
  11. [11]Luc Devroye, Abbas Mehrabian, and Tommy Reddad. The total variation distance between high-dimensional Gaussians with the same mean. arXiv preprint arXiv:1810.08693, 2018.arxiv.org/abs/1810.08693
  12. [12]Weiming Feng and Yucheng Fu. On Approximating the f-Divergence Between Two Ising Models. In Shubhangi Saraf, editor, 17th Innovations in Theoretical Computer Science Conference (ITCS 2026), volume 362 of Leibniz International Proceedings in Informatics (LIPIcs), pages 59:1–59:23, Dagstuhl, Germany, 2026. Schloss Dagstuhl – Leibniz-Zentrum für Informatik.arxiv.org/abs/2509.05016
  13. [13]Weiming Feng, Yucheng Fu, Minji Yang, and Anqi Zhang. On computing total variation distance between mixtures of product distributions. arXiv preprint arXiv:2605.03839, 2026.arxiv.org/abs/2605.03839
  14. [15]Weiming Feng, Liqiang Liu, and Tianren Liu. On deterministically approximating total variation distance. In SODA, pages 1766–1791. SIAM, 2024.arxiv.org/abs/2309.14696
  15. [16]Weiming Feng, Hongyang Liu, and Minji Yang. Approximating the total variation distance between spin systems. In COLT, volume 291 of Proceedings of Machine Learning Research, pages 1974–2025. PMLR, 2025.arxiv.org/abs/2502.05437
  16. [17]Hans-Otto Georgii. Gibbs measures and phase transitions, volume 9. Walter de Gruyter, 2011.
  17. [18]Nicholas J. A. Harvey, Piyush Srivastava, and Jan Vondrák. Computing the independence polynomial: From the tree threshold down to the roots. In SODA, pages 1557–1576. SIAM, 2018.arxiv.org/abs/1608.02282
  18. [19]Dunham Jackson. On approximation by trigonometric sums and polynomials. Transactions of the American Mathematical Society, 13(4):491–515, 1912.DOI
  19. [20]Mark Jerrum and Alistair Sinclair. Polynomial-time approximation algorithms for the Ising model. SIAM Journal on Computing, 22(5):1087–1116, 1993.
  20. [21]Stefan Kiefer. On computing the total variation distance of hidden Markov models. In ICALP, volume 107 of LIPIcs, pages 130:1–130:13. Schloss Dagstuhl–Leibniz-Zentrum für Informatik, 2018.arxiv.org/abs/1804.06170
  21. [22]Aryeh Kontorovich. On the tensorization of the variational distance. arXiv preprint arXiv:2409.10368, 2024.arxiv.org/abs/2409.10368
  22. [23]Liang Li, Pinyan Lu, and Yitong Yin. Correlation decay up to uniqueness in spin systems. In SODA, pages 67–84. SIAM, 2013.
  23. [24]Jingcheng Liu, Alistair Sinclair, and Piyush Srivastava. The Ising partition function: Zeros and deterministic approximation. In FOCS, pages 986–997. IEEE, 2017.
  24. [25]Jingcheng Liu, Alistair Sinclair, and Piyush Srivastava. Correlation decay and partition function zeros: Algorithms and phase transitions. SIAM Journal on Computing, 54(4):FOCS19–200–FOCS19–252, 2025.

Paper details

vlnc:W_np93vkpu
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 4

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents