1 / 35

Lower Bounds for Exact Model Counting and Applications in Probabilistic Databases

Lower Bounds for Exact Model Counting and Applications in Probabilistic Databases. Paul Beame Jerry Li Sudeepa Roy Dan Suciu University of Washington. Model Counting. Model Counting Problem: Given a Boolean formula F ,

emory
Download Presentation

Lower Bounds for Exact Model Counting and Applications in Probabilistic Databases

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lower Bounds for Exact Model Counting and Applications in Probabilistic Databases Paul Beame Jerry Li Sudeepa Roy Dan Suciu University of Washington

  2. Model Counting • Model Counting Problem: Given a Boolean formula F, compute #F = #Models (satisfying assignments) of F e.g. F = (x  y)  (x u  w)  (x  u  w  z) #Assignments on x, y, u, z, w which make F = true • Probability Computation Problem: Given F, and independent Pr(x), Pr(y), Pr(z), …, compute Pr(F)

  3. Model Counting • #P-hard • Even for formulas where satisfiability is easy to check • Applications in probabilistic inference • e.g. Bayesian net learning • There are many practical model counters that can compute both #F and Pr(F)

  4. Exact Model Counters [Birnbaumet. al.’99] • CDP • Relsat • Cachet • SharpSAT • c2d • Dsharp • … Search-based/DPLL-based (explore the assignment-space and count the satisfying ones) [Bayardo Jr. et. al. ’97, ’00] [Sang et. al. ’05] [Thurley ’06] [Darwiche ’04] Knowledge Compilation-based (compile F into a “computation-friendly” form) [Muiseet. al. ’12] [Survey by Gomes et. al. ’09] • Both techniques explicitly or implicitly • use DPLL-based algorithms • produce FBDD or Decision-DNNFcompiled forms (output or trace) • [Huang-Darwiche’05, ’07]

  5. Model Counters Use Extensions to DPLL • Caching Subformulas • Cachet, SharpSAT, c2d, Dsharp • Component Analysis • Relsat, c2d, Cachet , SharpSAT, Dsharp • Conflict Directed Clause Learning • Cachet, SharpSAT, c2d, Dsharp • DPLL + caching + (clause learning)  FBDD • DPLL + caching + component + (clause learning)  Decision-DNNF • How much more does component analysisadd? • i.e. how much more powerful are decision-DNNFsthanFBDDs?

  6. Main Result • Theorem: • Decision-DNNF of size N FBDD of size Nlog N + 1 • If the formulaisk-DNF, then FBDD of size Nk • Algorithmruns in linear time in the size of its output

  7. Consequence: Running Time Lower Bounds Model counting algorithm running time ≥ compiled form size Lowerbound on compiledform size Lowerbound on running time • Note: Running time may be much larger than the size • e.g. an unsatisfiable CNF formula has a trivial compiled form

  8. Consequence: Running Time Lower Bounds • Our quasipolynomial conversion • + Knownexponentiallowerbounds on FBDDs • [Bollig-Wegener ’00, Wegener’02] •  Exponentiallowerbounds on decision-DNNF size •  Exponentiallowerbounds on running time of exact model counters

  9. Outline • Review of DPLL-based algorithms • Extensions (Caching & Component Analysis) • Knowledge Compilation (FBDD & Decision-DNNF) • Our Contributions • Decision-DNNF to FBDD conversion • Implications of the conversion • Applications to Probabilistic Databases • Conclusions

  10. DPLL Algorithms 5/8 • F: (xy)  (xuw) (xuwz) x // basic DPLL: Function Pr(F): if F= false then return 0 if F = true then return 1 select a variable x, return • ½ Pr(FX=0)+ ½ Pr(FX=1) 1 0 Davis, Putnam, Logemann, Loveland [Davis et. al. ’60, ’62] uwz y(uw) 7/8 3/8 z y 1 0 1 0 uw uw ¾ ¾ 0 1 u u 0 1 0 0 1 1 w 1 1 ½ w ½ w 1 w 1 1 0 1 0 0 1 0 1 1 0 1 0 Assume uniform distribution for simplicity

  11. DPLL Algorithms 5/8 • F: (xy)  (xuw) (xuwz) x 1 0 uwz y(uw) 7/8 3/8 z y • The trace is a • Decision-Tree for F 1 0 1 0 uw uw ¾ ¾ 0 1 u u 0 1 0 0 1 1 w 1 1 ½ ½ w w 1 w 1 1 0 1 0 0 1 0 1 1 0 1 0

  12. Extensions to DPLL • Caching Subformulas • Component Analysis • Conflict Directed Clause Learning • Affects the efficiency of the algorithm, but not the final “form” of the trace • Traces of • DPLL + caching + (clause learning)  FBDD • DPLL + caching + component + (clause learning)  Decision-DNNF

  13. Caching • F: (xy)  (xuw) (xuwz) // basic DPLL: Function Pr(F): if F= false then return 0 if F = true then return 1 select a variable x, return • ½ Pr(FX=0)+ ½ Pr(FX=1) x 1 0 uwz y(uw) z y 1 1 0 0 uw uw u u 0 1 • // DPLL with caching: • Cache F and Pr(F);look it up before computing 0 0 1 1 w w w 1 w 1 1 0 1 0 1 0 1 0

  14. Caching & FBDDs Decision-Node • F: (xy)  (xuw) (xuwz) x 1 0 • The trace is a decision-DAG for F • FBDD(Free BinaryDecisionDiagram) • or • ROBP(Read Once Branching Program) • Every variable istestedatmost once on anypath • All internalnodes are decision-nodes uwz y(uw) z y 1 1 0 0 uw u 0 1 0 1 w w 1 1 0 1 0

  15. Component Analysis • F: (xy)  (xuw) (xuwz) // basic DPLL: Function Pr(F): if F= false then return 0 if F = true then return 1 select a variable x, return • ½ Pr(FX=0)+ ½ Pr(FX=1) x 1 0 uwz y  (uw) z y 1 1 0 0 uw // DPLL with component analysis (and caching): if F = G  H where G and H have disjoint set of variables Pr(F) = Pr(G)× Pr(H) u 0 1 0 1 w w 1 1 0 1 0

  16. Components & Decision-DNNF Decision Node • F: (xy)  (xuw) (xuwz) x AND Node 1 0 uwz y  (uw)  • The trace is a Decision-DNNF • [Huang-Darwiche ’05, ’07] • FBDD + “Decomposable” AND-nodes • (Twosub-DAGs do not share variables) z 1 0 y uw y u 1 1 0 0 1 w 1 0 w 1 1 0 How much power do they add? 1 0

  17. Main Technical Result Efficient construction Decision-DNNF FBDD Size N Size Nlog N+1 (quasipolynomial) Size Nk (polynomial) k-DNF e.g. 3-DNF: (x  y  z)  (w  y  z)

  18. Outline • Review of DPLL algorithms • Extensions (Caching & Component Analysis) • Knowledge Compilation (FBDDs & Decision-DNNF) • Our Contributions • Decision-DNNF to FBDD conversion • Implications of the conversion • Applications to Probabilistic Databases • Conclusions

  19. Decision-DNNF  FBDD Need to convert all AND-nodes to Decision-nodes while evaluating the same formula F

  20. A Simple Idea  • G 1 G • H • H FBDD 0 0 1 1 0 0 1 Decision-DNNF FBDD • G and H do not share variables, so every variable is still • tested at most once on any path

  21. But, what if sub-DAGs are shared?    • Conflict! • G • H G g ’ h • H h g ’ 0 0 • H • G 1 0 0 1 1 1 0 0 Decision-DNNF

  22. Obvious Solution: Replicate Nodes    G G g ’ h • H • H No conflict Apply the simple idea 0 1 0 1 But, may need recursive replication Can have exponential blowup!

  23. Main Idea: Replicate Smaller Sub-DAG  Edges coming from other nodes in the decision-DNNF Smaller sub-DAG Each AND-node creates a private copy of its smaller sub-DAG Larger sub-DAG

  24. Light and Heavy Edges  Light Edge Heavy Edge Smaller sub-DAG Larger sub-DAG • Each AND-node creates a private copy of its smaller sub-DAG • Recursively each node u is replicated #times in a smaller sub-DAG • #Copies of u = #sequences of light edges leading to u

  25. Quasipolynomial Conversion L = Max #light edgeson any path L ≤ log N N = Nsmall + Nbig ≥ 2 Nsmall ≥ ... ≥ 2L #Copies of each node ≤ NL ≤ Nlog N   #Nodes in FBDD ≤ N. Nlog N  We also show that our analysis is tight

  26. Polynomial Conversion for k-DNFs • L = #Max light edges on any path ≤ k – 1 • #Nodes in FBDD ≤ N. NL = Nk

  27. Outline • Review of DPLL algorithms • Extensions (Caching & Component Analysis) • Knowledge Compilation (FBDDs & Decision-DNNF) • Our Contributions • Decision-DNNF to FBDD conversion • Implications of the conversion • Applications to Probabilistic Databases • Conclusions

  28. Separation Results Exponential Separation Poly-size AND-FBDD or d-DNNF exists Exponential lower bound on decision-DNNF size • FBDD:Decision-DAG, each variable is tested once along any path • Decision-DNNF:FBDD + decomposable AND-nodes (disjoint sub-DAGs) Decision-DNNF d-DNNF AND-FBDD FBDD • AND-FBDD:FBDD + AND-nodes (not necessarily decomposable) • [Wegener’00] • d-DNNF: Decomposable AND nodes + OR-nodes with sub-DAGs not simultaneously satisfiable[Darwiche ’01, Darwiche-Marquis ’02]

  29. Outline • Review of DPLL algorithms • Extensions (Caching & Component Analysis) • Knowledge Compilation (FBDDs & Decision-DNNF) • Our Contributions • Decision-DNNF to FBDD conversion • Implications of the conversion • Applications to Probabilistic Databases • Conclusions

  30. Probabilistic Databases • Tuples are probabilistic (and independent) • “Ann” is present with probability 0.3 • What is the probability that Q is true on D? • Assign unique variables to tuples • Boolean formula FQ,D = (x1y1z1)  (x1y2z2)  (x2y3z2) • Q is true on D FQ,D is true y1 x1 0.5 z1 0.9 0.3 y2 1.0 0.5 x2 z2 0.1 y3 0.7 Boolean query Q:  x  y AsthmaPatient(x)  Friend (x, y)  Smoker(y) Pr(x1) = 0.3

  31. Probabilistic Databases • FQ,D = (x1y1z1)  (x1y2z2)  (x2y3z2) • Probability Computation Problem: Compute Pr(FQ,D) given Pr(x1), Pr(x2), …. • FQ,D can be written as a k-DNF • for fixed, monotone queries Q • For an important class of queries Q, we get • exponential lower bounds on decision-DNNFs • and model counting algorithms

  32. Outline • Review of DPLL algorithms • Extensions (Caching & Component Analysis) • Knowledge Compilation (FBDDs & Decision-DNNF) • Our Contributions • Decision-DNNF to FBDD conversion • Implications of the conversion • Applications to Probabilistic Databases • Conclusions

  33. Summary • Quasi-polynomial conversion of any decision-DNNF into an FBDD (polynomial for k-DNF) • Exponential lower bounds on model counting algorithms • d-DNNFs and AND-FBDDs are exponentially more powerful than decision-DNNFs • Applications in probabilistic databases

  34. Open Problems • A polynomial conversion of decision-DNNFs to FBDDs? • A more powerful syntactic subclass of d-DNNFs than decision-DNNFs? • d-DNNF is a semantic concept • No efficient algorithm to test if two sub-DAGs of an OR-node are simultaneously satisfiable • Approximate model counting?

  35. Thank You Questions?

More Related