Autoregressive Entity Generation for End-to-End Task-Oriented Dialog (2022)

Abstract: Task-oriented dialog (TOD) systems are often required to interact with an external knowledge base (KB) to retrieve necessary entity (e.g., restaurants) information to support their response generation. Most current end-to-end TOD systems either retrieve the KB information explicitly or embed it into model parameters for implicit access. While the first approach demands scanning the KB at each turn of response generation, which is inefficient when the KB scales up, the second approach shows higher flexibility and efficiency. In either approach, the response shall contain attributes of the same entity, however the systems may generate a response with conflicting entities. To address this, we propose to generate the entity autoregressively before leveraging it to guide the response generation in an end-to-end system. To ensure entity consistency, we impose a trie constraint on the decoding of an entity. We also introduce a logit concatenation strategy to facilitate gradient backpropagation for end-to-end training. Experiments on MultiWOZ 2.1 single and CAMREST show that our system can generate more high-quality and entity-consistent responses in an end-to-end manner.

## introduction task-oriented dialog (tod) systems @xcite have become prominent and drawn much attention from both academia and industries. their mission is to help users accomplish specific tasks such as booking restaurants and reserving hotels through natural language conversations, where an external knowledge base (kb) is usually needed to support the generation of a system response. for example, when trying to recommend a restaurant, they will retrieve its address from the kb and generate a response. many recent state-of-the-art tod systems @xcite @xcite take a pipeline route that decomposes the task into modules that rely on intermediate annotations such as belief state and dialog act for hi, there. have you heard of a hotel called warkworth house? yes. i have the warkworth house guest house on warkworth terrace, which is the east section of the city. can i help make a reservation for you? there are mainly two approaches to eliminating the reliance on intermediate annotations and generating system response in an end-to-end manner. first, entity information in the kb can be accessed by soft attention @xcite @xcite . to this end, a memory network is usually used to encode the kb, and attention and pointer are then utilized to retrieve entity information from the memory. these attentionbased methods tend to become cumbersome when the kb scales up. second, the kb information can be stored in model parameters to avoid direct in-teraction with the kb during response generation @xcite . this is partly motivated by the observation that pre-trained models such as bert @xcite can carry certain relational and factual knowledge @xcite . to embed the kb into model parameters, this approach first augments the original training set with kb entries and then encodes the training samples with a powerful encoder. despite the success in end-to-end tod systems, one of the remaining problems is entity inconsistency during response generation @xcite , which means that the systems usually generate conflicting entity information in system responses. for example, they may generate a response "gourmet kitchen is an italian restaurant" while gourmet kitchen is actually a north american restaurant. in this work, we aim to address this issue more scalably in our end-to-end tod system. following gpt-ke @xcite , we first insert the kb into natural language dialogs by data augmentation, so that the kb can be embedded into model parameters whose size does not scale with the kb. then, we predict the entity that will appear in the response autoregressively. to avoid generating an inconsistent entity, we impose a trie constraint on the decoding to ensure that the generated entity truly belongs to the kb. the generated entity is taken as an extra input to generate an entityconsistent system response. besides, since tokens in the entity are integers, which hinders gradient backpropagation, we propose logit concatenation to allow for end-to-end training. we evaluate our system on multiwoz 2.1 single @xcite and camrest @xcite , which are two task-oriented dialog benchmarks widely used in the literature. experimental results show that it compares favorably with all the baselines. particularly, it outperforms gpt-ke, a strong end-to-end tod system that we follow, by a large margin. by ablation studies, we demonstrate that autoregressive entity generation assists in producing entity-consistent system responses in an end-to-end manner. to our best knowledge, this is the first work that attempts to alleviate the entity inconsistency problem in tod systems by generating the entity first and taking it as an input for response generation. the system can be trained end-to-end without accessing external kbs during response generation. ## related work end-to-end task-oriented dialog systems have drawn increasing attention in recent years. in one line of work, researchers propose to train the modules of a pipeline system jointly in an end-to-end framework, though they still require intermediate annotations for supervision. among these works, simpletod (hosseini-asl et al., 2020), soloist @xcite , and ubar @xcite attempt to concatenate the dialog history, user utterance, belief state, dialog act, and system response into a long sequence, which is then modeled by a sequence-to-sequence generation model. hyknow @xcite extends the belief state to handle both structured and unstructured knowledge and trains the dialog state tracking and response generation modules jointly. nevertheless, these systems are not the end-to-end solutions we pursue in this work since they still need intermediate annotations. there are mainly two approaches to implementing intermediate annotations free end-to-end tod systems. first, entity information in the kb can be accessed by soft attention. mem2seq @xcite combines the ideas of multi-hop attention over memory and a pointer network to incorporate kb information. @xcite proposed to compute a dialogue state representation from the dialog history and use it to interact with kb representations to retrieve entity information for response generation. glmp @xcite encodes the representations of dialog history and structural kb with a memory network and then passes the result to a decoder for response generation. df-net @xcite includes a dynamic fusion module to generate a fused representation that explicitly captures the correlation between domains and uses it to query the kb. when the kb scales up, however, attention-based methods become less efficient. second, the kb information can be stored in model parameters to avoid further interaction with the kb during response generation. the motivation comes from the observation that pre-trained language models such as bert @xcite and t5 @xcite can already carry certain relational and factual knowledge @xcite . gpt-ke @xcite is the seminal dialog system towards this goal. it first augments the training set with kb entries and then learns a response generation model from the augmented set in an end-to-end fashion, thus abandoning the kb during response generation. shared encoder entity decoder shared encoder response decoder context utterance entity entity response entity generation response generation trie constraint logitconcat … … … … … … … … … … figure 2: the architecture of our eco system. the entity generation module takes the context and user utterance as input and generates a relevant entity. the response generation module takes the context, user utterance, and the generated entity as input to generate a system response. the two modules share the same encoder but have separate decoders. a trie constraint is imposed when generating the entity, and logitconcat is proposed to facilitate end-to-end optimization. ## methodology as shown in figure 2 , our entity-consistent endto-end (eco) task-oriented dialog system begins by embedding the kb into training dialogs ( §3.2). following gpt-ke @xcite , we augment the original training set with kb entries and abandon the kb afterward. unlike gpt-ke, which conducts data augmentation in data pre-processing before training, eco conducts augmentation for each batch of training samples, which reduces the size of augmented training samples while maintaining high coverage of the kb. we then predict the entity ( §3.3) that will appear in the response and incorporate it into response generation ( §3.4) to ensure entity consistency, where logitconcat is proposed to facilitate end-to-end optimization. ## conclusion we proposed an end-to-end task-oriented dialog system by encoding external knowledge into model parameters. to address entity inconsistency in system responses, we proposed to generate the entities first and took them as input to response generation. to ensure the generated entities are valid, a trie constraint was imposed on the generation, and a logit concatenation strategy was introduced to facilitate backpropagation for end-to-end training. experiments demonstrate that this system can produce more high-quality and entity-consistent responses in an end-to-end manner. for future work, we will extend this system to handle multiple entities that are involved in each turn of conversation.