470 likes | 680 Views
Lifted First-Order Probabilistic Inference. Rodrigo de Salvo Braz University of Illinois at Urbana-Champaign. with Eyal Amir and Dan Roth. Motivation. We want to be able to do inference with Probabilistic First-order Logic
E N D
Lifted First-Order Probabilistic Inference Rodrigo de Salvo Braz University of Illinois at Urbana-Champaign with Eyal Amir and Dan Roth
Motivation • We want to be able to do inference with Probabilistic First-order Logic • if epidemic(Disease) then sick(Person, Disease) [0.2, 0.05] • if sick(Person, Disease) then hospital(Person) [0.3, 0.01] • sick(bob, measles) or sick(bob, flu) 0.6 • Expressiveness of logic • Robustness of probabilistic models • Goal: Probabilistic Inference at First-order level(scalability one of main advantages)
Current approaches - Propositionalization • Exact inference: • Knowledge-based construction (Breese, 1992) • Probabilistic Logic Programming (Ng & Subrahmanian, 1992) • Probabilistic Logic Programming (Ngo and Haddawy, 1995) • Probabilistic Relational Models (Friendman et al., 1999) • Relational Bayesian networks (Jaeger, 1997) • Bayesian Logic Programs (Kersting & DeRaedt, 2001) • Probabilistic Abduction (Poole, 1993) • MEBN (Laskey, 2004) • Markov Logic (Richardson & Domingos, 2004) • Sampling: • PRISM (Saito, 1995) • BLOG (Milch et al, 2005)
epidemic(D1) D1 D2 epidemic(D2) first-order Unexploited structure • f(epidemic(Disease1), epidemic(Disease2)) epidemic(flu) … epidemic(measles) epidemic(rubella) propositionalized as in first-order theorem proving
This Talk • Representation • Inference • Inversion Elimination (IE) (Poole, 2003) • Formalization of IE • Identification of conditions for IE • Counting Elimination • Experiment & Conclusions
Representation epidemic(measles) … epidemic(flu) … … sick(mary,measles) sick(mary,flu) sick(bob,measles) sick(bob,flu) … … … … … hospital(mary) hospital(bob) …
Representation epidemic(measles) … epidemic(flu) … … sick(mary,measles) sick(mary,flu) sick(bob,measles) sick(bob,flu) … … … f(sick(mary,measles), epidemic(measles)) … … hospital(mary) hospital(bob) …
Representation epidemic(measles) … epidemic(flu) … … sick(mary,measles) sick(mary,flu) sick(bob,measles) sick(bob,flu) … … … … … hospital(mary) hospital(bob) …
Representation - Lots of Redundancy! epidemic(measles) … epidemic(flu) … … sick(mary,measles) sick(mary,flu) sick(bob,measles) sick(bob,flu) … … … … … hospital(mary) hospital(bob) …
Representing structure epidemic(measles) … epidemic(flu) … … sick(mary,measles) sick(mary,flu) sick(bob,measles) sick(bob,flu) … … … Poole (2003) named these parfactors, for “parameterized factors” epidemic(D) sick(P,D)
epidemic(Disease) sick(Person,Disease) Parfactor 8 Person, Disease f(sick(Person,Disease), epidemic(Disease))
epidemic(Disease) sick(Person,Disease) Parfactor Person mary, Disease flu 8 Person, Disease f(sick(Person,Disease), epidemic(Disease)), Person mary, Disease flu
Representing structure • More intutive • More compact • Represents structure explicitly • Generalization of graphical models epidemic(D) sick(P,D) Atoms represent a set of random variables hospital(P)
Making use of structure in Inference • Task: given a condition, what is the marginal probability of a set of random variables? • P(sick(bob, measles) | sick(mary,measles)) = ? • Three approaches • plain propositionalization • dynamic construction (“smart” propositionalization) • lifted inference
Inference - Plain Propositionalization • Instantiation of potential function for each instantiation • Lots of redundant computation • Lots of unnecessary random variables
Inference - Dynamic construction • Instantiation of potential function for relevant parts • P(hospital(mary) | sick(mary, measles)) = ? … epidemic(measles) epidemic(flu) epidemic(rubella) … sick(mary,measles) sick(mary, flu) sick(mary, rubella) hospital(mary)
Inference - Dynamic construction • Instantiation of potential function for relevant parts • P(hospital(mary) | sick(mary, measles)) = ? … epidemic(measles) epidemic(flu) epidemic(rubella) … sick(mary,measles) sick(mary, flu) sick(mary, rubella) Much redundancy still hospital(mary)
Inference - Dynamic construction • Most common approach forexact First-order Probabilistic inference: • Knowledge-based construction (Breese, 1992) • Probabilistic Logic Programming (Ng & Subrahmanian, 1992) • Probabilistic Logic Programming (Ngo and Haddawy, 1995) • Probabilistic Relational Models (Friendman et al., 1999) • Relational Bayesian networks (Jaeger, 1997) • Bayesian Logic Programs (Kersting & DeRaedt, 2001) • MEBN (Laskey, 2004) • Markov Logic (Richardson & Domingos, 2004)
Inference - Lifted inference • Inference on parameterized, or first-order, level; • Performs certain inference steps once for a class of random variables; • Poole (2003) describes a generalized Variable Elimination algorithm which we call Inversion Elimination.
Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? epidemic(D) sick(mary, D) hospital(mary)
Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? epidemic(D) = Unification sick(mary, D) hospital(mary)
Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? epidemic(measles) epidemic(D) D measles sick(mary,measles) sick(mary, D) D measles hospital(mary)
Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? epidemic(measles) epidemic(D) = D measles sick(mary,measles) sick(mary, D) D measles hospital(mary)
Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? epidemic(measles) epidemic(D) D measles sick(mary,measles) sick(mary, D) D measles hospital(mary)
Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? epidemic(D) D measles sick(mary,measles) sick(mary, D) D measles hospital(mary)
Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? epidemic(D) D measles sick(mary, D) D measles hospital(mary)
Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? D measles sick(mary, D) D measles hospital(mary)
Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? hospital(mary)
Inference - Inversion Elimination (IE) • Does not depend on domain size. epidemic(measles) epidemic(D) epidemic(flu) … sick(mary,measles) sick(mary, flu) sick(mary, D) hospital(mary) hospital(mary)
First contribution - Formalization of IE • Joint ÕfÕqf(Afq) • Example ÕXf1(p(X)) ÕX,Y f2(p(X),q(X,Y)) • Marginalization by eliminating class q(X,Y): åq(X,Y) ÕXf1(p(X))ÕX,Yf2(p(X),q(X,Y)) = ÕXf1(p(X))åq(X,Y)ÕX,Yf2(p(X),q(X,Y))
First contribution - Formalization of IE åq(X,Y)ÕX,Yf2(p(X),q(X,Y)) = åq(x1,y1)...åq(xn,ym) f2(p(x1),q(x1,y1))...f2(p(xn),q(xn,ym)) = (åq(x1,y1) f2(p(x1),q(x1,y1)))...(åq(xn,ym) f2(p(xn),q(xn,ym))) =ÕX,Yåq(X,Y) f2(p(X),q(X,Y)) = ÕX,Yf3(p(X)) = ÕXf4(p(X))
First contribution - Formalization of IE åq(X,Y)ÕX,Yf2(p(X),q(X,Y)) = åq(x1,y1)...åq(xn,ym) f2(p(x1),q(x1,y1))...f2(p(xn),q(xn,ym)) = (åq(x1,y1) f2(p(x1),q(x1,y1)))...(åq(xn,ym) f2(p(xn),q(xn,ym))) =ÕX,Yåq(X,Y) f2(p(X),q(X,Y)) = ÕX,Yf3(p(X)) = ÕXf4(p(X))
First contribution - Formalization of IE • By formalizing the problem of Inversion Elimination, we determined conditions for its application: • Eliminated atom must contain all logical variables in parfactors involved; • Eliminated atom instances must not occur together in the same instances of parfactor.
Inversion Elimination - Limitations - I • Eliminated atom must contain all logical variables in parfactors involved. epidemic(D) sick(P,D)
Inversion Elimination - Limitations - I • Eliminated atom must contain all logical variables in parfactors involved. epidemic(D) epidemic(D) sick(P,D) Ok, contains both P and D
Inversion Elimination - Limitations - I • Eliminated atom must contain all logical variables in parfactors involved. Not Ok, missing P epidemic(D) sick(P,D) sick(P,D)
Inversion Elimination - Limitations - I • Eliminated atom must contain all logical variables in parfactors involved. No atom can be eliminated p(X,Y) q(Y,Z)
Inversion Elimination - Limitations - I • Marginalization by eliminating class p(X): åp(X)ÕX,Yf2(p(X),q(X,Y)) = åp(x1)...åp(xn) ÕYf2(p(x1),q(x1,Y))...ÕYf2(p(xn),q(xn,Y)) = (åp(x1) ÕYf2(p(x1),q(x1,Y)))...(åp(xn) ÕYf2(p(xn),q(xn,Y))) =ÕXåp(X) ÕYf2(p(X),q(X,Y))
Inversion Elimination - Limitations - II • Requires eliminated RVs to occur in separate instances of parfactor epidemic(D) InversionElimination Ok D measles sick(mary, D) … epidemic(flu) epidemic(rubella) … sick(mary, flu) sick(mary, rubella)
Inversion Elimination - Limitations - II • Requires eliminated RVs to occur in separate instances of parfactor epidemic(D1) InversionElimination Not Ok D1 D2 epidemic(D2) epidemic(flu) … epidemic(measles) epidemic(rubella)
Inversion Elimination - Limitations - II åe(D)ÕD1D2f(e(D1),e(D2)) = åe(d1)...åe(dn) f(e(d1), e(d2)) ...f(e(dn-1),e(dn)) = åe(d1) f(e(d1), e(d2))...åe(dn) f(e(dn-1),e(dn))
|e(D)| |e(D)| = å()Õv f(v)#v in e(D),D1D2 (from i) i i=0 Second Contribution - Counting Elimination åe(D)ÕD1D2f(e(D1),e(D2)) = åe(D)f(0,0)#(0,0) in e(D),D1D2f(0,1)#(0,1) in e(D),D1D2f(1,0)#(1,0) in e(D),D1D2f(1,1)#(1,1) in e(D),D1D2 = åe(D)Õv f(v)#v in e(D),D1D2
Second Contribution - Counting Elimination • Does depend on domain size, but exponentially less so than brute force; • More general than Inversion Elimination, but still has conditions of its own; • inter-atom logical variables must be in a dominance ordering • p(X,Y), q(Y,X), r (Y) OK, Y dominates X • p(X), q(X,Y), r (Y) not OK, no dominance
Conclusions • Contributions: • Formalization and Identification of conditions for Inverse Elimination (Poole); • Counting Elimination; • Much faster than propositionalization in certain cases; • Basis for probabilistic theorem proving on the First-order level, as it is already the case with regular logic.
Future Directions • Approximate inference • Parameterized queries • “what is the most likely D such that sick(mary, D)?” • Function symbols • sick(motherOf(mary), D) • sequence(S, [g, c, t]) • Equality • MPE, MAP • Summer project at Cyc