fast sampling and counting sat solutions in the local
play

Fast sampling and counting -SAT solutions in the local lemma regime - PowerPoint PPT Presentation

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)


  1. 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

  2. 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].

  3. 𝑙, 𝑒 -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 𝑃 π‘œπ‘’π‘™ .

  4. 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.

  5. 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]

  6. 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 𝑃 (π‘œ) . β€’

  7. 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

  8. 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

  9. 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 ) ; (𝑦 ! ∨ ¬𝑦 " ∨ 𝑦 # ) ∧ (𝑦 " ∨ 𝑦 ' ∨ 𝑦 % ) ∧ (𝑦 $ ∨ ¬𝑦 % ∨ 𝑦 & )

  10. 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 ) ; (𝑦 ! ∨ ¬𝑦 " ∨ 𝑦 # ) ∧ (𝑦 " ∨ 𝑦 ' ∨ 𝑦 % ) ∧ (𝑦 $ ∨ ¬𝑦 % ∨ 𝑦 & )

  11. 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 ) ; (𝑦 ! ∨ ¬𝑦 " ∨ 𝑦 # ) ∧ (𝑦 " ∨ 𝑦 ' ∨ 𝑦 % ) ∧ (𝑦 $ ∨ ¬𝑦 % ∨ 𝑦 & )

  12. 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 ) ; (𝑦 ! ∨ ¬𝑦 " ∨ 𝑦 # ) ∧ (𝑦 " ∨ 𝑦 ' ∨ 𝑦 % ) ∧ (𝑦 $ ∨ ¬𝑦 % ∨ 𝑦 & )

  13. 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

  14. β€œ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]

  15. 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 ?

  16. 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

  17. 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 𝑍 ∼ 𝜈 ,\+ (β‹… |π‘Œ) ). β€’

  18. 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. β€’

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend