DRLK : Dynamic Hierarchical Reasoning with Language Model and Knowledge Graph for Question Answering (2022)

Abstract: In recent years, Graph Neural Network (GNN) approaches with enhanced knowledge graphs (KG) perform well in question answering (QA) tasks. One critical challenge is how to effectively utilize interactions between the QA context and KG. However, existing work only adopts the identical QA context representation to interact with multiple layers of KG, which results in a restricted interaction. In this paper, we propose DRLK (Dynamic Hierarchical Reasoning with Language Model and Knowledge Graphs), a novel model that utilizes dynamic hierarchical interactions between the QA context and KG for reasoning. DRLK extracts dynamic hierarchical features in the QA context, and performs inter-layer and intra-layer interactions on each iteration, allowing the KG representation to be grounded with the hierarchical features of the QA context. We conduct extensive experiments on four benchmark datasets in medical QA and commonsense reasoning. The experimental results demonstrate that DRLK achieves state-of-the-art performances on two benchmark datasets and performs competitively on the others.

## introduction question answering (qa) system is a hot research area in natural language processing, requiring the robot to clearly understand the scenario described in the question and then reason with relevant domain knowledge @xcite . recently, largescale pre-trained language models (lms) @xcite have become a popular solution in several qa datasets @xcite , achieving excellent performance. by training on an ultra large-scale corpus, lms learn the latent domain knowledge and perform well in downstream tasks through fine-tuning @xcite q a man presents it n rashes on face and also complains of decreased mental function. he is also having few macular lesions on his skin. on ct scan, intracranial calcification was seen. his 6-year old son is also having similar skin lesions. what would be the most likely diagnosis? where the correct answer is indicated in bold. @xcite . however, fine-tuned lms perform poorly when downstream tasks involve complex reasoning or require explicit knowledge. the fine-tuned approach relies on similar task patterns and sample forms, while black-box models result in uninterpretable behavior @xcite . one research topic is to introduce external knowledge graphs (kgs) for effective and interpretable joint reasoning. large-scale kgs, such as umls @xcite and drugbank @xcite , explicitly define structured knowledge through triples, entities, and relations. existing work @xcite demonstrates that kgs perform well in reasoning tasks involving knowledge. however, the question in qa task is always in natural language rather than a structured and logical query. the inevitable challenge is to constrain and integrate the structured kg according to the question, so as to extend the reasoning advantage to qa. furthermore, well-designed graph neural networks (gnns) @xcite @xcite are employed for structured knowledge processing. related approaches follow a two-stage paradigm @xcite : retrieval and modeling. first, researchers construct the knowledge subgraph by retrieving triples relevant to question via character matching or entity recognition. fig. 1 shows an example of knowledge subgraph, where "cerebral calcification" and "macular lesions" are core entities in the question. then, designed gnn modules are utilized to constrain the knowledge subgraph and perform inference. structured inference paths are contained in multi-hop relations in the subgraph. however, these methods only focus on isolated modeling of multi-hop relationships in kg. they only interact in a shallow manner, fusing the qa context and kg representations on the output layer or enhancing kg representations by the qa context statically @xcite . consequently, these methods demonstrate limited ability to exchange useful information. effective interaction, especially in a non-shallow way between kg and qa context, is critical to breaking the bottleneck of correctly understanding the complex knowledge relationships in the question. according to the above consideration, we propose drlk, a novel model that utilizes hierarchical interactions between qa context and kg for reasoning (see in fig. 2 ). drlk extracts dynamic hierarchical features in the qa context, and performs inter-layer and intra-layer interactions on each iteration, allowing kg representations to be grounded with the hierarchical features of the qa context. specifically, we design the hierarchical awareness module and the heterogeneous relationship module for dynamic hierarchical interactions. the former extracts hierarchical features of the qa context and kg, while the latter performs the message passing mechanism on the heterogeneous relational network to update the kg. drlk employs dynamic hierarchical interactions between the qa context and kg via inter-layer and intra-layer interactions, accomplishing correct reasoning via an iterative execution of above interactions. in summary, our contributions are three-fold: ## related work integrating kg has become a hot research topic for enhancing qa systems. due to the formal heterogeneity between structured knowledge and natural language, some work @xcite unifies two description forms during input, such as transforming structure knowledge into text via templates or grammar. these methods use plms as an encoder to perform end-to-end inference on kg and qa context. such formal transformations inevitably lose the original formal characteristics. other work @xcite models structure knowledge with gnn and integrates them at the embedding representation level. wang et al. (2019a) directly integrate the graphical representation and context of knowledge via the twin-tower model. lin et al. (2019) enhance qa context through the kg representation. in contrast, feng et al. ( 2020 ) augment the reasoning of kg by the qa context, which is usually static. among these methods, enhancing kg with the qa context has the highest ceiling and is now the most popular method. however, in these methods, there is no interaction between two representations or only limited interaction with a static representation. although such methods can model two representations separately, the shallow interaction limits the extraction of effective features. our proposed approach drlk improves mainly on this point. additionally, plms show excellent performance on qa tasks, such as fine-tuning @xcite and prompt learning @xcite . these methods do not require extra knowledge, but they are limited by the reasoning capability of plm. other researchers propose integrating the advantages of lm and kg for joint reasoning. qa-gnn @xcite proposes to consider the the l-th layer of hierarchical awareness module the l-th layer of heterogeneous relational module answer prediction language model encoder [cls] question [sep] candidate answer [sep] feature extract hierarchical interaction … plausibility score mask pooling … fc fc softmax mlp hierarchical awareness module heterogeneous relational module inter-layer intra-layer embedding embedding lm encoder lm encoder mlp node norm norm … relation … node relation aggr mlp qa context kg c qa context as a node directly connected to kg, and update the representation of both the context and the node through the message passing mechanism of the graph. however, the qa context focuses on one node, limiting the deep interaction between lm and gnn. greaselm @xcite and jointjk @xcite are further extensions of qa-gnn to enhance the interaction while retaining the individual structure of both models. greaselm mixes lm and gnn node representations in the transformer module to achieve communication between the two modes. jointjk considers fine-grained interactions between tokens in the question and entities in kg via intensive bi-directional attention. in contrast to previous work, we focus on the cascading features of the qa context and kg, and update the qa context representation by a designed hierarchical feature extraction. for the interaction between them, we consider both before and inside the gnn layer for hierarchical features. in addition, we preserve the heterogeneous relational network and assess the interaction of heterogeneous relations with the qa context, making the structured inference paths interpretable. ## experiments setup all experiments are conducted on one gpu (rtx-8000-48gb). the framework of our code relies on the pytorch foot_0 and transformer foot_1 packages. ## conclusion and future work in this paper, we propose a novel model that enables accurate reasoning through a hierarchical interaction between the qa context and kg. compared to the fine-tuning based lm and kgenhanced methods, drlk achieves sota performances on two medical qa benchmark datasets. on commonsense reasoning benchmark datasets, drlk performs competitively. experimental results show that dynamic hierarchical interactions achieve superiority in dealing with complex knowledge relationships. in addition, the results on different domains show that drlk possesses generalizations for the question answering task.