A General Modifier-based Framework for Inconsistency-Tolerant Query Answering

by   Jean Francois Baget, et al.

We propose a general framework for inconsistency-tolerant query answering within existential rule setting. This framework unifies the main semantics proposed by the state of art and introduces new ones based on cardinality and majority principles. It relies on two key notions: modifiers and inference strategies. An inconsistency-tolerant semantics is seen as a composite modifier plus an inference strategy. We compare the obtained semantics from a productivity point of view.



There are no comments yet.


page 1

page 2

page 3

page 4


Query Answering with Inconsistent Existential Rules under Stable Model Semantics

Traditional inconsistency-tolerent query answering in ontology-based dat...

Datalog: Bag Semantics via Set Semantics

Duplicates in data management are common and problematic. In this work, ...

Query Answering in Resource-Based Answer Set Semantics

In recent work we defined resource-based answer set semantics, which is ...

Extending Weakly-Sticky Datalog+/-: Query-Answering Tractability and Optimizations

Weakly-sticky (WS) Datalog+/- is an expressive member of the family of D...

Fault-tolerant and Transactional Stateful Serverless Workflows (extended version)

This paper introduces Beldi, a library and runtime system for writing an...

Nonlinearity-tolerant 8D modulation formats by set-partitioning PDM-QPSK

We present two new nonlinearity tolerant modulation formats at spectral ...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.


In this paper we place ourselves in the context of Ontology-Based Data Access [Poggi et al.2008] and we address the problem of query answering when the assertional base (which stores data) is inconsistent with the ontology (which represents generic knowledge about a domain). Existing work in this area studied different inconsistency-tolerant inference relations, called semantics, which consist of getting rid of inconsistency by first computing a set of consistent subsets of the assertional base, called repairs, that restore consistency w.r.t the ontology, then using them to perform query answering. Most of these proposals, inspired by database approaches e.g. [Arenas, Bertossi, and Chomicki1999] or propositional logic approaches e.g. [Benferhat, Dubois, and Prade1997], were introduced for the lightweight description logic DL-Lite e.g. [Lembo et al.2015]. Other description logics e.g. [Rosati2011] or existential rule e.g. [Lukasiewicz et al.2015] have also been considered. In this paper, we use existential rules e.g.[Baget et al.2011] as ontology language that generalizes lightweight description logics.

The main contribution of this paper consists in setting up a general framework that unifies previous proposals and extends the state of the art with new semantics. The idea behind our framework is to distinguish between the way data assertions are virtually distributed (notion of modifiers) and inference strategies. An inconsistency-tolerant semantics is then naturally defined by a modifier and an inference strategy. We also propose a classification of the productivity of hereby obtained semantics by sound and complete conditions relying on modifier inclusion and inference strategy order. The objective of framework is to establish a methodology for inconsistency handling which, by distinguishing between modifiers and strategies, allows not only to cover existing semantics, but also to easily define new ones, and to study different kinds of their properties.


We consider first-order logical languages without functional symbols, hence a term is a variable or a constant. An atom is of the form where is a predicate of arity , and the are terms. Given an atom or a set of atoms , terms() denotes the set of terms occurring in . A (factual) assertion is an atom without variables.

A conjunctive query is an existentially quantified conjunction of atoms. For readability, we restrict our focus to Boolean conjunctive queries, which are closed formulas. However the framework and the obtained results can be directly extended to general conjunctive queries. In the following, by query, we mean a Boolean conjunctive query. Given a set of assertions and a query , the answer to over is yes iff , where denotes the standard logical consequence.

A knowledge base can be seen as a database enhanced with an ontological component. Since inconsistency-tolerant query answering has been mostly studied in the context of description logics (DLs), and especially DL-Lite, we will use some DL vocabulary, like ABox for the data and TBox for the ontology. However, our framework is not restricted to DLs, hence we define TBoxes and ABoxes in terms of first-order logic. We assume the reader familiar with the basics of DLs and their logical translation.

An ABox is a set of factual assertions. As a special case we have DL assertions restricted to unary and binary predicates. A positive axiom is of the form where and are conjunctions of atoms (in other words, it is a positive existential rule). As a special case, we have for instance concept and role inclusions in DL-Lite, which are respectively of the form and , where and (with an atomic concept, an atomic role and the inverse of an atomic role). A negative axiom is of the form where is a conjunction of atoms (in other words, it is a negative constraint). As a special case, we have for instance disjointness axioms in DL-Lite, which are inclusions of the form and , or equivalently and .

