Sunday 3:45 PM–4:30 PM in C01

Knowledge Graph made simple using NLP and Transfer Learning

Suyog Swami

Audience level:
Novice

Description

In 30 years, dunnhumby has built a huge knowledge base. GRAKN.AI is a powerful Knowledge Graph database that provides automated reasoning to connect information together and derive powerful insights. The challenge is that it has its own query language. We present here a solution based on NLP and transfer learning that converts any questions into a GRAKN query, making its content accessible to all.

Abstract

dunnhumby, the world’s first data science platform has around 400+ Data Scientist, delivering 1000+ projects yearly using 50+ analytical solutions. This huge knowledge base has an abundance of information which can be explored to extract useful insights to help employees and stakeholders better the processes and progress in right direction.

GRAKN: GRAKN.AI is knowledge graph, a database to organise complex networks of data and make it queryable, by performing knowledge engineering. Grakn provides the knowledge foundation for cognitive and intelligent (e.g. AI) systems, by providing an intelligent language for modelling, transactions and analytics.

Graql: GRAKN’s query language provides an enhanced entity-relationship schema to model complex datasets. It performs logical inference through entity and relationship type deductive reasoning, as well as rule-based reasoning. This allows the discovery of facts and patterns that would otherwise be too hard to find.

The issue: As mentioned above GRAKN has its own query language called graql. Naïve users cannot efficiently leverage the power of GRAKN directly due to lack of technical knowledge.

An example of query to find an expert at the algorithm XGBoost:

match 
$ expert isa employee, has name $name_expert;
$algorithm isa algorithm, has name=’XGBoost’;
($expert, $algorithm) isa leverage;
get $name_expert;

But what if they could express their question or request in their natural language?

The opportunity: We have developed a solution which convert the natural language text into GRAKN queries and act as a precursor to the GRAKN input interface. Hence making knowledge graphs explorable to users who want to focus on insights rather than technicality.

Our Solution: Algorithm is explained below:

  1. Take input text string
  2. Identify nouns and verbs from the string by using Word2Vec and Transfer Learning
  3. Infer the nouns in the entity list available in Knowledge database
  4. Similarly, infer verbs in the relations list available in Knowledge database
  5. Also, match exact entity values with the nouns in the database.
  6. Using the collection of similar entity, relations generate a match query containing entity and relations.

Eg.

User

“Tell me who is an expert at ‘XGBoost’ ”

Text2GQL

match 
$ expert isa employee, has name $name_expert;
$algorithm isa algorithm, has name=’XGBoost’;
($expert, $algorithm) isa leverage;
get $name_expert;

Future enhancement: Idea is to make the tool generic which takes schema, data source (json) and input string and generates a grakn query which would be used an input to grakn interface. Also we can use similar approach to automate the process of parsing documents and identifying entities and relations which could be inserted in the graph database.

Subscribe to Receive PyData Updates