PRISM: A Probabilistic
Language for Modeling and
Learning
Joint work with Taisuke Sato (Tokyo
Institute of Technology)
by Neng-Fa Zhou 1
What is PRISM?
PRISM = Probabilistic Prolog
direction(D):-
msw(coin,Face),
(Face==head->D=left;D=right).
Three execution modes
– Sample execution
– Probability calculation
– Learning
by Neng-Fa Zhou 2
Features
Use logic programs to describe probabilistic
choices and their consequences
Probability distributions (parameters of switches)
can be learned automatically from samples
Tabling is used in probabilistic computations and
learning (resembles dynamic programming)
A high level yet efficient modeling language
(Subsumes HMM, PCFG, and discrete Bayesian
networks)
by Neng-Fa Zhou 3
Applications
Probabilistic modeling and learning for
problem domains where randomness or
uncertainty is involved
– Stochastic language processing
– Gene sequence analysis
– Game analysis
– Optimization (e.g., performance tuning)
by Neng-Fa Zhou 4
PRISM : the Language
Probability distributions and switches
values(coin,[head:0.5,tail:0.5]).
direction(D):-
msw(coin,Face),
(Face==head->D=left;D=right).
Sample execution: sample(Goal)
Probability calculation: prob(Goal,P)
Learning: learn(Facts)
by Neng-Fa Zhou 5
Assumptions
Distribution assumption
• Let values(I,[o1:p1,…,on:pn]) be a sample space
declaration. pi = 1
• msw(I,V) always succeeds if V is a variable.
Independence assumption
prob(AB) = prob(A)*prob(B)
Exclusiveness assumption
prob(AB) = prob(A)+prob(B)
by Neng-Fa Zhou 6
Learning
Given a set of observed facts F, determine the probability
distributions for the switches to maximize the likelihood of F.
by Neng-Fa Zhou 7
Using Tabling (Dynamic
Programming) in Learning
hmm(L) :- hmm([a,b,a])
msw(init,Si),
hmm(Si,L). hmm(s0,[a,b,a]) hmm(s1,[a,b,a])
hmm(S,[]).
hmm(S,[C|L]) :- hmm(s0,[b,a]) hmm(s1,[b,a])
msw(out(S),C),
msw(tr(S),NextS), hmm(s0,[a]) hmm(s1,[a])
hmm(NextS,L).
values(init,[s0,s1]). hmm(s0,[]) hmm(s1,[])
values(out(_),[a,b]).
values(tr(_),[s0,s1]).
by Neng-Fa Zhou 8
Papers
1. T. Sato: A Statistical Learning Method for Logic
Programs with Distribution Semantics,
ICLP-95.
2. T. Sato and Y. Kameya: Parameter Learning
of Logic Programs for Symbolic-statistical Modeling,
Journal of Artificial Intelligence Research, 2001.
3. N.F. Zhou, T. Sato, K. Hasida: Toward a High-
performance System for Symbolic and Statistical
Modeling, Proc. IJCAI Workshop on Learning
Statistical Models from Relational Data, pp. 153-159,
2003.
by Neng-Fa Zhou 9