1 / 47

Lifted First-Order Probabilistic Inference

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

milt
Download Presentation

Lifted First-Order Probabilistic Inference

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lifted First-Order Probabilistic Inference Rodrigo de Salvo Braz University of Illinois at Urbana-Champaign with Eyal Amir and Dan Roth

  2. 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)

  3. 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)

  4. 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

  5. This Talk • Representation • Inference • Inversion Elimination (IE) (Poole, 2003) • Formalization of IE • Identification of conditions for IE • Counting Elimination • Experiment & Conclusions

  6. Representation epidemic(measles) … epidemic(flu) … … sick(mary,measles) sick(mary,flu) sick(bob,measles) sick(bob,flu) … … … … … hospital(mary) hospital(bob) …

  7. 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) …

  8. Representation epidemic(measles) … epidemic(flu) … … sick(mary,measles) sick(mary,flu) sick(bob,measles) sick(bob,flu) … … … … … hospital(mary) hospital(bob) …

  9. Representation - Lots of Redundancy! epidemic(measles) … epidemic(flu) … … sick(mary,measles) sick(mary,flu) sick(bob,measles) sick(bob,flu) … … … … … hospital(mary) hospital(bob) …

  10. 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)

  11. epidemic(Disease) sick(Person,Disease) Parfactor 8 Person, Disease f(sick(Person,Disease), epidemic(Disease))

  12. epidemic(Disease) sick(Person,Disease) Parfactor Person  mary, Disease  flu 8 Person, Disease f(sick(Person,Disease), epidemic(Disease)), Person  mary, Disease  flu

  13. 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)

  14. 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

  15. Inference - Plain Propositionalization • Instantiation of potential function for each instantiation • Lots of redundant computation • Lots of unnecessary random variables

  16. 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)

  17. 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)

  18. 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)

  19. 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.

  20. Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? epidemic(D) sick(mary, D) hospital(mary)

  21. Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? epidemic(D) = Unification sick(mary, D) hospital(mary)

  22. 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)

  23. 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)

  24. 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)

  25. Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? epidemic(D) D  measles sick(mary,measles) sick(mary, D) D  measles hospital(mary)

  26. Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? epidemic(D) D  measles sick(mary, D) D  measles hospital(mary)

  27. Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? D  measles sick(mary, D) D  measles hospital(mary)

  28. Inference - Inversion Elimination (IE) P(hospital(mary) | sick(mary, measles)) = ? hospital(mary)

  29. 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)

  30. 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))

  31. 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))

  32. 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))

  33. 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.

  34. Inversion Elimination - Limitations - I • Eliminated atom must contain all logical variables in parfactors involved. epidemic(D) sick(P,D)

  35. 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

  36. 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)

  37. 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)

  38. 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))

  39. 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)

  40. 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)

  41. Inversion Elimination - Limitations - II åe(D)ÕD1D2f(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))

  42. |e(D)| |e(D)| = å()Õv f(v)#v in e(D),D1D2 (from i) i i=0 Second Contribution - Counting Elimination åe(D)ÕD1D2f(e(D1),e(D2)) = åe(D)f(0,0)#(0,0) in e(D),D1D2f(0,1)#(0,1) in e(D),D1D2f(1,0)#(1,0) in e(D),D1D2f(1,1)#(1,1) in e(D),D1D2 = åe(D)Õv f(v)#v in e(D),D1D2

  43. 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

  44. A Simple Experiment

  45. 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.

  46. 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

  47. The End

More Related