Topics In Demand
Notification
New

No notification found.

Achieving Cognitive Explainable AI Recommendations Using Graph Theory
Achieving Cognitive Explainable AI Recommendations Using Graph Theory

662

2

In today’s “Smart Digital” age, Artificial Intelligence (AI) based recommendations are becoming the backbone for marketing numerous products and services. Approximately 78 percent of companies say that “fair, safe, and reliable” results from AI are trusted. To build trust, the results from AI must be explainable and contextual.  In this article, we attempt to understand the business alignment for the recommendation systems which exist today and how they could be used wisely for specific domains using knowledge graphs. 

Technology giants ranging from the likes of Amazon (retail) and Netflix (entertainment) to banking applications, from Facebook, Instagram, Twitter (social media) to news feeds around the world are generating huge amounts of data daily and it is the recommendation-based algorithms that are assisting end-users to choose/prioritize the content they are interested in. To begin with, we could look at instances where the state-of-the-art recommendation systems did not do well in simple scenarios. The first scenario is the search for books related to Natural Language Processing (NLP) on a leading retail e-commerce site. And when the results are thrown up, we can see that of all recommendations, only one recommendation suits the requirement.

Book Recommendation

We can see that the top 3 recommendations had two books that were not relevant to the context of the product which was being searched. The books “The Theory of Everything” and “The Jungle Book” should ideally not be suggested in this context.

Another example was with a popular OTT platform where the search criteria were “a good movie with the family”. While looking at the movie “Wonder” and the recommendations which came along with it, there were indeed some good recommendations along with a few tragic 18+ movies. Although based on real-life, the recommendations were not the ones to be watched with young children around.

Movie Recommendation

 

When we look deeper into these two examples, we will quickly realize that these recommendations did not align with the context probably because of using techniques like collaborative filtering working in tandem with content-based recommendations. After all, state-of-the-art models for recommendations will have a combination of these two techniques along with knowledge-based recommendations and other techniques like demographic-based and utility-based recommendations. However, do these state-of-the-art recommendation models align with the business objectives? Can similar models be fine-tuned to say the health insurance domain? Or can we explain the recommendations that are presented to link them with business KPIs?

Here is an approach that uses Graph theory, which dates back to the year 1736, which is surprisingly useful to build explainable recommendations, and modeling the data into a simple knowledge graph is the backbone of this approach. The NLP pipeline built mainly had the following 5 components as shown below:

Pipeline

Identify the key elements which should drive the recommendations: In the example of the movie “Wonder” mentioned earlier, the following will be the key focus elements where we can drive our recommendations based on characteristics like genres and tags and have a restriction of suggesting movies to up the specified maturity rating.

About Wonder

Extract these key elements with techniques like named entity recognition

For most OTT platforms, the key focus elements are readily available in the description however in case we have textual content, we can build a custom named entity recognizer to extract this information from the available data. Custom NERs can be as simple as using regex or as complex as using transformers. 

Build a Knowledge graph where the content and key elements extracted from the data will form the nodes and they will be linked by the relationships which exist in the ecosystem of the data. Again, for the movie example, we can have a knowledge graph which has a relation like the {movie} [is directed by] {director},  where the entity in curly brackets represents a node and in the text in square brackets represents the relationship between the nodes. This syntax is very similar to the syntax used by the neo4j database. The other relationships in this example can be {movie}[belongs to]{genre}, {movie}[ viewing is restricted for age under]{maturity rating}, {movie}[has]{tag}, {actor}[has acted in]{movie}.

A snapshot of such a knowledge graph generated in neo4j is shown below.

KG

Use either out-of-the-box algorithms or design your own based on the business requirements. In many cases, these can be some complex queries to the knowledge graph. Most leading graph databases today support AI algorithms and come with out-of-the-box packages. Also, we can implement some complex queries to provide very relevant recommendations based on the knowledge graphs. Neo4j for instance comes with data science packages that have some very useful implementations. Alternatively, we can write our algorithms using the cypher in neo4j.

Get your computation architecture right based on the size of the knowledge graph. If the knowledge graph is huge, the computation time is high and sometimes this can be a challenge to provide real-time recommendations. This issue can be overcome by approaches like selecting a subgraph and then running the logic of the recommendations or using distributed computing in spark using Graphframes or a combination of both. 

In conclusion, recommendations using knowledge graphs are explainable and can be directly tied to business KPIs. Additionally, we can use this approach to overcome some of the inherent problems of recommendation systems like cold start and scalability. We can also avoid manipulation of recommendation systems which often happens in systems that have a high weightage in collaborative systems. An ideal approach however will be using knowledge graph-based recommendations in combination with collaborative and content-based filtering where knowledge graphs can help to ensure that we maintain the context of the recommendations.

About The Author

Hrishekesh Shinde is a Data Scientist and has more than 14 years of experience in digital transformation. He has worked across the domains of finance & banking, logistics & transportation, telecommunications and healthcare. He is a data geek and often explores the new trends and technologies related to data science. He has worked in the areas of Machine Learning, Inferential Statistics, NLU and NLP. He has a masters degree in Data Science from Lewis University, Illinois and is currently working with Globant in the capacity of Data Science Architect.

For more information, visit www.globant.com


That the contents of third-party articles/blogs published here on the website, and the interpretation of all information in the article/blogs such as data, maps, numbers, opinions etc. displayed in the article/blogs and views or the opinions expressed within the content are solely of the author's; and do not reflect the opinions and beliefs of NASSCOM or its affiliates in any manner. NASSCOM does not take any liability w.r.t. content in any manner and will not be liable in any manner whatsoever for any kind of liability arising out of any act, error or omission. The contents of third-party article/blogs published, are provided solely as convenience; and the presence of these articles/blogs should not, under any circumstances, be considered as an endorsement of the contents by NASSCOM in any manner; and if you chose to access these articles/blogs , you do so at your own risk.


A digitally native company that helps organizations reinvent themselves to create a way forward and unleash their potential, Globant is the place where innovation, design, and engineering meet scale. Globant is a disruptor in the professional services arena and we leverage the latest technologies and methodologies in the digital and cognitive space to help organizations transform in every aspect. A pure-play in the digital and cognitive fields, Globant has a global presence with delivery centers in North America, Latin America, Europe, and Asia through which we offer a deep knowledge of the latest trends and technologies. With over 27,000 professionals present in 25 countries working for companies like Google, Rockwell Automation, Electronic Arts, and Santander, among others, we are featured as a business case study at Harvard, MIT, and Stanford apart from being a member of the Cybersecurity Tech Accord (2019). For more information, visit www.globant.com

© Copyright nasscom. All Rights Reserved.