draft
play

Draft Connecting Width and Structure in Knowledge Compilation - PowerPoint PPT Presentation

Draft Connecting Width and Structure in Knowledge Compilation Antoine Amarilli 1 , Mikal Monet 1 , 3 , Pierre Senellart 2 , 3 March 28th, 2018 1 LTCI, Tlcom ParisTech, Universit Paris-Saclay; Paris, France 2 cole normale suprieure,


  1. Draft Target classes in knowledge compilation For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width -based: • Bounded pathwidth / treewidth Boolean circuits, CNFs, DNFs, etc. → message passing algorithm for #SAT and probabilistic evaluation • Links with Bayesian networks 4/20

  2. Draft Target classes in knowledge compilation For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width -based: • Bounded pathwidth / treewidth Boolean circuits, CNFs, DNFs, etc. → message passing algorithm for #SAT and probabilistic evaluation • Links with Bayesian networks Semantics -based: • Ordered Binary Decision Diagrams (OBDDs)/ Deterministic Structured Decomposable Negation Normal Forms (d-SDNNFs) 4/20

  3. Draft Target classes in knowledge compilation For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width -based: • Bounded pathwidth / treewidth Boolean circuits, CNFs, DNFs, etc. → message passing algorithm for #SAT and probabilistic evaluation • Links with Bayesian networks Semantics -based: • Ordered Binary Decision Diagrams (OBDDs)/ Deterministic Structured Decomposable Negation Normal Forms (d-SDNNFs) → #SAT and probabilistic evaluation are easy because these classes have strong semantic constraints 4/20

  4. Draft Target classes in knowledge compilation For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width -based: • Bounded pathwidth / treewidth Boolean circuits, CNFs, DNFs, etc. → message passing algorithm for #SAT and probabilistic evaluation • Links with Bayesian networks Semantics -based: • Ordered Binary Decision Diagrams (OBDDs)/ Deterministic Structured Decomposable Negation Normal Forms (d-SDNNFs) → #SAT and probabilistic evaluation are easy because these classes have strong semantic constraints • Used to understand #SAT solvers 4/20

  5. Draft Target classes in knowledge compilation For #SAT and probabilistic evaluation, two main restrictions on compilation targets: Width -based: • Bounded pathwidth / treewidth Boolean circuits, CNFs, DNFs, etc. → message passing algorithm for #SAT and probabilistic evaluation • Links with Bayesian networks Semantics -based: • Ordered Binary Decision Diagrams (OBDDs)/ Deterministic Structured Decomposable Negation Normal Forms (d-SDNNFs) → #SAT and probabilistic evaluation are easy because these classes have strong semantic constraints • Used to understand #SAT solvers Question: what are the links beetween the two? 4/20

  6. Draft Plan O ( | C | × exp ( k )) • Circuit C of treewidth � k d-SDNNF 5/20

  7. Draft Plan O ( | C | × exp ( k )) • Circuit C of treewidth � k d-SDNNF • + ≃ matching lower bound 5/20

  8. Draft Plan O ( | C | × exp ( k )) • Circuit C of treewidth � k d-SDNNF • + ≃ matching lower bound Then O ( | ϕ | × exp ( k )) • DNF/CNF ϕ of pathwidth � k OBDD (not us) 5/20

  9. Draft Plan O ( | C | × exp ( k )) • Circuit C of treewidth � k d-SDNNF • + ≃ matching lower bound Then O ( | ϕ | × exp ( k )) • DNF/CNF ϕ of pathwidth � k OBDD (not us) • + matching lower bound 5/20

  10. Draft Plan O ( | C | × exp ( k )) • Circuit C of treewidth � k d-SDNNF • + ≃ matching lower bound Then O ( | ϕ | × exp ( k )) • DNF/CNF ϕ of pathwidth � k OBDD (not us) • + matching lower bound Then • Application to provenance and probabilistic databases 5/20

  11. Draft Treewidth and d-SDNNFs 6/20

  12. Draft Bounded treewidth Boolean circuits ∧ ∧ ∨ x ¬ ∨ ∧ t ¬ y z 7/20

  13. Draft Bounded treewidth Boolean circuits ∧ ∧ ∨ Treewidth of C = that of the underlying graph x ¬ ∨ ∧ t ¬ y z 7/20

  14. Draft Bounded treewidth Boolean circuits ∧ ∧ ∨ Treewidth of C = that of the underlying graph x ¬ ∨ ∧ t ¬ y z We can do message passing : Theorem (Lauritzen & Spielgelhalter, 1988) Fix k ∈ N . Given a Boolean circuit C of treewidth � k , we can compute its probability in time O ( f ( k ) × | C | ) , where f is singly exponential 7/20

  15. Draft d-SDNNF ∨ ∧ ∧ x ¬ ∧ y x ¬ ∧ y z z 8/20

  16. Draft d-SDNNF • Negation Normal Form : negations only applied to the leaves ∨ ∧ ∧ x ¬ ∧ y x ¬ ∧ y z z 8/20

  17. Draft d-SDNNF • Negation Normal Form : negations only applied to the leaves ∨ • Decomposable : inputs of ∧ -gates are ∧ ∧ independent (no variable has a path to two different inputs of the same x ¬ ∧ -gate) ∧ y x ¬ ∧ y z z 8/20

  18. Draft d-SDNNF • Negation Normal Form : negations only applied to the leaves ∨ • Decomposable : inputs of ∧ -gates are ∧ ∧ independent (no variable has a path to two different inputs of the same x ¬ ∧ -gate) ∧ → SAT can be solved efficiently y x ¬ ∧ y z z 8/20

  19. Draft d-SDNNF • Negation Normal Form : negations only applied to the leaves ∨ • Decomposable : inputs of ∧ -gates are ∧ ∧ independent (no variable has a path to two different inputs of the same x ¬ ∧ -gate) ∧ → SAT can be solved efficiently y x ¬ ∧ • Deterministic : inputs of ∨ -gates are y z z mutually exclusive 8/20

  20. Draft d-SDNNF • Negation Normal Form : negations only applied to the leaves ∨ • Decomposable : inputs of ∧ -gates are ∧ ∧ independent (no variable has a path to two different inputs of the same x ¬ ∧ -gate) ∧ → SAT can be solved efficiently y x ¬ ∧ • Deterministic : inputs of ∨ -gates are y z z mutually exclusive → #SAT and probability evaluation 8/20

  21. Draft d-SDNNF • Negation Normal Form : negations • only applied to the leaves ∨ • Decomposable : inputs of ∧ -gates are x • ∧ ∧ independent (no variable has a path y z to two different inputs of the same x ¬ ∧ -gate) ∧ → SAT can be solved efficiently y x ¬ ∧ • Deterministic : inputs of ∨ -gates are y z z mutually exclusive → #SAT and probability evaluation • Structured : there is a vtree that structures the ∧ -gates 8/20

  22. Draft d-SDNNF • Negation Normal Form : negations • only applied to the leaves ∨ • Decomposable : inputs of ∧ -gates are x • ∧ ∧ independent (no variable has a path y z to two different inputs of the same x ¬ ∧ -gate) ∧ → SAT can be solved efficiently y x ¬ ∧ • Deterministic : inputs of ∨ -gates are y z z mutually exclusive → #SAT and probability evaluation • Structured : there is a vtree that structures the ∧ -gates → Enumeration 8/20

  23. Draft Treewidth and d-SDNNFs: Upper bound Theorem (Bova & Szeider, 2017) Let C be a Boolean circuit on m variables of treewidth � k . There exists a d-SDNNF equivalent to C of size O ( m × g ( k )) , where g is doubly exponential 9/20

  24. Draft Treewidth and d-SDNNFs: Upper bound Theorem (Bova & Szeider, 2017) Let C be a Boolean circuit on m variables of treewidth � k . There exists a d-SDNNF equivalent to C of size O ( m × g ( k )) , where g is doubly exponential Drawbacks : non constructive 9/20

  25. Draft Treewidth and d-SDNNFs: Upper bound Theorem (Bova & Szeider, 2017) Let C be a Boolean circuit on m variables of treewidth � k . There exists a d-SDNNF equivalent to C of size O ( m × g ( k )) , where g is doubly exponential Drawbacks : non constructive Theorem (This paper) Let C be a Boolean circuit of treewidth � k . We can compute a d-SDNNF equivalent to C in time O ( | C | × f ( k )) , where f is singly exponential 9/20

  26. Draft Treewidth and d-SDNNFs: Upper bound Theorem (Bova & Szeider, 2017) Let C be a Boolean circuit on m variables of treewidth � k . There exists a d-SDNNF equivalent to C of size O ( m × g ( k )) , where g is doubly exponential Drawbacks : non constructive Theorem (This paper) Let C be a Boolean circuit of treewidth � k . We can compute a d-SDNNF equivalent to C in time O ( | C | × f ( k )) , where f is singly exponential Applications: recapturing message passing, and enumeration of satisfying valuations 9/20

  27. Draft Construction sketch 10/20

  28. Draft Construction sketch 10/20

  29. Draft Construction sketch 10/20

  30. Draft Construction sketch 10/20

  31. Draft Construction sketch 10/20

  32. Draft Construction sketch 10/20

  33. Draft Construction sketch 10/20

  34. Draft Construction sketch 10/20

  35. Draft Construction sketch 10/20

  36. Draft Construction sketch 10/20

  37. Draft Construction sketch 10/20

  38. Draft Construction sketch 10/20

  39. Draft Construction sketch 10/20

  40. Draft Construction sketch 10/20

  41. Draft Construction sketch 10/20

  42. Draft Construction sketch 10/20

  43. Draft Construction sketch 10/20

  44. Draft Construction sketch 10/20

  45. Draft Treewidth and d-SDNNFs: Lower bound • Already applies to very restricted Boolean circuits: monotone DNFs and CNFs 11/20

  46. Draft Treewidth and d-SDNNFs: Lower bound • Already applies to very restricted Boolean circuits: monotone DNFs and CNFs • Treewidth of a DNF/CNF: that of its Gaifman graph 11/20

  47. Draft Treewidth and d-SDNNFs: Lower bound • Already applies to very restricted Boolean circuits: monotone DNFs and CNFs • Treewidth of a DNF/CNF: that of its Gaifman graph • Arity: size of the largest clause 11/20

  48. Draft Treewidth and d-SDNNFs: Lower bound • Already applies to very restricted Boolean circuits: monotone DNFs and CNFs • Treewidth of a DNF/CNF: that of its Gaifman graph • Arity: size of the largest clause • Degree: maximal number of clauses to which a variable belongs 11/20

  49. Draft Treewidth and d-SDNNFs: Lower bound • Already applies to very restricted Boolean circuits: monotone DNFs and CNFs • Treewidth of a DNF/CNF: that of its Gaifman graph • Arity: size of the largest clause • Degree: maximal number of clauses to which a variable belongs Theorem Let ϕ be a monotone DNF of treewidth k , let a := arity ( ϕ ) and k � � d := degree ( ϕ ) . Then any d-SDNNF for ϕ has size � 2 3 × a 3 × d 2 − 1 11/20

  50. Draft Treewidth and d-SDNNFs: Lower bound • Already applies to very restricted Boolean circuits: monotone DNFs and CNFs • Treewidth of a DNF/CNF: that of its Gaifman graph • Arity: size of the largest clause • Degree: maximal number of clauses to which a variable belongs Theorem Let ϕ be a monotone DNF of treewidth k , let a := arity ( ϕ ) and k � � d := degree ( ϕ ) . Then any d-SDNNF for ϕ has size � 2 3 × a 3 × d 2 − 1 • For CNFs , the bound even works for (non-deterministic) SDNNF 11/20

  51. Draft Treewidth and d-SDNNFs: Lower bound • Already applies to very restricted Boolean circuits: monotone DNFs and CNFs • Treewidth of a DNF/CNF: that of its Gaifman graph • Arity: size of the largest clause • Degree: maximal number of clauses to which a variable belongs Theorem Let ϕ be a monotone DNF of treewidth k , let a := arity ( ϕ ) and k � � d := degree ( ϕ ) . Then any d-SDNNF for ϕ has size � 2 3 × a 3 × d 2 − 1 • For CNFs , the bound even works for (non-deterministic) SDNNF • The bound is generic : it applies to any monotone DNF/CNF 11/20

  52. Draft Pathwidth and OBDDs 12/20

  53. Draft Ordered Binary Decision Diagrams (OBDDs) • DAG with sink nodes {⊤ , ⊥} and internal nodes labeled by variables 13/20

  54. Draft Ordered Binary Decision Diagrams (OBDDs) • DAG with sink nodes {⊤ , ⊥} and internal nodes labeled by variables • Semantics: follow the path of an assignment to get the value of the Boolean function 13/20

  55. Draft Ordered Binary Decision Diagrams (OBDDs) • DAG with sink nodes {⊤ , ⊥} and internal nodes labeled by variables • Semantics: follow the path of an assignment to get the value of the Boolean function • There is a total order on the variables v = X 1 X 2 X 3 X 4 such that each root-to-sink path is compatible with v 13/20

  56. Draft Ordered Binary Decision Diagrams (OBDDs) • DAG with sink nodes {⊤ , ⊥} and internal nodes labeled by variables • Semantics: follow the path of an assignment to get the value of the Boolean function • There is a total order on the variables v = X 1 X 2 X 3 X 4 such that each root-to-sink path is compatible with v • Compute probability bottom-up 13/20

  57. Draft Ordered Binary Decision Diagrams (OBDDs) • DAG with sink nodes {⊤ , ⊥} and internal nodes labeled by variables • Semantics: follow the path of an assignment to get the value of the Boolean function • There is a total order on the variables v = X 1 X 2 X 3 X 4 such that each root-to-sink path is compatible with v • Compute probability bottom-up Pr π ( • ) = π ( X 3 ) × Pr π ( • ) +( 1 − π ( X 3 )) × Pr π ( • ) 13/20

  58. Draft Ordered Binary Decision Diagrams (OBDDs) • DAG with sink nodes {⊤ , ⊥} and internal nodes labeled by variables • Semantics: follow the path of an assignment to get the value of the Boolean function • There is a total order on the variables v = X 1 X 2 X 3 X 4 such that each root-to-sink path is compatible with v • Compute probability bottom-up Pr π ( • ) = π ( X 3 ) × Pr π ( • ) +( 1 − π ( X 3 )) × Pr π ( • ) • Width of the OBDD ≃ largest number of nodes that are labeled by the same variable 13/20

  59. Draft Pathwidth and OBDDs: Upper and lower bounds Upper bound: Theorem (Bova & Slivovsky, 2017) Let ϕ be a CNF or DNF of pathwidth k . We can compile ϕ into an OBDD of width 2 k + 2 (hence of size � nb_vars × 2 k + 2 ) 14/20

  60. Draft Pathwidth and OBDDs: Upper and lower bounds Upper bound: Theorem (Bova & Slivovsky, 2017) Let ϕ be a CNF or DNF of pathwidth k . We can compile ϕ into an OBDD of width 2 k + 2 (hence of size � nb_vars × 2 k + 2 ) Lower bound: Theorem (This paper) Let ϕ be a monotone CNF or DNF of pathwidth k , and let a := arity ( ϕ ) k � � and d := degree ( ϕ ) . Then any OBDD for ϕ has width � 2 a 3 × d 2 14/20

  61. Draft Pathwidth and OBDDs: Upper and lower bounds Upper bound: Theorem (Bova & Slivovsky, 2017) Let ϕ be a CNF or DNF of pathwidth k . We can compile ϕ into an OBDD of width 2 k + 2 (hence of size � nb_vars × 2 k + 2 ) Lower bound: Theorem (This paper) Let ϕ be a monotone CNF or DNF of pathwidth k , and let a := arity ( ϕ ) k � � and d := degree ( ϕ ) . Then any OBDD for ϕ has width � 2 a 3 × d 2 • Again, this is a generic lower bound! 14/20

  62. Draft Pathwidth and OBDDs: Upper and lower bounds Upper bound: Theorem (Bova & Slivovsky, 2017) Let ϕ be a CNF or DNF of pathwidth k . We can compile ϕ into an OBDD of width 2 k + 2 (hence of size � nb_vars × 2 k + 2 ) Lower bound: Theorem (This paper) Let ϕ be a monotone CNF or DNF of pathwidth k , and let a := arity ( ϕ ) k � � and d := degree ( ϕ ) . Then any OBDD for ϕ has width � 2 a 3 × d 2 • Again, this is a generic lower bound! • For monotone DNF/CNF ϕ of constant arity and degree, the smallest width of an OBDD for ϕ is 2 Θ( pathwidth ( ϕ )) 14/20

  63. Draft Application to provenance 15/20

  64. Draft Provenance: definition Definition The provenance Prov ( q , I ) of query q on relational instance I is the Boolean function with facts of I as variables and such that for any valuation ν : I → { 0 , 1 } , Prov ( q , I ) evaluates to ⊤ under ν iff { F ∈ I | ν ( F ) = 1 } | = q 16/20

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