A TBox is partitioned into a set of positive axioms and a set of negative axioms. Finally, a knowledge base (KB) is of the form where is an ABox and is a TBox. is said to be consistent if is satisfiable, otherwise it is said to be inconsistent. We also say that is (in)consistent (with ), which reflects the assumption that the TBox is reliable. The answer to a query over a consistent KB is yes iff . When is inconsistent, standard consequence is not appropriate since all queries would be positively answered.

A key notion in inconsistency-tolerant query answering is the one of a repair of the ABox w.r.t. the TBox. A repair is a subset of the ABox consistent with the TBox and inclusion-maximal for this property: is a repair of w.r.t. if i) is consistent, and ii) , if ( is strictly included in ) then is inconsistent. We denote by the set of ’s repairs (for easier reading, we often leave implicit in our notations). Note that iff is consistent. The most commonly considered semantics for inconsistency-tolerant query answering, inspired from previous work in databases, is the following: is said to be a consistent consequence of if it is a standard consequence of each repair of . Several variants of this semantics have been proposed, which differ with respect to their behaviour (in particular they can be more or less cautious) and their computational complexity. Before recalling the main semantics studied in the literature, we need to introduce the notion of the positive closure of an ABox. The positive closure of (w.r.t. ), denoted by , is obtained by adding to all assertions (built on the individuals occurring in ) that can be inferred using the positive axioms of the TBox, namely:
= atom and terms() terms() Note that the set of atomic consequences of a KB = may be infinite whereas the positive closure of is always finite since it does not contain new terms. Note also that is consistent (with ) iff is consistent (with ).

We now recall the most well-known inconsistency-tolerant semantics introduced in [Arenas, Bertossi, and Chomicki1999, Lembo et al.2010, Bienvenu2012]. Given a possibly inconsistent KB =, a query is said to be:

  • a consistent (or AR) consequence of if ,

  • a CAR consequence of if ,;

  • an IAR consequence of if ;

  • an ICAR consequence of if ;

  • an ICR consequence of if .

A Unified Framework for Inconsistency-Tolerant Query Answering

In this section, we define a unified framework for inconsistency-tolerant query answering based on two main concepts: modifiers and inference strategies.

Let us first introduce the notion of MBox KBs. While a standard KB has a single ABox, it is convenient for subsequent definitions to define KBs with multiple ABoxes (“MBoxes”). Formally, an MBox KB is of the form = where is a TBox and =,, is a set of ABoxes called an MBox. We say that is consistent, or is consistent (with ) if each in is consistent (with ).

In the following, we start with an MBox KB which is a possibly inconsistent standard KB (namely with a single ABox in ) and produce a consistent MBox KB, in which each element reflects a virtual reparation of the initial ABox. We see an inconsistency-tolerant query answering method as made out of a modifier, which produces a consistent MBox from the original ABox (and the Tbox), and an inference strategy, which evaluates queries against the obtained MBox KB.

Elementary and Composite Modifiers

We first introduce three classes of elementary modifiers, namely expansion, splitting and selection. For each class, we consider a ”natural” instantiation, namely positive closure, splitting into repairs and selecting the largest elements (i.e., maximal w.r.t. cardinality). Elementary modifiers can be combined to define composite modifiers. Given the three natural instantiations of these modifiers, we show that their combination yields exactly eight different composite modifiers.

Expansion modifiers.

The expansion of an MBox consists in explicitly adding some inferred knowledge to its ABoxes. A natural expansion modifier consists in computing the positive closure of an MBox, which is defined as follows:

Splitting modifiers.

A splitting modifier replaces each of an MBox by one or several of its consistent subsets. A natural splitting modifier consists of splitting each ABox into the set of its repairs, which is defined as follows:

This modifier always produces a consistent MBox.

Selection modifiers.

A selection modifier selects some subsets of an MBox. As a natural selection modifier, we consider the cardinality-based selection modifier, which selects the largest elements of an MBox:

We call a composite modifier any combination of these three elementary modifiers. We now study the question of how many different composite modifiers yielding consistent MBoxes exist and how they compare to each other. We begin with some properties that considerably reduce the number of combinations to be considered. First, the three modifiers are idempotent. Second, the modifiers and need to be applied only once.

Lemma 1.

For any MBox , the following holds:

  1. =, = and =.

  2. Let be any composite modifier. Then:
    (a) , and
    (b) .




