490 likes | 600 Views
UIUC CS 497: Section EA Lecture #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.
E N D
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
Contact Strain Patient Treatment Patterns in Structured Data
Pneumonia Tuberculosis Lung Infiltrates XRay Sputum Smear Bayesian Networks nodes = random variables edges = direct probabilistic influence Network structure encodes independence assumptions: XRay conditionally independent of Pneumonia given Infiltrates
Pneumonia Tuberculosis Lung Infiltrates XRay Sputum Smear Bayesian Networks T P(I |P, T ) P p t 0.8 0.2 p t 0.6 0.4 p t 0.2 0.8 p t 0.01 0.99 • Associated with each node Xi there is a conditional probability distribution P(Xi|Pai:) — distribution over Xi for each assignment to parents
P T I X S BN Semantics conditional independencies in BN structure local probability models full joint distribution over domain + =
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.
Classes Relationships Attributes Relational Schema Strain Infected with Unique Infectivity Contact Contact-Type Close-Contact Patient Skin-Test Homeless Age Interacted with HIV-Result Ethnicity Disease-Site • Describes the types of objects and relations in the database
Infectivity Cont.Transmitted | æ ö ÷ ç Cont.Close-Contact P ÷ ç ÷ ç Cont.Contactor.HIV è ø P(T | H, C) H , C f , f 0 . 9 0 . 1 f , t 0 . 8 0 . 2 t , f 0 . 7 0 . 3 t , t 0 . 6 0 . 4 Probabilistic Relational Model Strain Patient Unique POB Homeless HIV-Result Contact Age Disease Site Contact-Type Close-Contact Transmitted
Contact • c1 • Strain • s1 • Patient • p1 • Contact • c2 • Strain • s2 • Patient • p2 • Contact • c3 • Patient • p3 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
P(T | H, C) H , C P(T | H, C) H , C true P1.HIV-Result f , f 0 . 9 0 . 1 true false f , f 0 . 9 0 . 1 f , t 0 . 8 0 . 2 f , t 0 . 8 0 . 2 t , f 0 . 7 0 . 3 t , f 0 . 7 0 . 3 t , t 0 . 6 0 . 4 t , t 0 . 6 0 . 4 A Portion of the BN P1.POB C1.Age P1.Homeless C1.Contact-Type C1.Close-Contact P1.Disease Site C1.Transmitted C2.Age C2.Contact-Type C2.Close-Contact C2.Transmitted
Age HIV-Result Transmitted • Contact • #5077 • Contact-Type • coworker • Close-Contact • no • Age • middle-aged • Transmitted • false • Patient • Jane Doe • POB • US • Homeless • no • HIV-Result • negative • Age • ??? • Disease Site • pulmonary • Contact • #5076 • Contact-Type • spouse • Close-Contact • yes • Age • middle-aged • Transmitted • true • Contact • #5075 • Contact-Type • friend • Close-Contact • no • Age • middle-aged • Transmitted • false . . A . mode PRM: Aggregate Dependencies Patient Contact POB Contact-Type Homeless Close-Contact Age Disease Site sum, min, max, avg, mode, count
Strain Patient Contact probability distribution over completions I: Objects Attributes PRM Semantics • Contact • c1 Strain s1 Patient p2 • Contact • c2 Strain s2 Patient p1 • Contact • c3 Patient p3 PRM + relational skeleton =
Legal Models • PRM defines a coherent probability model over a skeleton if the dependencies between object attributes is acyclic • Paper • P1 • Accepted • yes author-of • Researcher • Prof. Gump • Reputation • high • Paper • P2 • Accepted • yes sum How do we guarantee that a PRM is acyclic for every skeleton?
Attribute stratification: dependency graph acyclic acyclic for any Attribute Stratification PRM dependency structure S dependency graph Paper.Accecpted if Researcher.Reputation depends directly on Paper.Accepted Researcher.Reputation Algorithm more flexible; allows certain cycles along guaranteed acyclic relations
(Father) (Mother) Person Blood Type Person Blood Type P-chromosome P-chromosome M-chromosome M-chromosome Person P-chromosome M-chromosome Blood Type Contaminated Result Blood Test
Outline • Probabilistic Relational Models (PRMs) • PRMs w/ Attribute Uncertainty • PRMs w/ Link Uncertainty
Cornell Topic Theory AI Theory papers Attribute Uncertainty Topic Theory AI Agent Scientific Paper • Attributes of object • Attributes of linked objects • Attributes of heterogeneous linked objects
Rank Genre Age Vote.Rank | æ ö Gender ÷ ç Vote.Movie.Genre, P ÷ ç ÷ ç Income Vote.Person.Gender, Vote.Person.Age ç ç Dependency Structure ø è Local Probability Models PRMs w/ AU: example Person Movie Vote PRM consists of: Relational Schema
Primary Keys Foreign Keys PRM w/ Attribute Uncertainty Vote v1 Movie: m1 Person: p1 Movie m1 Person p1 Vote v2 Movie: m1 Person: p2 Movie m2 Person p2 Vote v3 Movie: m2 Person: p2 Fixed relational skeleton : • set of objects in each class • relations between them Uncertainty over assignment of values to attributes
Ground BN defining distribution over complete instantiations of attributes I: Objects Attributes PRM with Attribute Uncertainty Semantics Person Vote Movie Movie Person Patient p2 Vote Vote Movie Person Vote PRM + relational skeleton =
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 Author Institution Research Area Wrote Paper Paper Topic Topic Word1 Word1 Word2 Cites … Word2 Count … Citing Paper WordN Cited Paper WordN
P( Institution | Research Area) P( Topic | Paper.Author.Research Area P( WordN | Topic) Attribute Uncertainty Author Institution Research Area Wrote Paper Topic ... Word1 WordN
? ? ? Reference Uncertainty ` Bibliography 1. ----- 2. ----- 3. ----- Scientific Paper Document Collection
PRM w/ Reference Uncertainty Paper Paper Topic Topic Cites Words Words Cited Citing Dependency model for foreign keys • Naïve Approach: multinomial over primary key • noncompact • limits ability to generalize
Paper P1 P2 Topic P1 P2 Topic Words Theory 0 0 0 0 0 0 . . . . . . 7 9 01 1 3 99 AI Reference Uncertainty Example • Paper • P5 • Topic • AI • Paper • P4 • Topic • AI • Paper • P3 • Topic • AI • Paper • M2 • Topic • AI Paper P5 Topic AI P1 Paper P4 Topic Theory Paper P1 Topic Theory Paper P2 Topic Theory Paper P1 Topic Theory • Paper • P3 • Topic • AI P2 Paper.Topic = AI Paper.Topic = Theory Cites Cited Citing
Paper P2 Topic Theory Paper P2 Topic Theory Paper P5 Topic AI Paper P5 Topic AI Paper P4 Topic Theory Paper P4 Topic Theory Paper P3 Topic AI Paper P3 Topic AI Paper P1 Topic ??? Paper P1 Topic ??? entity skeleton PRM-RU + entityskeleton Reg • Reg probability distribution over full instantiations I Reg • Reg • Cites PRMs w/ RU Semantics Paper Paper Topic Topic Cites Words Words Cited Citing PRM RU
? ? ? Existence Uncertainty Document Collection Document Collection
PRM w/ Existence Uncertainty Paper Paper Topic Topic Cites Words Words Exists Dependency model for existence of relationship
Theory Theory 0.995 0005 Theory AI 0.999 0001 AI Theory 0.997 0003 AI AI 0.993 0008 Exists Uncertainty Example Paper Paper Topic Topic Cites Words Words Exists False True Cited.Topic Citer.Topic
??? Paper P2 Topic Theory Paper P2 Topic Theory Paper P5 Topic AI Paper P5 Topic AI Paper P4 Topic Theory Paper P4 Topic Theory Paper P3 Topic AI Paper P3 Topic AI Paper P1 Topic ??? Paper P1 Topic ??? object skeleton PRM-EU + objectskeleton probability distribution over full instantiations I PRMs w/ EU Semantics Paper Paper Topic Topic Cites Words Words Exists PRM EU
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. $$ Student1. advisor Prof1. fame Prof2. fame Prof3. fame Student1. success
MCMC with PRMs Prof1. $$ Prof2. $$ Prof3. $$ Network structure changed Student1. advisor Prof2. fame =Prof2 Student1. success
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 Gibbs when reference var does not change Prof1. $$ Prof2. $$ Prof3. $$ Student1. advisor Prof2. fame Prof3. fame =Prof2 Student1. success 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) Constant wrt P3.f
M-H Sampling with PRMs Changing a ref. variable Prof1. $$ Prof2. $$ Prof3. $$ Student1. advisor Prof2. fame Prof3. fame =Prof2 Student1. success 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…) 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 Changing a ref. variable Prof1. $$ Prof2. $$ Prof3. $$ Student1. advisor Prof2. fame Prof3. fame =Prof2 Student1. success 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)
M-H Sampling with PRMs Changing a ref. variable Prof1. $$ Prof2. $$ Prof3. $$ Student1. advisor Prof2. fame Prof3. fame When aggregation function (e.g.,max, softmax) =Prof2 Student1. success 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 | P3.$$) P(s1.s | P3.f,S1.a=P3) -------------------------------------------------------- P(s1.a=P2 | P2.$$) P(s1.s | P2.f,S1.a=P2)
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
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
Queries Full joint distribution specifies answer to any query: P(variable | evidence about others) Pneumonia Tuberculosis Lung Infiltrates Sputum Smear Sputum Smear XRay XRay