# What are the differences between a knowledge base and a knowledge graph?

During my readings, I have seen many authors using the two terms interchangeably, i.e. as if they refer to the same thing. However, we all know about Google's first quotation of "knowledge graph" to refer to their new way of making use of their knowledge base. Afterward, other companies are claiming to use knowledge graphs.

What are the technical differences between the two? Concrete examples will be very useful to understand better the nuances.

Based on the related Wikipedia, a knowledge base (KB) is:

a technology used to store complex structured and unstructured information used by a computer system. The initial use of the term was in connection with expert systems which were the first knowledge-based systems.

As there are different representation model for a KB, we can find different terminology in different domains. For example, in some AI articles, it's called ontology.

Knowledeg graph (KG) is another object model to KB realization which is introduced by Google for its search engine (as you have mentioned). Hence, KG is a specification of KB. You can find more information in the paper Knowledge Graphs, such as more history about the KG or a formal definition of that:

knowledge graph is a graph of data intended to accumulate and convey knowledge of the real world, whose nodes represent entities of interest and whose edges represent relations between these entities.

Moreover, you can find some articles about contextual KG (CKG) in the paper Learning Contextual Embeddings for Knowledge Graph Completion and KG$$^2$$: Learning to Reason Science Exam Questions with Contextual Knowledge Graph Embeddings.

• I am not sure if an ontology is a synonym for KB. For example, read this article What’s the Difference Between an Ontology and a Knowledge Graph?, where the author says that a knowledge graph is an "instantiation" of an ontology. See also Ontologies and knowledge bases: towards a terminological clarification (1995) by Nicola Guarino et al. The term ontology has been defined differently in many cases. There's also this related blog post.
– nbro
Jun 11 '20 at 14:08
• @nbro You're right. They are not a synonym. It's also a realization of a KB. However, the term "ontology" is mostly used in AI as a reference to a KB
– OmG
Jun 11 '20 at 14:25
• I have to support OmG here. I have always seen the word 'ontology' used in AI. Whether that is 'correct' or not is a different question, sadly. Jan 28 at 21:25

There is not a single answer to your question because knowledge graphs (KGs) and knowledge bases (KBs) have been defined in multiple (often ambiguous) ways in the past. Some people say that KGs are different from KBs, while other people use the term KG as a synonym for KB or define it as a type of KB.

Appendix A.3 "Knowledge Graphs": 2012 Onwards of the survey Knowledge Graphs (which is probably the most extensive survey on KGs) states that knowledge graphs have been defined in different ways in recent years. Each of these definitions raises questions about the relationship between KGs and other related concepts, like graph databases, knowledge bases, and ontologies.

The 1st definition of a KG is

a graph where nodes represent entities, and edges represent relationships between those entities. Often a directed edge labelled graph is assumed (or analogously, a set of binary relations, or a set of triples)

The question here is: what's the difference between KGs and graph databases (like Neo4j)? Graph databases have been used to build KGs, but is there any actual difference between these 2 terms?

The 2nd definition of a KG is

a knowledge graph is a graph-structured knowledge base

So, according to this definition, a KG would be a type of knowledge base (KB). So, what is a knowledge base? They write

The phrase "knowledge base" was popularised in the 70's (possibly earlier) in the context of rule-based expert systems [72], and later were used in the context of ontologies and other logical formalisms [68]

They conclude that a KB has also been defined in ambiguous ways in the past.

The 3rd definition of a KG is

a knowledge graph "mainly describes real world entities and their interrelations, organized in a graph; defines possible classes and relations of entities in a schema; allows for potentially interrelating arbitrary entities with each other; covers various topical domains"

The fourth definition of KG is

A knowledge graph acquires and integrates information into an ontology and applies a reasoner to derive new knowledge

The person that proposed this definition criticized Google for having called their KG a KB and that person stated that ontologies are often a synonym for KBs. So, a KG is not an ontology, which is a synonym for KB, according to this definition!

The 5th (detailed) definition of KG is

A knowledge graph is a semi-structured data model characterized by three components: (i) a ground extensional component, that is, a set of relational constructs for schema and data (which can be effectively modeled as graphs or generalizations thereof); (ii) an intensional component, that is, a set of inference rules over the constructs of the ground extensional component; (iii) a derived extensional component that can be produced as the result of the application of the inference rules over the ground extensional component (with the so-called "reasoning" process).