What's an Ontology?
An ontology enables knowledge sharing at scale by creating a shared knowledge representation layer. Simply put, it's a way to model people's understanding of certain domains or the world.
For a formal definition, Uschold and Gruninger defined an ontology as "the shared understanding of some domain of interest which may be used as a unifying framework" (Uschold and Gruninger, 1996).
Use Cases
Ontology can be applied to building digital twins, enhancing web portals, managing multimedia collections, corporate knowledge management, streamlining design documentation, building intelligent agents, and enabling ubiquitous computing. More details can be found in OWL Web Ontology Language Use Cases and Requirements and the Uschold and Gruninger paper.
One particularly exciting use case that I see is to create an ontology for unifying different research fields mentioned in the Uschold and Gruninger paper, which had originated from an invited talk by Michael Georgeff titled "Agents and Their Plans" given at IJCAI-95 in Montreal. The first and most important step in research is often identifying an important problem (with a reasonable attack) to solve. Having a unifying conceptual framework enables the consolidation of equivalent or similar research problems/ideas across different fields. Later, the research results in one field can be applied to the other fields. I haven't seen any literature related to this use case yet so please reach out if you have an example!
Web Ontology Language (OWL)
Overview
OWL provides a set of expressive vocabularies for defining ontologies, which allow for more structured and expressive representations of knowledge on the web. With it, we can define a "shared understanding of the domain" via three primitives: class (aka concept), relationship (aka property) and instance (aka individual).
How we define an ontology using OWL is similar to how RDF triples work (subject-predicate-object).
XML is used to encode OWL documents and namespaces, which prevent naming conflicts in vocabularies.
Intro
- Purpose: OWL extends RDF to support ontology modeling with richer semantics for reasoning.
- Key Features:
- Allows the specification of classes, properties, hierarchies, and logical axioms.
- Supports inference, enabling systems to derive new facts from existing data.
- Example: If and , an ontology reasoner (e.g. HermiT, Pellet, or FaCT++) can infer
- Role in Semantic Technology: OWL adds a logical reasoning layer on top of RDF, making systems capable of complex knowledge representation and automated reasoning.
Basic Types
Classes (Concepts)
- We can define the hierarchy between different classes using
rdfs:subClassOf
RDF Schema property
<owl:Class rdf:about="#Person"/>
<owl:Class rdf:about="#Child">
<rdfs:subClassOf rdf:resource="#Person"/>
</owl:Class>
Relationships (Properties)
OWL supports:
- Object Properties: Relationships between instances.
- e.g. related_to, topic, prior
- Data Properties: Attributes with literal values akin to key-value pairs.
- e.g. summary, title, author
Domain and Range:
- Specify the class that a property applies to (domain) and the class of its values (range).
<owl:ObjectProperty rdf:about="#hasParent">
<rdfs:domain rdf:resource="#Person"/>
<rdfs:range rdf:resource="#Person"/>
</owl:ObjectProperty>
Complex Relationships
- Inverse Properties
- Define a reciprocal relationship.
- If
hasParent
linksChild
toParent
, thenhasChild
linksParent
toChild
. - Example:
prior
andnext
- Transitive Properties
- If
A
is related toB
, andB
is related toC
, thenA
is related toC
. - Example:
isAncestorOf
.
- If
- Symmetric Properties
- The relationship applies in both directions.
- Example:
isMarriedTo
,related_to
- Functional Properties
- An individual can have at most one value for this property.
- Example:
hasSocialSecurityNumber
.
- Cardinality Constraints
- Limit the number of relationships an individual can have.
- Example: A person can have at most one biological mother and father.
Instances (Individuals)
The term instance is often used interchangeably with individual.
- An individual represents a specific entity or object in the domain of discourse.
- It is the basic unit of data in an ontology and is often used to represent concrete things like people, objects, or concepts.
- Individuals are members (or instances) of a class.
<!-- Define the Class -->
<owl:Class rdf:about="#Person"/>
<!-- Define an Individual -->
<rdf:Description rdf:about="#John">
<rdf:type rdf:resource="#Person"/>
</rdf:Description>