New Rules for Domain Independent Lifted MAP Inference

Slides:



Advertisements
Similar presentations
10 October 2006 Foundations of Logic and Constraint Programming 1 Unification ­An overview Need for Unification Ranked alfabeths and terms. Substitutions.
Advertisements

2005conjunctive-ii1 Query languages II: equivalence & containment (Motivation: rewriting queries using views)  conjunctive queries – CQ’s  Extensions.
University of Texas at Austin Machine Learning Group Department of Computer Sciences University of Texas at Austin Discriminative Structure and Parameter.
Resolution.
1 Conjunctions of Queries. 2 Conjunctive Queries A conjunctive query is a single Datalog rule with only non-negated atoms in the body. (Note: No negated.
CPSC 322, Lecture 30Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 30 March, 25, 2015 Slide source: from Pedro Domingos UW.
Markov Logic Networks: Exploring their Application to Social Network Analysis Parag Singla Dept. of Computer Science and Engineering Indian Institute of.
Efficient Query Evaluation on Probabilistic Databases
Markov Logic: Combining Logic and Probability Parag Singla Dept. of Computer Science & Engineering Indian Institute of Technology Delhi.
Review Markov Logic Networks Mathew Richardson Pedro Domingos Xinran(Sean) Luo, u
Speaker:Benedict Fehringer Seminar:Probabilistic Models for Information Extraction by Dr. Martin Theobald and Maximilian Dylla Based on Richards, M., and.
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
Relational Models. CSE 515 in One Slide We will learn to: Put probability distributions on everything Learn them from data Do inference with them.
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
Markov Logic: A Simple and Powerful Unification Of Logic and Probability Pedro Domingos Dept. of Computer Science & Eng. University of Washington Joint.
Learning, Logic, and Probability: A Unified View Pedro Domingos Dept. Computer Science & Eng. University of Washington (Joint work with Stanley Kok, Matt.
Statistical Relational Learning Pedro Domingos Dept. Computer Science & Eng. University of Washington.
Introduction to Logic for Artificial Intelligence Lecture 2 Erik Sandewall 2010.
1 First order theories. 2 Satisfiability The classic SAT problem: given a propositional formula , is  satisfiable ? Example:  Let x 1,x 2 be propositional.
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
Markov Logic Parag Singla Dept. of Computer Science University of Texas, Austin.
1 2. Independence and Bernoulli Trials Independence: Events A and B are independent if It is easy to show that A, B independent implies are all independent.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
Markov Logic And other SRL Approaches
NP-COMPLETENESS PRESENTED BY TUSHAR KUMAR J. RITESH BAGGA.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
1 Relational Algebra and Calculas Chapter 4, Part A.
Markov Logic Networks Pedro Domingos Dept. Computer Science & Eng. University of Washington (Joint work with Matt Richardson)
First-Order Logic and Inductive Logic Programming.
Linear Program Set Cover. Given a universe U of n elements, a collection of subsets of U, S = {S 1,…, S k }, and a cost function c: S → Q +. Find a minimum.
CPSC 322, Lecture 31Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 33 Nov, 25, 2015 Slide source: from Pedro Domingos UW & Markov.
1 Section 9.1 Automatic Reasoning Recall that a wff W is valid iff ¬ W is unsatisfiable. Resolution is an inference rule used to prove unsatisfiability.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
CPSC 322, Lecture 30Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 30 Nov, 23, 2015 Slide source: from Pedro Domingos UW.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
Happy Mittal (Joint work with Prasoon Goyal, Parag Singla and Vibhav Gogate) IIT Delhi New Rules for Domain Independent Lifted.
CS104:Discrete Structures Chapter 2: Proof Techniques.
Markov Logic: A Representation Language for Natural Language Semantics Pedro Domingos Dept. Computer Science & Eng. University of Washington (Based on.
Progress Report ekker. Problem Definition In cases such as object recognition, we can not include all possible objects for training. So transfer learning.
Approximation Algorithms based on linear programming.
Scalable Statistical Relational Learning for NLP William Y. Wang William W. Cohen Machine Learning Dept and Language Technologies Inst. joint work with:
Happy Mittal Advisor : Parag Singla IIT Delhi Lifted Inference Rules With Constraints.
Scalable Statistical Relational Learning for NLP
Introduction to Logic for Artificial Intelligence Lecture 2
Inference and search for the propositional satisfiability problem
Computability and Complexity
The Propositional Calculus
CS 352 Introduction to Logic Design
Markov Logic Networks for NLP CSCI-GA.2591
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 30
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 29
Factorization by Cross-method
First-Order Logic and Inductive Logic Programming
NP-Completeness Yin Tat Lee
Logic for Artificial Intelligence
Propositional Calculus: Boolean Algebra and Simplification
Complexity 6-1 The Class P Complexity Andrei Bulatov.
Lifted First-Order Probabilistic Inference [de Salvo Braz, Amir, and Roth, 2005] Daniel Lowd 5/11/2005.
Alternating tree Automata and Parity games
CHAPTER 1: LOGICS AND PROOF
Resolution Proofs for Combinational Equivalence
MA/CSSE 474 More Math Review Theory of Computation
Computational Logic Lecture 13
Automated Reasoning in Propositional Logic
NP-Completeness Yin Tat Lee
Methods of Proof Chapter 7, second half.
This Lecture Substitution model
Presentation transcript:

New Rules for Domain Independent Lifted MAP Inference Happy Mittal (Joint work with Prasoon Goyal, Parag Singla and Vibhav Gogate) Happy.Mittal@cse.iitd.ac.in IIT Delhi

Overview Introduction Motivation Notations and preliminaries First rule Second rule Experiments Conclusion and Future work

Markov Logic Networks (MLN) Friendship leads to Similar Smoking habits Smoking leads to Cancer Real world problems characterized by Entities and Relationships & Uncertain Behavior Relational Models : Horn clauses, SQL, first-order logic Statistical Models: Markov networks, Bayesian networks Markov Logic [Richardson & Domingos 06] Weighted First Order Formulas

Example: Friends & Smokers

Example: Friends & Smokers

Example: Friends & Smokers Two constants: Ana (A) and Bob (B)

Example: Friends & Smokers Two constants: Ana (A) and Bob (B) Smokes(A) Smokes(B) Cancer(A) Cancer(B)

Example: Friends & Smokers Two constants: Ana (A) and Bob (B) Friends(A,B) Friends(A,A) Smokes(A) Smokes(B) Friends(B,B) Cancer(A) Cancer(B) Friends(B,A)

Example: Friends & Smokers Two constants: Ana (A) and Bob (B) Friends(A,B) Friends(A,A) Smokes(A) Smokes(B) Friends(B,B) Cancer(A) Cancer(B) Friends(B,A)

Example: Friends & Smokers Two constants: Ana (A) and Bob (B) Friends(A,B) Friends(A,A) Smokes(A) Smokes(B) Friends(B,B) Cancer(A) Cancer(B) Friends(B,A)

Markov Logic Networks MLN is template for ground Markov nets Probability of a world x: Weight of formula i No. of true groundings of formula i in x

MAP/MPE Inference This is just the weighted MaxSAT problem Use weighted SAT solver (e.g., MaxWalkSAT [Kautz et al. 97] )

Normal MLN Normal Form Not Normal Form An MLN is in normal form iff : No constants in any formula Variables X and Y at same position of predicate implies dom(X) = dom(Y) Any MLN can be converted into normal form in polynomial time. Normal Form Not Normal Form

Overview Introduction Motivation Notations and preliminaries First rule Second rule Experiments Conclusion

… MAP/MPE Inference Naïve way : Solve on fully grounded theory Exponential in size of domain of predicates. Exploit symmetries in the theory Example : All are identical up to constant renaming. Solve one, get solutions for others also. Used decomposer : a variable must appear in each atom of formula …

MAP/MPE Inference What about No decomposer here. No current technique handle below rule without grounding : We give two rules which make MLN having above formulas domain independent Domain Independent inference : Time complexity independent of size of variable domains.

Overview Introduction Motivation Notations and preliminaries First rule Second rule Experiments Conclusion and Future work

Notations and preliminaries Binding relation : variables X and Y are related if : They appear in same position of a predicate P, or X,Z and Y,Z are related. Example : X ,Z are related, X,U are related, Y,V are related. Intuitively, related variables have to be split together. Relation is symmetric, and transitive, hence splits variables into equivalence classes. X and Y bind to each other if they belong to same equivalence class (denote as X ~ Y) In above example : two equivalence classes {X,Z,U}, {Y,V}

Single occurrence Single occurrence equivalence class : If no two variables of that class appear together in any formula. Example : {Y,V} is single occurrence {X,Z,U} is not single occurrence (Z,U appear together) Single occurrence MLN : If each equivalence class is single occurrence. Intuition : Variables in any formula are not tied together.

Overview Introduction Motivation Notations and preliminaries First rule Second rule Experiments Conclusion and Future work

First rule for lifted MAP inference Given an MLN theory M. Let a single occurrence equivalence class be E. MAP inference over M can be reduced to MAP inference over simpler theory M’ such that M’ has : Same formulas as of M (with modified weights) Domain of E is single constant.

Constructing M’ Consider MLN M : Let domain of all variables be {a,b,c} 3 equivalence classes : E1={X,Z,U}, E2={Y,V}, E3={W} E2,E3 are single occurrence, E1 is not. Split according to single occurrence equivalence classes. Lets split according to E2 first.

Constructing M’ Split into ∆E2 theories (having same formulas) E2={Y,V} Split into ∆E2 theories (having same formulas)

Constructing M’ M3 M2 M1 E2={Y,V} For every formula not containing equivalence class E2, divide its weight by ∆E2

Constructing M’ M2 M3 M1 E2={Y,V} M’ can be any of the M1, M2, or M3 MAP inference over M can be reduced to MAP inference over M’.

Constructing M’ E2={Y,V} M2 M3 M1 Split M2 according to E3 = {W} now

Constructing M’ E3={W} M2 M3 M1

Constructing M’ E3={W} M2 M3 M1

First rule for lifted MAP inference Given an MLN theory M. Let a single occurrence equivalence class be E. MAP inference over M can be reduced to MAP inference over simpler theory M’ such that M’ has : Same formulas as of M (with modified weights) Domain of E is single constant.

Proof Proof can be divided into 4 steps : Step 1 Set of weighted constraints in M is union of set of weighted constraints in sub theories M1, M2, …, Mr

Proof Proof can be divided into 4 steps : Step 1 Set of weighted constraints in M is union of set of weighted constraints in sub theories M1, M2, …, Mr Proof : For formula containing variable of class E2 : partial groundings split across all sub theories.

Proof Proof can be divided into 4 steps : Step 1 Set of weighted constraints in M is union of set of weighted constraints in sub theories M1, M2, …, Mr Proof : For formula containing variable of class E2 : partial groundings split across all sub theories. For formula not containing variable of class E2 : weight divided equally among all sub theories, hence total weight is original weight in M.

Proof Step 1 Set of weighted constraints in M is union of set of weighted constraints in sub theories M1, M2, …, Mr Proof : For formula containing variable of equivalence class E2 : partial groundings are split across all sub theories. For formula not containing variable of class E2 : weight divided equally among all sub theories, hence total weight is original weight in M.

Proof Step 2 MAP assignments across sub theories are same up to constant renaming. Proof : Follows from symmetry of sub theories.

Proof Step 3 MAP solution XMAP for M can be obtained from any of the sub-theory Mj.. Create MAP solution XMAP for M as follows : Predicate not containing variable of class E2, : Use solution from MAP of M1 . Ex : P(X), R(W) Predicate containing variable from class E2, Read off any of its partial grounding’s assignment in any theory Mj. Ex : Any of the Q(X,a), Q(X,b), or Q(X,c) will work.

Proof XMAP is indeed a MAP solution for M Step 4 Proof : Suppose it is not, then let XALT exists such that WM(XALT) > WM(XMAP) But then WM(XjALT) > WM(XjMAP) Which means there is some sub theory j, whose XjMAP is not a MAP solution, which is a contradiction.

Algorithm Input : MLN M Initialize M’ = M For each single occurrence equivalence class E in M’ : For each formula F in M ‘: If F doesn’t contain any variable from E : Set WF = WF/∆E Set domain E to be single constant Return M’

Domain Independent Lifted MAP Theorem : MAP inference in single occurrence MLN is domain independent. Proof : Since MLN is single occurrence, Successively reduce domain of each single occurrence equivalence class to be a constant. Since MLN is single occurrence, all variables’ domain reduced to constant. Hence domain independent MAP inference.

Overview Introduction Motivation Notations and preliminaries First rule Second rule Experiments Conclusion and Future work

Exploiting Extremes Extreme assignment : F(X,Y) ^ F(Y,Z) => F(X,Z) In assignment x, predicate P is at extreme if all its groundings are either true or false. F(X,Y) ^ F(Y,Z) => F(X,Z) Suppose F is at extreme 0 ^ 0 => 0 OR 1 ^ 1 => 1 Tautology at extreme How can we exploit this tautology ?

Exploiting Extremes Consider MLN : Suppose Q is at extreme W1 : P(X) => Q(X,Y) W2 : Q(X,Y) ^ Q(Y,Z) => Q(X,Z) Suppose Q is at extreme Then Q(X,Y) ^ Q(Y,Z) => Q(X,Z) is tautology We can just solve How do we know if some predicate is at extreme ? First rule tells that

Exploiting Extremes M3 M2 M1 Theorem : If Predicate P is single occurrence in M, then P has an extreme assignment in XMAP In single occurrence MLN, all predicates are at extreme in MAP assignment. E3={W} M3 M1 M2

Second rule for lifted MAP Consider MLN : W1 : P(X) => Q(X,Y) W2 : Q(X,Y) ^ Q(Y,Z) => Q(X,Z) Is it single occurrence MLN ? No Now ? Yes P and Q have extreme assignments in MAP But Q(X,Y) ^ Q(Y,Z) => Q(X,Z) is tautology at extreme. So solve

Second rule for Lifting MAP Second Rule : If MLN is single occurrence after removing tautology at extremes, then MAP inference in original MLN is domain independent. In general, only variables appearing in tautology at extremes must be single occurrence for second rule to apply.

Second rule for Lifting MAP How to identify tautology at extremes : Necessary and sufficient condition : A clause must have both positive and negative occurrences of same predicate symbol. !F(X,Y) V !F(Y,Z) V F(X,Z)

Algorithm to find single occurrence tautology at extremes Input : MLN M Initialization : Fte = all tautologies at extreme F’ = remaining formulas (F – Fte) Done = False While(not Done) Done = True EQ = single occurrence variables in F’ For each formula f in Fte If there is variable in f not in EQ Add f into F’ ; Done = False Return F - F’

Comparison with others’ work Decomposer : If class E is decomposer, it is also single occurrence. E is decomposer iff : If variable of E appears in formula, then it occurs in all preds of that formula. No two variables in E appear together in a predicate i.e. P(X,Y) is not allowed if X,Y are in E. E is single occurrence : Because no two variables X and Y from E can occur together in formula Sarkhel et. al [2014]’s non-shared MLN approach : If MLN is non-shared and without self join, it is single occurrence. P(X) V Q(Y,Z) P(A) V Q(B,C) Equivalence classes : {X,A} , {Y,B}, {Z,C} -> same predicate, same position No two variables in an equivalence class can occur in same formula : Because of non-self join.

Overview Introduction Motivation Notations and preliminaries First rule Second rule Experiments Conclusion and Future Work

Experiments Compared our performance with Purely grounded version of benchmark MLNs Sarkhel et al. [2014]‘s non shared MLN approach Used ILP based solver Gurobi as base solver. Notation : GRB : purely grounded version NSLGRB : Sarkhel et al. [2014]’s non shared MLN approach SOLGRB : our approach (single occurrence lifted GRB)

Datasets and Methodology Used 2 benchmark MLNs : For each algorithm, we report : Time to reach optimal with varying domain size. Cost of unsatisfied clauses with varying running time (fixed domain size of 500) Ground theory size with varying domain size. Dataset No. of formulas Single Occurrence Taut. At extereme Example formulas IE 7 No (Mix) No Token(t,p,c)=>InField(p,f,c) !Equal(f1,f2) ^ InField(p,f1,c) => !InField(p,f2,c) etc FS 5 Yes S(x) => C(x) F(x,y) ^ F(y,z) => F(x,z)

Results Time to reach optimal IE FS

Results Cost of unsatisfied formulae with varying time (fixed domain size 500) IE FS

Results Size of ground theory with varying domain size. IE FS

Overview Introduction Motivation Notations and preliminaries First rule Second rule Experiments Conclusion and Future work

Conclusion and Future work Presented two new rules for lifting MAP inference over MLN. Applicable to large classes of MLNs MAP inference becomes domain independent for single occurrence MLN. Can handle transitivity rules. Can we combine our new rules with existing techniques ? Relaxing normal MLN Lift any structured CSP (in general any structured LP)

THANK YOU