Selection: =



Selection: =

Selection: =


Selection: =
Figure 1: The eight possible combinations of modifiers starting from a single MBox KB =

Figure 1 presents the eight different composite modifiers (thanks to Lemma 1) that can be applied to an MBox initially composed of a single (possibly inconsistent) ABox. At the beginning, one can perform either an expansion or a splitting operation (the selection has no effect). Expansion can only be followed by a splitting or a selection operation. From the MBox only a selection can be performed, thanks to Lemma 1. Similarly, if one starts with a splitting operation followed by a selection operation, then only an expansion can be done (thanks to Lemma 1 again). From only a selection can be performed (Lemma 1 again).

To ease reading, we also denote the modifiers by short names reflecting the order in which the elementary modifiers are applied, and using the following letters: for , for and for as shown in Table 1. For instance, denotes the modifier that first splits the initial ABox into its set of repairs, then closes these repairs and finally selects the maximal-cardinality elements.

Modifier Combination MBox
Table 1: The eight possible composite modifiers for an MBox =
Theorem 1.

Let = be a possibly inconsistent KB. Then for any composite modifier that can be obtained by a finite combination of the elementary modifiers , , , there exists a composite modifier in (see Table 1) such that =.

Example 1.

Let = be an MBox DL-Lite KB where =, , , , , , , and =. We have
=,,, =,, ,, , and
=, .

The composite modifiers can be classified according to ”inclusion” as depicted in Figure

2. We consider the relation, denoted by , defined as follows: given two modifiers and , if, for any MBox , for each there is such that . We also consider two specializations of : the true inclusion (i.e., ) and the ”closure” inclusion, denoted by : if is the positive closure of (then each is included in its closure in ). In Figure 2, there is an edge from a modifier to a modifier iff . We label each edge by the most specific inclusion relation that holds from to . Transitivity edges are not represented.

Figure 2: Inclusion relations between composite modifiers.

With any and such that , one can naturally associate, for any MBox , a mapping from Mbox to MBox , which assigns each to a such that . We point out the following useful facts:

Fact 1

The MBox mapping associated with is injective in all our cases.

Fact 2

The MBox mapping associated with is surjective (hence bijective). The same holds for the mapping from to .

Inference Strategies for Querying an MBox

An inference-based strategy takes as input a consistent MBox KB = and a query and determines if is entailed from . We consider four main inference strategies: universal (also known as skeptical), safe, majority-based and existential (also called brave). 111Of course, one can consider other inference strategies such as the argued inference, parametrized inferences, etc. This is left for future work.

The universal inference strategy states that a conclusion is valid iff it is entailed from and every ABox in . It is a standard way to derive conclusions from conflicting sources, used for instance in default reasoning [Reiter1980], where one only accepts conclusions derived from each extension of a default theory. The safe inference strategy considers as valid conclusions those entailed from and the intersection of all ABoxes. The safe inference is a very sound and conservative inference relation since it only considers assertions shared by different ABoxes. The existential inference strategy (called also brave inference relation) considers as valid all conclusions entailed from and at least one ABox. The existential inference is a very adventurous inference relation and may derive conclusions that are together inconsistent with . It is often considered as undesirable when the KB represents available knowledge base on some problem. It only makes sense in some decision problems when one is only looking for a possible solution of a set of constraints or preferences. Finally, the majority-based inference relation considers as valid all conclusions entailed from and the majority of ABoxes. The majority-based inference can be seen as a good compromise between universal / safe inference and existential inference.

We formally define these inference strategies as follows:

  • Query is a universal consequence of , denoted by iff ,.

  • Query is a safe consequence of , denoted by , iff .

  • Query is a majority-based consequence of , denoted , iff .

  • Query is an existential consequence of , denoted by iff , .

Given two inference strategies and , we say that is more cautious than , denoted , when for any consistent MBox and any query , if then . The considered inference strategies are totally ordered by as follows:


safe inference

universal inference

majority-based inference

existential inference
Figure 3: Comparison between inference strategies, where means that
Example 2.

Let us consider the MBox = given in Example 1. We have =, hence . By universal inference, we also have . The majority-based inference adds as a valid conclusion. Indeed, and and =, hence . Finally, the existential inference adds as a valid conclusion.

Inconsistency-Tolerant Semantics = Composite Modifier + Inference Strategy

