- Source: 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 [0,1]}
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:
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
Kata Kunci Pencarian:
- ProbLog
- Probabilistic logic programming
- Probabilistic programming
- Python (programming language)
- Sentential decision diagram
- Neuro-symbolic AI
- Inductive logic programming
- Rao Narendra Singh
- Markov logic network
- Hannu Toivonen (professor)