Search code examples
owlsemantic-webontologylinked-datashacl

What is the role of CWA and OWA in semantic web applications?


What role does CWA and OWA play in semantic web applications? How important is it for those developing ontologies, writing SHACL schemas, or generating linked data to keep these concepts in mind?


Solution

  • Your question is vague but I'll try addressing CWA, OWA and also UNA that you mention in the comments, using examples.

    CWA

    If you're told that Charles is a married man, and Sharon is a married woman, then with the closed world assumption, you would assume that Charles is not married to Sharon. If, later on, you are additionally informed that Charles and Sharon are indeed husband and wife, then you would have to retract your former conclusion and accept this new fact. With CWA, reasoning is non-monotonic, meaning that with the addition of new knowledge, you may have less conclusions than before.

    OWA

    Under the open world assumption, you simply don't make the CWA. Charles and Sharon may be married, but they may not be married. You simply do not draw any conclusion about their marriage. With the additional knowledge of them being husband and wife, you can add more conclusions. Additional knowledge always increases what you can conclude, thus it's monotonic. OWA, in spite of its name, is really an absence of assumption. If something can't be proved, then it can't be proved.

    UNA

    If I say that Dave was born on 16th September 1975 and lives at the 3rd floor of a 25-storeys building in Soho, London, and David, born in September the sixteenth of nineteen seventy five, is living in the district of Soho of the city of London, in an apartment at the third floor of a building with twenty five floors, then I may be thinking that Dave and David are names of the same person. However, if I adopt the unique name assumption, then I conclude that Dave and David are different, so that there are, coincidentally, two people with the same birthdate living in the same district. Any further knowledge that would allow us to assertain that Dave and David represent the same person would be inconsitent with the UNA. Without UNA, no such conclusion is made, and further knowledge could identify Dave and David as one person.

    The role of these assumptions in the Semantic Web

    The standards of the semantic web do not impose either CWA or UNA. So you may think of them as essentially "based on OWA". However OWA and CWA do not apply to every standard. For instance, talking about CWA or OWA for SHACL is irrelevant. SHACL is not a knowledge representation language. It's used to describe the shapes of RDF graphs. If a shape says that an IRI must be the subject of 2 triples in a graph, then you look at the graph and count the triples. If there are indeed 2 such triples, the shape is satisfied, otherwise it's not. There is no need for any assumption. This does not mean that some connections cannot be made between SHACL and reasoning with CWA. Certain aspects of SHACL can emulate logical reasoning with a seemingly CWA flavour. But saying that SHACL makes the CWA is as improper as saying that my IDE makes the CWA when checking the syntax of my code.

    Also, in spite of semantic web standards not relying on CWA or UNA in their specifications, nothing prevents anyone from building systems based on, say, OWL, RDFS, SWRL, RIF and apply additional assumptions for the purpose of an application. Using OWL + CWA + UNA in a system can be very useful and is perfectly fine. But if you draw conclusions from these assumptions, you should not believe that others are drawing the same conclusions.

    Other assumptions

    There are other kinds of assumptions that can be useful, and that are sometimes misinterpreted as CWA. First, it is possible to have a local closed world assumption which only "closes the world" on some parts of the knowledge. For instance, an airline company may know about every flight existing, so we can assume that if it's not in their knowledge base, it simply does not exist. However, it may have incomplete knowledge about touristic places. For instance, if a restaurant does not have any review from the company's customers, it does not mean that none of them ever visited this restaurant.

    Second, there is the closed domain assumption, which is often confused with CWA. It assumes that the universe is limited to only the things that are named in the knowledge base. In the example of Charles and Sharon, two people who are married, if we do not have any other facts, we would conclude that Charles and Sharon are necessarily married because they are the only two existing entities (assuming it is known that someone cannot marry themself).

    Formal examples

    Assume the first order logic theory:

    ∃x married(Charles,x)
    ∃x married(Sharon,x)
    ∀x ∀y married(x,y) ⇒ married(y,x)
    ∀x ¬married(x,x)
    

    Without any assumption (i.e., under OWA), we can conclude that:

    ¬married(Charles,Charles)
    ¬married(Sharon,Sharon)
    

    With CWA, we can additionally conclude (or assume):

    ¬married(Charles,Sharon)
    ¬married(Sharon,Charles)
    

    With CDA, but without CWA, we can conclude:

    married(Charles,Sharon)
    married(Sharon,Charles)
    

    Those FOL sentences can all be expressed equivalently in OWL 2, so this works with semantic web standards as well.