UIUC CS 497: Section EALecture #8
Reasoning in Artificial Intelligence
Professor: Eyal Amir
Spring Semester 2004
(Based on slides by Lise Getoor (UMD))
Last Time
• Approximate Inference with Probabilistic Graphical Models
• Monte Carlo techniques
• Markov Chain Monte Carlo
Today
• Probabilistic Relational Models (PRMs)
• PRMs w/ Attribute Uncertainty
• PRMs w/ Link Uncertainty
Patterns in Structured Data
Patient
Treatment
Strain Contact
Bayesian Networks
nodes = random variablesedges = direct probabilistic
influence
Network structure encodes independence assumptions: XRay conditionally independent of Pneumonia given Infiltrates
XRay
Lung Infiltrates
Sputum Smear
TuberculosisPneumonia
Bayesian Networks
XRay
Lung Infiltrates
Sputum Smear
TuberculosisPneumonia
• Associated with each node Xi there is a conditional probability distribution P(Xi|Pai:) — distribution over Xi for each assignment to parents
0.8 0.2
p
t
p
0.6 0.4
0.010.99
0.2 0.8
tp
t
t
p
TP P(I |P, T )
BN Semantics
conditionalindependenciesin BN structure
+local
probabilitymodels
full jointdistribution
over domain=
t)|sP(i)|P(xt),p|P(iP(t))pP()sx,i,t,,pP(
X
I
S
TP
Probabilistic Relational Models
• Combine advantages of FOL & Bayes Nets:
– natural domain modeling
– generalization over a variety of situations;
– compact, natural probability models.
• Integrate uncertainty with relational model:
– properties of domain entities can depend on properties of related entities;
– uncertainty over relational structure of domain.
Relational SchemaStrain
Unique
Infectivity
Infected with
Interacted with
• Describes the types of objects and relations in the database
ClassesClasses
RelationshipsRelationshipsContact
Close-Contact
Skin-Test
Age
Patient
Homeless
HIV-Result
Ethnicity
Disease-Site AttributesAttributes
Contact-Type
Probabilistic Relational Model
Close-Contact
Transmitted
Contact-Type
Disease Site
Strain
Unique
Infectivity
Patient
Homeless
HIV-Result
POB
Contact Age
Cont.Contactor.HIVCont.Close-Contact
Cont.Transmitted |
P
4.06.0
3.07.0
2.08.0
1.09.0
,
,
,
,,
tt
ft
tf
ff
P(T | H, C)CH
Relational Skeleton
Fixed relational skeleton – set of objects in each class– relations between them
Uncertainty over assignment of values to attributes
PRM defines distr. over instantiations of attributes
Strains1
Patientp2
Patientp1
Contactc3
Contactc2
Contactc1
Strains2
Patientp3
A Portion of the BN
P1.Disease Site
P1.Homeless
P1.HIV-Result
P1.POB
C1.Close-Contact
C1.Transmitted
C1.Contact-Type
C1.Age
C2.Close-Contact
C2.Transmitted
C2.Contact-Type
truefalse
true
4.06.0
3.07.0
2.08.0
1.09.0
,
,
,
,,
tt
ft
tf
ff
P(T | H, C)CH
4.06.0
3.07.0
2.08.0
1.09.0
,
,
,
,,
tt
ft
tf
ff
P(T | H, C)CH
C2.Age
PRM: Aggregate Dependencies
sum, min, max, avg, mode, count
Disease Site
Patient
Homeless
HIV-Result
POB
Age
Close-Contact
Transmitted
Contact-Type
Contact
Age
.
.
PatientJane Doe
POB US
Homeless no
HIV-Result negative
Age ???
Disease Site pulmonary
A
.
Contact#5077
Contact-Typecoworker
Close-Contact no
Agemiddle-aged
Transmitted false
Contact#5076
Contact-Typespouse
Close-Contact yes
Agemiddle-aged
Transmitted true
Contact#5075
Contact-Typefriend
Close-Contact no
Agemiddle-aged
Transmitted false
mode
6.03.01.0
2.06.02.0
2.04.04.0
o
m
yomym
PRM Semantics
)).(|.(),S,|( ,.
AxparentsAxPP Sx Ax
I
AttributesObjects
probability distribution over completions I:
PRM relational skeleton + =
Strain
Patient
Contact
Strain s1
Patient p1
Patient p2
Contactc3
Contactc2
Contactc1
Strain s2
Patient p3
Legal Models
author-of
• PRM defines a coherent probability model over a skeleton if the dependencies between object attributes is acyclic
How do we guarantee that a PRM is acyclic for every skeleton?
ResearcherProf. Gump
Reputationhigh
PaperP1
Accepted yes Paper
P2Accepted
yes
sum
Attribute StratificationPRM
dependency structure S
dependencygraph
Paper.Accecpted
Researcher.Reputation
if Researcher.Reputation depends directly on Paper.Accepted
dependency graph acyclic acyclic for any Attribute stratification:
Algorithm more flexible; allows certain cycles along guaranteed acyclic relations
Blood Type
M-chromosome
P-chromosome Person
Result
Contaminated
Blood Test
Blood Type
M-chromosome
P-chromosome
Person Blood Type
M-chromosome
P-chromosome
Person
(Father)
(Mother)
Outline
• Probabilistic Relational Models (PRMs)
» PRMs w/ Attribute Uncertainty
• PRMs w/ Link Uncertainty
Attribute UncertaintyTopic
Theory AI
Agent
Theory papers
Cornell
Scientific Paper
Topic
Theory AI
•Attributes of object•Attributes of linked objects
•Attributes of heterogeneous linked objects
PRMs w/ AU: example
Vote
Rank
Movie
Income
Gender
Person
AgeGenre
PRM consists of:
Relational Schema
Dependency Structure
Vote.Person.Gender,Vote.Person.Age
Vote.Movie.Genre,Vote.Rank |
P
Local Probability Models
Fixed relational skeleton :– set of objects in each class– relations between them
Movie m1
Vote v1 Movie: m1 Person: p1
Person p2
Person p1
Movie m2
Uncertainty over assignment of values to attributes
PRM w/ Attribute Uncertainty
Vote v2 Movie: m1 Person: p2
Vote v3 Movie: m2 Person: p2
Primary Keys
Foreign Keys
PRM with Attribute Uncertainty Semantics
)).(|.(),S,|( ,.
AxparentsAxPP Sx Ax
I
AttributesObjects
Ground BN defining distribution over complete instantiations of attributes I:
PRM relational skeleton + =
Patient p2
Vote
Movie Person Movie
Vote
Vote
Person
Person
Movie
Vote
Issue
• PRM w/ AU applicable only in domains where we have full knowledge of the relational structure
Next we introduce PRMs which allow uncertainty over relational structure…
Outline
• Probabilistic Relational Models (PRMs)
• PRMs w/ Attribute Uncertainty
» PRMs w/ Link Uncertainty
Approach
• Construct probabilistic models of relational structure that capture link uncertainty
• Two new mechanisms:– Reference uncertainty– Existence uncertainty
• Advantage:– Applicable with partial knowledge of relational
structure
Citation Relational Schema
Wrote
PaperTopic
Word1
WordN
…Word2
PaperTopic
Word1
WordN
…Word2Cites
CountCiting Paper
Cited Paper
AuthorInstitution
Research Area
Attribute Uncertainty
Paper
Word1
Topic
WordN
Wrote
Author
...
Research Area
P( WordN | Topic)
P( Topic | Paper.Author.Research Area
Institution P( Institution | Research Area)
Reference Uncertainty
Bibliography
Scientific Paper
`1. -----2. -----3. -----
???
Document Collection
PRM w/ Reference Uncertainty
CitesCitedCiting
Dependency model for foreign keys
PaperTopicWords
PaperTopicWords
Naïve Approach: multinomial over primary key• noncompact• limits ability to generalize
Reference Uncertainty Example
PaperP5
Topic AI
PaperP4
Topic AI
PaperP3
Topic AI
PaperM2
Topic AI
Paper P1Topic Theory
CitesCitedCiting
Paper P5Topic AI
PaperP3
Topic AI
Paper P4Topic Theory
Paper P2Topic Theory
Paper P1Topic Theory
Paper.Topic = AIPaper.Topic = Theory
P1
P2
PaperTopicWords P1 P2
3.0 7.0
P1 P2
1.0 9.0
Topic
99.0 01.0 Theory
AI
PRMs w/ RU Semantics
PRM-RU + entity skeleton
probability distribution over full instantiations I
Cites
Cited
Citing
PaperTopic
Words
PaperTopic
Words
PRM RU
Paper P5Topic AI
Paper P4Topic Theory
Paper P2Topic Theory
Paper P3Topic AI
Paper P1Topic ???
Paper P5Topic AI
Paper P4Topic Theory
Paper P2Topic Theory
Paper P3Topic AI
Paper P1Topic ???
RegReg
RegRegCites
entity skeleton
Existence Uncertainty
Document CollectionDocument Collection
? ??
PRM w/ Existence Uncertainty
Cites
Dependency model for existence of relationship
PaperTopicWords
PaperTopicWords
Exists
Exists Uncertainty Example
Cites
PaperTopicWords
PaperTopicWords
Exists
Citer.Topic Cited.Topic
0.995 0005 Theory Theory
False True
AI Theory 0.999 0001
AI AI 0.993 0008
AI Theory 0.997 0003
PRMs w/ EU Semantics
PRM-EU + object skeleton
probability distribution over full instantiations I
Paper P5Topic AI
Paper P4Topic Theory
Paper P2Topic Theory
Paper P3Topic AI
Paper P1Topic ???
Paper P5Topic AI
Paper P4Topic Theory
Paper P2Topic Theory
Paper P3Topic AI
Paper P1Topic ???
object skeleton
???
PRM EU
Cites
Exists
PaperTopic
Words
PaperTopic
Words
Inference 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
(Murphy’99)
• Use approx. inference: MCMC (Pasula etal. ’01)
MCMC with PRMs
Prof1.$$
Prof2.$$
Prof3.$$
Prof1.fame
Prof2.fame
Prof3.fame
Student1.advisor
Student1.success
MCMC with PRMs
Prof1.$$
Prof2.$$
Prof3.$$
Prof2.fame
Student1.advisor
Student1.success
=Prof2
Networkstructurechanged
Gibbs Sampling with PRMs
• For each complex attribute A: reference attribute Ref[A], w/finite domain Val[Ref[A]]
• Reference uncertainty modifies chain of attributes
Gibbs Sampling with PRMs
• For each complex attribute A: reference attribute Ref[A], w/finite domain Val[Ref[A]]
• Reference uncertainty modifies chain of attributes
• Gibbs for simple attributes: Use MB
• Gibbs for complex attributes (RU):– Add reference variables
Gibbs Sampling with PRMs
Prof1.$$
Prof2.$$
Prof3.$$
Prof2.fame
Student1.advisor
Student1.success
=Prof2
P(P3.f | mb(P3.f))=P(P3.f|Pa(P3.f))P(P3.$$|P3.f)P(S1.s|S1.a=P2,P1.f,P2.f,P3.f)=P(P3.f) P(P3.$$ | P3.f) P(S1.s | S1.a=P2,P2.f)=’P(P3.f) P(P3.$$ | P3.f)
Prof3.fame
Constant wrt P3.f
Gibbs whenreference vardoes not change
M-H Sampling with PRMs
Prof1.$$
Prof2.$$
Prof3.$$
Prof2.fame
Student1.advisor
Student1.success
=Prof2
P(s1.a=P3,...X…) q(s1.a=P2,...X…| s1.a=P3,...X…) --------------------------------------------------------------------- =P(s1.a=P2,...X…) q(s1.a=P3,...X…| s1.a=P2,...X…)
Prof3.fame
Changing a ref.variable
P(s1.a=P3,...X…) P(s1.a=P3 | P1.$$,…,Pn.$$) P(s1.s|P3.f,------------------------ = -----------------------------------------P(s1.a=P2,...X…) P(s1.a=P3,...X…)
M-H Sampling with PRMs
Prof1.$$
Prof2.$$
Prof3.$$
Prof2.fame
Student1.advisor
Student1.success
=Prof2
Prof3.fame
Changing a ref.variable
P(s1.a=P3,...X…) ------------------------ = P(s1.a=P2,...X…)
P(s1.a=P3 | P1.$$,…,Pn.$$) P(s1.s | P3.f,S1.a=P3)-------------------------------------------------------------------P(s1.a=P2 | P1.$$,…,Pn.$$) P(s1.s | P2.f,S1.a=P2)
P(s1.a=P3 | P1.$$,…,Pn.$$) P(s1.s | P3.f,S1.a=P3)-------------------------------------------------------------------- =P(s1.a=P2 | P1.$$,…,Pn.$$) P(s1.s | P2.f,S1.a=P2)
M-H Sampling with PRMs
Prof1.$$
Prof2.$$
Prof3.$$
Prof2.fame
Student1.advisor
Student1.success
=Prof2
Prof3.fame
Changing a ref.variable
P(s1.a=P3 | P3.$$) P(s1.s | P3.f,S1.a=P3)--------------------------------------------------------P(s1.a=P2 | P2.$$) P(s1.s | P2.f,S1.a=P2)
Whenaggregationfunction(e.g.,max, softmax)
Conclusions
• PRMs can represent distribution over attributes from multiple tables
• PRMs can capture link uncertainty
• PRMs allow inferences about individuals while taking into account relational structure (they do not make inapproriate independence assuptions)
Next Time
• Dynamic Bayesian Networks
THE END
Selected Publications• “Learning Probabilistic Models of Link Structure”, L. Getoor, N.
Friedman, D. Koller and B. Taskar, JMLR 2002.• “Probabilistic Models of Text and Link Structure for Hypertext
Classification”, L. Getoor, E. Segal, B. Taskar and D. Koller, IJCAI WS ‘Text Learning: Beyond Classification’, 2001.
• “Selectivity Estimation using Probabilistic Models”, L. Getoor, B. Taskar and D. Koller, SIGMOD-01.
• “Learning Probabilistic Relational Models”, L. Getoor, N. Friedman, D. Koller, and A. Pfeffer, chapter in Relation Data Mining, eds. S. Dzeroski and N. Lavrac, 2001.– see also N. Friedman, L. Getoor, D. Koller, and A. Pfeffer, IJCAI-99.
• “Learning Probabilistic Models of Relational Structure”, L. Getoor, N. Friedman, D. Koller, and B. Taskar, ICML-01.
• “From Instances to Classes in Probabilistic Relational Models”, L. Getoor, D. Koller and N. Friedman, ICML Workshop on Attribute-Value and Relational Learning: Crossing the Boundaries, 2000.
• Notes from AAAI Workshop on Learning Statistical Models from Relational Data, eds. L.Getoor and D. Jensen, 2000.
• Notes from IJCAI Workshop on Learning Statistical Models from Relational Data, eds. L.Getoor and D. Jensen, 2003.
See http://www.cs.umd.edu/~getoor
QueriesFull joint distribution specifies answer to any query: P(variable | evidence about others)
XRay
Lung Infiltrates
Sputum Smear
TuberculosisPneumonia
XRay Sputum Smear