Knowledge Graph Representation: GRAKN.AI or OWL?

Why does GRAKN.AI implement its own ontology language?

Szymon Klarman
Jan 19, 2017 · 8 min read

In this blog post, we take a closer look at a few of the key aspects that differentiate the knowledge representation model adopted by the GRAKN.AI knowledge graph platform from the popular Semantic Web formalisms: RDF(S) and OWL. In effect, we are answering the frequently asked question “Why does GRAKN.AI implement its own ontology language instead of using the existing W3C standards?”

This post is aimed at readers familiar with the notion of formal semantics and working experience in modelling ontologies, particularly using RDF(S) and OWL. We want you to get as much as possible out of our writing, and we are happy to discuss this post in the comments section below or via our Community Slack channels. Please get in touch!

Knowledge Graphs: a new frontier for knowledge representation

With GRAKN.AI — our open-source knowledge graph platform — we bridge concepts from several knowledge and data representation paradigms to specifically address what we see as a shortfall. In this post, we review the central motives and design decisions behind these efforts.

Knowledge representation on the Semantic Web

RDF

An RDF graph is expressed as a set of <subject, predicate, object> triples, each interpreted as an edge labelled with “predicate” going from the “subject” node to the “object” node. RDF does not support any semantics on its own, other than those carried over from the XML datatype definitions — it’s simply a data model. SPARQL is the language dedicated to querying RDF graphs, which is natively implemented by triple stores, i.e., databases developed specifically for storing and managing RDF data. The Wikidata project offers a prominent example of exposing RDF data via a live SPARQL endpoint run on top of a triple store.

RDFS

OWL

OWL adopts the so-called open-world assumption (OWA), as opposed to the closed-world assumption (CWA) characteristic of relational database systems, meaning that a lack of information is not interpreted as if the information were false. For instance, the OWL constraint “Every parent must have at least one child” is consistent with the dataset containing the single fact “John is a parent”, without any mentions of John’s children. No mention of children does not imply no children; on the contrary, unless specifically told otherwise, we can safely assume John has a child, even if we do not know about it. This philosophy is a natural fit for the open-ended web environment, where incompleteness of information can be taken for granted.

As the adoption of the RDF(S) standards for publishing data on the web has seen a notable uptake over the recent years, the use of OWL has been surprisingly limited [2], [3]. This is true both in the number of applications it has been effectively used for, and in the number of specific ontological constructs that get ever employed in practice. One of the scarce examples is delivered by Ordnance Survey, the national mapping agency for Great Britain, which employs expressive OWL ontologies for structuring geographical and administrative data. Some of the commonly acknowledged reasons behind that phenomenon are exactly those that have encouraged our company to keep pursuing a more suitable knowledge representation solution, as explained in the next part.

Why GRAKN.AI instead of OWL?

  • Grakn remains largely storage-agnostic, and can work on top of such graph databases and triple stores as Titan, OrientDB, Blazegraph, StarDog, and others that implement the TinkerPop interface;
  • The underlying data structure of Grakn is that of a labelled hypergraph. This, in turn, is further mapped to a labelled, directed graph — a model exposed by TinkerPop regardless of the actual data storage involved.

Labelled, directed multigraphs also happen to be the structures underpinning the RDF data model, so it is relatively straightforward to devise a mapping between RDF and hypergraphs. However, the real difference appears at the ontology layer, where Grakn exposes a higher level knowledge model, allowing developers to represent their application domain in terms of entities, resources, relations and roles, as opposed to OWL’s individuals, literals, properties and classes.

Here are the four main reasons why we believe Grakn ontologies are a better fit than OWL for modelling knowledge graphs in the context of stand-alone applications:

1) Grakn combines the Open and Closed World Assumption

In Grakn, we carefully combine both styles of reasoning, taking the best of two worlds: ontological-style open-world inference, and schema-like closed-world constraint checking. The long-standing antagonism between the open-world “ontological” and closed-world “schema” modelling stems, in our view, not principally from the formal incompatibility between the two approaches. Rather, it is rooted in the extreme philosophical views on the prototypical application scenarios they are ideally suited for: the open-ended, heterogeneous web of data vs. closed, curated, single-viewed data stores. Because we focus on large, domain-specific knowledge graphs, we find both ends of this spectrum too limiting and see a natural need for endorsing a mixed, yet still balanced solution.

2) OWL profiles have an unsatisfactory balance of expressiveness vs complexity

In theory, OWL architecture invites the use of arbitrary fragments (as needed on per use-case basis). However, in practice, “cherry picking” is impeded by the nature of the available reasoning tools, which must anyway involve expensive computational techniques to account for the entire, respective OWL profiles. Just to reason with the two simple constraints “Every parent has a child” and “Every child is a person”, one must involve a full-fledged OWL DL reasoner — a tool that, on average, will scale poorly with large data. This commonly pushes Semantic Web practitioners into a sole use of RDF(S), which on its own is too simplistic as an ontology/schema language.

3) GRAKN.AI is dedicated to graph data

4) OWL has a high entry threshold for non-logicians

By ensuring that Grakn’s knowledge representation formalism remains lightweight and is built bottom-up, following the experiences and needs of developers, we hope to enable more semantic capabilities to a much larger audience than that of OWL.

By committing to a novel ontology formalism from that underpinning the Semantic Web, Grakn had to be consequently equipped with a new, dedicated query language, Graql, which is intended to offer the optimal access to information represented in Grakn knowledge graphs. We will discuss the formal properties of Graql in more detail in future posts.

The design of a practical yet well-founded knowledge representation formalism is far from being a simple task, and takes careful considerations on numerous issues involving formal, knowledge engineering and technological perspectives. There are many trade-offs and hard compromises to be made, before a satisfying and stable specification can finally surface. While the work on this front continuously progresses at Grakn Labs, we invite you to check our documentation and provide your feedback.

[1] L. Ehrlinger, W. Wöß: “Towards a definition of knowledge graphs”, SEMANTiCS 2016.

[2] B. Glimm, A. Hogan, M. Krötzsch, A. Polleres: „OWL: Yet to arrive on the Web of Data?”, Linked Data on the Web Workshop (LDOW) 2012.

[3] J. Hendler: “On Beyond OWL: challenges for ontologies on the Web”, OWL: Experiences and Directions Workshop (OWLED) 2015.

With thanks to my fellow editors Nicholas D, Jo Stichbury, Haikal Pribadi, Borislav Iordanov and Precy Kwan for their input.

Vaticle

Creators of TypeDB and TypeQL

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store