Query Answering Based on the Modal Correspondence Theory Evgeny Zolin University of Manchester Manchester, UK
2/17 Talk Outline Description Logics, knowledge bases Answering conjunctive queries Modal correspondence theory “From modal logic to query answering” Applications: Transferring Kracht’s Theorem Beyond Kracht’s fragment Adding inverse relations “From query answering back to modal logic”? Conclusions and outlook
3/17 Description Logics A family of knowledge representation formalisms Vocabulary: –concept names A, B, …; –role names R, S, … –individual names a, b, … Syntax for the Description Logic ALC : –concepts are built up from concept names ( A, B, …) using operations C, C D, C D, and R. C, R. C [K.Schild,1991] ALC is a notational variant of the multi- modal logic K ( m ) : replace R i and R i with ◊ i and □ i
4/17 Description Logics (continued) A knowledge base KB = T, A consists of: –T : TBox (“terminology”) contains axioms: C D –A : ABox (“world description”) assertions: a : C, aRb Extensions (indicated by adding letters to logic’s name): Reasoning problems: –KB satisfiability: whether there is a model of a given KB –instance checking and instance retrieval: KB a : C I – inverse roles: R – O – nominals: { a } Q – num.restr.: ( ≥ n R. C ) H – role hierarchy: R S S – transitive roles: Trans( R )
5/17 Query answering A conjunctive query q ( x ) is an expression of the form: q ( x ) ( y ) term 1 ( x, y ) … term k ( x, y ) where x, y are lists of variables, terms are either z : C or zRz ’ ( z, z’ { x, y }) The answer set of the query q ( x ) w.r.t. a KB: ans( q,KB) := { a IndNames: KB q ( a ) } No tight complexity bounds for query answering known so far –SHIQ is ExpTime-complete [S.Tobies,2001]. Query answering: 3coNExpTime upper bound, if KB has no transitive roles; 4coNExpTime in general case [Calvanese et al., DL2005]. –SHOIQ is NExpTime-complete, but the decidability of the query answering problem has only recently been established
6/17 A closer look at instance retrieval Consider KB a : C, where the concept C contains fresh concept names ( X, …) not occurring in the KB. The concept X R. X “answers” the query q ( x ) xRx The concept R. X S. X “answers” the query q ( x ) y ( xRy xSy ) all individuals will be retrieved no individuals will be retrieved { a | KB aRa } { a | KB y ( aRy aSy ) } KB a : X KB a : ( X X ) KB a : ( X R. X ) KB a : ( R. X S. X )
7/17 Query answered by a concept Definition. A query q ( x ) is answered by a concept C if, for any KB and a constant a, KB q ( a ) KB a : C The concept X R. X answers the query q ( x ) xRx R. X S. X answers the query q ( x ) y ( xRy xSy ) From modal logic: F ||– p ◊ p R is reflexive: x xRx F, e ||– p ◊ p R is reflexive at e : eRe F, e ||– □ R p ◊ S p y ( eRy eSy ) holds in F
8/17 Modal correspondence theory Modal logic K ( m ) : := p i | | | □ i (Kripke) semantics: – Frame: F = W, R 1, …, R m , where R i W 2 – Model: M = F,v , where a valuation v ( p i ) W A formula is true at a point e of a model M : M, e Local validity: F, e ||– iff M, e for any M = F,v Let ( x ) be a FO-formula over binary predicates { R 1, …, R m }. Definition. ( x ) locally corresponds to if, for any frame F and its point e, F, e ||– F ( e ).
9/17 “From modal logic to query answering” Given , denote by C the corresponding ALC - concept (with variables p i replaced by fresh concept names X i ). Theorem (Reduction) Suppose that q(x) is a relational query (with one free variable); is a modal formula. Then: if q(x) locally corresponds to then q(x) is answered by the ALC - concept C (over any KB) ?
10/17 Sahlqvist’s and Kracht’s theorems Modal formulas First-order formulas [Sahlqvist,1975] {… …} {… ( x ) …} [ Kracht,1993] Family of queries K : For any query of the following shape, there exists a concept that answers it. For a relational query q(x), the resulting concept is in ALC. q ( x ) y (Tree( x, y ) i,j x R i y j x R t x k,l y k R l x x : C s y s : D s ) x
11/17 Queries within Kracht’s fragment xRx X R. X y ( xRy ySx ) X R. S. X y ( xRy ySx y : C ) X R.( C S. X ) y ( xRy xSy ) R. Y S. Y y ( xRy xSy y : C ) R. Y S.( C Y ) y ( xR 1 y 1 y 1 R 2 y 2 y 1 R 3 y 3 y 1 R 2 y 2 y 4 R 5 y 5 y 4 R 6 y 6 xS 1 y 1 xS 4 y 6 y 2 S 2 x y 5 S 3 x ) ( S 1.Y 11 S 4.Y 46 X 22 X 53 ) R 1. ( Y 11 R 2. S 2.X 22 R 3. T R 4. ( R 6.Y 46 R 5. S 3.X 53 )) x R x R y S C x R y S C x
12/17 Beyond Kracht’s fragment Parallel-serial queries (with two poles) x y x y x y q 1 (x) q 2 (x) serial connection ( q 1 o q 2 ) x y x y parallel connection ( q 1 || q 2 ) q(x) y ( xRy ) Fact: Any parallel-serial relational query q(x) is answered by some concept in ALC ( , o ): R ( q ):= R for atomic q(x) R ( q 1 || q 2 ):= R ( q 1 ) R ( q 2 ) R ( q 1 o q 2 ):= R ( q 1 ) o R ( q 2 ) Then q(x) is answered by the concept R ( q ). T
13/17 Beyond Kracht’s fragment (continued) Family of queries Z : For any query of the following shape, there exists a concept answering it. If q(x) is relational, then the concept belongs to ALC. y x y x Reversed tree with the root y, whose all leaves merged in x A parallel-serial query, where only atomic q 2 are allowed in ( q 1 o q 2 )
14/17 Adding role inverses Theorem (Family of queries Y ) For any connected query q ( x ) without cycles consisting of bound variables only, there is a concept answering it (and it can be built in linear time). If q(x) is relational, then the resulting concept belongs to the Description Logic ALCI. ( K Z ) Y x
15/17 From query answering back to modal logic? Theorem (Reduction) q(x) loc. corresponds to q(x) is answered by C Lemma If q(x) is answered by a concept C , then for any frame F and its point e, F q ( e ) F, e ||– . Recently: we can replace “ ” with “ ” in the above Lemma for finitely branching frames F. Definition A frame F is finitely branching if, for any its point e and a relation R, the set { d | eRd } is finite.
16/17 From query answering back to modal logic? Validity of a modal formula ≈ closed world assumption Ex.: F = W,R , where W = { a, b, c, d }, R = { a,b , a,c , c,d }. F, b ||– ◊T ( b has no R -successors) F, c ||– ◊ p □ p ( R is functional at the point c ) Entailment from a KB ≈ open world assumption KB= T, A , TBox T is empty, Abox A = { aRb, aRc, cRd } Then neither KB b : R.T, nor KB c : ( R. X R. X ) a c b d
17/17 Conclusions and outlook Relationship between corr. theory and query answering Two families of queries answered by ALC -concepts A larger family of queries answered by ALCI -concepts Questions and further directions: –Does the converse “ ” of the Reduction Theorem hold? –Characterisation of conj. queries answered by concepts? –More expressive queries? (disjunction, equality) –Adding number restrictions? ( ALCQ ≈ Graded ML) –Relations of arbitrary arities? ( DLR ≈ Polyadic ML) Thank you!