Simulated Chats for Building Dialog Systems: Learning to Generate Conversations from Instructions (2021)

Abstract: Popular dialog datasets such as MultiWOZ are created by providing crowd workers an instruction, expressed in natural language, that describes the task to be accomplished. Crowd workers play the role of a user and an agent to generate dialogs to accomplish tasks involving booking restaurant tables, calling a taxi etc. In this paper, we present a data creation strategy that uses the pre-trained language model, GPT2, to simulate the interaction between crowd workers by creating a user bot and an agent bot. We train the simulators using a smaller percentage of actual crowd-generated conversations and their corresponding instructions. We demonstrate that by using the simulated data, we achieve significant improvements in low-resource settings on two publicly available datasets - MultiWOZ dataset and the Persona chat dataset.

## introduction building dialog systems typically requires a large collection of conversation logs for training models. there exists a scarcity of the data required to train a dialog system for most tasks. various methods have been proposed to tackle this issue including paraphrase techniques to generate artificial training data @xcite , generating annotations including intent-slots and dialog acts @xcite or even injecting noise to improve robustness in dialog act prediction for asr data @xcite . crowd-sourcing is a popular method for generating new large datasets. for instance, to create datasets for task oriented dialogs, crowd workers may be provided with instructions that describes the task; workers then play the roles of a user and an agent to generate conversations @xcite figure 1 : an instruction from the multiwoz dialog corpus @xcite and the corresponding conversation generated by real crowd-sourced workers and crowd-worker simulators. @xcite . the user worker begins the conversation by stating their requirement and the agent worker provides information to the user by querying a knowledge base (kb), if required. together, both workers interact with each other via natural language to generate conversations. similarly in persona chat @xcite , the workers are provided different personalities to role play conversations. however, creating large crowd-sourced datasets can be time consuming and expensive. pre-trained transformer-based language models such as gpt-2 @xcite , that are trained on a large number of documents crawled from the web have achieved extensive generalization in natural language understanding and generation across a variety of diverse tasks @xcite @xcite , 2019). recent works have exploited the prior knowledge in these models to train effective models for machine translation @xcite , language understanding in low resource settings @xcite and few-shot language models @xcite . in this paper we demonstrate how such large pre-trained models can also be used to follow instructions and generate conversations. we create a user simulator and an agent simulator. the user simulator has access to the instructions while the agent simulator has access to a knowledge base (kb). the agent simulator maps the current dialog context to a belief state (query), that can be executed over a knowledge base (kb), to retrieve a set of results if required. thus, the simulators are trained to interact with each other to generate conversations conditioned on the instructions and the kb. in our work we train these simulators using just 5-20% of crowd-sourced conversations by fine-tuning the pre-trained language models -gpt2 @xcite and longformer @xcite . we use the external knowledge present in these language models to help generate effective artificial data on low-resourced datasets. an example of a generated conversation is shown in figure 1 . our experiments further show that from a small number of existing conversations we are able to train meaningful user and agent bots that in-turn generate new conversations. this in principle, is somewhat similar to a noisy student-teacher model @xcite where a weaker teacher model is used to generate labels(dialogs in our case) which is then used to train a new student model that significantly outperforms the teacher model in end task. due to its simplicity and generality, our model could be used on a wide variety of dialog systems by taking different forms of instructions. contributions: (1) we present a novel technique that effectively uses weak generative models to create new artificial data which are used to train final end task models (2) we introduce a simple yet effective dialog-generation framework foot_0 that mimics the roles played by crowd workers to generate complete conversations. (3) we demonstrate the generality of our model by generating data for two different types of dialog tasks -task oriented conversations and persona-guided conversations. we show that pre-trained language models can be successfully used for generating artificial data in low resource dialog settings leading to a 7-13% improvement in combined score in multiwoz 2.0 and 2-10% improvement in hits@1 metric in persona chat. (4) we present a human-study to assess the quality of our simulated dialogs. we find that the generated conversations are grammatically sound and meaningfully move the conversations forward. ## related work the method of interacting different models to converse with each other has seen some recent successes @xcite . @xcite has previously used simulators to generate conversational artificial data. however the work uses hand-crafted templates for generating dialogs. our approach is more general and less cumbersome as demonstrated through the effectiveness of our approach on two different tasks. @xcite tries to use a similar simulator approach but uses human in the loop in order to bring variations to the dialogs. on the other hand, our approach doesn't require any human involvement apart from providing diverse instructions which are easy to produce in large quantities. unlike existing data augmentation methods, like those based on paraphrase generation (malandrakis et al., 2019; gao et al., 2020 teacher model has been used to train student models, based on the idea of knowledge distillation @xcite , teach dynamic loss functions @xcite or for adaptation under metalearning settings @xcite . to the best of our knowledge, we are the first to adopt such a model for data generation in dialog systems. ## model in order to generate the data, we train our gpt-2 based agent and user bots(teacher models) using a subset of original data to simulate low-resource environment(5% or 20%). in case of task oriented dialogs, we require a third model for generating belief states as well. longformer based selector models are trained to chose from a list of responses generated by the teacher generator models as seen in figure 2 . note that all the modules in figure (shown in green) also receive dialog history as input which has not been shown in the figure for ease of presentation. finally the generated data from the process is mixed with the original low resourced data to create a new dataset. to test the effectiveness of new dataset, we compare the performance of newly trained student model on the new data to that of the teacher model and other baseline models on the respective end tasks of the datasets. ## conclusion in this paper, we demonstrated a dialog generation framework that mimics the data creation process employed by crowd workers. we find that our method is able to generate meaningful conversations that aids the training of end-task dialog models in low resource data settings. the use of additional simulated data to train end-task dialog models result in a performance improvement of 7-13% in low resource settings of multiwoz 2.0 dataset and 2-10% increase in hits@1 in case of personachat. the simulation-framework does not make strict assumptions about the domain or dataset and can be applied to diverse dialog tasks such as task-oriented dialog and persona-based chat. in future, it would be interesting to compare the strengths of different augmentation methods and how they may be effectively combined.