Computational Semantics Day 5: Inference Aljoscha.

Slides:



Advertisements
Similar presentations
-- in other words, logic is
Advertisements

Artificial Intelligence
1 Knowledge Representation Introduction KR and Logic.
CS4026 Formal Models of Computation Part II The Logic Model Lecture 1 – Programming in Logic.
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
Computational Semantics Aljoscha Burchardt, Alexander Koller, Stephan Walter, Universität des Saarlandes,
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Working with Discourse Representation Theory Patrick Blackburn & Johan Bos Lecture 3 DRT and Inference.
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Logic Concepts Lecture Module 11.
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
1 Logic What is it?. 2 Formal logic is the science of deduction. It aims to provide systematic means for telling whether or not given conclusions follow.
Knowledge Representation Methods
Truth Trees Intermediate Logic.
CAS LX 502 Semantics 1b. The Truth Ch. 1.
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Knowledge Representation I (Propositional Logic) CSE 473.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
FIRST ORDER LOGIC Levent Tolga EREN.
Predicates and Quantifiers
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
1 Knowledge Based Systems (CM0377) Lecture 4 (Last modified 5th February 2001)
F22H1 Logic and Proof Week 6 Reasoning. How can we show that this is a tautology (section 11.2): The hard way: “logical calculation” The “easy” way: “reasoning”
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Logic CL4 Episode 16 0 The language of CL4 The rules of CL4 CL4 as a conservative extension of classical logic The soundness and completeness of CL4 The.
Pattern-directed inference systems
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
LOGIC AND ONTOLOGY Both logic and ontology are important areas of philosophy covering large, diverse, and active research projects. These two areas overlap.
0 What logic is or should be Propositions Boolean operations The language of classical propositional logic Interpretation and truth Validity (tautologicity)
Course Overview and Road Map Computability and Logic.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
Albert Gatt LIN3021 Formal Semantics Lecture 4. In this lecture Compositionality in Natural Langauge revisited: The role of types The typed lambda calculus.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Key Concepts Representation Inference Semantics Discourse Pragmatics Computation.
1 CA 208 Logic PQ PQPQPQPQPQPQPQPQ
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
CS6133 Software Specification and Verification
Artificial Intelligence 7. Making Deductive Inferences Course V231 Department of Computing Imperial College, London Jeremy Gow.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
Propositional Logic Predicate Logic
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
1 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Artificial Intelligence Logical Agents Chapter 7.
Knowledge Representation Lecture 2 out of 5. Last Week Intelligence needs knowledge We need to represent this knowledge in a way a computer can process.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Chapter 7. Propositional and Predicate Logic
The Propositional Calculus
EA C461 – Artificial Intelligence Logical Agent
Lecture 2 Propositional Logic
Chapter 7. Propositional and Predicate Logic
CSNB234 ARTIFICIAL INTELLIGENCE
Predicates and Quantifiers
Logical and Rule-Based Reasoning Part I
Introduction to Computational Linguistics
Presentation transcript:

Computational Semantics Day 5: Inference Aljoscha Burchardt, Alexander Koller, Stephan Walter, Universität des Saarlandes, Saarbrücken, Germany ESSLLI 2004, Nancy, France

Where are we by now? So far: Sentence: John loves Mary. Linguistic Analysis… SyntaxSemantic construction lexicon Formula: love(john, mary) Why??? Why meaning? Why logic?

Motivations Why meaning? 1.The big question in the background of semantics: How do linguistic expressions relate to the world? 2.The need for inference in a broad sense is omnipresent in linguistic processing: Getting some piece of information out of another. This process is meaning based. Why logic? Using logic helps us in answering both problems at once.

Meaning based linguistic Inferences Answering questions: A: "Is Peter happy" B: Discourse „There is my car. The roof is red.“ => The roof of this particular car. Pragmatics A: „Shall we watch Athens?“, B: „Oh, I hate Sports“  Answer is "no."... Peter loves Mary and she doesn't love him. No one is happy if he isn't loved by the one he loves.  Peter is not happy "No"

Logical Inferences Argumentation: Classical field => Answering questions „Every human is mortal“, „Socrates is a human“ => Socrates is mortal.  x.human(x) -> mortal(x), human(soc) |= mortal(soc) Discourse, Pragmatics,... Inference problems during processing: –logical relations between readings (equivalence, implication, contradiction)  y  x.love(x,y)  x  y.love(x,y)  x  y.love(x,y)  y  x.love(x,y) –discourse maxims: utterance consistent? informative? … –"lexical" inference: "Brussels lowers taxes" –presuppositions

Next… How do linguistic expressions relate to the world? Building logical representations is a step towards a scientific theory of this relation! They're a way of replacing something we don't understand by something we understand (at least better). Why? Because we have a formal way of saying what they mean: Models.

The big question of semantics John loves Mary and Peter doesn't.   love(john,mary)  love(peter,mary) {man(john), man(peter), woman(mary), love(john,mary)} ??? "Understanding language" Semantic construction Logics Cognition / Ontology ???

Plan for Today What's the advantage of FOL-formulae?  Interpretations and models Doing things with semantic representations  Logical Inference and Proof Theory  A calculus Automated Theorem Proving (first steps)  An implementation of propositional tableaux A sample application

FOL-semantics What does a FO-formula mean? It may be true or false (that's all) Whether it is true or false is calculated given a model.  So: A formula is true or false in a model. But what is a model?

Models –John loves Mary. –John is a man. –Mary doesn't love John. –Peter is a man. –Mary isn't a man. –Mary is a woman. –…–… A model can be thought of as a set of basic facts that describe a part of the world. E.g., talking about John, Mary, Peter, love, man and woman : In this listing: 1.Who is there? 2.Which properties do (or don't) they have?

Formally This intuition is formalized as follows: A model is an ordered pair of a set and a Function: M=(D, F) The domain: What is there. The interpretation function: Which properties do these things have? (and more…)

Example model D = { John, Mary, Peter } F = {(John, John), (Mary, Mary), (Peter, Peter ) (man, { John, Peter }), (woman, { Mary }), (love, {( John, Mary )}) }

Truth in a model g: Assignment function, assigning values from D to variables iffandiff orifforiff for some x-variant g' of gifffor all x-variants g' of g

Models as Sets of Formulae For our purposes, models are simply sets of literals (i.e. positive or negative atomic formulae).  Set contains all literals that are true in the model. Our example: {man(john), man(peter), woman(mary), love(john,mary),  love(mary,john),…} Truth of atomic formulae without variables: R(t 1,…,t n )  M

From theory to practice Models define the semantics of logical languages… …and are an interesting concept for relating language and the world. But they're also of practical importance: They're the key to a formalization of inference. Now: some further important logical notions.

Inference and Entailment Valid inference: Truth of premises guarantees truth of conclusion. Entailment: Talking about all models. Concept directly captures syllogistic reasoning. For all M, g such that: and P, Q, … | = R and… we have:

Validity A related notion: Truth of a formula in all models: Validity | = A iff for all M,g: Validity formalizes the notion of tautology, e.g.: Sylvester is either a cat or not. | = cat(s) v  cat(s) Relation to entailment via the deduction theorem: A |= B iff |= A  B

Where are we now? Why meaning? Why logic? Relation to the world: Models Inferences: Entailment and validity How to compute with these notions?

How to work with all models? Entailment and validity are both defined with respect to all models. Problem: There are infinitely many models. How can we work with these notions then? Idea: Tell whether a formula is valid or not just by looking at it! The answer: A calculus.

Calculi Calculi are rule-based systems for manipulating formulae according to their structure. Some of the resulting configurations are called proofs. Formulas with proofs are called theorems. A good calculus produces a proof iff its input formula is valid.

"Good" Calculi Good Calculi are: 1.Sound: Only valid formulae get a proof. 2.Complete: All valid formulae get a proof. In other words: All and only theorems are valid. |- ≡ |= To achieve this, one has to give the right rules. Let's try…

Tableaux: The intuition I Truth conditions tell us what would have to hold in a model for a given formula, e.g.: –A and B hold in all models for A  B –For A  B, there are two kinds of models: Those for A and those for B. –…–… If we go on decomposing a formulas that way, we end up with sets of literals  models Example: smoke(john)  (  love(mary,john)   love(john,mary))  {smoke(john),  love(john, mary)}  {smoke(john),  love(mary, john)}

Tableaux: The intuition II We know: If a formula is valid, it's always true. I.e.: No model makes it false. Making formulae false: ( smoke(john)  walk(john)) F  {  smoke(john),  walk(john)} ( smoke(john)   smoke(john)) F  {smoke(john),  smoke(john)}  "sign"

Tableaux If we want to know whether a formula is valid, we systematically try to find a model that would make it false… … hoping that we find none. That is, all attempts should lead to contradictions. Next: A look at: ()F)F  ((p  q)  (  p  q))

A simple fragment Next: The rules for a tableaux calculus for predicate logic without variables and quantifiers. –Actually propositional logic –Advantage 1: Decidable –Advantage 2: Rules are easy –Disadvantage: Boring and restricted More is possible – but not here and now.

Preprocessing Reduce the number of connectives by translating  and  to  and . Use logical equivalences: 1.A  B   (  A   B) „De Morgan“ 2.A  B   (A   B)

Tableaux Inference Rules

“Mary loves Bill or John loves Mary'' |= ``John loves Mary“ ???

Summing up Using predicate logic as representation language seemed to be a design decision on Monday. Now we're happy we did it: –Models tell us when sentences are true. –Models give us a concept of logical inference. –This concept can be mechanized by calculi. After the break: Calculi can be implemented in provers. And provers are useful!

More logics - Changing the language and/or the semantics. Different phenomena, different logics: –Intensional logic ( John seeks a unicorn ) –Temporal logics (tense) –Dynamic logics (anaphora) –Higher Order (quantifiers) Different tasks – different tools –Decidability and complexity –From propositional over first order to higher order –In between. E.g. Description logics.