Skip to main content Accessibility help

The magic of logical inference in probabilistic programming


Today, there exist many different probabilistic programming languages as well as more inference mechanisms for these languages. Still, most logic programming-based languages use backward reasoning based on Selective Linear Definite resolution for inference. While these methods are typically computationally efficient, they often can neither handle infinite and/or continuous distributions nor evidence. To overcome these limitations, we introduce distributional clauses, a variation and extension of Sato's distribution semantics. We also contribute a novel approximate inference method that integrates forward reasoning with importance sampling, a well-known technique for probabilistic inference. In order to achieve efficiency, we integrate two logic programming techniques to direct forward sampling. Magic sets are used to focus on relevant parts of the program, while the integration of backward reasoning allows one to identify and avoid regions of the sample space that are inconsistent with the evidence.

Hide All
Angelopoulos, N. and Cussens, J. 2003. Prolog issues and experimental results of an MCMC algorithm. In Web Knowledge Management and Decision Support, Bartenstein, O., Geske, U., Hannebauer, M. and Yoshie, O., Eds. Lecture Notes in Computer Science, vol. 2543. Springer, Berlin, Germany 186196.
Bancilhon, F., Maier, D., Sagiv, Y. and Jeffrey, D. Ullman. 1986. Magic sets and other strange ways to implement logic programs (extended abstract). In Proceedings of the Fifth ACM SIGACT-SIGMOD Symposium on Principles of Database Systems (PODS 1986). ACM, Cambridge, MA, 115.
Baral, C., Gelfond, M. and Rushton, N. 2009. Probabilistic reasoning with answer sets. Theory and Practice of Logic Programming 9, 1, 57144.
De Raedt, L., Demoen, B., Fierens, D., Gutmann, B., Janssens, G., Kimmig, A., Landwehr, N., Mantadelis, T., Meert, W., Rocha, R., Santos Costa, V., Thon, I. and Vennekens, J. 2008. Towards digesting the alphabet-soup of statistical relational learning. In Proceedings of the 1st Workshop on Probabilistic Programming: Universal Languages, Systems and Applications, Roy, D., Winn, J., McAllester, D., Mansinghka, V. and Tenenbaum, J., Eds. Whistler, British Columbia, Canada.
De Raedt, L., Frasconi, P., Kersting, K. and Muggleton, S. 2008. Probabilistic Inductive Logic Programming – Theory and Applications. LNCS, vol. 4911. Springer, Berlin, Germany.
De Raedt, L., Kimmig, A. and Toivonen, H. 2007. ProbLog: A probabilistic Prolog and its application in link discovery. In Proceedings of the 20th International Joint Conference on Artificial Intelligence (IJCAI) Hyderabad, India, January 6–12. 24622467.
Eisner, J., Goldlust, E. and Smith, N. 2005. Compiling comp ling: Weighted dynamic programming and the Dyna language. In Proceedings of the Human Language Technology Conference and Conference on Empirical Methods in Natural Language Processing (HLT/EMNLP-05), Vancouver, BC, Canada, October 68.
Fuhr, N. 2000. Probabilistic Datalog: Implementing logical information retrieval for advanced applications. Journal of the American Society for Information Science (JASIS) 51, 2, 95110.
Getoor, L. and Taskar, B. 2007. An Introduction to Statistical Relational Learning. MIT Press, Cambridge, MA.
Gogate, V. and Dechter, R. 2011. SampleSearch: Importance sampling in presence of determinism. Artificial Intelligence 175, 694729.
Goodman, N., Mansinghka, V. K., Roy, D. M., Bonawitz, K. and Tenenbaum, J. B. 2008. Church: A language for generative models. In Proceedings of the 24th Conference in Uncertainty in Artificial Intelligence, Helsinki, Finland, July 9–12. AUAI Press, Helsinki, Finland, 220229.
Gutmann, B., Jaeger, M. and De Raedt, L. 2010. Extending ProbLog with continuous distributions. In Proceedings of the 20th International Conference on Inductive Logic Programming (ILP–10), Firenze, Italy, June 27–30, Frasconi, P. and Lisi, F. A., Eds. Springer, Berlin, Germany.
Kersting, K. and De Raedt, L. 2008. Basic principles of learning Bayesian logic programs. See De Raedt et al. (2008), 189–221.
Kimmig, A., Demoen, B., DeRaedt, L. Raedt, L., Santos Costa, V. and Rocha, R. 2011. On the implementation of the probabilistic logic programming language ProbLog. Theory and Practice of Logic Programming (TPLP) 11, 235262.
Koller, D. and Friedman, N. 2009. Probabilistic Graphical Models: Principles and Techniques. MIT Press, Cambridge, MA.
Mantadelis, T. and Janssens, G. 2010. Dedicated tabling for a probabilistic setting. In Technical Communications of the 26th International Conference on Logic Programming (ICLP-10), Hermenegildo, M. V. and Schaub, T., Eds. LIPIcs, vol. 7. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 124133.
Milch, B., Marthi, B., Russell, S., Sontag, D., Ong, D. and Kolobov, A. 2005. BLOG: Probabilistic models with unknown objects. In Proceedings of THE Nineteenth International Joint Conference on Artificial Intelligence (IJCAI), Edinburgh, Scotland, UK, July 30–August 5. Springer Verlag, Berlin, Germany, 13521359.
Milch, B., Marthi, B., Sontag, D., Russell, S., Ong, D. L. and Kolobov, A. 2005. Approximate inference for infinite contingent Bayesian networks. In Proceedings of the Tenth International Workshop on Artificial Intelligence and Statistics, January 6–8, Barbados, Cowell, R. G. and Ghahramani, Z., Eds. Society for Artificial Intelligence and Statistics, New Jersey, 238245. (Available electronically at
Nilsson, U. and Małiszyński, J. 1996. Logic, Programming And Prolog, 2nd ed. Wiley, Hoboken, NJ.
Pfeffer, A. 2001. IBAL: A probabilistic rational programming language. In Seventeenth International Joint Conference on Artificial Intelligence (IJCAI), Seattle, Washington, August 4–10. Springer, Berlin, Germany, 733740.
Poole, D. 2008. The independent choice logic and beyond. In Probabilistic Inductive Logic Programming – Theory and Applications, De Raedt, L., Frasconi, P., Kersting, K. and Muggleton, S., Eds. LNCS, vol. 4911. Springer, Berlin, Germany, 222243.
Richardson, M. and Domingos, P. 2006. Markov logic networks. Machine Learning 62, 1–2, 107136.
Santos Costa, V., Page, D. and Cussens, J. 2008. CLP(BN): Constraint logic programming for probabilistic knowledge. See De Raedt et al. (2008), 156–188.
Sato, T. 1995. A statistical learning method for logic programs with distribution semantics. In Proceedings of the Twelth International Conference on Logic Programming (ICLP 1995). MIT Press, Cambridge, MA, 715729.
Sato, T. and Kameya, Y. 2001. Parameter learning of logic programs for symbolic-statistical modeling. Journal of Artificial Intelligence Resesearch (JAIR) 15, 391454.
Vennekens, J., Denecker, M. and Bruynooghe, M. 2009. CP-logic: A language of causal probabilistic events and its relation to logic programming. Theory and Practice of Logic Programming 9, 3, 245308.
Wasserman, L. 2003. All of Statistics: A Concise Course in Statistical Inference (Springer Texts in Statistics). Springer, Berlin, Germany.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Theory and Practice of Logic Programming
  • ISSN: 1471-0684
  • EISSN: 1475-3081
  • URL: /core/journals/theory-and-practice-of-logic-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *



Altmetric attention score

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed