Download presentation
Presentation is loading. Please wait.
Published byEarl Miles Modified over 9 years ago
1
LDK R Logics for Data and Knowledge Representation Context Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese
2
2 Outline Introduction: c ontexts Syntax Semantics Local Models Contextual models Satisfiability, validity and contextual entailment Reasoning with beliefs and equivalence with modal logic
3
3 The notion of context The notion of “context” is used in various areas of AI, including data and knowledge representation, NLP, and multimedia IR. However, its meaning is frequently left to the user its use is implicit and intuitive its formalization is poor or missing No formal definition of context was given INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
4
4 Example ‘Today is nice’ What do we mean by ‘nice’? Which day is ‘today’? We cannot answer, as the proposition does not have a precise meaning or context. Therefore, we cannot say whether the proposition is true or false. INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
5
5 Example (McCarthy, 1987) ‘The book is on the table’ Consider modeling the on preposition so as to draw appropriate consequences from the information expressed in the sentence How many interpretations of it we can think? What is the right level of generality? INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
6
6 Example (Tarski, 1931) ‘Snow is white’ Is this proposition true? What about the color of the snow on top of Mount Etna in Sicily? ( Mount Etna is one of the most active volcanoes in the world) Tarski made explicit the context he used to interpret it: “I would only mention that [...] I shall be concerned exclusively with grasping the intentions which are contained in the so-called classical conception of truth.” (The first attempt to formalize a context) INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
7
7 Summary These examples show that: even a very simple proposition requires the use of some context to be interpreted the notion of context is often unclear, undefined or left implicit. The first attempt to formalize a context as a way to interpret (first- order) statements was introduced by Tarski (1930-31). INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
8
8 Definitions of context From Webster dictionary A context “surrounds, and gives meaning to, something else” In linguistic It is “the text surrounding a term in which the term is used” In logic (Giunchiglia, 1993) that subset of the complete state of an individual that is used for reasoning about a given goal, e.g. to formulate a query. INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
9
9 Subjective Perspective (I) The “magic box” (Giunchiglia& Ghidini, 1998) Intuitively, a context is a theory of the world which encodes (formally by using a logic called contextual logic, CxL) an individual’s subjective perspective about the world. In this example, two observer look at the same phenomenon from two different perspectives. INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
10
10 Subjective Perspective (II) The “magic box” (Giunchiglia& Ghidini, 1998) The “magic box” represents a world with two contexts, called the local models, that encode Mr.1 and Mr. 2’s subjective view of the phenomenon. INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
11
11 Syntax: alphabet and languages Alphabet of symbols For every i ∈ N, with N the set of contexts, we define an alphabet Σ i for a contextual language L i such that L = {L i } i ∈ N Multi-Context Alphabet A multi-context alphabet is a set Σ = ∪ i ∈ I Σ i with I ⊆ N, where each Σ i is a first-order alphabet enriched by some auxiliary symbols to build contextual formulas Family of languages From the multi-context alphabet Σ = ∪ i ∈ I Σ i we define a family of languages L = {L i } i ∈ N Each L i is the formal language used to state what is true in the context I, and it is therefore called a local language INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
12
12 Syntax: formation rules First order formulas ::= | | ( {, }*) ::= ( {, }*) | = ::= | ¬ | ∧ | ∨ | → | ∀ | ∃ Contextual formulas ::= i : for each i ∈ I (also called i-formula or L i -formula) Using contextual formulas we turn a meta-theoretic object (the name i of a context) into a theoretic object (an i-formula i : ψ) A contextual formula is a kind of labeled formula INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
13
13 Example Contextual Laws for ∧, ¬ and → : i : (A ∧ ¬B) → ¬ (A → B) i : ¬(A → B) → (A ∧ ¬B) Contextual Pierce’s law: i : ((A → B) → A) → A Contextual De Morgan’s laws: i : ¬(A ∨ B) ↔ (¬A ∧ ¬B) i : ¬(A ∧ B) ↔ (¬A ∨ ¬B) INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
14
14 Contextual languages and theories Multi-context language The multi-context alphabet Σ and the formation rules define a multi- context language L = {L i } i ∈ I Multi-context theory A set of closed wff’s over L is a multi-context theory NOTE: A first order theory T is a special case of a contextual theory T i where ψ ∈ T iff i : ψ ∈ T i for any i ∈ I A first-order theory T i is called local theory INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
15
15 Example T 1 = { 1: ∀ x.apple(x) → Computer(x), 1: apple(docPBG4pdf) } T 2 = { 2: ∀ x.apple(x) → Fruit(x), 2: ∀ x.orange(x) → Fruit(x), 2: apple(docRdoc), 2: apple(docGtxt) } Same terminology, different meaning. 1 2 INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
16
16 Example T 1 = { 1: ∀ x.apple(x) → Computer(x), 1: apple(doc1) } T 2 = { 2: ∀ x.Mac(x) → Computer(x), 2: Mac(doc1) } Different terminology, same meaning. 1 2 INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
17
17 Local model semantics Local model semantics (LMS) Provide the meaning of the sentences and model reasoning as logical consequence over a multi-context language. LMS formalizes: Principle of Locality We never consider all we know, but rather a very small subset of it Modeling reasoning which uses only a subset of what reasoners actually know about the world The part being used while reasoning is what we call a context, i.e., a local theory T i Principle of Compatibility There is compatibility among the kinds of reasoning performed in different contexts INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
18
18 Example: viewpoints (I) The “magic box” (Giunchiglia& Ghidini, 1998) Locality: Mr. 1 and Mr. 2 do not have any perception of the depth of the box INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
19
19 Example: viewpoints (II) Compatibility: there are some compatible situations we can list Compatible pairs can be described: “if Mr.1 sees at least one ball then Mr.2 sees at least one ball” NOTE: each of the configurations depicted here is what we call a local model (see next slides), i.e. one of the possible situations in a context INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
20
20 Example: viewpoints (III) Compatibility: there are cases in which observers cannot really distinguish among different situations In these cases we need a third view INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
21
21 Viewpoints: applications An application where partial views matter is data integration in federations of relational databases Each federated database can be represented as a context The federation of databases is a set of views of an ideal (global) database which is impossible, too complex or even not worth to reconstruct completely INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
22
22 Local models and compatibility sequences Given a family of languages L = {L i } i ∈ I Local model We denote with M(L i ) the set of all models for L i An element m ∈ M(L i ) is a local model Compatibility sequence A compatibility sequence for L is an infinite sequence c = where c i is a subset of M(L i ). NOTE: For I = {1,2}, c is called a compatibility pair INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
23
23 Model and compatibility relation Intuitively, local models describe what is locally true while compatibility sequences put together local models which are mutually compatible consistently with the situation we are modeling A compatibility relation (for L) is a set C of compatibility sequences. A model (for L) is a non-empty compatibility relation C such that the sequence is not in C INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
24
24 Example: viewpoints semantics (I) Languages We need languages L 1 and L 2 describing the views of Mr.1 and Mr.2. With L 1 we describe that a ball can be on the left or on the right With L 2 we describe that a ball can be on the left, in the center, or on the right. No other constrains are specified L 1 = {Bl Br} L 2 = {Bl Br Bc} INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
25
25 Example: viewpoints semantics (II) Local models We construct all the possible situations (models) for L 1 and L 2 This leads to the definition of four situations (models) for L 1 and eight situations (models) for L 2 Compatibility pairs We construct all the compatibility pairs Compatibility relation The collection of all the compatibility pairs INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
26
26 Formal definition of context Let model C = { ” be given. A context is any c i, i.e. the set of local models m ∈ M(L i ) allowed by C within any particular compatibility sequence c in C Given c, a context captures exactly locally true facts given the constraints posed by the local models of the other contexts in the same compatibility sequence, as allowed by c INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
27
27 Truth relation (satisfaction relation) The scope of the FO-logic truth relation is extend A model C satisfies an i-formula i : ψ C ⊨ i : ψ if for all ∈ C and for all m ∈ c i, m ⊨ ψ C is a model of i : ψ i : ψ is true in C INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
28
28 Satisfiability and validity An L i -formula i : ψ is satisfied by a model C if all the local models in each context c i satisfy it A model C satisfies a set of formulas Γ (C ⊨ Γ ) if C satisfies every formula i : ψ in Γ Γ is satisfiable if C ⊨ i : ψ for some C and for all i : ψ in Γ i : ψ is valid ( ⊨ i : ψ ) if C ⊨ i : ψ for all C INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
29
29 Contextual entailment A set Γ of formulas entails a formula i : ψ w.r.t. a model C (i : ψ is a logical consequence of Γ w.r.t. C) Γ ⊨ C i : ψ if for every compatibility sequence c ∈ C and for all j ∈ I with j ǂ i, if c j ⊨ Γ j then for all m ∈ c i, if m ⊨ Γ i then m ⊨ ψ If Γ is empty then i : ψ is a tautology Intuitively, given a contextual model C, for any c ∈ C (1) distinguish between the local formulas Γ i and the others Γ j (2) throw away c if c j ⊮ Γ j, continue otherwise (3) throw away all the local models m’ ∈ c i that m’ ⊮ Γ i (4) the remaining models m ∈ c i locally satisfy ψ INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
30
30 Example: the “magic box” If Mr. 1 sees a ball on the left and Mr. 2 does not see any ball on the right, then Mr. 2 sees a ball on the left or in the center. (1) In the premises, local conditions are in blue, the others in red (2) Throw away all the compatibility sequences that do not satisfy the red condition (3) Throw away all the local models that do not satisfy the blue one (4) Notice how the remaining local models for Mr. 2 satisfy the condition in green. INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
31
Context logics: reasoning with beliefs (I) Consider two agents a and b. We can imagine that each agent generates a different context (different language, knowledge and reasoning capabilities). What does a believe of b? (and vice versa) aa = what a believes of a ab = what a believes of b ba = what b believes of a … 31 i i + 1 INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
32
Context logics: reasoning with beliefs (II) At each level we generate a different context that we can link using some “rules”: Assume P L i and L i If P L i and Q L i then P Q L i If P L i then B(P) L i+ 1 where B stands for “believes” and is a modal operator This generates a hierarchy of languages We can then generate for each path in the tree a different compatibility sequence When reasoning we add the following “bridge rules”: i: B(P)| i+ 1 : P (Rdown i ) i+ 1 : P| i: B(P) (Rup i ) 32 INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
33
Equivalence Modal logics – Context logics (I) Bridge rules generate an accessibility relation that has a direct translation in modal logic where B(P) is translated as P. RECALL: In the canonical Kripke model K the following schema is valid: □ (P Q) ( □ P □ Q) We need to prove that this property is true also for context logic 33 INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
34
Equivalence Modal logics – Context logics (II) Let us prove it for context logics with beliefs: B(P Q) (B(P) □ Q). Let us assume both i: B(P Q) and i: B(P) i: B(P)i: B(P Q) ---------- (Rdown i )-------------- (Rdown i ) i+ 1 : P i+ 1 : P Q ---------------------------------------------------- (i+ 1 : P ( P Q) implies i+ 1 : Q) i+ 1 : Q ---------------------------------------------------- (Rup i ) i: B(Q) ---------------------------------------------------- ( i ) i: B(P) B(Q) ---------------------------------------------------- ( i ) i: B(P Q) (B(P) B(Q)) 34 INTRODUCTION :: SYNTAX :: LOCAL MODELS :: CONTEXTUAL MODELS :: SAT, VAL AND ENT :: BELIEFS
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.