Introduction to Ontologies

Monsoon 2018
Instructor: Raghava Mutharaju
IIIT Delhi

What is an Ontology (Philosophy)

  • The term ontology has its origins in philosophy
  • It is the knowledge/study of being or existence
  • It is a discussion of how things exist
  • Eg: What are the fundamental parts of the World?
  • Eg: How are they related to each other?
  • Eg: What is a thing?
  • Eg: How can we categorize things?
  • It is a way to categorize the World into objects and relations

What is an Ontology (Computer Science)

  • Gruber: “An ontology is a formal explicit specification of a shared conceptualization.”
    • formal: ontology should be defined in a formal language
    • explicit specification: concepts, relations between them and the constraints on them should be explicitly defined
    • shared: "ontology should be a shared view between several parties, a consensus rather than an individual view"
    • conceptualization: "ontology should be an abstract, simplified view of the world that we wish to represent for some purpose"
  • M. Uschold, M. Gruninger: “An ontology is a shared understanding of some domain of interest.”
    • shared understanding: ontology is the common vocabulary for the stakeholders to communicate. Eg: data integration
    • domain of interest: ontology focusses on a particular piece of the World. There cannot be one big ontology of everything
  • An ontology should be machine processable

Different Perspectives of the World

Vegetable Pizza with extra cheese
Image source:

Perspective 1: Italian cuisine; delicious food

  • Different types of cuisines such as Indian, Italian, Mexican, Japanese etc.
  • Different dishes in each cuisine
  • Characteristics of each dish such as spicy, grilled, steamed etc.

Perspective 2: Recipe

  • What is the recipe for Pizza
  • What are the ingredients?
  • What kind of cooking utensils are required?

Perspective 3: Calorie Concious

  • What ingredients go into making this Pizza?
  • How many calories does each ingredient contribute to?
  • What is the weight of this Pizza?

What is an Ontology (Computer Science)

  • Gruber: “An ontology is a formal explicit specification of a shared conceptualization.”
  • M. Uschold, M. Gruninger: “An ontology is a shared understanding of some domain of interest.”
  • An ontology should be machine processable

Conceptual Modelling

  • It is a way to express our understanding of the system using concepts (abstract building blocks)
  • Several conceptual modelling techniques
    • Entity Relationship (ER) models
    • UML diagrams
    • Ontologies

ER and Ontologies

  • ER model consists of entities and the relationships between them
  • Entity can have properties associated with it
  • A property can have value associated with it
  • Eg: Employee has an ID. Employee works in an organization
  • Generally used in database modelling
  • In ontologies
    • relationship among properties can be established
    • properties can exist independent of entities
    • hasSon is a subPropertyOf hasChild
    • complex relationships can be modelled

UML and Ontologies

  • UML is short for Unified Modelling Language
  • It is used for modelling software systems
  • Provides different types of diagrams to model the structure (class diagram) and behaviour (activity diagram, use case diagram) of the system
  • Ontologies are more expressive but hard to model information and data flow in the system

Which modelling technique to use?

  • Use the one that is appropriate for the application at hand
  • With expressivity comes complexity
  • Other factors
    • familiarity of modelling techniques to the modelling team
    • bias for/against a modelling technique

Ontology (Philosophy and CS)

Philosophy Computer Science
In natural language In formal language
For debate among people For machine processing
Solely abstract Abstract and specific
For the gain of knowledge For a specific use case

Ontologies and Knowledge Graphs

Knowledge Graphs

Knowledge Graph
Image source:

Knowledge Graphs

  • There is no standard definition of Knowledge Graphs
  • It is a directed labelled graph that represents knowledge
    • "Things" not strings. Things should have semantics.
    • Eg: What does it mean to be a "Person", "Organization", etc.
    • Things are entities that have properties and are connected by relationships
  • Optionally, provenance information should be enconded in the Knowledge Graphs

Why build Ontologies?

  • Unambiguous formal semantics
    • required for clearly defining and exchanging knowledge between humans as well as machines
  • Reasoning
    • infer new facts
    • consistency checking, generate explanations for inconsistencies
    • Fact 1: All birds can fly
    • Fact 2: Penguin is a bird
    • Inference: Penguin can fly
    • Fact 3: Penguins cannot fly
    • Knowledge Graph is inconsistent
  • An ontology gives an abstract view of the data and acts as documentation
CSV Data file
Image source:
Ontology Data file
Image source:
  • Models are declarative and are independent of implementation
  • References

    1. Actually, What Does “Ontology” Mean? Johannes Busse et. al. Journal of Computing and Information Technology. 2015
    2. What Is an Ontology? Nicola Guarino et. al. Handbook on Ontologies. Steffen Staab and Rudi Studer. Springer. 2009
    3. What is a Knowledge Graph? James McCusker, et. al. Submitted to Semantic Web Journal. 2018
    4. Ontologies for Knowledge Graphs? Markus Krötzsch. DL 2017

    Course Overview


    1. Introduction to Ontologies
    2. Introduction to OWL (Web Ontology Language)
    3. Designing an ontology
    4. Introduction to Protégé
    5. Design and build an ontology in the class
    6. Ontology reasoning
    7. Introduction to OWL API
    8. Introduction to Ontology Design Patterns (ODPs)
    9. Redesign and rebuild in-class ontology with ODPs
    10. Anti-patterns
    11. Open problems in modelling and building ontologies