Skip to main content

DPMC: Weighted Model Counting by Dynamic Programming on Project-Join Trees

  • Conference paper
  • First Online:
Principles and Practice of Constraint Programming (CP 2020)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12333))

Abstract

We propose a unifying dynamic-programming framework to compute exact literal-weighted model counts of formulas in conjunctive normal form. At the center of our framework are project-join trees, which specify efficient project-join orders to apply additive projections (variable eliminations) and joins (clause multiplications). In this framework, model counting is performed in two phases. First, the planning phase constructs a project-join tree from a formula. Second, the execution phase computes the model count of the formula, employing dynamic programming as guided by the project-join tree. We empirically evaluate various methods for the planning phase and compare constraint-satisfaction heuristics with tree-decomposition tools. We also investigate the performance of different data structures for the execution phase and compare algebraic decision diagrams with tensors. We show that our dynamic-programming model-counting framework DPMC is competitive with the state-of-the-art exact weighted model counters Cachet, c2d, d4, and miniC2D.

Work supported in part by NSF grants IIS-1527668, CCF-1704883, IIS-1830549, and DMS-1547433.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    A one-shot algorithm outputs exactly one solution and then terminates immediately.

  2. 2.

    An anytime algorithm outputs better and better solutions the longer it runs.

  3. 3.

    https://www.cs.rochester.edu/u/kautz/Cachet/Model_Counting_Benchmarks.

  4. 4.

    Excluding 11 benchmarks double-counted by [26].

  5. 5.

    http://www.cril.univ-artois.fr/KC/benchmarks.html.

  6. 6.

    Including 73 benchmarks missed by [26].

