Reputation: 119
What is the difference between a knowledge graph and an ontology? And which of them is dependent on the other?
I understand that :
both are represented with nodes and edges, indicating entities and the relationships between these entities.
knowledge graphs are more specific and are used for a certain application, while ontology is more general.
an ontology is referred to when building a knowledge graph to check for the consistency of this knowledge graph.
Am I correct?
Upvotes: 6
Views: 7570
Reputation: 19
Knowledge graphs and ontologies are both parts of a knowledge representation but really address different aspects.
An ontology formally defines the concepts (the cognitive elements) of a specific domain, usually via defining properties including “is-a” relationships between concepts and other necessary attributes needed to differentiate concepts for a given purpose. In genral, an ontology should have formal definitions necessary and sufficient to tell closely concepts apart.
By formally, this usually means use of a concept model and some syntax that is unambiguous, such as first-order predicate logic, or more expressive description logics. The Wikipedia pages are helpful here!
For example, strep throat is-a pharyngitis (which is-a inflammatory process with location of pharynx) and is-a upper respiratory tract infection and is-a infection with Streptococcus pyogenes (synonymous-with group A streptococcus (which is-a Streptococcus infection which is-a gram positive cocci infection which is-a bacterial infection ….) ).
The definitionmin the ontology would probably include other properties of S. pyogenese like formation of betahemolysis on sheep's blood agar incubated in a reduced CO2, being catalase negative and being sensitive to bacitracin, since these are part of the typical/classic definition of group A strep. It might, or might not, depending on the domain it is used for, include information about M,and T proteins.
Note: definition here is not the common dictionary description, but something much more precise. Since there are a lot of ways to treat it, and can infect a wide group of people, and then complications depend on the specific M/T type these don't help in telling whether or not something is strep throat. Same with diagnosis, as there is a lot more tomthe store than a throat swab.
A knowledge graph is similar, and often can use the same sort of technology (e.g. graph databases work well for both, and there are other graph markup languages that can be used.). It has a formal model for a domain and use. It represents knowledge (I.e. data plus context plus the model) for a domain, usually about concepts defined using an ontology. It will typically contain things not related to the definition of a concept. It often has (well, should) indication when relations are not certain, and should indicate the providence of the information and often strength of an association.
The knowledge graph usually has relationships between different concept types represented by edges. Very simple properties may be part of the nodel (in a named property graph database) or as separate nodes (e.g. if using RDF).
The knowledge base might include the definitions, or this might be external (e.g. if defined and shared by a group) . It asserts things beyond just definition, (usually, since there benefit is being able to manage more than definitions). E.g it is where you might say things like:
Strep throat usually infects school age children. It is typically treated with oral penicillin or amoxicillin or a single injection of long acting penicillin or oral 1st generation cephalosporins. In patients who are allergic to penicillin it is usually treated with azithromycin, erythromycin, or clarithromycin unless resistance to macrolide antibiotics is >15%. I would put in a lot more details, e.g. complications based on M and T type, actual studies of resistance, relationship between treatment failure and resistance, epidemiology, immune response (and the genetics of the difference in immune response) symptoms, etc. I.e. everything we know about strep throat that isn't the definition of it would go in the knowledge graph.
A knowledge graph will often have quantitative data that isn't part of the definition. E.g. the size of the bacteria.
So, there is some overlap, but they work together for different aspects of knowledge bases / knowledge representations. You can use a graph database for both, but probably shouldn't use something like OWL for anything other than the ontology / definitions.
Often people will end up making really problematic ontologies when they try to put too much stuff in it, I.e. stuff that should be in the knowledge graph.
Upvotes: 0
Reputation: 462
My response would be more or less what Tico said before, with the following clarification: The ontology plays the role of the "schema" that the data should comply to, while the knowledge graph is the actual data (often the knowledge graph contains also the ontology, i.e., the schema definition).
Please read this and this post for a better overview.
Upvotes: 7
Reputation: 115
Putting concepts in simple words I can say:
So, in summary: Knowledge Graph = Graph database + Ontology
Upvotes: 10