Controllable Conversation Generation with Conversation Structures via Diffusion Models (2023)

Abstract: Generating coherent conversation is an important and challenging long text generation task, as it has various applications such as daily entertainment, children education or building conversational AI to facilitate human-computer interaction. However, current generation models often fail to effectively utilize rich linguistic and world knowledge to generate conversations just like human. In this work, we introduce a novel conversation generation framework to effectively incorporate human knowledge and conversation structures with both controllability and interpretability for better conversation generation. Specifically, we first generate the prototype conversations from short descriptions. We then gradually and strategically incorporate different levels of conversation structures including the action triples, dialogue acts and discourse relations via diffusion models to directly edit the prototype conversations. We demonstrate the effectiveness of our framework through experiments on two datasets by comparing our method with the state-of-the-art baseline models.

## introduction generating long-form and coherent text is an important step in many natural language generation (nlg) applications @xcite . while recent research has shown impressive progress in generating short texts, it is still challenging for generation models to write coherent long text which requires comprehensively incorporating linguistic and world knowledge @xcite . our work takes a closer look at long conversation generation @xcite , one of the most challenging long text generation tasks. the task is to generate an entire coherent conversation from a given short description, i.e., a summary, of it. conversation generation has various applications from daily entertainment, and story generation, to customer services. however, real human/human conversation logs are scarce; crowdsourcing conversational data is time-consuming, costly, and hard to ensure data quality @xcite . thus, better conversation generation models would allow us to generate massive natural conversational data more automatically and efficiently, which further helps build better conversational ai systems. even though there are a growing number of studies that focused on long text generation such as story generation @xcite @xcite using large pre-trained models @xcite , event planning @xcite @xcite and recursive revision @xcite , directly applying them to generate long conversation may not work well due to the inherent different structures between stories and conversations. for instance, previous long text generation usually focused on generating stories that talk about one single topic with five sentences to one paragraph. they are shorter compared to conversations, which usually cover multiple topics between different speakers (over ten turns) @xcite . furthermore, there are diverse discourse relations between different speakers @xcite , making it even more challenging to generate long and coherent conversations. while there is a line of work about dialogue generation, they are mainly concentrated on generating the next utterance autoregressively based on the given context @xcite @xcite @xcite with sequence-to-sequence models. such methods usually neglect the conversation structures @xcite , and thus might easily lose focus to produce long and coherent conversations after several rounds of generation @xcite . moreover, the formerly generated utterances could not be further edited to adapt the later generated utterances. it is also unclear whether and how these sequence-to-sequence models are "gradually planning" to produce the long conversations. therefore, how to design controllable methods tailored to the structures in conversations for generating long and coherent conversations becomes especially important. to this end, our work introduces a controllable conversation generation framework with diffusion models (diffuse-cg, shown in figure 1 ) to incorporate different conversational structures in a non-autoregressive manner, inspired by recent advances in deep generative models @xcite @xcite . specifically, we first generate a prototype conversation using pre-trained sequence-to-sequence model based on the input description. then we leverage the diffusion models to gradually enrich the prototype conversation with conversation structures. the diffusion process allows a more flexible conversation generation by not limiting a fixed left-to-right generation order; it also allows the model to gradually incorporate different levels of conversation structures to control the granularities, including the use of action triples to add more specific topics and events @xcite , dialogue acts to make the utterances more like human @xcite @xcite , and discourse relations to generate longer conversations with better coherency @xcite @xcite . to make the diffusion process more adapted to conversation generation and more stable, we further improve the general diffusion model @xcite with linguistic-informed noise where we perturb the prototype conversation in the forward process with noise including soft-masking action words, soft-masking utterances, and shuffling discourse relations, rather than pure gaussian noise @xcite . experiments on two conversation datasets, samsum @xcite and dialogsum @xcite by visualizing the intermediate-generated conversations, we show that diffuse-cg achieves better interpretability for understanding how the model is structuring and generating long-form conversations. ## related work long text generation long-form text generation has been a longstanding challenge in natural language generation where models need to generate long, coherent and open-ended narratives @xcite @xcite @xcite . recent studies have shown impressive success in generating more coherent stories through adopting hierarchical model structures @xcite , leveraging large pre-trained models @xcite , planing first and then generating framework @xcite @xcite and incorporating external knowledge @xcite @xcite . however, previous studies mainly focus on generating singlespeaker stories and neglect one important form of long text-conversations. such methods cannot be directly applied to generate multi-speaker conversations because of the complex linguistic structures in conversations such as back-and-forth interactions @xcite . our work fills this gap by utilizing conversation structures to generate coherent conversations. dialogue response generation numerous studies have been conducted on generating short responses conditioned on previous context @xcite @xcite @xcite such as adding user's persona @xcite , paraphrasing template responses @xcite and using example guidance @xcite . while achieving state-of-the-art performances, they suffer from generating the entire conversation because they can only generate one utterance at a time and easily lose focus when generating multiple rounds of utterances or the entire conversation @xcite . this is largely due to the fact that former errors cannot be corrected when generating utterance by utterance autoregressively, and the lack of awareness towards rich conversation structures like long-distance relations in conversations @xcite . to this end, we design a controllable and interpretable conversation generation framework that makes use of rich structures to generate the entire conversation in a non-autoregressive way. diffusion model diffusion models @xcite @xcite are recently-introduced state-of-the-art non-autoregressive generative models and have shown substantial success for visual modalities @xcite . they are generally more interpretable and controllable as they gradually denoise random vectors to desired output via multiple intermediate steps @xcite . however, it is still difficult to apply diffusion models to textual data, because the input space in text is discrete and text is generally more complex in structures. although there are a few exceptions to model language generation with diffusion process @xcite @xcite @xcite where continuous and discrete space is bridged through embedding and rounding @xcite @xcite , such approaches often utilize gaussian noise in the forward process, which usually fails to leverage the linguistic structure in text to noise the input textual data and makes the diffusion models unstable and costly @xcite . building upon these prior works, we utilize diffusion models for interpretable and controllable conversation generation and design a novel linguistic-informed noise for adapting diffusion models to generate textual conversations. ## background: diffusion models diffusion models are the recent state-of-the-art deep generative models via iterative denoising the latent variables @xcite @xcite . basically, corruption (usually gaussian noise) is added to the input data distribution gradually during a forward process. then a diffusion model is trained through learning to recover the corrupted distribution to the original input data distribution step by step. a small amount of information that is perturbed during the corresponding forward process is reconstructed in every diffusion step. there is usually a forward noising process and a diffusion denoising process in a diffusion model. for a given sampled input data, then a reversed diffusion process, which is learned by a parameterized model (p(x t-1 |x t )), is learned to denoise x t to the original data x 0 : the diffusion model is trained to maximize the marginal likelihood of log p θ (x 0 ). and ho et al. expand and reweight the objectives to obtain a meansquared error (l 2 ) loss: ## our approach this section introduces our controllable conversation generation model to generate natural and coherent conversations, as shown in figure 1 . basically, we first utilize a sequence-to-sequence model to generate a prototype version of the conversation based on the given short description (section 4.1). we then gradually incorporate the conversation structure guidance to edit the prototype conversation in order from lower levels to higher levels (action triples, dialogue acts, and discourse relations) through diffusion models (section 4.2). ## conclusion in this work, we introduce a novel controllable conversation generation framework that utilizes different levels of conversation structures to generate long and coherent conversations based on a given short description. specifically, we first generate the prototype conversation and then enrich it with structure information like action triples, dialogue acts, and discourse relations, together with novel linguistic-informed noises for further adapting diffusion models to generate conversations. experiments on samsum and dialogsum show the effectiveness of our framework by significantly improving over the baselines. our proposed method also provides interpretability of how the model is gradually generating longer and better conversations.