Natural Language Understanding with Commonsense Reasoning
Total Page:16
File Type:pdf, Size:1020Kb
E.T.S. DE INGENIEROS INFORMÁTICOS UNIVERSIDAD POLITÉCNICA DE MADRID MASTER TESIS MSc IN ARTIFICIAL INTELLIGENCE (MUIA) NATURAL LANGUAGE UNDERSTANDING WITH COMMONSENSE REASONING: APPLICATION TO THE WINOGRAD SCHEMA CHALLENGE AUTHOR: ALFONSO LÓPEZ TORRES SUPERVISOR: MARTÍN MOLINA GONZÁLEZ JUNE, 2016 This is for my children Carla and Alonso, and my wife Véronique Thanks for their unconditional support and patient (also for the coming adventures…) v Acknowledgments: I’d like to thank the advices and help received from Martín. I was very lucky being your student. vi RESUMEN En 1950, Alan Turing propuso un test para evaluar el grado de inteligencia humana que podría presentar una máquina. La idea principal era realmente sencilla: llevar a cabo una charla abierta entre un evaluador y la máquina. Si dicho evaluador era incapaz de discernir si el examinado era una persona o una máquina, podría afirmarse que el test había sido superado. Desde entonces, a lo largo de los últimos 60 años se han presentado numerosas propuestas a través de los cuales se han puesto al descubierto ciertas debilidades del test. Quizás la más importante es el hecho de centrarse en la inteligencia humana, dejando a un lado otros tipos de inteligencia. El test obliga en gran medida a definir en la máquina un comportamiento antropomórfico y de imitación con el único fin de pasar el test. Con el fin de superar estos y otros puntos débiles, Hector Levesque propuso en 2011 un nuevo reto, “The Winograd Schema Challenge”. Un sencillo test basado en Pregunta y Respuesta sobre una frase que describe una situación cotidiana. En dicha frase se identifican dos agentes participantes, existiendo una referencia a uno de ellos a través de (generalmente) un pronombre. La prueba consiste en entender a cuál de los agentes está haciendo siendo referenciado por dicho pronombre. Es decir, resolver la anáfora o correferencia en cuestión. La clave del test está en la definición de la frase, que debe ser de tal que la solución al problema no puede encontrarse mediante métodos estadísticos. El equilibrio existente entre los elementos asociados a la anáfora es tal que sólo es resoluble mediante una comprensión de los conceptos descritos en la frase tal y como lo haría una persona. Es decir, a través de la comprensión del lenguaje natural conseguida gracias al conocimiento del dominio o mundo y utilizando cierto razonamiento de sentido común. Este trabajo presenta una propuesta para resolver este reto de comprensión de lenguaje natural definido por Levesque. Para ello se han utilizado diferentes modos de representación del conocimiento con la idea de permitir en cierta medida aplicar los conceptos del razonamiento de sentido común clásico del ser humano a través de una aplicación software desarrollada con dicho fin. vii ABSTRACT In 1950, Alan Turing proposed a test to measure the degree of human intelligence that could present a machine or computer. The main idea was really simple: To carry out an open discussion between an evaluator and the machine. If the evaluator was unable to discern whether the examinee was a person or a machine, it could be argued that the test had been passed. Since then, over the last 60 years there have been numerous proposals that have finally revealed certain weaknesses in the test. Perhaps, the most important one is that it only focus on human intelligence, leaving aside other types of intelligence. The test also requires the machine to act as an anthropomorphic and imitation device with the sole purpose of passing the test behavior. In order to overcome these and other weaknesses, Hector Levesque proposed in 2011 a new test, "The Winograd Schema Challenge". A simple experiment based on Q & A over a phrase describing an everyday situation. In the sentence, there are two main participants or actors, and there is also a reference to one of them through (usually) a pronoun. The test consists of trying to find which agent is referenced by the pronoun. That is, it tries to solve an anaphora or coreference problem. The test key point is how the phrase is defined. It should be done in such a way that the solution to the problem could not be found through statistical methods. The balance between the elements associated with anaphora makes the problem only resolvable through a deeper understanding of the concepts described in the phrase (like would be done by a person). That is, by way of the natural language understanding achieved with the knowledge of the related domain or world and by using somehow what is known as commonsense reasoning. This paper presents a proposal to solve the understanding natural language challenge defined by Levesque. For this purpose, they have used different modes of knowledge representation with the idea of allowing the application of classical concepts of human commonsense reasoning. The results have been consolidated in a software application developed specifically for this purpose. viii TABLE OF CONTENTS LIST OF FIGURES .............................................................................................................................. viii LIST OF TABLES .................................................................................................................................. ix PART I: INTRODUCTION......................................................................................... 1 1. INTRODUCTION..................................................................................................................................... 2 2. MAIN GOALS .......................................................................................................................................... 5 PART II: BACKGROUND .......................................................................................... 7 3. COMMONSENSE REASONING ............................................................................................................. 8 3.1. Introduction .................................................................................................................... 8 3.2. Commonsense Reasoning ............................................................................................ 8 3.2.1. Commonsense Knowledge .......................................................................................... 10 3.2.2. Reasoning with a Commonsense Knowledge Base ..................................................... 13 3.3. Qualitative Reasoning in the Spatio-temporal Domain ................................................ 15 3.4. Event Calculus and DEC ............................................................................................. 16 3.4.1. Event Calculus main concepts ..................................................................................... 17 3.4.2. Using Event Calculus for commonsense reasoning ..................................................... 19 4. NATURAL LANGUAGE UNDERSTANDING (NLU) .............................................................................. 24 4.1. Introduction .................................................................................................................. 24 4.2. Natural Language Processing: Shallow Understanding .............................................. 25 4.3. Natural Language Understanding: A Deeper comprehension .................................... 26 4.4. The Winograd Schema Challenge ............................................................................... 27 4.4.1. Description of the Winograd Schema Challenge .......................................................... 28 4.4.2. Defining the Winograd Schema Challenge Corpus ...................................................... 30 4.4.3. Different approaches to the Winograd Schema Challenge .......................................... 31 PART III: PROPOSAL .............................................................................................. 33 5. PROBLEM APPROACH ........................................................................................................................ 34 5.1. Introduction .................................................................................................................. 34 5.2. Solving the WSC with a Model-Based System ............................................................ 34 6. ADDRESING THE WSC WITH A MODEL-BASED SYSTEM ................................................................ 39 6.1. Introduction .................................................................................................................. 39 6.2. Relevant Information for the understanding process ................................................... 40 6.3. Domain, Agents and Parameters extraction ................................................................ 42 6.3.1. Agent Selection from a Schema answers .................................................................... 43 6.3.2. Domain Selection by detecting the main actions of the sentence ................................ 44 6.3.3. Selection of relevant Information about the Agents ...................................................... 46 6.4. Model description by way of the Event Calculus ......................................................... 47 6.4.1. General predicates ....................................................................................................... 48 6.4.2. Narrative predicates ..................................................................................................... 49 6.5. Model generation by using Domain, Agents and Parameters ....................................