Learning Neural Templates for Recommender Dialogue System (2021)

Abstract: The task of Conversational Recommendation System (CRS), i.e., recommender dialog system, aims to recommend precise items to users through natural language interactions. Though recent end-to-end neural models have shown promising progress on this task, two key challenges still remain. First, the recommended items cannot be always incorporated into the generated response precisely and appropriately. Second, only the items mentioned in the training corpus have a chance to be recommended in the conversation. To tackle these challenges, we introduce a novel framework called NTRD for recommender dialogue system that can decouple the dialogue generation from the item recommendation. NTRD has two key components, i.e., response template generator and item selector. The former adopts an encoder-decoder model to generate a response template with slot locations tied to target items, while the latter fills in slot locations with the proper items using a sufficient attention mechanism. Our approach combines the strengths of both classical slot filling approaches (that are generally controllable) and modern neural NLG approaches (that are generally more natural and accurate). Extensive experiments on the benchmark ReDial show our approach significantly outperforms the previous state-of-the-art methods. Besides, our approach has the unique advantage to produce novel items that do not appear in the training set of dialogue corpus. The code is available at https://github.com/jokieleung/NTRD .

## introduction building an intelligent dialogue system that can freely converse with human, and fulfill complex tasks like movie recommendation, travel planning and etc, has been one of longest standing goals of natural language processing (nlp) and artificial intelligence (ai). thanks to the breakthrough in deep learning, the progress on dialogue system has been greatly advanced and brought into a new frontier over the past few years. nowadays, we are witnessing the booming of virtual assistants with conversational user interface like microsoft cortana, apple siri, amazon alexa and google assistant. the recent large-scale dialogue models such as dialogpt @xcite , meena @xcite and blender @xcite , demonstrate the impressive performance in practice. besides, the social bots such as xi-aoice @xcite and personachat @xcite also exhibit the great potential on the emotional companion to humans. the conversational techniques shed a new light on the search and recommender system, as the users can seek information through interactive dialogues with the system. traditional recommender systems often rely on matrix factorization methods @xcite @xcite , and suffer from the coldstart problem @xcite when no prior knowledge about users is available. on the other hand, existing recommendation models are trained on offline historical data and have the inherent limitation in capturing online user behaviors @xcite . however, the user preference is dynamic and often change with time. for instance, a user who usually prefers science fiction movies but is in the mood for comedies, would likely get a failed recommendation. in recent years, there is an emerging trend towards building the recommender dialogue system, i.e., conversational recommendation system (crs), which aims to recommend precise items to users through natural conversations. existing works @xcite @xcite on this line usually consist of two major components, namely a recommender module and a dialogue module. the recommender module aims at retrieving a subset of items that meet the user's interest from the item pool by conversation history, while the dialogue module generates free-form natural responses to proactively seek user preference, chat with users, and provide the recommendation. to incorporate the recommended items into the responses, a switching network @xcite or copy mechanism @xcite is utilized by these methods to control whether to generate an ordinal word or an item at each time step. such integration strategies cannot always incorporate the recommended items into generated replies precisely and appropriately. besides, current approaches do not consider the generalization ability of the model. hence, only the items mentioned in the training corpus have a chance of being recommended in the conversation. in this paper, we propose to learn neural templates for recommender dialogue system, i.e., ntrd. ntrd is a neural approach that firstly generates a response "template" with slot locations explicitly tied to the recommended items. these slots are then filled in with proper items by an item selector, which fully fuses the information from dialogue context, generated template and candidate items via the sufficient multi-head self-attention layers. the entire architecture (response template generator and item selector) is trained in an endto-end manner. our approach combines the advantages of both classical slot filling approaches (that are generally controllable) and modern neural nlg approaches (that are generally more natural and accurate), which brings both naturally sounded responses and more flexible item recommendation. another unique advantage of our ntrd lies in its zero-shot capability that can adapt with a regularly updated recommender system. once a slotted response template is generated by the template generator, different recommender systems could be plugged into the item selector easily to fill in the slots with proper items. thus, ntrd can produce the diverse natural responses with the items recommended by different recommenders. the contributions of this work are summarized as follows: (1) we present a novel framework called ntrd for recommender dialogue system, which decouples the response generation from the item recommendation via a two-stage strategy; (2) our ntrd first generates a response template that contains a mix of contextual words and slot locations explicitly associated with target items, and then fills in the slots with precise items by an item selector using a sufficient attention mechanism; (3) extensive experiments on standard dataset demonstrate our ntrd significantly outperforms previous state-of-the-art methods on both automatic metrics and human evaluation. besides, ntrd also exhibits the promising generalization ability on novel items that do not exist in training corpus. ## related work in this section, we first introduce the related work on task-oriented dialogue system. then we review the existing literature on conversational recommender systems (crs), which can be roughly divided into two categories, i.e., attribute-centric crs and open-ended crs. ## preliminary formally, a dialogue consisting of t-turn conversation utterances is denoted as @xmath0. let m denotes an item from the total item set m, and w denotes a word from vocabulary v. at the tth turn, the recommender module chooses several candidate items m t from the item set m, while the dialogue module generates a natural language sentence s t containing a proper item i from m t to make recommendations. it is noteworthy that m t can be equal to ∅ when there is no need for recommendation. in that case, the dialogue module could continue to generate a chit-chat response or proactively explore the user's interests by asking questions. to incorporate the recommended items into the generated reply, a switching mechanism @xcite or copynet @xcite is usually utilized to control the decoder to decide whether it should generate a word from the vocabulary or an item from the recommender output. specifically, the recommender predicts the probability distribution over the item set as p rec , and the dialogue module predicts the probability distribution over vocabulary as p @xmath1. the overall probability of generating the next token is calculated as follows: ## method in this section, we present the framework of learning neural templates for recommender dialogue system, called ntrd. as shown in figure 1 , ntrd mainly consists of three components: a recommendation-aware response template generator, a context-aware item selector and a knowledge graph (kg) based recommender. given the dialogue context, the encoder-decoder based template generator focuses on generating the response template with item slots (section 4.1). then the blank slots are filled by the item selector according to the dialogue context, candidate items from the recommender module and the generated response template (section 4.2). finally, the entire framework is trained in an end-to-end manner (section 4.3). dialogue history slotted response template (e.g., "oh, i get it. you should check out [item], it's romantic and funny.") item selector item set final response (e.g., "oh, i get it. you should check out the big sick, it's romantic and funny.") dialogue template generator seq2seq module (a) baseline (b) ours dialogue history switching network response recommender system knowledge graph r-gcn dialogue system seq2seq module recommender system knowledge graph r-gcn ## conclusions in this paper, we introduce ntrd, a novel recommender dialogue framework that decouples the dialogue generation from the item recommendation via a two-stage strategy. our approach reconciles classical slot filling approaches with modern neural nlg approaches, which make the recommender dialogue system more flexible and controllable. besides, our approach exhibits the promising generalization ability to recommend novel items that do not appear in the training corpus. extensive experiments show our approach significantly outperforms the previous state-of-the-art methods. for future work, the generalization ability of ntrd could be further explored. current method only supports one placeholder with broad semantics to represent all the item mentions in the dialogue corpus, which is lack of fine-grained annotation. one possible attempt is to extend it to support fine-grained item placeholders, such as replacing the placeholder with different attributes of the items, to further improve its performance.