0

When using a reasoner on an OWL ontology in which certain entities could be modeled either as classes or individuals, is it overall more computationally efficient to model those entities as individuals instead of classes? Or are they equally efficient?

Suppose you have an ontology (from https://protege.stanford.edu/ontologies/pizza/pizza.owl) with the following class hierarchy:

Pizza
    CheesyPizza
    InterestingPizza
    MeatyPizza
    NamedPizza
        American
        Cajun
        Capricciosa
        Caprina
        Fiorentina
        FourSeasons
        Giardiniera
        LaReine
        Margherita
        Mushroom
        Napoletana
        Parmense
        PolloAdAstra
        PrinceCarlo
        QuattroFormaggi
        Siciliana
        SloppyGiuseppe
        Soho
        Veneziana
    NonVegetarianPizza
    RealItalianPizza
    SpicyPizza
    SpicyPizzaEquivalent
    ThinAndCrispyPizza
    UnclosedPizza
    VegetarianPizza
    … etc.

The items in the “namedPizza” category (eg. American, Cajun, etc) can be modeled as classes, or they could plausibly be modeled as individuals instead.

Overall, would modeling them as individuals make it more computationally efficient to use a reasoner?

What effect would the choice to model them as individuals have on the efficiency of checking: Ontology Consistency, Class Expression Satisfiability, Class Expression Subsumption, and Conjunctive Query Answering?

Overall, would the increased complexity of Instance Checking be offset by gains in efficiency in those other categories?

In particular, what overall effect would this have on Conjunctive Query Answering?

Do the answers to any of the above questions vary depending the OWL profile of the ontology (eg. OWL-EL vs OWL-DL, etc)?

  • The semantic differences between one modeling strategy and the other are too deep for the question to make sense. Regardless of which version takes more computing power, they're entirely different ontologies and cannot be used to get the same inferences; they don't carry the same information. – Ignazio Dec 14 '22 at 14:03
  • @ Ignazio Can you elaborate? It's doesn't seem to me that there is a deep, substantial difference between, for example, modeling a Cajun pizza as a class which is a subclass of SpicyPizza vs an individual which with the type SpicyPizza. Yes, the model-theoretic semantics are different in these two cases, but the two ontologies function the same in practice, yes? You would just query them in a slightly different manner. Eg. in the first case you might run a query to return all subclasses of SpicyPizza, and in the second case you might run a query to return all individuals of type SpicyPizza. – user10264746 Dec 15 '22 at 00:39
  • @ Ignazio The question I'm most concerned with (out of all of the ones I listed in the original post) is: which of the two searches described in the previous comment would be faster to execute? – user10264746 Dec 15 '22 at 00:40
  • I disagree that two ontologies with a different model semantics function the same in practice. They would satisfy *some* use cases but not all. E.g., how do you model two Cajun pizza to be delivered at my apartment, if Cajun pizza is an individual? – Ignazio Dec 16 '22 at 17:25
  • To reiterate, you can't compare the speed of a paper airplane and of a turtle, even if both have Boeing written on the side. – Ignazio Dec 16 '22 at 17:26
  • You're right - the pizza ontology was a bad example for me to use because there are some potential use cases in which you'd want to have multiple instances of a named pizza. So suppose either that we weren't designing this ontology for those use cases, or that we simply change the example to one where we have classes each of which you'd never want to instantiate twice. For example, you could model files in a particular folder on a hard drive as classes, or you could model them as individuals. Is that an acceptable example? If so, what efficiency concerns would come into play? – user10264746 Dec 16 '22 at 21:50

1 Answers1

1

TLDR

In this case, whether you are using individuals or classes will have little to no effect on the computational complexity of reasoning tasks. In general, the expressiveness of the Description Logic (DL) used is by far the biggest predictor of the resulting computational complexity. Thus, for conjunctive queries, use OWL2 QL, for classification use OWL2 EL.

As for the choice between using individuals and classes, I tend to prefer classes mainly because of the expressiveness they allow. See my SO answer in this regard.

The longer answer

Here I try to in some large brush-strokes give an idea of some of the considerations wrt complexity results. However, this is just tip of the iceberg and to serve as possible starting point for further investigation.

The main factors contributing to computational complexity is the reasoning task used and the DL used.

Reasoning tasks

Reasoning tasks are tasks like consistency checking, classification and query answering. Consistency checking and classification often is seen as "standard reasoning tasks" meaning that when DLs are designed, these are the reasoning tasks for which designers aim to achieve decidablity. Query answering however is undecidable for many DLs. For DLs with negation, consistency checking can be reduced to classification. Many DLs that are derivatives of EL do not have negation and thus do not have consistency checking as reasoning task. For those DLs that have consistency checking, consistency checking and classification have the same computational complexity. Query answering is a different reasoning task which can have different computational complexity.

DLs

The semantics of OWL2 is given by the Description Logic SROIQ (see OWL 2 Direct Semantics). This is a highly expressive DL of which the computational complexity for classification is N2ExpTime-complete (see RIQ and SROIQ are Harder than SHOIQ paper). For the Description Logic EL++, which is the underlying DL used for OWL2 EL, classification has polynomial time complexity (see Pushing the EL envelope paper).

The DL underlying OWL2 QL is DL-LiteR for which computational complexity is given by the following figure

Complexity of basic DL-Lite logics taken from the The DL-Lite Family and Relations paper.

Henriette Harmse
  • 4,167
  • 1
  • 13
  • 22