HOME

TheInfoList



OR:

ProbLog is a probabilistic logic programming language that extends
Prolog Prolog is a logic programming language associated with artificial intelligence and computational linguistics. Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily ...
with probabilities. It minimally extends
Prolog Prolog is a logic programming language associated with artificial intelligence and computational linguistics. Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily ...
by adding the notion of a probabilistic fact, which combines the idea of logical atoms and
random variables A random variable (also called random quantity, aleatory variable, or stochastic variable) is a mathematical formalization of a quantity or object which depends on random events. It is a mapping or a function from possible outcomes (e.g., the po ...
. Similarly to Prolog, ProbLog can query an
atom Every atom is composed of a nucleus and one or more electrons bound to the nucleus. The nucleus is made of one or more protons and a number of neutrons. Only the most common variety of hydrogen has no neutrons. Every solid, liquid, gas, and ...
. While Prolog returns the
truth value In logic and mathematics, a truth value, sometimes called a logical value, is a value indicating the relation of a proposition to truth, which in classical logic has only two possible values (''true'' or '' false''). Computing In some progr ...
of the queried
atom Every atom is composed of a nucleus and one or more electrons bound to the nucleus. The nucleus is made of one or more protons and a number of neutrons. Only the most common variety of hydrogen has no neutrons. Every solid, liquid, gas, and ...
, ProbLog returns the
probability Probability is the branch of mathematics concerning numerical descriptions of how likely an Event (probability theory), event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and ...
of it being true.


Semantics

A probabilistic fact is a pair (p, a) with a an atom and p \in
, 1 The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline (t ...
/math> the probability of a being true. A rule is defined by an atom h, called the head, and a finite set of n literals \, called the body. ProbLog programs consist of a set of probabilistic facts \mathcal and a set of rules \mathcal. 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) = \prod_ P(l) where the product runs over all the literals in the model M. For a query atom q the distribution semantics defines a probability for the query P(q) = \sum_ P(M) = \sum_ \prod_ P(l) in which the sum runs over all the models where q is true. ProbLog supports multiple tasks: *Probabilistic inference: calculate P(q) *Most probable explanation: calculate the most probable model probability \max_ P(M) *Sampling: generate samples of 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 GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, continuous ...
. 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 Decision theory (or the theory of choice; not to be confused with choice theory) is a branch of applied probability theory concerned with the theory of making decisions based on assigning probabilities to various factors and assigning numerical ...
. 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 extends ProbLog by allowing any
semiring In abstract algebra, a semiring is an algebraic structure similar to a ring, but without the requirement that each element must have an additive inverse. The term rig is also used occasionally—this originated as a joke, suggesting that rigs ar ...
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

{{Reflist, 30em, refs= {{cite web, url=http://dtai.cs.kuleuven.be/problog, title=ProbLog: Probabilistic Programming, website=dtai.cs.kuleuven.be {{cite web, url=https://problog.readthedocs.io/en/latest/, title=ProbLog: ProbLog 2.1 documentation, website=problog.readthedocs.io {{cite web, url=https://github.com/ML-KULeuven/problog, title=ProbLog GitHub repository, website=github.com, date=12 October 2022 {{cite web, url=https://dtai.cs.kuleuven.be/problog/problog1/installation.html, title=ProbLog1, website=dtai.cs.kuleuven.be {{cite web, url=https://dtai.cs.kuleuven.be/ml/systems/DC/, title=Distributional Clauses, website=dtai.cs.kuleuven.be {{cite web, url=https://ml.unife.it/pita/, title=PITA: Probabilistic Inference with Tabling and Answer subsumption, website=ml.unife.it {{cite web, url=https://rjida.meijo-u.ac.jp/prism/, title=PRISM: PRogramming In Statistical Modeling , website=rjida.meijo-u.ac.jp {{cite conference , last1 = De Raedt, first1 = Luc, last2 = Kimmig, first2 = Angelika, last3 = Toivonen, first3 = Hannu, title = ProbLog: A Probabilistic Prolog and Its Application in Link Discovery, conference = IJCAI, date = November 2007, volume = 7 {{cite journal , last1 = De Raedt, first1 = Luc, last2 = Kimmig, first2 = Angelika, title = Probabilistic (logic) programming concepts, journal = Machine Learning, date = 2015, volume = 100, number = 1, pages = 5–47, doi=10.1007/s10994-015-5494-z , s2cid=3166992 , doi-access = free {{cite conference , last1 = Van den Broeck, first1 = Guy, last2 = Thon, first2 = Ingo, last3 = Van Otterlo, first3 = Martijn, last4=De Raedt, first4=Luc, title = DTProbLog: A decision-theoretic probabilistic Prolog, book-title = Proceedings of the AAAI Conference on Artificial Intelligence, date = 2010, volume = 24, number = 1 {{cite conference, last1 = Manhaeve, first1 = Robin, last2 = Dumancic, first2 = Sebastijan, last3 = Kimmig, first3 = Angelika, last4 = Demeester, first4 = Thomas, last5 = De Raedt, first5 = Luc, title = DeepProbLog: Neural Probabilistic Logic Programming, conference = NeurIPS 2018, Thirty-second Conference on Neural Information Processing Systems, date = 2018, pages = 3753–3760 {{cite conference, last1 = Fierens, first1 = D, last2 = Van den Broeck, first2 = G., last3 = Bruynooghe , first3 = M., last4 = De Raedt, first4 = L., title = Constraints for probabilistic logic programming, conference = Proceedings of the NIPS Probabilistic Programming Workshop, date = 2012, pages = 1–4 {{cite conference, last1 = Kimmig, first1 = A., last2 = Van den Broeck, first2 = G., last3 = De Raedt, first3 = L., title = An algebraic Prolog for reasoning about possible worlds, conference = Proceedings of the Twenty-Fifth AAAI Conference on Artificial Intelligence, date = 2011, pages = 209–214 {{cite conference, last1 = Vennekens, first1 = Joost, last2 = Denecker, first2 = Marc, last3 = Bruynooghe, first3 = Maurice , title = CP-logic: A language of causal probabilistic events and its relation to logic programming, conference = Theory and practice of logic programming, date = 2009, pages = 245–308, volume = 9, arxiv = 0904.1672 {{cite book, last1 = Poole, first1 = David, chapter = The independent choice logic and beyond, title = Probabilistic Inductive Logic Programming, series=Lecture Notes in Computer Science , date = 2008, pages = 222–243, volume = 4911, editor1= Luc Raedt, editor2= Paolo Frasconi, editor3= Kristian Kersting, editor4= Stephen Muggleton , publisher=Springer , doi=10.1007/978-3-540-78652-8_8 , isbn=978-3-540-78651-1 Probabilistic software Programming paradigms Nondeterministic programming languages Computational statistics Python (programming language) scientific libraries Logic programming languages