We can now define an inconsistency-tolerant query answering semantics by a composite modifier and an inference strategy.

Definition 1.

Let = be a standard KB, be a composite modifier and be an inference strategy. A query is said to be an -consequence of , which is denoted by , if it is entailed from the MBox KB with the inference strategy .

This definition covers the main semantics recalled in Section Preliminaries: AR, IAR, CAR, ICAR and ICR semantics respectively correspond to , , and .

Comparison of Inconsistency-Tolerant Semantics w.r.t. Productivity

We now compare the obtained semantics with respect to productivity, which we formalize as follows.

Definition 2.

Given two semantics and , we say that is more productive than , and note if, for any KB = and any query , if then .

We first pairwise compare semantics defined with the same inference strategy. For each inference strategy, we give necessary and sufficient conditions for the comparability of the associated semantics w.r.t. productivity. These conditions rely on the inclusion relations between modifiers (see Figure 2).

Proposition 1.

[Productivity of -semantics] See Figure 4. It holds that iff or in a bijective way (see Fact 2).

less productive

more productive
Figure 4: Relationships between -based semantics
Proposition 2.

[Productivity of -semantics] See Figure 5. It holds that iff , or in a bijective way (see Fact 2) or .

less productive

more productive
Figure 5: Relationships between -based semantics
Proposition 3.

[Productivity of -semantics] See Figure 6. It holds that iff in a bijective way (see Fact 2) or .

less productive

more productive
Figure 6: Relationships between -based semantics
Proposition 4.

[Productivity of -semantics] See Figure 7. It holds that iff (in particular or ) or .

less productive

more productive
Figure 7: Relationships between -based semantics

We now extend previous results to any pair of semantics, possibly based on different inference strategies.

Theorem 2.

[Productivity of semantics] The inclusion relation is the smallest relation that contains the inclusions defined by Propositions 1-4 and satisfying the two following conditions:

  1. for all , and , if then .

  2. it is transitive.

Theorem 2 is an important result. It states that the productivity relation can only be obtained from Figures 4-7 (resp. Propositions 1-4) and some composition of the relations. No more inclusion relations hold. In particular when , it holds that , , which means that there exist a query and a KB such that is an -consequence of but not an -consequence of . Note that this holds already for DL-Lite KBs.

Proof:[Sketch] Condition 1 holds by definition of . Transitivity holds by definition of . To show that there are no other inclusions, we prove two lemmas: for all and , (1) if then ; and (2) if and , then .

Lastly, it is important to note that when the initial KB is consistent, all semantics collapse with standard entailment, namely:

Proposition 5.

Let be a consistent standard KB. Then: ,,, , iff .


This paper provides a general and unifying framework for inconsistency-tolerant query answering. On the one hand, our logical setting based on existential rules includes previously considered languages. On the other hand, viewing an inconsistency-tolerant semantics as a pair composed of a modifier and an inference strategy allows us to include the main known semantics and to consider new ones. We believe that the choice of semantics depends on the applicative context, namely the features of the semantics, i.e rationality properties, complexity (which we have studied, but not presented in this paper) and productivity with respect to the applicative context. In particular, cardinality-based selection allows us to counter troublesome assertions that conflict with many others. In some contexts, requiring to find an answer in all selected repairs can be too restrictive, hence the interest of majority-based semantics, which are more productive than universal semantics, without being as productive as the adventurous existential semantics. As for future work, we plan consider other inference strategies such as the argued inference, parametrized inferences, etc. We also want to adapt the framework to belief change problems, like merging or revision.


