Syntax Controlled Knowledge Graph-to-Text Generation with Order and Semantic Consistency (2022)

Abstract: The knowledge graph (KG) stores a large amount of structural knowledge, while it is not easy for direct human understanding. Knowledge graph-to-text (KG-to-text) generation aims to generate easy-to-understand sentences from the KG, and at the same time, maintains semantic consistency between generated sentences and the KG. Existing KG-to-text generation methods phrase this task as a sequence-to-sequence generation task with linearized KG as input and consider the consistency issue of the generated texts and KG through a simple selection between decoded sentence word and KG node word at each time step. However, the linearized KG order is obtained through a heuristic search without data-driven optimization. In this paper, we optimize the knowledge description order prediction under the order supervision extracted from the caption and further enhance the consistency of the generated sentences and KG through syntactic and semantic regularization. We incorporate the Part-of-Speech (POS) syntactic tags to constrain the positions to copy words from the KG and employ a semantic context scoring function to evaluate the semantic fitness for each word in its local context when decoding each word in the generated sentence. Extensive experiments are conducted on two datasets, WebNLG and DART, and achieve state-of-the-art performances. Our code is now public available.

## introduction knowledge graphs (kgs) record the common sense knowledge in a structural way and have many potential applications, e.g., question answering @xcite , recommendation system @xcite and storytelling @xcite . one typical kg is shown in figure 1 , with circle nodes indicating entities, and the directional edges connecting the head node to the tail node and representing the relation among connected entities. this figure 1 : one example kg from dart dataset @xcite . awh is short for awh engineering college. text a) is the ground-truth sentence, text b) is the pos sequence obtained by nltk, and most words copied from the kg are nouns. the linearized order of kg should correlate with the information sequence expressed in the corresponding sentence (words indicated in bold in gt sentence), and each decoded word should fit in its local semantic context (e.g. the blue dashed lines). also, most existing methods @xcite maintain the word authenticity by maximizing the copy probability of the tokens from the kg, while ignoring the syntactic correctness and semantic relevance. a simple observation from the example in figure 1 , you can find that the pos tags of most words copied from the kg are nouns. motivated by this observation, we introduce a pos generator to guide the sentence generation process by applying the pos information as additional supervision at each time step and limit the position scope of the word selection from kg. moreover, to further enhance semantic relevance of generated sentence, we consider the structural information and local semantic information of the kg by designing a semantic context scoring function with sliding windows of different sizes, and combine the semantic context score into the word selection process at each time step of the sentence generation. in summary, we propose a syntax controlled kgto-text generation model with order and semantic consistency, called s-osc. the main contributions are summarized as follows: ## approaches in this section, we first formulate the kg-to-text generation problem setting and then elaborate the proposed s-osc in detail. ## conclusion this paper proposes a learning-based sorting network to obtain the optimal description order for kg-to-text generation. additionally, our model incorporates pos generator and semantic context scoring to selectively copy words from kg and improve the word authenticity in generated sentences. extensive experiments show that our model outperforms previous state-of-the-art approaches. in the future, we will introduce casual inference into the model to further improve the reasoning ability.