Misplaced Pages

ProbLog

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Probabilistic logic programming language
ProbLog
Original author(s)DTAI research lab (KU Leuven)
Initial releaseNovember 11, 2007 (2007-11-11)
Stable release2.1
Written inPython
Operating systemLinux, Mac OS X, Microsoft Windows
TypeProbabilistic logic
License Apache License, Version 2.0
Websitedtai.cs.kuleuven.be/problog/

ProbLog is a probabilistic logic programming language that extends Prolog with probabilities. It minimally extends Prolog by adding the notion of a probabilistic fact, which combines the idea of logical atoms and random variables. Similarly to Prolog, ProbLog can query an atom. While Prolog returns the truth value of the queried atom, ProbLog returns the probability of it being true.

Semantics

A probabilistic fact is a pair ( p , a ) {\displaystyle (p,a)} with a {\displaystyle a} a ground atom and p [ 0 , 1 ] {\displaystyle p\in } the probability of a {\displaystyle a} being true. A rule is defined by an atom h {\displaystyle h} , called the head, and a finite set of n {\displaystyle n} literals { b 1 , b 2 , . . . , b n } {\displaystyle \{b_{1},b_{2},...,b_{n}\}} , called the body. ProbLog programs consist of a set of probabilistic facts F {\displaystyle {\mathcal {F}}} and a set of rules R {\displaystyle {\mathcal {R}}} . Using the distribution semantics, a probability distribution is defined over the two-valued well-founded models of the atoms in the program. The probability of a model is defined as P ( M ) = l M P ( l ) {\displaystyle P(M)=\prod _{l\in M}P(l)} where the product runs over all the literals in the model M {\displaystyle M} . For a query atom q {\displaystyle q} the distribution semantics defines a probability for the query P ( q ) = M q P ( M ) = M q l M P ( l ) {\displaystyle P(q)=\sum _{M\models q}P(M)=\sum _{M\models q}\prod _{l\in M}P(l)} in which the sum runs over all the models where q {\displaystyle q} is true.

ProbLog supports multiple tasks:

  • Probabilistic inference: calculate P ( q ) {\displaystyle P(q)}
  • Most probable explanation: calculate the most probable model probability max M q P ( M ) {\displaystyle \max _{M\models q}P(M)}
  • Sampling: generate samples of q {\displaystyle q}
  • Learning from interpretations: learn the probabilities of ProbLog programs from data

Example

ProbLog can for example be used to calculate the probability of getting wet given the probabilities for rain and the probabilities that someone brings an umbrella as follows:

0.4 :: rain(weekday).
0.9 :: rain(weekend).
0.8 :: umbrella_if_rainy(Day).
0.2 :: umbrella_if_dry(Day).
umbrella(Day) :- rain(Day), umbrella_if_rainy(Day).
umbrella(Day) :- \+rain(Day), umbrella_if_dry(Day).
wet(Day) :- rain(Day), \+umbrella(Day).
query(\+wet(weekend)).

The last rule before the query states that someone gets wet if it rains and no umbrella was brought. When ProbLog is asked to solve the "probabilistic inference" task, the query asks for the probability to stay dry on a weekend day. When solving the "most probable explanation" task, ProbLog will return the most likely reason for staying dry, i.e. because it is not raining or because the person has an umbrella.

Implementations

The ProbLog language has been implemented as a YAP Prolog library (ProbLog 1). and as a stand-alone Python framework (ProbLog 2) The source code of ProbLog 2 is licensed under Apache License, Version 2.0 and available on GitHub. The ProbLog language has also been implemented as part of the cplint probabilistic logic programming package for SWI-Prolog, YAP and XSB.

ProbLog variants

ProbLog has been extended or used as inspiration for several different variants, including:

  • DeepProbLog extends ProbLog by allowing the probability to be parametrized by a neural network.
  • DTProblog extends ProbLog with decision theory. The utility of a strategy is defined as the expected reward for its execution in the presence of probabilistic effects.
  • DC-ProbLog extends ProbLog with distributional facts, meaning that instead of probabilities, a logic atom has a corresponding continuous probability distribution instead.
  • aProbLog generalizes ProbLog by allowing any commutative semiring instead of just probabilities.
  • ProbFOIL: given a set of ProbLog facts as a probabilistic relational database, ProbFOIL finds a set of probabilistic rules to predict the facts of one relation based on all other relations.

Related languages

  • PRISM: Programming in statistical modeling
  • ICL: Independent Choice Logic
  • CP-Logic: Language of causal probabilistic events
  • LPAD: Logic programs with annotated disjunctions
  • Distributional clauses: A probabilistic logic language for hybrid relational domains

Further reading

  • ProbLog homepage
  • ProbLog docs
  • ProbLog repository

References

  1. De Raedt, Luc; Kimmig, Angelika; Toivonen, Hannu (November 2007). ProbLog: A Probabilistic Prolog and Its Application in Link Discovery. IJCAI. Vol. 7.
  2. Fierens, D; Van den Broeck, G.; Bruynooghe, M.; De Raedt, L. (2012). Constraints for probabilistic logic programming. Proceedings of the NIPS Probabilistic Programming Workshop. pp. 1–4.
  3. De Raedt, Luc; Kimmig, Angelika (2015). "Probabilistic (logic) programming concepts". Machine Learning. 100 (1): 5–47. doi:10.1007/s10994-015-5494-z. S2CID 3166992.
  4. "ProbLog1". dtai.cs.kuleuven.be.
  5. ^ "ProbLog: Probabilistic Programming". dtai.cs.kuleuven.be.
  6. ^ "ProbLog GitHub repository". github.com. 12 October 2022.
  7. "cplint – AI@UNIFE". Retrieved 2023-11-13.
  8. Manhaeve, Robin; Dumancic, Sebastijan; Kimmig, Angelika; Demeester, Thomas; De Raedt, Luc (2018). DeepProbLog: Neural Probabilistic Logic Programming. NeurIPS 2018, Thirty-second Conference on Neural Information Processing Systems. pp. 3753–3760.
  9. Van den Broeck, Guy; Thon, Ingo; Van Otterlo, Martijn; De Raedt, Luc (2010). "DTProbLog: A decision-theoretic probabilistic Prolog". Proceedings of the AAAI Conference on Artificial Intelligence. Vol. 24.
  10. Kimmig, A.; Van den Broeck, G.; De Raedt, L. (2011). An algebraic Prolog for reasoning about possible worlds. Proceedings of the Twenty-Fifth AAAI Conference on Artificial Intelligence. pp. 209–214.
  11. "PRISM: PRogramming In Statistical Modeling". rjida.meijo-u.ac.jp.
  12. Poole, David (2008). "The independent choice logic and beyond". In Luc Raedt; Paolo Frasconi; Kristian Kersting; Stephen Muggleton (eds.). Probabilistic Inductive Logic Programming. Lecture Notes in Computer Science. Vol. 4911. Springer. pp. 222–243. doi:10.1007/978-3-540-78652-8_8. ISBN 978-3-540-78651-1.
  13. Vennekens, Joost; Denecker, Marc; Bruynooghe, Maurice (2009). CP-logic: A language of causal probabilistic events and its relation to logic programming. Theory and practice of logic programming. Vol. 9. pp. 245–308. arXiv:0904.1672.
  14. "PITA: Probabilistic Inference with Tabling and Answer subsumption". ml.unife.it.
  15. "Distributional Clauses". dtai.cs.kuleuven.be.
  16. "ProbLog: ProbLog 2.1 documentation". problog.readthedocs.io.
Categories: