C ausal D ialogue: Modeling Utterance-level Causality in Conversations (2023)

Abstract: Despite their widespread adoption, neural conversation models have yet to exhibit natural chat capabilities with humans. In this research, we examine user utterances as causes and generated responses as effects, recognizing that changes in a cause should produce a different effect. To further explore this concept, we have compiled and expanded upon a new dataset called CausalDialogue through crowd-sourcing. This dataset includes multiple cause-effect pairs within a directed acyclic graph (DAG) structure. Our analysis reveals that traditional loss functions struggle to effectively incorporate the DAG structure, leading us to propose a causality-enhanced method called Exponential Maximum Average Treatment Effect (ExMATE) to enhance the impact of causality at the utterance level in training neural conversation models. To evaluate the needs of considering causality in dialogue generation, we built a comprehensive benchmark on CausalDialogue dataset using different models, inference, and training methods. Through experiments, we find that a causality-inspired loss like ExMATE can improve the diversity and agility of conventional loss function and there is still room for improvement to reach human-level quality on this new dataset.

## introduction over time, broadly-defined dialogue models have become increasingly prevalent in society and been integrated in a range of domains from speech assistants and customer service systems to entertainment products, such as video games, where the non-playable characters (npcs) engage in conversation with players. a core goal of training chatbots is enabling them to interact with humans naturally @xcite . this includes, but is not limited to: considering both the machine and addressee's personalities @xcite , diversifying responses to be less generic (e.g., the same response "i don't know." is often produced in a traditional setting for different dialogues) @xcite , grounding on external knowledge to be informative @xcite , and tailoring responses specific to nuanced differences in conversation. to the best of our knowledge, no recent studies have prioritized the ability to tailor responses for minor differences in conversations. this problem is currently implicitly approached by training models with larger scale or cleaner conversation data @xcite @xcite or involving human-in-the-loop @xcite . however, the effectiveness of these methods is unclear, the online rewarding scheme can be expensive, and a suitable testbed for evaluating the solution to this problem has not yet been identified. to this end, we propose a benchmark to foster research in tailoring responses for nuanced differences in conversations by answering the question "if all prior turns are the same, but the last turns in two conversations are semantically different, how should future turns differ?" we call this concept agility and model it as the utterance-level causes and effects in dialogue response generation, where the causes are the slightly different prior turns and the effects are the resulting future turns. we introduce causaldialogue, a dataset seeded by expert-written dialogues containing branching dialogue paths, which we further expand in terms of scale and linguistic abundance with crowdsourcing. each conversation is represented as a directed acyclic graph (dag) for ease of storage and causal analysis @xcite as shown in figure 1 . as conversations progress, each utterance can elicit multiple responses, resulting in a split of the conversation (branch-splitting). alternatively, multiple conversations that share a common starting point branch-splitting (fork) linhardt: well, hello, professor. you came all the way to my room to--oh. you've brought the materials from your lecture i slept through. i appreciate it. thank you. ## causaldialogue dataset in this section, we introduce causaldialogue, a novel dataset that includes chit-chat conversations in a conversational directed acyclic graph (dag) data structure. this structure allows for the natural inclusion of various dialogue flows, such as forks (branch-splitting) and colliders (branchcolliding) @xcite . our goal is to offer re-searchers a valuable resource for studying the complexities of human conversation and advancing the understanding of causal inference in dialogue. to create causaldialogue, we sourced expertwritten dialogues from a role-playing game (section 3.1) and expanded upon them with amazon mechanical turk (mturk) foot_1 and manual correction (section 3.2). by using our fused collection method, the dataset contains high-quality, engaging conversations with abundant linguistic usage that imitates daily life. ## task definition in this work we consider a conversation among two or more speakers. at each time step t, a speaker s t takes their turn with an utterance u t . the goal, as in conventional response generation, is to train a model parameterized by θ that can predict a plausible next utterance given the speakers and utterances in prior turns as: distinct from prior conversation datasets, causal-dialogue has multiple dialogue branches. if we consider each branch as an independent conversation (flatten the branches), many conversations will have large overlaps and thus bias the dataset. we consider this point and extract triples (dh, x, y) from causaldialogue. to simplify notations for following sections, we denote s t u t as x, s t+1 u t+1 as y and dh is the dialogue history s 1 u 1 , s 2 u 2 , ..., s t-1 u t-1 . the key idea is that for a dh, we will not extract duplicated pairs (x, y), but x or y itself can be shared. the causaldialogue response generation task is therefore defined as finding a possible turn-taking speaker and their response given the dialogue history dh with an utterance cause x. y ∼ p θ (⋅|dh, x) . the sequences @xmath0...x i ...x |x| and @xmath1...y j ...y |y| , where x i and y j are tokens, and |x| and |y| are the length of the sequences x and y respectively. ## methods in this section, we describe how conventional generative models can be used and propose a simple yet effective approach to model causal effect. ## experiments we provide a preliminary benchmark for causal-dialogue with often used methods and a naive causality-inspired loss. we fine-tuned two types of pretrained language models based on transformers @xcite : decoder-only architecture, dialogpt @xcite and encoderdecoder architecture, t5 @xcite , by the conventional mle loss and the proposed ex-mate loss, and inferred by various sampling methods. we evaluate three aspects of the generated responses: fluency (perplexity (ppl) and bleu @xcite ), diversity (distinct n-grams dist1 and dist2 @xcite ), and our proposed agility (cce) in section 4.1. furthermore, we use accuracy to evaluate if the speaker for a given turn is correctly predicted as the one in the human written responses (identity acc). more details are in appendix a.4 and a.6. ## conclusion in this paper, we presented a new dataset, causal-dialogue, with novel conversational dag structure. with experiments on various model setups with a newly proposed loss, exmate, we demonstrate that there is room for improvement to reach humanlevel quality, even though exmate improves the diversity, informativeness, and agility. this dataset serves as a testbed for future research that needs abundant conversation cases, like causal inference and offline reinforcement learning. moreover, with the naturally paired metadata, future work can use this dataset for other tasks, such as speaker prediction in multi-speaker scenarioes and personalized dialogue generation.