Skip to main content

Comparison of Greedy and Optimal Assessment of Natural Language using word-to-word Similarity Metrics

Introduction:

This article covers the comparison of optimal approach and greedy approach for assessing of natural language student input in dialogue based tutoring systems.  
Consider a instance below from experiments with AutoTutor (a dialogue based tutoring system):
Expert Answer : Expectation
Student Input : Contribution
To check contribution is similar to expectation or not.If yes, system should return positive feedback else system should return negative feedback.

Optimal Approach:

Well known combinatorial optimization problem , known as Sailor Assignment Problem or simply known as Assignment Problem.

In Assignment problem, we are given n jobs/tasks and k employees and experience(maximization problem) or salary(minimization problem) of ith employee for performing jth task  where i = 1,2,......,k and j  =1,2,.......,n
(weight matrix).

Two variants of problem:
We have to assign employees to jobs such that:
1) Maximization Problem
When we are given experience of each employee and we want to assign most experienced employee among the qualified employees for a particular task.
2) Minimization Problem
When we are given salary of each employee and we want to assign employee with least salary among qualified employees for a particular task.

Solution of Assignment problem: The Hungarian Algorithm

For reference:



Same variant of maximization problem of Hungarian algorithm could be applied
on word-to-word similarity metrics. Here, employees and tasks are replaced by words from two sentences to be compared and the element of weight matrix wxy is the similarity between word x and word y.


Greedy Approach:

Principle of Compositionality:
In mathematics and semantics, the principle of compositionality states that the meaning of a complex expression is determined by the meanings of of its constituent expressions and the rules used to combine them.Simply stating, the meaning of longer texts can be composed from the meaning of their individual words.

Based on compositionality principle, the similarity between two texts is composed in a simple additive manner from individual similarities between pair of words.

The greedy approach can be summarized in steps:

1) After pairing of each word of text T1 with every word of text T2, similarity scores are computed. Then, exclusive pairs of similar words(i.e. having max similarity score) are added to set S.
2)  The similarity of text T1 and T2 is simply additive or weighted sum of similarity scores of pairs present in set S.
3) Normalize computed sum with weighted length of original texts. Ways of normalizing: Dividing to the longest text, or dividing to the average length of two texts.

Drawback:
Greedy approach does not aim to get global maximum  similarity score.

Example to see difference between greedy and optimal approach:


Here, we have two sentence fragments and word-to-word similarity scores of word pairs across sentences (Bold lines show optimal pairing)
Greedy method would pair motion with motion(max similarity score 1.00),then pair speed with acceleration (similarity score 0.69)
So total similarity score before normalization by greedy approach: 1.69
Whereas optimal matching would yield a score of 0.75(pair motion with speed)+ 0.95(pair acceleration with motion) = 1.70    

Explanation: How Hungarian algorithm would give optimal pairing:  



Conclusion:

Optimal assessment obviously provide better performance in terms of accuracy as compared to greedy approach and other baseline methods.  

References:

1)  https://aclweb.org/anthology/W/W12/W12-2018.pdf
2)  https://www.topcoder.com/community/data-science/data-science-tutorials/assignment-problem-and-hungarian-algorithm/
3)  https://www.aaai.org/ocs/index.php/FLAIRS/FLAIRS12/paper/viewFile/4421/4801

Comments

Popular posts from this blog

NLP in Video Games

From the last few decades, NLP (Natural Language Processing) has obtained a high level of success in the field  of Computer Science, Artificial Intelligence and Computational Logistics. NLP can also be used in video games, in fact, it is very interesting to use NLP in video games, as we can see games like Serious Games includes Communication aspects. In video games, the communication includes linguistic information that is passed either through spoken content or written content. Now the question is why and where can we use NLP in video games?  There are some games that are related to pedagogy or teaching (Serious Games). So, NLP can be used in these games to achieve these objectives in the real sense. In other games, one can use the speech control using NLP so that the player can play the game by concentrating only on visuals rather on I/O. These things at last increases the realism of the game. Hence, this is the reason for using NLP in games.  We can use NLP to impr

Discourse Analysis

NLP makes machine to understand human language but we are facing issues like word ambiguity, sarcastic sentiments analysis and many more. One of the issue is to predict correctly relation between words like " Patrick went to the club on last Friday. He met Richard ." Here, ' He' refers to 'Patrick'. This kind of issue makes Discourse analysis one of the important applications of Natural Language Processing. What is Discourse Analysis ? The word discourse in linguistic terms means language in use. Discourse analysis may be defined as the process of performing text or language analysis, which involves text interpretation and knowing the social interactions. Discourse analysis may involve dealing with morphemes, n-grams, tenses, verbal aspects, page layouts, and so on. It is often used to refer to the analysis of conversations or verbal discourse. It is useful for performing tasks, like A naphora Resolution (AR) , Named Entity Recognition (NE

Coreference Resolution and Applications in NLP

In computational linguistics and natural language processing coreference resolution (CR) is an avidly studies problem in discourse which has managed to be only partially solved by the state of the art and consequently remain one of the most exciting open problems in this field. Introduction and Definition The process of linking together mentions of a particular entity in a speech or text excerpt that related to real world entities is termed as coreference resolution. This process identifies the dependence between a phrase with the rest of the sentence or other sentences in the text.  This is an integral part of natural languages to avoid repetition, demonstrate possession/relation etc. A basic example to illustrate the above definition is given below : Another example which uses elements from popular fiction literature : Harry  wouldn’t bother to read “ Hogwarts: A History ” as long as  Hermione  is around.  He  knows  she  knows  the book  by heart. The different type