This work has been supported by the French National Research Agency. ASPIQ project ANR-12-BS02-0003.


  • [Arenas, Bertossi, and Chomicki1999] Arenas, M.; Bertossi, L. E.; and Chomicki, J. 1999. Consistent query answers in inconsistent databases. In Proc. of SIGACT-SIGMOD-SIGART, 68–79.
  • [Baget et al.2011] Baget, J.; Leclère, M.; Mugnier, M.; and Salvat, E. 2011. On rules with existential variables: Walking the decidability line. Artif. Intell. 175(9-10):1620–1654.
  • [Benferhat, Dubois, and Prade1997] Benferhat, S.; Dubois, D.; and Prade, H. 1997. Some syntactic approaches to the handling of inconsistent knowledge bases: A comparative study part 1: The flat case. Studia Logica 58(1):17–45.
  • [Bienvenu2012] Bienvenu, M. 2012. On the complexity of consistent query answering in the presence of simple ontologies. In Proc. of AAAI’12.
  • [Lembo et al.2010] Lembo, D.; Lenzerini, M.; Rosati, R.; Ruzzi, M.; and Savo, D. F. 2010. Inconsistency-tolerant semantics for description logics. In Proc. of RR’10, 103–117.
  • [Lembo et al.2015] Lembo, D.; Lenzerini, M.; Rosati, R.; Ruzzi, M.; and Savo, D. F. 2015. Inconsistency-tolerant query answering in ontology-based data access. J. Web Sem. 33:3–29.
  • [Lukasiewicz et al.2015] Lukasiewicz, T.; Martinez, M. V.; Pieris, A.; and Simari, G. I. 2015. From classical to consistent query answering under existential rules. In Proc. of AAAI’15, 1546–1552.
  • [Poggi et al.2008] Poggi, A.; Lembo, D.; Calvanese, D.; Giacomo, G. D.; Lenzerini, M.; and Rosati, R. 2008. Linking data to ontologies. J. Data Semantics 10:133–173.
  • [Reiter1980] Reiter, R. 1980. A logic for default reasoning. Artificial intelligence 13(1):81–132.
  • [Rosati2011] Rosati, R. 2011. On the complexity of dealing with inconsistency in description logic ontologies. In Proc. of IJCAI’11, 1057–1062.


In this appendix, we provide details on the proofs.

Section 3: A Unified Framework for Inconsistency-Tolerant Query Answering

Theorem 1. Let = be a possibly inconsistent KB. Then for any composite modifier that can be obtained by a finite combination of the elementary modifiers , , , there exists a composite modifier in (see Table 1) such that =.

Lemma 1 For any MBox , the following holds:

  1. =, = and =.

  2. Let be any composite modifier. Then:
    (a) , and
    (b) .


The proof of the idempotence of follows from the facts that: i) is consistent and ii) if is consistent, then . The proof of the the idempotence of follows from the facts that: i) , we have ii) if then . For the idempotence of , it is enough to show that for a given . From the definition of , clearly we have . Now assume that but . Let be the subset that allows to derive , namely . Now for each element of , we have . Then clearly, .

Regarding item (2.a), if is an elementary modifier then it can be either , , or . If then the result holds since is idempotent. If then the selected elements from are closed sets of assertions since only discards some elements of but does not change the content of remaining elements. Lastly, let us consider the case where . Again . Let us recall that is a maximally consistent subset of , with . If this means that (hence ) such that despite the fact that . This is impossible since should be a maximal consistent subbase of . Since each applied on closed a ABox preserves the closeness property, then clearly a composite modifier also preserves this closeness property.

The proof of item (2.b) follows immediately from the fact that i) , is consistent, ii) if is consistent, then yields a consistent subbase, and iii) if is consistent. ∎

Proof of Theorem 1.

The proof relies on Lemma 1 (see also the explanations following Lemma 1 in the paper). ∎

Justification of Figure 2 (Inclusion relations between composite modifiers): see following Proposition 6, Example 3, Proposition 7 and Example 4.

Proposition 6 (Part of the proof of Figure 2).

Let = be an inconsistent KB. Let ,…, be the MBoxes obtained by the eight composite modifiers summarized in Table 1. Then:

  1. .

  2. .

  3. .

  4. .

  5. .

  6. .

  7. .

  8. .


  • Items 1-4 follow from the definition of the elementary modifier . Since selects subsets of having maximal cardinality. Namely, given an MBox, we have . Hence relations , , , and holds.

  • Items 5-6 follow immediately from the definition of the elementary modifier , hence we trivially have and .

  • Let us show that , namely , such that . The proof is immediate. Recall that , hence we also have . Recall also that . This means that such that .

  • Regarding the proof of Item 8, we have . This means that , there exists such that . Said differently, , we have . Since =, we conclude that .

  • We now show that . Let and let us show that there exists a set of assertions such that and . Since , this means by definition that and hence . Now, is consistent, this means that there exists such that . From Lemma 1, is a closed set of assertions, then this means that .

Example 3 (Counter-examples showing that there are no reciprocal edges in Figure 2).

  1. The converse of does not hold.
    Let =, and =, , .
    It is easy to check that is inconsistent. We have:
    ==, and
    One can check that .

  2. The converse of does not hold.
    Let =, and =.
    It is easy to check that is inconsistent. We have:
    , and