Building Dynamic Knowledge Graphs from Text using Machine Reading Comprehension

1 INTRODUCTION . Automatically building knowledge graphs ( KGs ) from text is a long-standing goal in artificial intelligence research . KGs organize raw information in a structured form , capturing relationships ( labeled edges ) between entities ( nodes ) . They enable automated reasoning , e.g. , the ability to infer unobserved facts from observed evidence and to make logical “ hops , ” and render data amenable to decades of work in graph analysis . There exists a profusion of text that describes complex , dynamic worlds in which entities ’ relationships evolve through time . This includes news articles , scientific manuals , and procedural text ( e.g. , recipes , how-to guides , and so on ) . Building KGs from this data would not only help us to study the changing relations among participant entities , but also to make implicit information more explicit . For example , the graphs at each step in Figure 1 help us to infer that the new entity mixture is created in the leaf , since the previous location of its participant entities ( light , CO2 , water ) was leaf – even though this is never stated in the text . This paper introduces a neural machine-reading model , KG-MRC , that ( i ) explicitly constructs dynamic knowledge graphs to track state changes in procedural text and ( ii ) conditions on its own constructed knowledge graphs to improve downstream question answering on the text . Our dynamic graph model is recurrent , that is , the graph at each time step depends on the state of the graph at the previous time step . The constructed graphs are parameterized by real-valued embeddings for each node that change through time . In text , entities and their states ( e.g. , their locations ) are given by spans of words . Because of the variety of natural language , the same entity/state may be described with several surface forms . To ∗Work performed when author was an intern at MSR Montréal . Chloroplast in leaf of the plant trap light from the sun . The root absorbs minerals from the soil . This combination of water and minerals flows from the stem into the leaf . Carbon dioxide enters the leaf . Light , water and minerals , and the carbon dioxide all combine into a mixture . This mixture forms sugar ( glucose ) which is what the plant eats . current location cu rre nt loc ati on current location Light Water CO2 leaf current location cu rr en t l oc at io ncur ren t lo cat ion Light Water CO2 Nowhere leaf Mixture current location Before After Figure 1 : Snapshot of the knowledge graphs created by our model before and after reading the sentence in boldface . Since the KG explicitly stores the current location of light , CO2 , and water as leaf , the model can infer that mixture is formed in the leaf even though this is not explicitly stated . The three participant entities also get destroyed in the process , which is captured in the graph by pointing to a special Nowhere node . address the challenge of entity/state recognition , our model uses a machine reading comprehension ( MRC ) mechanism ( Seo et al. , 2017a ; Xiong et al. , 2017 ; Chen et al. , 2017 ; Yu et al. , 2018 , inter alia ) , which queries for entities and their states at each time step . We leverage MRC mechanisms because they have proven adept at extracting text spans that answer entity-centric questions ( Levy et al. , 2017 ) . However , such models are static by design , returning the same answer for the same query and context . Since we expect answers about entity states to change over the course of the text , our model ’ s MRC component conditions on the evolving graph at the current time step ( this graph captures the instantaneous states of entities ) . To address the challenge of aliased text mentions , our model performs soft co-reference as it updates the graph . Instead of adding an alias node , like the leaf or leaves as aliases for leaf , the graph update procedure soft-attends ( Bahdanau et al. , 2014 ) over all nodes at the previous time step and performs a gated update ( Cho et al. , 2014 ; Chung et al. , 2014 ) of the current embeddings with the previous ones . This ensures that state information is preserved and propagated across time steps . Soft coreference can also handle the case that entity states do not change across time steps , by applying a near-null update to the existing state node rather than duplicating it . At each time step , after the graph has been updated with the ( possibly ) new states of all entities , our model updates each entity representation with information about its state . The updated information about each individual entity is further propagated to all other entities ( § 4.4 ) . This enables the model to recognize , for example , that entities are present in the same location ( e.g. , light , CO2 and water in Figure 1 ) . Thus , our model can use the information encoded in its internal knowledge graphs for a more comprehensive understanding of the text . We will demonstrate this experimentally by tackling comprehension tasks from the the recently released PROPARA and RECIPES datasets . Our complete machine reading model , which both builds and leverages dynamic knowledge graphs , can be trained end-to-end using only the loss from its MRC component ; i.e. , the negative loglikelihood that the MRC component assigns to the span that correctly describes each entity ’ s queried state . We evaluate our model ( KG-MRC ) on the above two PROPARA tasks and find that the same model significantly outperforms the previous state of the art . For example , KG-MRC obtains a 9.92 % relative improvement on the hard task of predicting at which time-step an entity moves . Similarly on the latter task , KG-MRC obtains a 5.7 % relative improvement over PROSTRUCT and 41 % relative improvement over other entity-centric models such as ENTNET ( Henaff et al. , 2017 ) . The same model also obtains state-of-the-art performance on the RECIPES dataset . 2 RELATED WORK . There are few datasets that address the challenging problem of tracking entity state changes . The bAbI dataset ( Weston et al. , 2015 ) includes questions about movement of entities ; however , its language is generated synthetically over a small lexicon , and hence models trained on bAbI often do not generalize well when tested on real-world data . For example , state-of-the-art models like ENTNET ( Henaff et al. , 2017 ) and Query Reduction Networks ( Seo et al. , 2017b ) fail to perform well on PROPARA . PROREAD ( Berant et al. , 2014 ) introduced the PROCESSBANK dataset , which contains paragraphs of procedural text as in PROPARA . However , this earlier task involves mining arguments and relations from events , not tracking the dynamic state changes of entities . The model that Berant et al . ( 2014 ) propose builds small knowledge graphs from the text , but they are not dynamic in nature . The model also relies on densely annotated process structure for training , demanding curation by domain experts . On the other hand , our model , KG-MRC , learns to build dynamic KGs just from annotations of text spans , which are much easier to collect . For the sentence-level PROPARA task they propose , Dalvi et al . ( 2018 ) introduce two models : PROLOCAL and PROGLOBAL . PROLOCAL makes local predictions about entities by considering just the current sentence . This is followed by some heuristic/rule-based answer propagation . PROGLOBAL considers a broader context ( previous sentences ) and also includes the previous state of entities by considering the probability distribution over paragraph tokens in the previous step . Tandon et al . ( 2018 ) recently proposed a neural structured-prediction model , ( PROSTRUCT ) , where hard and soft common-sense constraints are injected to steer their model away from globally incoherent predictions . We evaluate KG-MRC on the two PROPARA tasks proposed by Dalvi et al . ( 2018 ) and Tandon et al . ( 2018 ) , respectively , and find that our single model outperforms each of the above models on their respective tasks of focus . ENTNET ( Henaff et al. , 2017 ) and query reduction networks ( QRN ) ( Seo et al. , 2017b ) are two state-of-the-art entity-centric models for the bAbI dataset . ENTNET maintains a dynamic memory of hidden states with a gated update to the memory slots at each step . Memory slots can be tied to specific entities , but unlike our model , ENTNET does not maintain separate embeddings of individual states ( e.g. , current locations ) ; it also does not perform explicit co-reference updates . QRN refines the query vector as it processes each subsequent sentence until the query points to the answer , but does not maintain explicit representations of entity states . Neural Process Networks ( NPN ) ( Bosselut et al. , 2018 ) learn to understand procedural text by explicitly parameterizing actions and composing them with entities . These three models return an answer by predicting a vocabulary item in a multi-class classification setup , while in our work we predict spans of text directly from the paragraph . MRC models have been used previously for extracting the argument of knowledge base ( KB ) relations , by associating one or more natural language questions with each relation ( querification ) . These models have been shown to perform well in a zero-shot setting , i.e. , for a previously unseen relation type ( Levy et al. , 2017 ) , and for extracting entities that belong to non-standard types ( Roth et al. , 2018 ) . These recent positive results motivate our use of an MRC component in KG-MRC . 3 DATA & TASKS . We evaluate KG-MRC on the recently released PROPARA dataset ( Dalvi et al. , 2018 ) , which comprises procedural text about scientific processes . The location states of participant entities at each time step ( sentence ) in these processes are labeled by human annotators , and the names of participant entities are given . As an example , for a process describing photosynthesis , the participant entities provided are : light , CO2 , water , mixture and glucose . Although participant entities are thus known a priori , the location of an entity could be any arbitrary span in the process text . This makes the task of determining and tracking an entity ’ s changing location quite challenging . It should also be noted that the dataset does not provide information on whether a particular entity is an input to or output of a process . Not all entities exist from the beginning of the process ( e.g . glucose ) and not all exist at the end ( e.g . water ) . Table 1 shows statistics of PROPARA . As can be seen , the training set is small , which makes learning challenging . Along with the dataset , Dalvi et al . ( 2018 ) introduce the task of tracking state changes at a fine-grained sentence level . To solve this task , a model must answer three categories of questions ( 10 questions in total ) about an entity E : ( 1 ) Is E created , ( destroyed , moved ) in the process ? ( 2 ) When ( step # ) is E created , ( destroyed , moved ) ? ( 3 ) Where is E created , ( destroyed , moved from/to ) ? Cat . 1 asks boolean questions about the existence and movement of entities . Cat . 2 and 3 are harder tasks , as the model must correctly predict the step number at which a state changes as well as the correct locations ( text spans ) of entities at each step . Tandon et al . ( 2018 ) introduce a second task on the PROPARA dataset that measures state changes at a coarser process level . To solve this task , a model must correctly answer the following four types of questions : ( 1 ) What are the inputs to the process ? ( 2 ) What are the outputs of the process ? ( 3 ) What conversions occur , when and where ? ( 4 ) What movements occur , when and where ? Inputs to a process are defined as entities that exist at the start of the process but not at the end and outputs are entities that exist at the end of the process and were created during it . A conversion is when some entities are created and others destroyed , while movements refer to changes in location . Dalvi et al . ( 2018 ) and Tandon et al . ( 2018 ) propose different models to solve each of these tasks separately , whereas we evaluate the same model , KG-MRC , on both tasks . Bosselut et al . ( 2018 ) recently released the RECIPES dataset , which has various annotated states ( e.g . shape , composition , location , etc . ) for ingredients in cooking recipes . We further test KG-MRC on the location task to align with our PROPARA experiments . This is arguably the dataset ’ s hardest task , since it requires classification over more than 260 classes while the others have a much smaller label space ( maximum of 4 ) . Note that rather than treating this problem as classification over a fixed lexicon as in previous models , our model aims to find the location-describing span of text in the recipe paragraph .

Summary: The paper proposes a recurrent knowledge graph (bipartite graph between entities and location nodes) construction & updating mechanism for entity state tracking datasets such as (two) ProPara tasks and Recipes. The model goes through the following three steps: 1) it reads a sentence at each time step t and identifies the location of each entity via machine reading comprehension model such as DrQA (entities are predefined). 2) Co-reference module adjusts relationship scores (soft adjacency matrix) among nodes, including possibly new nodes introduced by the MRC model. 3) to propagate the relational information across all the nodes, the model performs L layers of LSTM for each entity that attend on other nodes via attention (where the weights come from the adjacency matrix). The model repeats the three steps for each sentence. The model is trained by directly supervising for the correct span by the MRC model at each time step, which is possible because the data provides strong supervision for each sentence (not just the answer at the end).