Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ontologies in the Semantic Web: Logics, Languages and more… Pavel Klinov.

Similar presentations


Presentation on theme: "Ontologies in the Semantic Web: Logics, Languages and more… Pavel Klinov."— Presentation transcript:

1 Ontologies in the Semantic Web: Logics, Languages and more… Pavel Klinov

2 What I am here for: To say few words about semantics and ontologies Why they are important To present my biased view on ontologies To give you an introduction into logical foundations of formal ontologies KR & R To give a brief overview of the “state-of-the- art” ontological languages W3C standards, trends, challenges and more (RDF(S), OWL)

3 Ontologies: Why Are They Important? Imagine two communicating agents Agent A tells: Red(X) Ambiguity This apple is red Person is a Red What the intended meaning is? More generally: intended interpretation of a term is usually a small subset of all interpretations → need to specify it

4 Where’s Semantics on Web? Semantic = Meaning. What things have meaning? Text, e.g., Web content Terms or expressions in agent dialogue Representation language Key question: How can semantics be captured? Informally or Formally Implicitly or Explicitly M. Uschold, “Where is the semantics in the Semantic Web”

5 Implicit vs Explicit Semantics Implicit Explicit Shared Human Consensus Pump: “a device for moving a gas or liquid from one place or container to another” M. Uschold, “Where is the semantics in the Semantic Web”

