Teaching machines to detect sarcasm

It is relatively easy for humans to pick out a sarcastic comment, but can a computer do it efficiently? This is precisely what Aditya Joshi, a researcher with the IITB-Monash Research Academy, is trying to ascertain.

It is a commonly-held belief that sarcasm comes naturally to Pune residents. And so it was quite fitting that Aditya, who spent many of his impressionable years in Pune and now specialises in sentiment analysis, chose to do research on computational sarcasm.

The IITB-Monash Research Academy is a pioneering joint-venture research partnership between two leading institutions in India and Australia. It offers research scholars like Aditya the opportunity to study for a dually-badged PhD from both IIT Bombay in India and Monash University in Australia. Students spend time in both countries over the course of their research, and many work on projects that are strongly-interdisciplinary in nature and with an applied research focus.

Sarcasm is a form of verbal irony that is intended to express contempt or ridicule. Consider the sentence ‘Slept at 4, woke up at 6. Jet lags are fun!’ Although the speaker uses a positive word ‘fun’, the implied sentiment is negative.

Fig. 1: Twitter Snapshot (Courtesy: Twitter)

Sentiment analysis deals with automatic identification of opinion in text, and sarcasm is a peculiar form of sentiment expression that proves to be a challenge to such sentiment analysis systems. “My work,” says Aditya, “deals with computational approaches to sarcasm. This means that a machine accurately needs to predict that the statement “I love being ignored” is sarcastic, whereas “I love winning lottery” is non-sarcastic.

“Sentiment analysis is closely linked with the rise of Web 2.0, where the creators of content on the web are no longer a select few,” explains Aditya. “On Web 2.0, the users could create content in the form of comments on articles, responses to web pages, and more recently – social media text. This has resulted in a huge volume of data containing user sentiment, opinion and emotion. Research in sentiment analysis is more than 10 years old. One state-of-the-art area in the field of sentiment analysis is sarcasm research. Around 11% of social media text has been reported to be sarcastic. To get the sentiment about a product, an entity, or a person right, and to be able to detect these sarcastic sentences correctly are both crucial.” Aditya’s PhD Supervisor from IIT Bombay, Prof. Pushpak Bhattacharyya is Vijay and Sita Vashee Chair Professor at IIT Bombay, and also the Director of IIT Patna. Speaking about Aditya’s research, Prof. Bhattacharyya says, “Sarcasm research demands the best from both natural language processing and machine learning – making it a cutting edge problem in data analytics today.”

Sentiment analysis works on the bedrock of strong Artificial Intelligence (AI), where machines that are to be humanised actually ‘imitate’ humans. Hence, in order to understand how the human brain performs the task of sentiment analysis, researchers like Aditya are closely studying sentiment annotation, the human equivalent of sentiment analysis.

In sentiment annotation, a human reader reads a piece of text (document, tweet, movie review, etc.) and assigns it a polarity or emotion. While he is doing so, these researchers are trying to understand what is going on in his mind – making use of a cutting edge eye-tracking device that records several critical parameters like fixation duration, saccadic duration, etc. with precision.

Fig. 2: Architecture of a sarcasm detection system that uses twitter footprint of an author in addition to the text in a tweet to predict sarcasm (Courtesy: Aditya Joshi)

The benefits of Aditya’s work are many. The advantages of sentiment analysis systems are well-studied and multiple: (a) knowing how a product is being received, (b) understanding inter-personal relationships, etc. And, better sarcasm understanding will lead to better sentiment analysis systems.

Among others, Prof Murali Sastry, CEO, IITB-Monash Research Academy, and a Pune person to boot, is a keen observer of computational sarcasm as well. Says he, “Aditya’s work was presented at IBM Research Open Day 2015, Microsoft Techvista 2015, Xerox Research’s Symposium 2016, TCS Research Scholar Symposium 2014, and at CSE-IITB’s Research Symposium in 2016. Aditya won the prize for the best thesis talk at Computer Science and Engineering Dept-IITB’s Research Symposium in 2016. He was also awarded the best paper and best 3-minute thesis talk, at IITB-Monash Academy’s Oskar nights in 2014 and 2015. His work on drunk texting prediction is a first-of-its-kind system that was reported in Indian Express. I am excited about the Academy and its potential to make significant contributions to business and society in India and Australia. I am confident that the unique collaboration model that we follow will attract innovation-led industry, top-ranking students and the best researchers to work together to solve grand-challenge problems that need to be solved.”

No sarcasm here—it takes one Pune achiever to recognise another!

Research scholar: Aditya Joshi, IITB-Monash Research Academy

Project title: Computational Sarcasm

Supervisors: Prof. Pushpak Bhattacharyya, Prof, Mark J Carman

Contact details: aditya.m.joshi@gmail.com

This story was written by Mr Krishna Warrier based on inputs from the research student and IITB-Monash Research Academy. Copyright IITB-Monash Research Academy.