References

  1. Abseher, M., Musliu, N., Woltran, S.: htd – a free, open-source framework for (customized) tree decompositions and beyond. In: Salvagnin, D., Lombardi, M. (eds.) CPAIOR 2017. LNCS, vol. 10335, pp. 376–386. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-59776-8_30

    Chapter  MATH  Google Scholar 

  2. Aguirre, A.S.M., Vardi, M.Y.: Random 3-SAT and BDDs: the plot thickens further. In: Walsh, T. (ed.) CP 2001. LNCS, vol. 2239, pp. 121–136. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-45578-7_9

    Chapter  Google Scholar 

  3. Arad, I., Landau, Z.: Quantum computation and the evaluation of tensor networks. SICOMP 39(7), 3089–3121 (2010). https://doi.org/10.1137/080739379

    Article  MathSciNet  MATH  Google Scholar 

  4. Bacchus, F., Dalmao, S., Pitassi, T.: Solving #SAT and Bayesian inference with backtracking search. JAIR 34, 391–442 (2009). https://doi.org/10.1613/jair.2648

    Article  MathSciNet  MATH  Google Scholar 

  5. Bahar, R.I., et al.: Algebraic decision diagrams and their applications. Formal Method Syst. Des. 10(2–3), 171–206 (1997). https://doi.org/10.1023/A:1008699807402

    Article  Google Scholar 

  6. Baumgartner, G., et al.: Synthesis of high-performance parallel programs for a class of ab initio quantum chemistry models. IEEE 93(2), 276–292 (2005). https://doi.org/10.1109/JPROC.2004.840311

    Article  Google Scholar 

  7. Bellman, R.: Dynamic programming. Science 153(3731), 34–37 (1966). https://doi.org/10.1126/science.153.3731.34

    Article  MATH  Google Scholar 

  8. Bouquet, F.: Gestion de la dynamicité et énumération d’impliquants premiers: une approche fondée sur les Diagrammes de Décision Binaire. Ph.D. thesis, Aix-Marseille 1 (1999), https://www.theses.fr/1999AIX11011

  9. Burch, J.R., Clarke, E.M., Long, D.E.: Symbolic model checking with partitioned transition relations. In: VLSI, pp. 49–58 (1991). http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.23.1932

  10. Burchard, J., Schubert, T., Becker, B.: Laissez-Faire caching for parallel #SAT solving. In: Heule, M., Weaver, S. (eds.) SAT 2015. LNCS, vol. 9340, pp. 46–61. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-24318-4_5

    Chapter  MATH  Google Scholar 

  11. Charwat, G., Woltran, S.: BDD-based dynamic programming on tree decompositions. Technical report, Technische Universität Wien, Institut für Informationssysteme (2016)

    Google Scholar 

  12. Chavira, M., Darwiche, A.: Compiling Bayesian networks using variable elimination. In: IJCAI, pp. 2443–2449 (2007). https://dl.acm.org/doi/10.5555/1625275.1625669

  13. Cichocki, A.: Era of big data processing: a new approach via tensor networks and tensor decompositions. arXiv preprint arXiv:1403.2048 (2014)

  14. Cichocki, A., et al.: Tensor decompositions for signal processing applications: from two-way to multiway component analysis. IEEE SPM 32(2), 145–163 (2015). https://doi.org/10.1109/MSP.2013.2297439

    Article  Google Scholar 

  15. Clarke, E., Biere, A., Raimi, R., Zhu, Y.: Bounded model checking using satisfiability solving. Formal Method Syst. Des. 19(1), 7–34 (2001). https://doi.org/10.1023/A:1011276507260

    Article  MATH  Google Scholar 

  16. Dal, G.H., Laarman, A.W., Lucas, P.J.: Parallel probabilistic inference by weighted model counting. In: PGM, pp. 97–108 (2018). http://proceedings.mlr.press/v72/dal18a.html

  17. Dalmau, V., Kolaitis, P.G., Vardi, M.Y.: Constraint satisfaction, bounded treewidth, and finite-variable logics. In: Van Hentenryck, P. (ed.) CP 2002. LNCS, vol. 2470, pp. 310–326. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-46135-3_21

    Chapter  Google Scholar 

  18. Darwiche, A.: Dynamic jointrees. In: UAI, pp. 97–104 (1998). https://dl.acm.org/doi/10.5555/2074094.2074106

  19. Darwiche, A.: New advances in compiling CNF to decomposable negation normal form. In: ECAI, pp. 318–322 (2004). https://dl.acm.org/doi/10.5555/3000001.3000069

  20. Dechter, R.: Bucket elimination: a unifying framework for reasoning. AIJ 113(1–2), 41–85 (1999). https://doi.org/10.1016/S0004-3702(99)00059-4

    Article  MathSciNet  MATH  Google Scholar 

  21. Dechter, R.: Constraint Processing. Morgan Kaufmann (2003). https://doi.org/10.1016/B978-1-55860-890-0.X5000-2

  22. Dechter, R., Pearl, J.: Tree clustering for constraint networks. AIJ 38(3), 353–366 (1989). https://doi.org/10.1016/0004-3702(89)90037-4

    Article  MathSciNet  MATH  Google Scholar 

  23. van Dijk, T., van de Pol, J.: Sylvan: multi-core decision diagrams. In: Baier, C., Tinelli, C. (eds.) TACAS 2015. LNCS, vol. 9035, pp. 677–691. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46681-0_60

    Chapter  Google Scholar 

  24. Domshlak, C., Hoffmann, J.: Probabilistic planning via heuristic forward search and weighted model counting. JAIR 30, 565–620 (2007). https://dl.acm.org/doi/10.5555/1622637.1622652

    Article  MathSciNet  Google Scholar 

  25. Dudek, J.M., Dueñas-Osorio, L., Vardi, M.Y.: Efficient contraction of large tensor networks for weighted model counting through graph decompositions. arXiv preprint arXiv:1908.04381 (2019)

  26. Dudek, J.M., Phan, V.H., Vardi, M.Y.: ADDMC: weighted model counting with algebraic decision diagrams. In: AAAI, vol. 34, pp. 1468–1476 (2020). https://doi.org/10.1609/aaai.v34i02.5505

  27. Dudek, J.M., Vardi, M.Y.: Parallel weighted model counting with tensor networks. In: MCW (2020). https://mccompetition.org/assets/files/2020/MCW_2020_paper_1.pdf

  28. Evenbly, G., Pfeifer, R.N.: Improving the efficiency of variational tensor network algorithms. Phys. Rev. B 89(24), 245118 (2014). https://doi.org/10.1103/PhysRevB.89.245118

    Article  Google Scholar 

  29. Fargier, H., Marquis, P., Niveau, A., Schmidt, N.: A knowledge compilation map for ordered real-valued decision diagrams. In: AAAI (2014). https://dl.acm.org/doi/10.5555/2893873.2894036

  30. Fatahalian, K., Sugerman, J., Hanrahan, P.: Understanding the efficiency of GPU algorithms for matrix-matrix multiplication. In: SIGGRAPH/EUROGRAPHICS, pp. 133–137 (2004). https://doi.org/10.1145/1058129.1058148

  31. Fichte, J.K., Hecher, M., Thier, P., Woltran, S.: Exploiting database management systems and treewidth for counting. In: Komendantskaya, E., Liu, Y. (eds.) PADL 2020. LNCS, vol. 12007, pp. 151–167. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-39197-3_10

    Chapter  Google Scholar 

  32. Fichte, J.K., Hecher, M., Zisser, M.: An improved GPU-based SAT model counter. In: Schiex, T., de Givry, S. (eds.) CP 2019. LNCS, vol. 11802, pp. 491–509. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-30048-7_29

    Chapter  Google Scholar 

  33. Gogate, V., Domingos, P.: Approximation by Quantization. In: UAI, pp. 247–255 (2011). https://dl.acm.org/doi/10.5555/3020548.3020578

  34. Gomes, C.P., Sabharwal, A., Selman, B.: Model counting. In: Handbook of Satisfiability (2009). https://doi.org/10.3233/978-1-58603-929-5-633. (Chap. 20)

  35. Hoey, J., St-Aubin, R., Hu, A., Boutilier, C.: SPUDD: stochastic planning using decision diagrams. In: UAI, pp. 279–288 (1999). https://arxiv.org/abs/1301.6704

  36. Jégou, P., Kanso, H., Terrioux, C.: Improving exact solution counting for decomposition methods. In: ICTAI, pp. 327–334. IEEE (2016). https://doi.org/10.1109/ICTAI.2016.0057

  37. Kask, K., Dechter, R., Larrosa, J., Dechter, A.: Unifying tree decompositions for reasoning in graphical models. AIJ 166(1–2), 165–193 (2005). https://doi.org/10.1016/j.artint.2005.04.004

    Article  MathSciNet  MATH  Google Scholar 

  38. Kjolstad, F., Kamil, S., Chou, S., Lugato, D., Amarasinghe, S.: The tensor algebra compiler. PACMPL 1(OOPSLA), 1–29 (2017). https://doi.org/10.1145/3133901

    Article  Google Scholar 

  39. Klebanov, V., Manthey, N., Muise, C.: SAT-based analysis and quantification of information flow in programs. In: Joshi, K., Siegle, M., Stoelinga, M., D’Argenio, P.R. (eds.) QEST 2013. LNCS, vol. 8054, pp. 177–192. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40196-1_16

    Chapter  Google Scholar 

  40. Kolaitis, P.G., Vardi, M.Y.: Conjunctive-query containment and constraint satisfaction. JCSS 61(2), 302–332 (2000). https://doi.org/10.1006/jcss.2000.1713

    Article  MathSciNet  MATH  Google Scholar 

  41. Koriche, F., Lagniez, J.M., Marquis, P., Thomas, S.: Knowledge compilation for model counting: affine decision trees. In: IJCAI (2013). https://dl.acm.org/doi/10.5555/2540128.2540265

  42. Koster, A.M., Bodlaender, H.L., Van Hoesel, S.P.: Treewidth: computational experiments. Electron Notes Discrete Math. 8, 54–57 (2001). https://doi.org/10.1016/S1571-0653(05)80078-2

    Article  MathSciNet  MATH  Google Scholar 

  43. Kourtis, S., Chamon, C., Mucciolo, E., Ruckenstein, A.: Fast counting with tensor networks. SciPost Phys. 7(5) (2019). https://doi.org/10.21468/SciPostPhys.7.5.060

  44. Kwiatkowska, M., Norman, G., Parker, D.: Stochastic model checking. In: Bernardo, M., Hillston, J. (eds.) SFM 2007. LNCS, vol. 4486, pp. 220–270. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-72522-0_6

    Chapter  Google Scholar 

  45. Lagniez, J.M., Marquis, P.: Preprocessing for propositional model counting. In: AAAI (2014). https://dl.acm.org/doi/10.5555/2892753.2892924

  46. Lagniez, J.M., Marquis, P.: An improved decision-DNNF compiler. In: IJCAI, pp. 667–673 (2017). https://doi.org/10.24963/ijcai.2017/93

  47. Lawson, C.L., Hanson, R.J., Kincaid, D.R., Krogh, F.T.: Basic linear algebra subprograms for Fortran usage. TOMS 5(3), 308–323 (1979). https://doi.org/10.1145/355841.355847

    Article  MATH  Google Scholar 

  48. McMahan, B.J., Pan, G., Porter, P., Vardi, M.Y.: Projection pushing revisited. In: Bertino, E., et al. (eds.) EDBT 2004. LNCS, vol. 2992, pp. 441–458. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-24741-8_26

    Chapter  Google Scholar 

  49. Morgenstern, A., Schneider, K.: From LTL to symbolically represented deterministic automata. In: Logozzo, F., Peled, D.A., Zuck, L.D. (eds.) VMCAI 2008. LNCS, vol. 4905, pp. 279–293. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78163-9_24

    Chapter  Google Scholar 

  50. Naveh, Y., et al.: Constraint-based random stimuli generation for hardware verification. AI Mag. 28(3), 13–13 (2007). https://dl.acm.org/doi/10.5555/1597122.1597129

    MathSciNet  Google Scholar 

  51. Oliphant, T.E.: A guide to NumPy, vol. 1. Trelgol Publishing, USA (2006). https://dl.acm.org/doi/book/10.5555/2886196

  52. Oztok, U., Darwiche, A.: A top-down compiler for sentential decision diagrams. In: IJCAI (2015). https://dl.acm.org/doi/10.5555/2832581.2832687

  53. Palacios, H., Geffner, H.: Compiling uncertainty away in conformant planning problems with bounded width. JAIR 35, 623–675 (2009). https://dl.acm.org/doi/10.5555/1641503.1641518

    Article  MathSciNet  Google Scholar 

  54. Pan, G., Vardi, M.Y.: Symbolic techniques in satisfiability solving. J. Autom. Reasoning 35(1–3), 25–50 (2005). https://doi.org/10.1007/s10817-005-9009-7

    Article  MathSciNet  MATH  Google Scholar 

  55. Robertson, N., Seymour, P.D.: Graph minors. X. Obstructions to tree-decomposition. J. Comb. Theory B 52(2), 153–190 (1991). https://doi.org/10.1016/0095-8956(91)90061-N

    Article  MathSciNet  MATH  Google Scholar 

  56. Samer, M., Szeider, S.: Algorithms for propositional model counting. J. Discrete Algorithms 8(1), 50–64 (2010). https://doi.org/10.1007/978-3-540-75560-9_35

    Article  MathSciNet  MATH  Google Scholar 

  57. Samer, M., Szeider, S.: Constraint satisfaction with bounded treewidth revisited. JCSS 76(2), 103–114 (2010). https://doi.org/10.1016/j.jcss.2009.04.003

    Article  MathSciNet  MATH  Google Scholar 

  58. Sang, T., Bacchus, F., Beame, P., Kautz, H.A., Pitassi, T.: Combining component caching and clause learning for effective model counting. SAT 4, 20–28 (2004). http://www.satisfiability.org/SAT04/accepted/65.html

    Google Scholar 

  59. Sang, T., Beame, P., Kautz, H.A.: Performing Bayesian inference by weighted model counting. In: AAAI, vol. 1, pp. 475–482. AAAI Press (2005). https://dl.acm.org/doi/10.5555/1619332.1619409

  60. Shachter, R.D., Andersen, S.K., Szolovits, P.: Global conditioning for probabilistic inference in belief networks. In: UAI, pp. 514–522. Elsevier (1994). https://doi.org/10.1016/B978-1-55860-332-5.50070-5

  61. Sinz, C., Kaiser, A., Küchlin, W.: Formal methods for the validation of automotive product configuration data. AI EDAM 17(1), 75–97 (2003). https://doi.org/10.1017/S0890060403171065

    Article  Google Scholar 

  62. Smilde, A., Bro, R., Geladi, P.: Multi-way Analysis: Applications in the Chemical Sciences. Wiley, Hoboken (2005). https://doi.org/10.1002/0470012110

    Book  Google Scholar 

  63. Somenzi, F.: CUDD: CU decision diagram package-release 3.0.0. University of Colorado at Boulder (2015). https://github.com/ivmai/cudd

  64. Strasser, B.: Computing tree decompositions with FlowCutter: PACE 2017 submission. arXiv preprint arXiv:1709.08949 (2017)

  65. Tabajara, L.M., Vardi, M.Y.: Factored Boolean functional synthesis. In: FMCAD, pp. 124–131. IEEE (2017). https://dl.acm.org/doi/10.5555/3168451.3168480

  66. Tamaki, H.: Positive-instance-driven dynamic programming for treewidth. J. Comb. Optim. 37(4), 1283–1311 (2019). https://doi.org/10.1007/s10878-018-0353-z

    Article  MathSciNet  MATH  Google Scholar 

  67. Tarjan, R.E., Yannakakis, M.: Simple linear-time algorithms to test chordality of graphs, test acyclicity of hypergraphs, and selectively reduce acyclic hypergraphs. SICOMP 13(3), 566–579 (1984). https://doi.org/10.1137/0213035

    Article  MathSciNet  MATH  Google Scholar 

  68. Uribe, T.E., Stickel, M.E.: Ordered binary decision diagrams and the Davis-Putnam procedure. In: Jouannaud, J.-P. (ed.) CCL 1994. LNCS, vol. 845, pp. 34–49. Springer, Heidelberg (1994). https://doi.org/10.1007/BFb0016843

    Chapter  Google Scholar 

  69. Valiant, L.G.: The complexity of enumeration and reliability problems. SICOMP 8(3), 410–421 (1979). https://doi.org/10.1137/0208032

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Vu H. N. Phan .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Dudek, J.M., Phan, V.H.N., Vardi, M.Y. (2020). DPMC: Weighted Model Counting by Dynamic Programming on Project-Join Trees. In: Simonis, H. (eds) Principles and Practice of Constraint Programming. CP 2020. Lecture Notes in Computer Science(), vol 12333. Springer, Cham. https://doi.org/10.1007/978-3-030-58475-7_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-58475-7_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-58474-0

  • Online ISBN: 978-3-030-58475-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics