Insert Commonsense Knowledge Through Semantics for Dialogue Generation
摘要
Language models such as GPT and BART have been widely applied to various language generation tasks, including dialogue generation. While some works have improved the generation performance of these models by incorporating external knowledge, the effective extraction of valuable knowledge from diverse sources and its incorporation into generation models require further investigation. To tackle this problem, we propose a method called Knowledge-enhanced Multi-turn Dialogue Model (KMDM) to extract commonsense knowledge from external knowledge graphs and inject the knowledge into the encoding and decoding processes globally and locally. We first extract sub-graphs according to the semantic correlations with contexts. Then we add a hierarchical graph attention layer to the decoder in order to acquire local information from sub-graphs. Experiments conducted on Wizard of Wikipedia and DailyDialog show the effectiveness of the proposed method.