Title: CS498EA Reasoning in AI Lecture
1CS498-EAReasoning in AILecture 25
- Instructor Eyal Amir
- Fall Semester 2009
2What is Reasoning in AI?
Combining Logic and Probability
Logical Reasoning
Probabilistic Reasoning
Commonsense Reasoning
3Previously Combining Models of Logic and
Probability
- Representation methods for models that combine
relationships between objects and probabilities - Relational Markov Networks
- Probabilistic Relational Models
- Markov Logic Networks
- Many others
- If Have time
- PRMs w/ Attribute Uncertainty
- PRMs w/ Link Uncertainty
4Example A Recession Model
- What is probability of recession, when a bank(bm)
goes into bankruptcy? - Recession Recession of a country in 0,1
- MarketX Quarterly market (X) index
- LossX,Y Loss of a bank (Y) in a market (X)
- RevenueY Revenue of a bank (Y)
5Social Networks
- Example school friendships and their effects
Friend(A,B)
Attribute(A)
Measuremt(A)
Friend(A,C)
Attribute(B)
Measuremt(B)
Friend(B,C)
Attribute(C)
Measuremt(C)
6Modeling Epidemics
epidemic(measles)
epidemic(flu)
sick(mary,measles)
sick(mary,flu)
sick(bob,measles)
sick(bob,flu)
hospital(mary)
hospital(bob)
7Patterns in Structured Data
8Probabilistic Relational Model
Strain
Patient
Unique
POB
Homeless
HIV-Result
Contact
Age
Disease Site
Contact-Type
Close-Contact
Transmitted
9PRM Semantics
Contact c1
Strain s1
Patient p2
Contact c2
Strain s2
Patient p1
Contact c3
Patient p3
PRM
relational skeleton ?
10Representation Languages
- Many developed 1990s-2000s
- Probabilistic Logic (Nilsson 1986)
- First-Order probabilistic logics (Joe Halpern
1990) - Relational Markov Networks (Zhang Poole 1993)
- Relational Probabilistic Models (Pfeffer Koller
1997) - Knowledge-based construction (Breese, 1992)
- Probabilistic Logic Programs (Ng Subrahmanian,
1992) - Stochastic Logic Programs (Ngo Haddawy, 1995)
- Bayesian Logic Programs (Kersting DeRaedt,
2001) - Relational Dependency Networks (Neville Jensen,
2004) - Relational Bayesian networks (Jaeger, 1997)
- MEBN (Laskey, 2004)
- Markov Logic Networks (Richardson Domingos,
2004) - BLOG Bayesian LOGic (Milch etal. 2004)
11Representation Languages
- Relational Markov Networks (Zhang Poole 1993)
- Probabilistic Relational Models (Koller Pfeffer
1997) - Markov Logic Networks (Richardson Domingos,
2004) - What they can represent
- Single probabilistic model
- Distribution over an unknown (but finite) number
of elements - Unique Names assumed for elements
- Hard to represent (and to reason with tractably)
- Uncertainty about equality of elements
- Functions over elements
- .
12Useful For
- Representing high-dimensional distributions
- Natural-Language Processing
- Social Network Analysis
- Stochastic Relational Databases
- Not so useful yet
- Scaling up applications to many elements
- Needs efficient, precise inference
13Today
- Inference in PRMS / RMNs/ MLNs
- Sampling
- Lifted Inference
14Inference in Unrolled BN
- Exact Inference in unrolled BN
- Infeasible for large networks
- Structural (Attr/Reference/Exists) Uncertainty
creates very large cliques - Use caching (Pfeffer 00)
- FOL-Resolution-style techniques
- Loopy belief propagation (Pearl, 88 McEliece,
98) - Scales linearly with size of network
- Guaranteed to converge only for polytrees
- Empirically, often converges in general nets
(Murphy99) - Use approx. inference MCMC (Pasula etal. 01)
15MCMC with PRMs
Prof1.
Prof2.
Prof3.
Prof1. fame
Prof2. fame
Prof3. fame
Student1. advisor
Student1. success
16MCMC with PRMs
Prof1.
Prof2.
Prof3.
Network structure changed
Prof2. fame
Student1. advisor
Prof2
Student1. success
17Gibbs Sampling with PRMs
- For each complex attribute A reference attribute
RefA, w/finite domain ValRefA - Reference uncertainty modifies chain of
attributes
18Gibbs Sampling with PRMs
- For each complex attribute A reference attribute
RefA, w/finite domain ValRefA - Reference uncertainty modifies chain of
attributes - Gibbs for simple attributes Use MB
- Gibbs for complex attributes (RU)
- Add reference variables
19Gibbs Sampling with PRMs
Gibbs when reference var does not change
Prof1.
Prof2.
Prof3.
Prof2. fame
Student1. advisor
Prof3. fame
Prof2
Student1. success
P(P3.f mb(P3.f)) ?P(P3.fPa(P3.f))P(P3.P3.f)
P(S1.sS1.aP2,P1.f,P2.f,P3.f) ?P(P3.f) P(P3.
P3.f) P(S1.s S1.aP2,P2.f) ?P(P3.f) P(P3.
P3.f)
Constant wrt P3.f
20M-H Sampling with PRMs
Changing a ref. variable
Prof1.
Prof2.
Prof3.
Prof2. fame
Student1. advisor
Prof3. fame
Prof2
Student1. success
P(s1.aP3,...X) q(s1.aP2,...X s1.aP3,...X)
-------------------------------------------------
-------------------- P(s1.aP2,...X)
q(s1.aP3,...X s1.aP2,...X)
P(s1.aP3,...X) P(s1.aP3 P1.,,Pn.)
P(s1.sP3.f, ------------------------
----------------------------------------- P(s1.aP
2,...X) P(s1.aP3,...X)
21M-H Sampling with PRMs
Changing a ref. variable
Prof1.
Prof2.
Prof3.
Prof2. fame
Student1. advisor
Prof3. fame
Prof2
Student1. success
P(s1.aP3,...X) ------------------------
P(s1.aP2,...X)
P(s1.aP3 P1.,,Pn.) P(s1.s
P3.f,S1.aP3) ------------------------------------
------------------------------- P(s1.aP2
P1.,,Pn.) P(s1.s P2.f,S1.aP2)
22M-H Sampling with PRMs
Changing a ref. variable
Prof1.
Prof2.
Prof3.
Prof2. fame
Student1. advisor
Prof3. fame
When aggregation function (e.g.,max,
softmax)
Prof2
Student1. success
P(s1.aP3 P1.,,Pn.) P(s1.s
P3.f,S1.aP3) ------------------------------------
-------------------------------- P(s1.aP2
P1.,,Pn.) P(s1.s P2.f,S1.aP2)
P(s1.aP3 P3.) P(s1.s P3.f,S1.aP3) --------
------------------------------------------------ P
(s1.aP2 P2.) P(s1.s P2.f,S1.aP2)
23Today
- Inference in PRMS / RMNs/ MLNs
- Sampling
- Lifted Inference
24Example Inference Problem
epidemic(measles)
epidemic(flu)
Problem Inference exponential in vars!
sick(mary,measles)
sick(mary,flu)
sick(bob,measles)
sick(bob,flu)
hospital(mary)
hospital(bob)
25Making use of structure in Inference
- Task calculate marginals and posteriorsP(sick(b
ob, measles) sick(mary,measles)) ? - Three approaches
- plain propositionalization
- dynamic construction (smart propositionalization
) - Our focus today lifted inference
26Lifted Variable EliminationHigh-Level View
27Step 1 Inversion Elimination
- Joint distribution
- ÕP,D f1(e(D),s(P,D)) f2(s(P,D),h(P))
- Marginalization by eliminating class s(P,D)
- ås(.,.) ÕP,D f1(e(D),s(P,D)) f2(s(P,D),h(P))
28Step 1 Inversion Elimination
- ås(.,.) ÕP,D f1(e(D),s(P,D))f2(s(P,D),h(P))
- ÕP,D ås(P,D) f1(e(D),s(P,D))f2(s(P,D),h(P))
- ÕP,D f3(e(D),h(P))
Important computing??3(X,Y) is independent of
D,P ??3(X,Y) åZ f1(X,Z) f2(Z,Y)
29Inversion Elimination
- ås(.,.) ÕP,D f1(e(D),s(P,D)) f2(s(P,D),h(P))
- ås(p1,d1)ås(p1,d2)...ås(pn,dm)
f1(e(d1),s(p1,d1))?f1(e(d1),s(p1,d2))...f2(s(p1,d
1),h(p1))?f2(s(p1,d2),h(p1))... - (ås(p1,d1) f1(e(d1),s(p1,d1))f2(s(p1,d1),h(p1)))
(ås(p1,d2) f1(e(d1),s(p1,d2))f2(s(p1,d2),h(p1)))
...(ås(pn,dm) f1(e(dn),s(pn,dm))f2(s(pn,dm),h(pn)
)) - ÕP,D ås(P,D) f1(e(D),s(P,D)) f2(s(P,D),h(P))
30Counting Elimination
- åe(.)h(.) ÕD,P f3(e(D),h(P))
- åe(.)h(.) f3(0,0)(0,0) in e(.),h(.)
f3(0,1)(0,1) in e(.),h(.)
f3(1,0)(1,0) in e(.),h(.)
f3(1,1)(1,1) in e(.),h(.) - åe(.)h(.) Õv f3(v)v in e(.),h(.)
Does depend on domain size, but not exponentially
31Experimental Comparison with Propositional
Inference Methods
32Relational Factoring ofSocial Network Analysis
- Example school friendships and their effects
33Scaling-Up Experiments Computing Pr(friend(x,y))
Figure 5 Computation time for
34Reasoning A Recession Model
- What is probability of recession, when a bank(bm)
goes into bankruptcy? - Recession Recession of a country in 0,1
- MarketX Quarterly market (X) index
- LossX,Y Loss of a bank (Y) in a market (X)
- RevenueY Revenue of a bank (Y)
35(No Transcript)
36Experiments
37Conclusions
- Lifted inference with discrete variables holds
promise for scaling up of models and inference - Sampling in relational models allows inferences
about individuals while taking into account
relational structure (only correct independence
assumptions) - Social Network Analysis feasible application
- Can infer unobserved attributes from partial
friendship and attribute data - Can infer uncertain friendship links from partial
friendship and attribute data - Open Questions
- Friendship structures and transitivity
- MPE Most Probable Explanations
- Identity uncertainty
38Challenges
- Parameterized queries P(sick(A, measles)) ?
- Function symbols ?(diabetes(A),
diabetes(father(A))) - Equality AB
- Transitivity-like potential functions
- ?(friend(A,B),friend(B,C),friend(A,C))
- Observations
- seen(john)1, seen(james)0
- in_hospital(john)1, in_hospital(james)1
- Continuous and Hybrid relational models
- Economic models
- Switching Kalman Filters
39References
- R. D. S. Braz, Lifted first-order probabilistic
inference, PhD thesis, University of Illinois at
Urbana-Champaign, 2007. - R. D. S. Braz, E. Amir, and D. Roth, Lifted
first-order probabilistic inference, in 19th
Intl' Joint Conference on Artificial Intelligence
(IJCAI'05), AAAI Press, 2005, pp. 1319-1325. - R. D. S. Braz, E. Amir, and D. Roth, Mpe and
partial inversion in lifted probabilistic
variable elimination, in 21st National Conference
on Artificial Intelligence (AAAI'06), AAAI Press,
2006, pp. 1123-1130. - R. D. S. Braz, E. Amir, and D. Roth, Lifted
first-order probabilistic inference, in Lise
Getoor and Ben Taskar, eds. Statistical
Relational Learning, MIT Press, 2007, pp.
433-452. - L. Getoor and B. Taskar, Introduction to
statistical relational learning, MIT Press, 2007. - B. Milch, L. S. Zettlemoyer, K. Kersting, M.
Haimes, and L. P. Kaelbling, Lifted probabilistic
inference with counting formulas, in Proc. 23rd
AAAI Conference on Artificial Intelligence
(AAAI'08), AAAI Press, 2008, pp. 1062-1068. - D. Poole, First-order probabilistic inference, in
International Joint Conference On Artificial
Intelligence, Lawrence Erlbaum Associates LTD,
2003, pp. 985-991. - P. Singla and P. Domingos, Lifted first-order
belief propagation, in Proc. 23rd AAAI Conference
on Artificial Intelligence (AAAI'08), AAAI Press,
2008, pp. 1094-1099.
40THE END
41Queries
Full joint distribution specifies answer to any
query P(variable evidence about others)
Tuberculosis
Pneumonia
Lung Infiltrates
Sputum Smear
Sputum Smear
XRay
XRay