Fast sampling and counting π -SAT solutions in the local lemma regime Weiming Feng Nanjing University Joint work with: Heng Guo (University of Edinburgh) Yitong Yin (Nanjing University) Chihao Zhang (Shanghai Jiao Tong University) Online Seminar Institute of Computing Technology, Chinese Academy of Sciences
Conjunctive normal form (CNF) β’ Instance : a formula Ξ¦ = (π, π·) , for example clause Ξ¦ = π¦ ! β¨ Β¬π¦ " β¨ π¦ # β§ π¦ ! β¨ π¦ " β¨ π¦ $ β§ π¦ # β¨ Β¬π¦ $ β¨ Β¬π¦ % π = {π¦ ! , π¦ " , π¦ # , π¦ $ , π¦ % }: set of Boolean variables; π· : set of clauses. β’ SAT solutions : an assignment of variables in π s.t. πΎ = true . β’ Fundamental computational tasks for CNF formula: β’ Decision : Does SAT solution exist? NP-Complete problem [Cook 1971, Levin 1973]. β’ Counting : How many SAT solutions? #P-Complete problem [Valiant 1979].
π, π -CNF formula Ξ¦ = (π, π·) β’ Each clause contains π Boolean variables. β’ Each variable belongs to at most π clauses, e.g. max degree β€ π . Example: (3,2)-CNF formula π¦ ! β¨ Β¬π¦ " β¨ π¦ # β§ π¦ ! β¨ π¦ " β¨ π¦ $ β§ π¦ # β¨ Β¬π¦ $ β¨ Β¬π¦ % LovΓ‘sz Local Lemma (LLL) Suppose a ( π, π )-CNF formula satisfies π β³ π¦π©π‘ π (π β₯ log π + log π + π·) . Existence [ErdΕs, LovΓ‘sz, 1975] β’ If each variable takes a value in {true,false} uniformly and independently !" 1 Pr all clauses are satis?ied β₯ 1 β > 0, 2ππ which implies the π -SAT solution must exist ; Construction [Moser, Tardos, 2010] β’ a π -SAT solution can be constructed in expected time π πππ .
Sampling & counting π -SAT solutions β’ Input: a π, π -CNF formula Ξ¦ = (π, π·) with π = π , and error bound π > 0 . β’ Almost uniform sampling: generate a random SAT solution π β true, false % s.t. the total variation distance is at most π , π &% π, π = 1 ) Pr π = π β π(π) β€ π 2 # 'β true,false π : the uniform distribution of all π -SAT solutions.
Sampling & counting π -SAT solutions β’ Input: a π, π -CNF formula Ξ¦ = (π, π·) with π = π , and error bound π > 0 . β’ Almost uniform sampling: generate a π -SAT solution π β true, false % s.t. the total variation distance π &% π, π β€ π, π : the uniform distribution of all π -SAT solutions. β’ Approximate counting: estimate the number of π -SAT solutions, e.g. output 1 β π π β€ 9 π β€ 1 + π π, π = the number of π -SAT solutions. Self-reduction [Jerrum, Valiant, Vazirani 1986] Almost Uniform Approximate Sampling Counting Simulated annealing [Ε tefankoviΔ et al. 2009]
Work Regime Running time/lower bound Technique Monotone CNF [1] Markov chain Monte Carlo poly ππ π log π Hermon et al.β19 π β³ 2 log π (MCMC) π‘ β₯ min log ππ , π/2 [2] poly ππ π Guo et al.β17 Partial rejection sampling π β³ 2 log π π $%&'(!)) Moitraβ17 π β³ 60 log π Linear programming NP-hard BezΓ‘kovΓ‘ et al.β15 π β€ 2 log π β π· - Table: previous results for sampling SAT solutions of π, π -CNF formulas [1] Monotone CNF: all variables appear positively, e.g. πΈ = π¦ ! β¨ π¦ " β¨ π¦ # β§ π¦ " β¨ π¦ $ β¨ π¦ % β§ π¦ # β¨ π¦ $ β¨ π¦ & . [2] s: two dependent clauses share at least π‘ variables. Open Problem: Can we sample general π, π -CNF solutions such that the threshold down to π β³ 2 log π ; β’ the running time poly(ππ) 1 π (π) . β’
Our result Work Regime Running time/lower bound Technique Monotone CNF poly ππ π log π Hermon et al.β19 MCMC π β³ 2 log π π‘ β₯ min log ππ , π/2 poly ππ π Guo et al.β17 Partial rejection sampling π β³ 2 log π π $%&'(!)) Moitraβ17 π β³ 60 log π Linear programming NP-hard BezΓ‘kovΓ‘ et al.β15 π β€ 2 log π β π· - ; π β³ ππ π¦π©π‘ π π·(π π π π π π.ππππππ ) This work MCMC Table: results for sampling SAT solutions of π, π -CNF formulas
Main theorem (this work) For any sufficiently small π < 2 EFG , any (π, π) -CNF formula satisfying π β₯ 20 log π + 20 log π + 3 log 1 π , β’ sampling algorithm (main algorithm) π π F π H π IJK ; draw almost uniform random π -SAT solution in time D β’ counting algorithm (by simulated annealing reduction) π π H π H π FJK ; count #π -SAT solutions approximately in time D
Classic Glauber dynamics (Gibbs sampling) Start from an arbitrary solution π β π, πΊ % ; π¦ $ π¦ ! true For each π’ from 1 to π do π¦ % π¦ " π¦ ' false β’ Pick π€ β π uniformly at random; π¦ & π¦ # β’ Resample π N βΌ (β β£ π %\N ) ; (π¦ ! β¨ Β¬π¦ " β¨ π¦ # ) β§ (π¦ " β¨ π¦ ' β¨ π¦ % ) β§ (π¦ $ β¨ Β¬π¦ % β¨ π¦ & )
Classic Glauber dynamics (Gibbs sampling) Start from an arbitrary solution π β π, πΊ % ; π¦ $ π¦ ! true For each π’ from 1 to π do π¦ % π¦ " π¦ ' false β’ Pick π€ β π uniformly at random; π¦ & π¦ # β’ Resample π N βΌ (β β£ π %\N ) ; (π¦ ! β¨ Β¬π¦ " β¨ π¦ # ) β§ (π¦ " β¨ π¦ ' β¨ π¦ % ) β§ (π¦ $ β¨ Β¬π¦ % β¨ π¦ & )
Classic Glauber dynamics (Gibbs sampling) Start from an arbitrary solution π β π, πΊ % ; π¦ $ π¦ ! true For each π’ from 1 to π do π¦ % π¦ " π¦ ' T/F? false β’ Pick π€ β π uniformly at random; π¦ & π¦ # β’ Resample π N βΌ π N (β β£ π %\N ) ; (π¦ ! β¨ Β¬π¦ " β¨ π¦ # ) β§ (π¦ " β¨ π¦ ' β¨ π¦ % ) β§ (π¦ $ β¨ Β¬π¦ % β¨ π¦ & )
Classic Glauber dynamics (Gibbs sampling) Start from an arbitrary solution π β π, πΊ % ; π¦ $ π¦ ! true For each π’ from 1 to π do π¦ % π¦ " π¦ ' F! false β’ Pick π€ β π uniformly at random; π¦ & π¦ # β’ Resample π N βΌ π N (β β£ π %\N ) ; (π¦ ! β¨ Β¬π¦ " β¨ π¦ # ) β§ (π¦ " β¨ π¦ ' β¨ π¦ % ) β§ (π¦ $ β¨ Β¬π¦ % β¨ π¦ & )
Connectivity barrier (toy example) β’ (π, π) -CNF formula Ξ¦ = (π, π·) with π = π¦ I , π¦ F , β¦ π¦ P : Ξ¦ = π· I β§ π· F β§ β― β§ π· P . π· I = (Β¬π¦ I β¨ π¦ F β¨ π¦ H β¨ β― β¨ π¦ P ) forbids 100 β¦ 0 π· F = (π¦ I β¨ Β¬π¦ F β¨ π¦ H β¨ β― β¨ π¦ P ) forbids 010 β¦ 0 π· P = (π¦ I β¨ π¦ F β¨ π¦ H β¨ β― β¨ Β¬π¦ P ) forbids 000 β¦ 1 β’ Any assignment π β 0,1 % with π I = 1 is infeasible. β’ All false solution π is disconnected with others. 10β¦0 Other Solutions 00β¦0 01β¦0 00β¦1
βthe solution space (and hence the natural Markov chain) is not connectedβ β’ Glauber dynamics : random walk over solution space via local update. β’ Local Markov chain : one of the most fundamental approach for sampling: uniform graph coloring weighted matching/independent set Ising/spin system bases of a matroid We are here οΌ rapid mixing not mixing slow mixing For sampling CNF solutions, the MCMC approach meets the connectivity barrier . Mathematics and Computation [Wigdersonβ19]
Bypass the connectivity barrier Work Regime Running time Technique Monotone CNF Hermon et monotone CNF poly ππ π log π MCMC al.β19 π β³ 2 log π π‘ β₯ min log ππ , π/2 Guo, Jerrum, Partial rejection heavy intersection poly ππ π Liuβ17 π β³ 2 log π sampling π !"#$(&') constant π and π Moitraβ17 π β³ 60 log π Linear programming Non-MCMC approach Technique Motivation: Can MCMC approach bypass the connectivity barrier ?
Our technique: projection Source: https://www.shadowmatic.com/presskit/images/IMG_0650.png Projecting from a high dimension to a lower dimension to improve connectivity
Construct a good subset of variables π β π Run Glauber dynamics on projected distribution π + to draw sample π βΌ π + Start from a uniform random π β true ,false ) ; For each π’ from 1 to π Pick a variable π€ β π uniformly at random; β’ π Resample π * βΌ π * (β |π )\* ) ; β’ Return π β true ,false ) . T/F? Draw sample π βΌ π ,\+ (β |π) from the conditional distribution There exists an efficiently constructible subset π β π such that: computing exact distr. the Glauber dynamics on π + is rapidly mixing , β’ can be #P-hard the Glauber dynamics on π + can be implemented efficiently (draw π . βΌ π . (β |π +\. ) ), β’ sampling assignment for π\π can be implemented efficiently (draw π βΌ π ,\+ (β |π) ). β’
Construct a good subset of variables π β π Run Glauber dynamics on projected distribution π + to draw sample π βΌ π + Start from a uniform random π β true ,false ) ; For each π’ from 1 to π Pick a variable π€ β π uniformly at random; β’ π Resample π * βΌ π * (β |π )\* ) ; β’ Return π ; T/F? Draw sample π βΌ π ,\+ (β |π) from the conditional distribution Our Tasks : Construct such a good subset π β π . β’ Show that the Glauber dynamics on π + is rapidly mixing . β’ Given assignment on π , draw samples efficiently from the conditional distribution. β’
Recommend
More recommend