"Pointed" Question-Answering

img
Machine reading comprehension through question-answering is one of the most interesting and significant problems in Natural Language Processing because it not only measures how well the machine 'understands' a piece of text but also helps provide useful answers to humans. For this task, given a paragraph and a related question, the machine's model must select the span from the paragraph that corresponds to the answer using a start index prediction and end index prediction. My baseline model for this task is a Bidirectional Attention Flow (BiDAF) end-to-end neural network, with embedding, encoder, attention, modeling and output layers. Significantly, the output layer involves the probability distribution of the start index token and end index token to be generated independently. However, in order for the model to learn how the end of an answer can depend on the start of an answer, I implement a boundary model of an Answer Pointer layer (introduced by Wang et al, 2017) based on the notion of a Pointer Network (Vinyals et al, 2015) as a replacement for the output layer of the baseline. This enables us to condition the prediction for the end token on the prediction for the start token of the answer in the input text. Further, since a Pointer Network outputs a probability distribution exclusively over locations in the input paragraph (context) at each step instead of outputting a probability distribution over the entire vocabulary, it allows us to improve the model's efficiency in addition to its accuracy. On testing this new model, I obtain an F1 score of 59.60 and an EM score of 55.01 on the development set, which is an improvement on the performance of the baseline - involving both F1 and EM scores of 52.19 on the development set.