6 Informal vs Formal Semantics Informal, e.g., NL descriptions Formal, i.e., expressed in a formal language The rest of the talk is about formal and explicit semantics Pump: “a device for moving a gas or liquid from one place or container to another” (pump has (superclasses (device,…)) M. Uschold, “Where is the semantics in the Semantic Web”

7 Ontologies as Systems of Constraints (1) A little more formal approach: Given an agent A using a language L with vocabulary V There exists M(L) – set of all models of L But set of intended models of L according to A is C A (L) - subset of M(L) M(L) C A (L) conceptualization N. Guarino, “Semantic Matching”

8 Now add a second agent - B In order to “understand” A, B must either share the same conceptualization or A and B must adopt a common conceptualization The key role of ontologies: they help establish a common conceptualization through placing semantic constraints on models of a language Ontologies as Systems of Constraints (2) M(L) C A (L) conceptualization C B (L) N. Guarino, “Semantic Matching”

9 Logical Foundations of Formal Ontologies Pavel Klinov

10 Why Logic? Logic provides framework for defining: What are models What are semantic constraints How constraints can be formulated What are the consequences of placing those constraints Few logics have been investigated as ontology languages First-Order Logic Description Logic

11 Logics for ontologies FOL + Expressive + Well understood - Undecidable - Doesn’t (naturally) support structured concepts Example: “Every human has two parents who are humans”

12 Logics for ontologies Description Logic (DL) + Expressive + Well understood + Decidable (though worst case intractable) + Supports structured knowledge - Less expressive than FOL Example: “Every human has two parents who are humans”

13 Syntax of the simplest DL - ALC Each concept defines a term in a vocabulary Concepts are defined using axioms: C = A ∩ B DL allows creating structured concepts from elementary (atomic) concepts Ontology = collection of axioms (DL knowledge base) I. Horrocks, U. Sattler, “DL: Basics, Applications and More”

14 Semantics of ALC DL has a declarative model-theoretic semantics Interpretation = Interpretation satisfies: Axiom A = B iff A I = B I Axiom A B iff A I  B I Ontology iff it satisfies all axioms Important! DL semantics allows to state what is true without stating how to determine that I. Horrocks, U. Sattler, “DL: Basics, Applications and More”

15 Back to models and constraints Models of a language M(L) = all possible interpretations of given DL concepts Semantic constraints = DL axioms Intended models (conceptualization) = interpretations that satisfy given DL ontology (set of axioms) Examples: Lion  Mammal is satisfied by Lion I ={1,2}, Mammal I ={1,2,3} Red  Human is not satisfied by Red I ={red_colour}, Human I ={John,Abbey,Mike} A=¬A is never satisfied

16 Knowledge Representation in DL Terminological Knowledge (TBox) Concept definitions or inclusion axioms Man  Human Man = Human ∩ Male Assertional Knowledge (ABox) Concept and role membership axioms John:Human parentOf(Jim,John)

17 Reasoning in the Semantic Web Reasoning can be used to support ontology design and improve the quality of the resulting ontology Reasoning can support ontology integration Reasoning can be used by agents to determine set of facts consistent w.r.t. ontology

18 Ontology Design Ontologies can be created step-by-step by computing “is-a” relationships between concepts Person ManWoman Parent GrandFatherGrandMother FatherMother is-a child GrandFather is Father whose child is Parent

19 Ontology Integration Reasoning might be used to compute integrated hierarchy and detect inconsistencies Person Adolescent BoyGirl is-a Person ManWoman Parent GrandFatherGrandMother FatherMother is-a has-child

20 Facts consistent w.r.t. ontology Reasoning can be used to classify objects and infer their properties Classification Tom is a parent of Jim and John is a son of Jim. Therefore, Tom is a grandfather Inferring properties Tom is a grandfather, so he must be at least 45 years of age

21 Reasoning in DL Basic TBox inference problems: Concept Satisfiability: Concept C is satisfiable w.r.t. TBox iff there exists an interpretation I of TBox s.t. C I is non-empty Concept subsumption: C is subsumed by D w.r.t. TBox iff every interpretation I of TBox satisfies C  D Concept disjointness: C is disjoint with D w.r.t. TBox iff for every interpretation I of TBox C I is disjoint with D I Examples: Is Man ∩  Man satisfiable w.r.t. an empty TBox? No Is Man ∩ Woman satisfiable w.r.t. an empty TBox? Yes Man  Person w.r.t. empty TBox? No Man  Person w.r.t. T={Person  Man U Woman}? Yes!

22 Inference problems are interrelated C is subsumed by D iff (C ∩  D) is unsatisfiable C and D are equivalent iff C is subsumed by D and vice versa C and D are disjoint iff their intersection is unsatisfiable All that is needed is a SAT solver for DL! CICI DIDI DIDI

23 Satisfiability w.r.t. TBox SAT w.r.t. generic TBoxes is difficult At every logical step, reasoner must examine TBox to check that no axiom is violated Sometimes the problem may be reduced to reasoning w.r.t. empty TBox This may be done for simple terminologies using unfolding

24 Preconditions for Unfolding Simple TBoxes Every concept appear every once in the left handside of every axiom No cycles All left handsides are atomic

25 Unfolding Replace every non-basic concept in right handside by its definition Example:

26 Tableau Reasoning for DLs Goal: determine if concept is satisfiable Try to construct model (tableau) for concept. If failed – concept is unsatisfiable Tableau construction is accomplished by applying rules at every step of the reasoning process Termination conditions: No rule can be applied - complete tableau Clash occurs, e.g, a:C and a:¬C – incomplete tableau The procedure is provably sound, complete and guaranteed to terminate

27 Tableau Expansion Rules Intersection rule: Tableau contains a:(C ∩ D), then add a:C and a:D Union rule: Tableau contains a:(C U D), then create two tableaux (one with a:C and another with a:D) Universal restriction rule: Tableau contains a:(  R.C) and (a,b):R, then add b:C Existential restriction rule: Tableau contains a:(  R.C), then add (a,b):R and b:C

28 Reasoning Example: Is (  child.Male ∩  child.Female) satisfiable? 1. K={a:(  child.Male ∩  child.Female)}. Apply ∩ -rule 2. K=K  {a:(  child.Male), a:(  child.Female)}. Apply  -rule 3. K=K  {(a,b):child, b:Male}. Apply  -rule 4. K=K  {(a,c):child, c:Female} At this point no rule can be applied, no clash occurred, so the concept is satisfiable (a is Parent of both – Male b and Female c)

29 Another Reasoning Example: Is (  child.Man ∩  child.Woman) satisfiable? 1. Unfolding: (  child.Male ∩  child.  Male) 2. K={a:(  child.Male ∩  child.  Male)}. Apply ∩ -rule 3. K=K  {a:(  child.Male), a:(  child.  Male)}. Apply  -rule 4. K=K  {(a,b):child, b:Male}. Apply  -rule 5. K=K  {b:  Male} At this point, there is clash: b:Male and b:  Male, so the concept is unsatisfiable

30 ABox Reasoning Membership Does object belong to concept? Retrieval Get all objects for given concept Classification Get most specific concept for given object Tableau procedure works the same way: a:C holds is a:  C is unsatisfiable

31 DL Summary DL is a logical reconstruction of earlier formalisms (Sem. Nets, Frames) DL are translatable to other formalisms (FOL, Modal Logics) Decision procedures exist and are known for most of DLs DL research = balancing between expressiveness and decidability

32 Ontology Languages for the Semantic Web Pavel Klinov

33 RDF RDF stands for Resource Description Framework It is a W3C candidate recommendation (http://www.w3.org/RDF) RDF is graphical formalism ( + XML syntax + semantics) for representing metadata for describing the semantics of information in a machine- accessible way RDF document is a collection of triples (RDF graph) I. Horrocks, “Ontology Languages for the Semantic Web”

34 RDF Semantics RDF has “non-standard” semantics – mix of model-theoretic semantics, semantic conditions and axiomatic triples - axiomatic triple Semantics given by RDF Model Theory (MT) (http://www.w3.org/TR/rdf-mt/) In RDF MT, an interpretation I of a vocabulary V consists of: IR, a non-empty set of resources (universe) IS, a mapping from V into IR (interpretation function) IP, a distinguished subset of IR (the properties) A vocabulary element v 2 V is a property iff IS(v) 2 IP IEXT, a mapping from IP into the powerset of IRxIR I.e., property elements mapped to subsets of IRxIR IL, a mapping from typed literals into IR I. Horrocks, “Ontology Languages for the Semantic Web”

35 RDF Semantics: Example Satisfies: … Doesn’t satisfy: c not a property (a,b) not in IEXT(1) … RDF W3C Standard - http://www.w3.org/TR/rdf-mt/

36 RDFS RDF gives a formalism for meta data annotation, and a way to write it down in XML, but it does not give any special meaning to vocabulary such as subClassOf Interpretation is an arbitrary binary relation I.e., has no special meaning RDF Schema defines “schema vocabulary” that supports definition of ontologies gives “extra meaning” to particular RDF predicates and resources (such as subClassOf) this “extra meaning”, or semantics, specifies how a term should be interpreted RDFS is an RDF document http://www.w3.org/TR/rdf-schema/rdfs-namespace/ I. Horrocks, “Ontology Languages for the Semantic Web”

37 RDFS Examples RDF Schema terms: Class Property type subClassOf range domain These terms are the RDF Schema building blocks (constructors) used to create vocabularies: I. Horrocks, “Ontology Languages for the Semantic Web”

38 RDFS Semantics RDFS simply adds semantic conditions and axiomatic triples that give meaning to schema vocabulary Class interpretation ICEXT simply induced by rdf:type, i.e.: x is in ICEXT(y) if and only if is in IEXT(IS(rdf:type)) Other semantic conditions include: If is in IEXT(IS(rdfs:domain)) and is in IEXT(x) then u is in ICEXT(y) If is in IEXT(IS(rdfs:subClassOf)) then x and y are in IC and ICEXT(x) is a subset of ICEXT(y) IEXT(IS(rdfs:subClassOf)) is transitive and reflexive on IC Axiomatic triples include: rdf:type rdfs:domain rdfs:Resource rdfs:domain rdfs:domain rdf:Property I. Horrocks, “Ontology Languages for the Semantic Web”

39 RDF(S): flexible and liberal No distinction between classes and instances (individuals) Properties can themselves have properties No distinction between language constructors and ontology vocabulary, so constructors can be applied to themselves/each other I. Horrocks, “Ontology Languages for the Semantic Web”

40 Problems with RDFS RDFS is too weak to describe resources in sufficient detail No localized range and domain constraints Can’t say that the range of hasChild is person when applied to persons and elephant when applied to elephants No existence/cardinality constraints Can’t say that all instances of person have a mother that is also a person, or that persons have exactly 2 parents No transitive, inverse or symmetrical properties Can’t say that isPartOf is a transitive property, that hasPart is the inverse of isPartOf or that touches is symmetrical … Difficult to provide reasoning support No “native” reasoners for non-standard semantics May be possible to reason via FO axiomatization (http://www.w3.org/TR/lbase/) I. Horrocks, “Ontology Languages for the Semantic Web”

41 Requirement for Web Ontology Language Desirable features identified for Web Ontology Language: Extends existing Web standards Such as XML, RDF, RDFS Easy to understand and use Should be based on familiar KR idioms Formally specified Of “adequate” expressive power Possible to provide automated reasoning support

42 OWL Ideally, OWL would extend RDF Schema Consistent with the layered architecture of the Semantic Web But simply extending RDF Schema would work against obtaining expressive power and efficient reasoning Combining RDF Schema with logic leads to uncontrollable computational properties G. Antoniou, F. van Harmelen, “Semantic Web Primer”

43 Three species of OWL W3C’sWeb Ontology Working Group defined OWL as three different sublanguages: OWL Full OWL DL OWL Lite Each sublanguage designed to fulfill different aspects of requirements

44 OWL Full It uses all the OWL languages primitives owl:unionOf owl:equivalentClass owl:max(min)Cardinality … It allows the combination of these primitives in arbitrary ways with RDF and RDF Schema OWL Full is fully upward-compatible with RDF, both syntactically and semantically OWL Full is so powerful that it is undecidable No complete reasoning support Example: cardinality restrictions on complex roles, e.g., >2ancestorOf.Person G. Antoniou, F. van Harmelen, “Semantic Web Primer”

45 OWL DL OWL DL is a sublanguage of OWL Full that restricts application of the constructors from OWL and RDF Application of OWL’s constructors’ to each other is disallowed Example: EquivalentProperties(owl:sameAs,owl:differentFrom) It corresponds to a well studied DL SHOIN(D) OWL DL permits efficient reasoning support No full compatibility with RDF: Not every RDF document is a legal OWL DL document. Every legal OWL DL document is a legal RDF document. G. Antoniou, F. van Harmelen, “Semantic Web Primer”

46 OWL Lite An even further restriction limits OWL DL to a subset of the language constructors E.g., OWL Lite excludes enumerated classes, disjointness statements, and arbitrary cardinality. The advantage of this is a language that is easier to Understand, for users Implement, for tool builders Reason, for tools The disadvantage is restricted expressivity G. Antoniou, F. van Harmelen, “Semantic Web Primer”

47 Upward Compatibility between OWL Species Every legal OWL Lite ontology is a legal OWL DL ontology Every legal OWL DL ontology is a legal OWL Full ontology Every valid OWL Lite conclusion is a valid OWL DL conclusion Every valid OWL DL conclusion is a valid OWL Full conclusion G. Antoniou, F. van Harmelen, “Semantic Web Primer”

48 OWL Syntactic Varieties OWL builds on RDF and uses RDF’s XML- based syntax Other syntactic forms for OWL have also been defined: An alternative, more readable XML-based syntax (OWL/XML) An abstract syntax, that is much more compact and readable than the XML languages (Lisp-like) A graphic syntax based on the conventions of UML G. Antoniou, F. van Harmelen, “Semantic Web Primer”

49 Few OWL fragments… Pavel Klinov

50 owl:Ontology Some OWL ontology <owl:priorVersion rdf:resource="http://www.uc.edu/uni-ns-0.1"/> <owl:imports rdf:resource=" http://www.uc.edu/uni-ns-1.0 "/> University Ontology owl:imports is a transitive property G. Antoniou, F. van Harmelen, “Semantic Web Primer”

51 Classes Classes are defined using owl:Class owl:Class is a subclass of rdfs:Class Disjointness is defined using owl:disjointWith G. Antoniou, F. van Harmelen, “Semantic Web Primer”

52 Classes owl:equivalentClass defines equivalence of classes owl:Thing is the most general class (Top) owl:Nothing is the empty class (Bottom) G. Antoniou, F. van Harmelen, “Semantic Web Primer”

53 Properties In OWL there are two kinds of properties Object properties, which relate objects to other objects E.g. taughtBy, supervises, parentOf Data type properties, which relate objects to datatype values E.g. phone, title, age, etc. G. Antoniou, F. van Harmelen, “Semantic Web Primer”

54 Datatype Properties OWL makes use of XML Schema data types, using the layered architecture of the SW <rdfs:range rdf:resource= "http://www.w3.org/2001/XLMSchema #nonNegativeInteger"/> G. Antoniou, F. van Harmelen, “Semantic Web Primer”

55 Inverse Properties G. Antoniou, F. van Harmelen, “Semantic Web Primer”

56 Special Properties owl:TransitiveProperty (transitive property) E.g. “ancestorOf” owl:SymmetricProperty (symmetry) E.g. “siblingOf” owl:FunctionalProperty defines a property that has at most one value for each object E.g. “age” owl:InverseFunctionalProperty defines a property for which two different objects cannot have the same value E.g. “passportNumber” G. Antoniou, F. van Harmelen, “Semantic Web Primer”

57 Open World Assumption OWL currently adopts the open-world assumption (OWA): A statement cannot be assumed true on the basis of a failure to prove it On Web, this is a reasonable assumption Example: Person = Human ∩ 2.hasParent.Human. John:Human and parentOf(Jim,John), parentOf(Mary,John). Is John:Person entailed? Closed-world assumption: a statement is true when its negation cannot be proved Leads to nonmonotonic behavior

58 Unique Names Assumption (UNA) Typical database applications assume that individuals with different names are indeed different individuals OWL follows the usual logical paradigm where this is not the case Plausible on Web Previous example: John:Human, parentOf(Jim,John), parentOf(Mary,John). Is John:Person entailed?

59 Summary OWL is the proposed standard for Web ontologies OWL builds upon RDF and RDF Schema: Formal semantics and reasoning support is provided through the mapping of OWL to DL While OWL is sufficiently rich to be used in practice, extensions are in the making OWL 1.1 being standardized (SROIQ(D)) Property chains Qualified cardinality restrictions Rich annotations Rules (SWRL) Non-monotonic extensions (localized CWA, defaults) Handling uncertainty (ask me if interested!)


Download ppt "Ontologies in the Semantic Web: Logics, Languages and more… Pavel Klinov."

Similar presentations


Ads by Google