general formulations for structures markov logic
play

General Formulations for Structures: Markov Logic CS 6355: - PowerPoint PPT Presentation

General Formulations for Structures: Markov Logic CS 6355: Structured Prediction 1 This lecture Graphical models Bayesian Networks Markov Random Fields (MRFs) Formulations of structured output Joint models Markov Logic


  1. General Formulations for Structures: Markov Logic CS 6355: Structured Prediction 1

  2. This lecture • Graphical models – Bayesian Networks – Markov Random Fields (MRFs) • Formulations of structured output – Joint models • Markov Logic Network – Conditional models • Conditional Random Fields (again) • Constrained Conditional Models 2

  3. Representing and reasoning about knowledge Consider the following statements – Smoking causes cancer – If two people are friends and one smokes, so does the other Questions to think about – How do we represent this knowledge? – How do we answer questions like: “If Anna is friends with Bob, and Bob smokes, can Anna get cancer?” 3

  4. Representing and reasoning about knowledge Consider the following statements – Smoking causes cancer – If two people are friends and one smokes, so does the other Questions to think about – How do we represent this knowledge? – How do we answer questions like: “If Anna is friends with Bob, and Bob smokes, can Anna get cancer?” Logic is a natural language for declaratively stating knowledge and making inferences. 4

  5. Representing knowledge “Smoking causes cancer.” ∀𝑦, Smokes 𝑦 ⇒ Cancer 𝑦 We have predicates Smokes and Cancer here in this universally quantified statement. 5

  6. Representing knowledge “Smoking causes cancer.” ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) “If two people are friends and one smokes, so does the other.” ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) 6

  7. Reasoning about knowledge “Smoking causes cancer.” ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) “If two people are friends and one smokes, so does the other.” ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) Suppose we have two friends Anna and Bob, and Bob smokes. What can we infer about Anna? 1. Anna and Bob are friends: Friends Anna, Bob 2. Bob smokes: Smokes Bob 3. We know that: Friends Anna, Bob ∧ Smokes Bob ⇒ Smokes(Anna) 4. And we also know that: Smokes Anna ⇒ Cancer(Anna) 7

  8. Reasoning about knowledge “Smoking causes cancer.” ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) “If two people are friends and one smokes, so does the other.” ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) Suppose we have two friends Anna and Bob, and Bob smokes. What can we infer about Anna? 1. Anna and Bob are friends: Friends Anna, Bob 2. Bob smokes: Smokes Bob 3. We know that: Friends Anna, Bob ∧ Smokes Bob ⇒ Smokes(Anna) 4. And we also know that: Smokes Anna ⇒ Cancer(Anna) 8

  9. Reasoning about knowledge “Smoking causes cancer.” ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) “If two people are friends and one smokes, so does the other.” ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) Suppose we have two friends Anna and Bob, and Bob smokes. What can we infer about Anna? 1. Anna and Bob are friends: Friends Anna, Bob 2. Bob smokes: Smokes Bob 3. We know that: Friends Anna, Bob ∧ Smokes Bob ⇒ Smokes(Anna) 4. And we also know that: Smokes Anna ⇒ Cancer(Anna) 9

  10. Reasoning about knowledge “Smoking causes cancer.” ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) “If two people are friends and one smokes, so does the other.” ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) Suppose we have two friends Anna and Bob, and Bob smokes. What can we infer about Anna? 1. Anna and Bob are friends: Friends Anna, Bob 2. Bob smokes: Smokes Bob 3. We know that: Friends Anna, Bob ∧ Smokes Bob ⇒ Smokes(Anna) 4. And we also know that: Smokes Anna ⇒ Cancer(Anna) 10

  11. Reasoning about knowledge “Smoking causes cancer.” ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) “If two people are friends and one smokes, so does the other.” ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) Suppose we have two friends Anna and Bob, and Bob smokes. What can we infer about Anna? 1. Anna and Bob are friends: Friends Anna, Bob 2. Bob smokes: Smokes Bob 3. We know that: Friends Anna, Bob ∧ Smokes Bob ⇒ Smokes(Anna) 4. And we also know that: Smokes Anna ⇒ Cancer(Anna) 11

  12. Reasoning about knowledge “Smoking causes cancer.” ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) “If two people are friends and one smokes, so does the other.” ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) Suppose we have two friends Anna and Bob, and Bob smokes. What can we infer about Anna? 1. Anna and Bob are friends: Friends Anna, Bob 2. Bob smokes: Smokes Bob 3. We know that: Friends Anna, Bob ∧ Smokes Bob ⇒ Smokes(Anna) 4. And we also know that: Smokes Anna ⇒ Cancer(Anna) Logic is an expressive language, but how do we deal with uncertainty? 12

  13. From logic to Markov networks Consider the following statements – Smoking causes cancer – If two people are friends and one smokes, so does the other In logic: • ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) 13 [Example from Domingos and Lowd 2009]

  14. From logic to Markov networks Consider the following statements – Smoking causes cancer – If two people are friends and one smokes, so does the other In logic: • ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) The statements are not necessarily absolutely true • – How do we associate degrees of belief to statements? 14 [Example from Domingos and Lowd 2009]

  15. Markov Logic Networks From rules to graphical models • Convert to clauses ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) • Associate a potential function for each clause – Think of each formula as a factor – Typically, log-linear in all the variables involved • Ground the logical expressions to all x, y that you care about 15 [Example from Domingos and Lowd 2009]

  16. Markov Logic Networks From rules to graphical models • Convert to clauses ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) • Associate a potential function for each clause Recall: – Think of each formula as a factor – Typically, log-linear in all the variables involved • A literal is predicate or its negation • A clause is a disjunction of literals • Any implication 𝐵 ⇒ 𝐶 is equivalent to ¬𝐵 ∨ 𝐶 • Ground the logical expressions to all x, y that you care about 16 [Example from Domingos and Lowd 2009]

  17. Markov Logic Networks From rules to graphical models • Convert to clauses ∀𝑦, ¬Smokes 𝑦 ∨ Cancer 𝑦 ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) ∀𝑦, 𝑧, ¬Friends 𝑦, 𝑧 ∨ ¬Smokes 𝑧 ∨ Cancer(𝑧) ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) • Associate a potential function for each clause Recall: – Think of each formula as a factor – Typically, log-linear in all the variables involved • A literal is predicate or its negation • A clause is a disjunction of literals • Any implication 𝐵 ⇒ 𝐶 is equivalent to ¬𝐵 ∨ 𝐶 • Ground the logical expressions to all x, y that you care about 17 [Example from Domingos and Lowd 2009]

  18. Markov Logic Networks From rules to graphical models • Convert to clauses ∀𝑦, ¬Smokes 𝑦 ∨ Cancer 𝑦 ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) ∀𝑦, 𝑧, ¬Friends 𝑦, 𝑧 ∨ ¬Smokes 𝑧 ∨ Cancer(𝑧) ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) • Associate a potential function for each clause – Think of each formula as a factor – Could be log-linear in all the variables involved • Ground the logical expressions to all x, y that you care about 18 [Example from Domingos and Lowd 2009]

  19. Markov Logic Networks From rules to graphical models • Convert to clauses ∀𝑦, ¬Smokes 𝑦 ∨ Cancer 𝑦 ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) ∀𝑦, 𝑧, ¬Friends 𝑦, 𝑧 ∨ ¬Smokes 𝑧 ∨ Cancer(𝑧) ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) • Associate a potential function for each clause – Think of each formula as a factor – Could be log-linear in all the variables involved • Ground the logical expressions to all x, y that you care about 19 [Example from Domingos and Lowd 2009]

  20. Example of a ground network 1.5 ∀𝑦, ¬Smokes 𝑦 ∨ Cancer 𝑦 ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) ∀𝑦, 𝑧, ¬Friends 𝑦, 𝑧 ∨ ¬Smokes 𝑧 ∨ Cancer(𝑧) 1.0 ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) Each rule is associated with a weight 20 [Example from Domingos and Lowd 2009]

  21. Weighted formulas → ground network ∀𝑦, ¬Smokes 𝑦 ∨ Cancer 𝑦 ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) ∀𝑦, 𝑧, ¬Friends 𝑦, 𝑧 ∨ ¬Smokes 𝑧 ∨ Cancer(𝑧) ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) 21 [Example from Domingos and Lowd 2009]

  22. Weighted formulas → ground network 1.5 ∀𝑦, ¬Smokes 𝑦 ∨ Cancer 𝑦 ∀𝑦, Smokes 𝑦 ⇒ Cancer(𝑦) ∀𝑦, 𝑧, ¬Friends 𝑦, 𝑧 ∨ ¬Smokes 𝑧 ∨ Cancer(𝑧) 1.0 ∀𝑦, 𝑧 Friends 𝑦, 𝑧 ∧ Smokes 𝑦 ⇒ Smokes(𝑧) Suppose there are two people in the world: Anna (A), Bob (B) 22 [Example from Domingos and Lowd 2009]

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend