Markov Logic Networks for NLP CSCI-GA.2591

Slides:



Advertisements
Similar presentations
Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
Advertisements

Decision Theory: Sequential Decisions Computer Science cpsc322, Lecture 34 (Textbook Chpt 9.3) Nov, 28, 2012.
Local Search Jim Little UBC CS 322 – CSP October 3, 2014 Textbook §4.8
Naïve Bayes. Bayesian Reasoning Bayesian reasoning provides a probabilistic approach to inference. It is based on the assumption that the quantities of.
Discriminative Training of Markov Logic Networks
University of Texas at Austin Machine Learning Group Department of Computer Sciences University of Texas at Austin Discriminative Structure and Parameter.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
Undirected Probabilistic Graphical Models (Markov Nets) (Slides from Sam Roweis)
Review Markov Logic Networks Mathew Richardson Pedro Domingos Xinran(Sean) Luo, u
Speeding Up Inference in Markov Logic Networks by Preprocessing to Reduce the Size of the Resulting Grounded Network Jude Shavlik Sriraam Natarajan Computer.
School of Computing Science Simon Fraser University Vancouver, Canada.
Chapter 8-3 Markov Random Fields 1. Topics 1. Introduction 1. Undirected Graphical Models 2. Terminology 2. Conditional Independence 3. Factorization.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Recursive Random Fields Daniel Lowd University of Washington (Joint work with Pedro Domingos)
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
Markov Logic Parag Singla Dept. of Computer Science University of Texas, Austin.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
1 MCMC Style Sampling / Counting for SAT Can we extend SAT/CSP techniques to solve harder counting/sampling problems? Such an extension would lead us to.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 3 Logic Representations (Part 2)
Boltzmann Machine (BM) (§6.4) Hopfield model + hidden nodes + simulated annealing BM Architecture –a set of visible nodes: nodes can be accessed from outside.
Markov Logic And other SRL Approaches
Tuffy Scaling up Statistical Inference in Markov Logic using an RDBMS
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
Modeling Speech Acts and Joint Intentions in Modal Markov Logic Henry Kautz University of Washington.
Marginalization & Conditioning Marginalization (summing out): for any sets of variables Y and Z: Conditioning(variant of marginalization):
First-Order Logic and Inductive Logic Programming.
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
Review of Propositional Logic Syntax
DeepDive Model Dongfang Xu Ph.D student, School of Information, University of Arizona Dec 13, 2015.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Happy Mittal (Joint work with Prasoon Goyal, Parag Singla and Vibhav Gogate) IIT Delhi New Rules for Domain Independent Lifted.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
CS498-EA Reasoning in AI Lecture #19 Professor: Eyal Amir Fall Semester 2011.
Lecture 7: Constrained Conditional Models
Logic: TD as search, Datalog (variables)
An Introduction to Markov Logic Networks in Knowledge Bases
Inference in Propositional Logic (and Intro to SAT)
Introduction to Logic for Artificial Intelligence Lecture 2
Maximum Entropy Models and Feature Engineering CSCI-GA.2591
Computer Science cpsc322, Lecture 20
Logical Inference 1 introduction
Preliminaries CSCI-GA.2591
EA C461 – Artificial Intelligence Logical Agent
Exercises: First Order Logics (FOL)
The Propositional Calculus
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 30
First-Order Logic and Inductive Logic Programming
Local Search Strategies: From N-Queens to Walksat
Computer Science cpsc322, Lecture 14
Logic for Artificial Intelligence
CS 416 Artificial Intelligence
Learning Markov Networks
Discrete Event Simulation - 4
Logics for Data and Knowledge Representation
Decision Theory: Single Stage Decisions
Boltzmann Machine (BM) (§6.4)
Chapter 8: Estimating with Confidence
Methods of Proof Chapter 7, second half.
Chapter 8: Estimating with Confidence
Chapter 8: Estimating with Confidence
Comparing Two Proportions
Chapter 8: Estimating with Confidence
Markov Networks.
Chapter 8: Estimating with Confidence
Dan Roth Department of Computer Science
Presentation transcript:

Markov Logic Networks for NLP CSCI-GA.2591 NYU Markov Logic Networks for NLP CSCI-GA.2591 Ralph Grishman

Markov Logic Networks There is strong interest in combining symbolic and statistical reasoning The general area is termed “Statistical Relational Learning” One of the most widely used representations is Markov Logic Networks early software support (Alchemy) continuing software development (Tuffy) lots of publications (Domingos)

Markov Logic In a traditional knowledge base, consisting of a set of formulas, all these formulas must be true in each possible world In Markov logic, each formula is assigned a weight a formula which is violated makes the world less likely but still possible

Markov Logic Network Consists of: a set of pairs {<Fi, wi>} of a formula and its weight a set of constants C = {c1, … , cn} assume that C is closed under all functions Network has a node for each possible grounding of each formula two nodes are connected if their formulas share a ground atom

Probability of a state x where F = number of formulas Fi ni(x) = number of true groundings of Fi in x

An Example (from last week) Four axioms: friends of friends are friends people without friends smoke people who smoke get cancer if two people are friends, either both smoke or neither does Predicates: are friends: F(x, y) smokes: S(x) gets cancer: C (x)

… adding weights Clearly these formulas are not always true: not everyone who smokes gets cancer Adding weights to these formulas allows us to capture formulas which are generally true the weights reflect the strength of the coupling of the two nodes, but are not probabilities (may be more than 1)

An Example … with weights Four axioms: friends of friends are friends 0.7 people without friends smoke 2.3 people who smoke get cancer 1.5 if two people are friends, either both smoke or neither does 1.1 Predicates: are friends: F(x, y) smokes: S(x) gets cancer: C (x)

Harnessing the Power This seems intuitively a more powerful representation than FOL or MRFs separately can it be made efficient enough? in view of the brute-force approach: we deal with quantified formulas by grounding them producing very large sets of formulas

Inference First task: finding most likely state (grounding) subproblem: SAT (satisfiability task for propositional logic): deciding whether a propositional logic formula can be satisfied, and give a state which satisfies it ex: x  y satisfied if x=false and y = true x & !x not satisfiable How about (a + b + c) (a’ + b’ + c) (a + b’ + c’) (a’ + b + c’)? intensively studied problem [Davis-Putnam procedure, 1962] NP hard

WalkSAT Random walk to search for satisfiability Repeat: select a clause not satisfied by current assignment to variables (if none, done) choose a variable at random and flip it Generally prefer flipping a variable which minimizes the number of clauses which become unsatisfied (but sometimes make a pure random choice c https://www.cs.rochester.edu/u/kautz/walksat/

MaxWalkSAT Generalization of WalkSAT to handle weighted propositions

Reducing memory requirements problem: a domain may be too large to fully instantiate address through lazy instantiation: LazyWalkSAT observe that most propositions are false most clauses are true so just keep true propositions and false clauses in memory

More SATs SampleSAT combines WalkSAT with simulated annealing MC-SAT in Alchemy extends SampleSAT

Learning Scaled conjugant gradient or similar Maximize likelihood of data base Can be quite slow – must do inference at cycle Use pseudo-likekihood (dependent only on Markov blanket) to speed up Optimizing more difficult because of very different constraints Deterministic and near-deterministic dependencies

Alchemy Implementation of Markov Logic Networks From Univ. of Washington

Installation / Access Distribution is for Linux systems General site: https://alchemy.cs.washington.edu I have been running Alchemy 2.0 Distribution is for Linux systems User’s manual https://alchemy.cs.washington.edu/user-manual/manual.html (section 2) Suggestions for building for Mac or Windows at: https://alchemy.cs.washington.edu/requirements (may not be sufficient) Installed on CIMS servers at ~grishman/alchemy/alchemy2

MLN Files (highlights) 3 components Declaration of types and constants Declaration of predicates List of formulas and their weights

Data Base File Typically large file of ground atoms Training and test sets

Basic operations Learn weights Infer learnwts -g –i f.mln –t f.train.db –o f.out.mln Infer infer –i f.out.mln –e f.test.db –q … -r results

Warm-Up Assignment The ACE event inventory includes Attack, Injure, and Die events, which are correlated … intuitively, attacks cause the attacked party both injury and death. Using Alchemy, Represent the predicates by attack(x,y), injured(y), and die(y) Write the formulas to expess the relations between these predicates Prepare small training and test data bases Learn weights for these formulas Infer the probability of the ground atoms Very briefly, explain the inferred results. Due: one week (Nov. 20)

Looking ahead Hopefully it is a small step from this to doing joint inference for trigger identification … combining these rules with P(event-type | trigger-word)