/

What is a Knowledge Graph Anyway?

What is a Knowledge Graph Anyway?

If you are a data scientist or work in data management you may be familiar with Knowledge Graphs, but for most people, while the term may be familiar, you may suddenly find yourself wondering “what is a knowledge graph anyway?” Few people really know what they are for in practical terms. This article briefly introduces the concepts, explaining what Knowledge Graphs are, why we should care and when to (and when not to) use them.

So here we go.

Why do they keep going on about semantic networks / ontologies?

If you do a search for Knowledge Graphs you may well get bogged down in somewhat academic discussions about ontologies, RDF data, knowledge bases, the Semantic Web and so on. Those are the roots of modern-day Knowledge graphs so certainly interesting, but it does not need to be so complicated.

Oh! That's a Knowlege Graph!?

Turns out you already use a Knowledge Graph. Probably every day.

When you type ‘how old is Elon Musk’ into Google and it gives you the answer.

That’s a Knowledge Graph.

Turns out some of the largest, most tech-savvy companies are leveraging Graphs to power their businesses. Amazon has a Product Graph which it uses behind the scenes. LinkedIn, Facebook, AirBnB, Uber, Microsoft and eBay. They all use Knowledge Graphs to model their data.

But why a graph?

Well. Because graphs model networks, and networks can be interconnected in all sorts of ways and can be disconnected and re-connected in all sorts of ways, so they allow all the complexity and messiness of the real world to be modelled in a much better and more efficient way than the more structured and ordered world of traditional databases or search engines. This makes them ideal for representing facts, and therefore knowledge. But at core they are quite simple.

Let’s take a look at the example above represented as a graph.

The fact has three parts called a semantic triple. Elon Musk, who is a Person Entity (for better or worse 😊), an attribute or relationship, and a value (or another entity). You can see that represented on the Google response where it shows the path to the fact as ‘Elon Musk / Age.’   Of course, there are lots of ways to represent this data, but the Knowledge Graph representation gets more powerful as you add more entities. The critical factor is that, unlike a relational database system (somewhat ironically), the relationships are just as important in the representation as the entities. It is that inter-linking that gives them their power.

Let’s illustrate with another example. If we ask Google ‘how old is Elon Musk’s wife?’ we now get the response below:

The Knowledge Graph knows Mr. Musk has had two wives, and so shows us two options. This can be modelled with the following graph:

This time there are two triples and so two ‘hops’ in the Knowledge Graph. One is Entity to Entity and one is entity to Value/Date.

Most questions can be answered with a few hops.

We still have not really answered the question of why this is better than other ways of representing knowledge though. The key really is that this representation tries to model real ‘Things’ and their inter-relationships in a way that allows the relationships to represented as first class citizens, considering that relationships change and can be between seemingly unconnected entities. It is also self-descriptive insofar as it is possible to interrogate the Knowledge Graph to find out what it represents and ‘knows.’  This makes it possible to perform ad-hoc logical reasoning on the things it knows about.

If your business put your data into a knowledge graph you could start to ask questions like ‘What was our best-selling product last quarter?’  or ‘What is the phone number of our CEO’s personal assistant?.’  And your customers could do the same thing.

Can you imagine how much time and hassle that would save?

Importantly, we have all come to expect that kind of immediacy from our web searches, but when we go elsewhere the search experience can be… well, disappointing.

Don't voice assistants or chatbots do this?

Yes and no. Chatbots and voice assistants like Alexa tend to have a finite set of intents that they try to model. They are designed to address specific tasks and will try to disambiguate to identify which path to push you down to take the next action. They therefore tend to be highly curated and require a fair bit of maintenance. In the case of chatbots in customer service applications, for example, you normally need to have some kind of fallback to a real human too.

This is shown in the graphic below.

A knowledge graph can be used as a layer on top of a search engine which tries to spot a question, answer it if it can based on the knowledge within the graph, and if not drop back to the next layer such as picking the most likely answer out of a paragraph on a webpage (Extractive answers) or just showing standard search engine results.  Each of these layers is less and less curated and requires less maintenance. It is also less likely to be the right answer as you drop through the layers. Also, compared to a chatbot, a knowledge graph is less concerned with what the intent was behind the question, and the next action to perform, and much more focused on figuring out very generally whether this looks like a question we have the answer to. It is a more generalized approach. Obviously, it is also very important that the knowledge graph is kept up to date and accurate otherwise its knowledge becomes stale and that does not help anybody! So, it is essential that the Knowledge Graph is flexible, adapting, expanding and evolving as the domain it represents changes.

Knowledge Graphs are another way of helping people find information, they sit not as a replacement, but alongside search engines and chatbots as a powerful way of helping people get things done.

Can I do anything else with a Knowledge Graph?

Now that’s the cool bit. Once you have got this thing, there are many applications besides answering questions. One common application is recommendations – because you are modelling real world entities it is possible to use clustering and other graph-specific algorithms to find groups of similar People/Films/Products/Books/Whatever and use that to predict what people will like. Once you know that, you can make recommendations or personalize content or even build marketing campaigns. Importantly the recommendations are ‘explainable’ in a way that much machine learning is not, so you can check for biases and understand the basis on which a recommendation is made. This is a major advantage over ‘black box’ machine learning models.

You can also use the graph representation to train models or even to supplement training data where it is sparse.

It is also an interesting way to explore data. Graph visualizations make it easy to follow a trail of relationships and explore who and what are connected to each other, or even people who are not connected when they should be. It’s no surprise that graph technology is used extensively for fraud detection by banks, police forces and many others because it can reveal unexpected links or detached entities.  It is easy to imagine how this could be applied to discover novel market segments or product opportunities by discovering connections that would not have been identified otherwise.

When you start to apply this kind of representation to R&D heavy industries such as the life sciences, the potential can be game changing.

Okay, I get what a Knowledge Graph is now. How do I get started?

Over the years we repeatedly hear our customers ask us to just ‘make work it like Google.’  So, we are building a platform to help them do just that, including creating Knowledge Graphs. We have done some extensive work on how users are now asking for question answering systems – not just traditional keyword search.

If any of this sounds interesting, please feel free to CONTACT US for a chat.

Cheers,

Matt

Reference – https://en.wikipedia.org/wiki/Knowledge_graph#cite_note-9

Twitter
LinkedIn

Stay up to date with our latest insights!