Bi-Directional Multi-Granularity Generation Framework for Knowledge Graph-to-Text with Large Language Model (2024)

Abstract: The knowledge graph-to-text (KG-to-text) generation task aims to synthesize coherent and engaging sentences that accurately convey the complex information derived from an input knowledge graph. Existing methods generate the whole target text based on all KG triples at once and may incorporate incorrect KG triples for each sentence. To this end, we propose the bi-directional multi-granularity generation framework. Instead of generating the whole text at a time, we construct the sentence level generation based on the corresponding triples and generate the graph-level text as a result. Moreover, we design a backward relation extraction task to enhance the correctness of relational information. Our method achieves the new state-of-the-art in benchmark dataset WebNLG and further analysis shows the efficiency of different modules.

## introduction knowledge graph (kg) is a structured data representation form that contains rich knowledge information and is more convenient for processes such as information retrieval and reasoning. although kgs facilitate computational processes, it is difficult for humans to intuitively understand the content in kgs, so the proposed kg-to-text generation task aims to produce correct descriptive text for the input kg. kg-to-text has various applications, like question-and-answer @xcite and dialogue systems @xcite . moreover, with the population of large language models (llm), kg-to-text plays an important role in transforming structured knowledge into texts to alleviate hallucination in llms @xcite . recent works insert extra graph modules into pretrained language model (ptm) and decode the whole target text based on all kg triples in one round @xcite . with the size of kg growing, the full generation enlarges and there are multiple sentences to describe the kg with different sentences describing different aspects. however, the model may incorporate incorrect kg triples to generate the current sentence, which undermines the overall generation. aarhus university in denmark is affiliated with the european university association, which has its hq in brussels. denmark has a monarch; its religion is the church of denmark and its leader is lars rasmussen. lars rasmussen denmark church_of_denmark monarchy of denmark aarhus university european university association brussels leader name headquarters leader title religion country affiliation aarhus university in denmark is affiliated with the european university association. denmark has a monarch which has its hq in brussels; its religion is the church of denmark and it is led by lars rasmussen. correct incorrect figure 1: one example from webnlg dataset. there are 6 triples in this kg to generate the text: <denmark ,leader title, monarchy of denmark>; <denmark, religion, church of denmark>; <denmark, leader name, lars rasmussen>; <aarhus university, country, den-mark>; <aarhus university, affiliation, european university association>; <european university association, headquarters, brussels>. the "incorrect" denotes the incorrect generation of baseline model. we take an example in webnlg dataset @xcite in figure 1 . there are 6 triples in the kg and the target generation contains two sentences: "aarhus university in denmark is affiliated with the european university association, which has its hq in brussels." and "denmark has a monarch; its religion is the church of denmark and its leader is lars rasmussen.". the first sentence describes "aarhus university" and its affiliation "european university association". the second sentence describes the political and religious information of "denmark", so it should be generated based on the 3 triples including "<denmark ,leader title, monarchy of @xmath0; "<denmark, religion, church of @xmath1; "<denmark, leader name, lars @xmath2. the baseline model misunderstands the triple "<aarhus university, affiliation, european university @xmath3. to enhance the fine-grained information of each sentence generated by the model, we propose our bi-directional multi-granularity generation framework (bdmg). instead of generating the whole text at a time, we construct the sentence-level generation based on the corresponding triples and generate the graph-level text as a result. first, we prompt the model to find the subset of triples in kg which are needed for the current sentence. then the model generate the current text based on these triples. finally the model aggregates the sentencelevel generation into the final result. moreover, we design a backward relation-extraction (re) task to enhance the correctness of relational information. specifically, we randomly choose a number of triples in kg and ask the model to infer the relations between the head and tail entities. the model is jointly optimized by the two tasks. we conduct experiments on the benchmark dataset in kg-to-text task, webnlg, and derives the new state-of-the-art (sota), which shows the efficiency of our bi-directional multi-granularity generation framework. further experiments demonstrate the importance of step by step sentence-level generation and backward relation extraction to the kb-to-text task. we conclude our contributions as follows: 1. we propose the bi-directional multi-granularity generation framework, where the model generates the sentence-level information at first and aggregate into generating the kg-level text. 2. we design the backward relation extraction task into enhancing the relational information of triples in kg, which improves the overall performance of generating text from kg triples. 3. we conduct experiments on the benchmark dataset webnlg and achieves the new sota. ## methodology in this part, first we introduce the task of kg-to-text, then we introduce our bdmg approach. our method includes two modules: forward sequential sentence-level generation and backward relation extraction. the forward generation process absorbs the thought of divide-and-conquer algorithm @xcite . we ask the llm to decide the triple subset which should be generated in current sentence, and merge the generation result of different subsets into the full generation of kg.