History Semantic Graph Enhanced Conversational KBQA with Temporal Information Modeling (2023)

Abstract: Context information modeling is an important task in conversational KBQA. However, existing methods usually assume the independence of utterances and model them in isolation. In this paper, we propose a History Semantic Graph Enhanced KBQA model (HSGE) that is able to effectively model long-range semantic dependencies in conversation history while maintaining low computational cost. The framework incorporates a context-aware encoder, which employs a dynamic memory decay mechanism and models context at different levels of granularity. We evaluate HSGE on a widely used benchmark dataset for complex sequential question answering. Experimental results demonstrate that it outperforms existing baselines averaged on all question types.

## introduction in recent years, with the development of large-scale knowledge base (kb) like dbpedia @xcite and freebase @xcite , knowledge base question answering (kbqa) @xcite @xcite @xcite has become a popular research topic, which aims to convert a natural language question to a query over a knowledge graph to retrieve the correct answer. with the increasing popularity of ai-driven assistants (e.g., siri, alexa and cortana), research focus has shifted towards conversational kbqa @xcite @xcite ) that involves multi-turn dialogues. a common solution to the task of conversational kbqa is to map an utterance to a logical form using semantic parsing approach @xcite . the state-of-the-art semantic parsing approach @xcite breaks down the process into two stages: a logical form is first generated by low-level features and then the missing details are filled by taking both the question and templates into consideration. other approaches @xcite @xcite mainly focus on first detecting entities in the question and then mapping the question to a logical form. despite the inspiring results of the semantic parsing methods mentioned above, most of them fail to model the long-range semantic dependency in conversation history. specifically, they usually directly incorporate immediate two turns of conversations and ignore the conversation history two turns away. to demonstrate the importance of long-range conversation history, figure 1 shows an example illustrating the task of conversational kbqa. after the question "who is the president of the united states", the user consecutively proposes three questions that involve coreference and ellipsis phenomena @xcite . only when the system understands the complete conversation history can the system successfully predict the answer. though existing contextual semantic parsing models @xcite @xcite can be used to model conversation history, a survey @xcite points out that their performance is not as good as simply concatenating the conversation history, which is the most common conversation history modeling technique. to tackle the issues mentioned above, we pro-pose a history semantic graph enhanced conversational kbqa model (hsge) for conversation history modeling. specifically, we convert the logical forms of previous turns into history semantic graphs, whose nodes are the entities mentioned in the conversation history and edges are the relations between them. by applying graph neural network on the history semantic graph, the model can capture the complex interaction between the entities and improve its understanding of the conversation history. from the perspective of practice, using the history semantic graph to represent the conversation history is also more computationally efficient than directly concatenating the conversation history. besides, we design a context-aware encoder that addresses user's conversation focus shift phenomenon @xcite by introducing temporal embedding and allows the model to incorporate information from the history semantic graph at both token-level and utterance-level. to summarize, our major contributions are: ## related work the works most related to ours are those investigating semantic parsing-based approaches in conversational kbqa. given a natural language question, traditional semantic-parsing methods @xcite usually learn a lexicon-based parser and a scoring function to produce a logical form. for instance, @xcite propose to learn a context-independent ccg parser and @xcite utilizes a shift-reduce parser for logical form construction. recently, neural semantic parsing approaches are gaining attention with the development of deep learning @xcite . for example, @xcite introduces a neural symbolic machine (nsm) extended with a keyvalue memory network. @xcite proposes d2a, a neural symbolic model with memory augmentation. s2a+maml @xcite extends d2a with a meta-learning strategy to account for context. @xcite proposes the first multi-task learning framework masp that simultaneously learns type-aware entity detection and pointer-equipped logical form generation. @xcite introduces carton which utilizes pointer networks to specify the kg items. @xcite proposes a graph attention network to exploit correlations between entity types and predicates. @xcite proposes to use kg contextual data for semantic augmentation. while these methods have demonstrated promising results, they typically only consider the immediate two turns of conversations as input while neglecting the context two turns away. though @xcite introduces a dialog memory to maintain previously observed entities and predicates, it fails to capture their high-order interaction information. by introducing history semantic graph, our model hsge can not only memorize previously appeared entities and predicates but also model their interaction features using gnn to gain a deeper understanding of conversation history. ## method the structure of our proposed hsge model is illustrated in figure 2 . the model consists of six components: word embedding, transformerconv layer, context-aware encoder, entity recognition module, concept-aware attention module and grammar-guided decoder. ## conclusion in this paper, we propose a novel conversational kbqa method hsge, which achieves effective history modeling with minimal computational cost. we design a context-aware encoder that introduces temporal embedding to address user's conversation focus shift phenomenon and aggregate context information at both token-level and utterance-level. our proposed hsge outperforms existing baselines averaged on all question types on the widely used csqa dataset. action description @xmath0, p) set of subjects part of the triples with object e and predicate p @xmath1, p) set of objects part of the triples with subject e and predicate p @xmath2, tp) filter the given set of entities based on the given type @xmath3, set 2 ) filter the given set of entities based on the given set of types @xmath4, tp 1 , tp ) extracts a dictionary, where keys are entities of type 1 and values are the number of objects of type 2 related with p @xmath5, tp 1 , tp 2 ) extracts a dictionary, where keys are entities of type 1 and values are the number of subjects of type 2 related with p @xmath6, num) set of those entities that have lesser count than num @xmath7, num) set of those entities that have greater count than num @xmath8, num) set of those entities that have equal count with num @xmath9, num) set of those entities that have approximately same count with num @xmath10, num) set of those entities that have at most same count with num @xmath11, num) set of those entities that have at least same count with num @xmath12, set) check if the entity is part of the set @xmath13, set 2 ) union of set 1 and set 2 @xmath14, set 2 ) intersection of set 1 and set 2 @xmath15, set 2 ) difference of set 1 and set 2