TOD -Flow: Modeling the Structure of Task-Oriented Dialogues (2023)

Abstract: Task-Oriented Dialogue (TOD) systems have become crucial components in interactive artificial intelligence applications. While recent advances have capitalized on pre-trained language models (PLMs), they exhibit limitations regarding transparency and controllability. To address these challenges, we propose a novel approach focusing on inferring the TOD-flow graph from dialogue data annotated with dialog acts, uncovering the underlying task structure in the form of a graph. The inferred TOD-flow graph can be easily integrated with any dialogue model to improve its prediction performance, transparency, and controllability. Our TOD-flow graph learns what a model can, should, and should not predict, effectively reducing the search space and providing a rationale for the model’s prediction. We show that the proposed TOD-flow graph better resemble human-annotated graphs compared to prior approaches. Furthermore, when combined with several dialogue policies and end-to-end dialogue models, we demonstrate that our approach significantly improves dialog act classification and end-to-end response generation performance in the MultiWOZ and SGD benchmarks.

## introduction task-oriented dialogue (tod) systems have attracted significant attention due to their potential applications in personal assistants, customer support, and other interactive systems that necessitate human-like conversation @xcite . many of the recent advances in tod have heavily leaned on pre-trained language models (plms) @xcite that are first pre-trained on a large corpus of data in an unsupervised manner, and then either fine-tuned @xcite @xcite * equal contribution @xcite or subjected to few-shot prompting @xcite to adapt them to specific dialogue domains. while these approaches have yielded commendable performance, they have limitations. few-shot prompted models have been challenged by issues of transparency, controllability, and adaptability to specific domains, especially when working with only a few examples. the lack of understanding of their decision-making processes and finegrained control over their output is often inadequate, which can result in sub-optimal conversational experiences. on the other hand, fine-tuned models are confronted with their own unique challenges. while they offer improved performance by aligning the model with task-specific semantics, this approach typically requires large annotated datasets and resources which can be a limiting factor in practice. furthermore, these models often lack transparency, making it challenging to understand the reasons behind their decisions or predictions. some prior works @xcite introduced workflow-based dialog models to handle the challenges in existing tod models. these methods aim to explicitly model the structure of dialog in a graph format. grounding the dialog in the graph offers benefits in terms of 1) elucidating the reasoning of system's decisions in terms of the relationships (i.e., transparency); 2) allow human manipulation of the dialogue model via graph modification (i.e., controllability) without retraining the dialog model. however, realworld dialogues were often unstructured, making it non-trivial to be modeled as a workflow, and the necessity of manually designing the domainspecific workflow or its elements limits its practical applicability. to tackle these challenges, we propose to learn the subtask graph @xcite from taskoriented dialog data. intuitively, the subtask graph can predict the affordance (i.e., availability) of the action from the status of environment and agent (i.e., the progress of completing a task or the subtasks). the subtask graph framework has two major benefits: i) subtask graphs can be inferred from the demonstrations without any direct supervision (e.g., video @xcite or transcript @xcite ), ii) subtask graphs can be combined with the base prediction model to improve its prediction since the subtask graph does not decide what to predict but instead suggests the affordable candidates of prediction. contributions. the main contribution of this work is generalizing the subtask graph framework into task-oriented dialog settings. to this end, we propose the tod-flow graph, which extends the subtask graph framework in three major aspects. first, we show that subtask graph can infer the relationship between dialog state and dialog acts without requiring any manual definition of nodes and edges in graphs. second, in addition to the precondition (or can relationship), we present learning algorithms to model two novel relationships, should and should not, which provide more fine-grained control and improved prediction. for instance, a can relationship may represent that the system can make a payment only if the user confirms the payment. the should relationship may learn that if a user ask about the address of the hotel, the system should reply back. conversely, a should not relationship may dictate that the system usually does not predict a farewell if the user's last utterance implies a question. third, we demonstrate that the inferred tod-flow graphs can enhance any dialog policy or end-to-end dialog system, whether fine-tuned or prompted, without the necessity of retraining. ## background our main contribution, the tod-flow graph, is an extension of the subtask graph framework @xcite , which describes the causal dependency structure of a compositional task τ consisting of a set of subtasks. in the context of task-oriented dialogue, dialog acts can be seen as subtasks. each subtask has a precondition that must be satisfied before the subtask can be performed. note that the precondition is not the only relationship between subtask, and in section 3.2 we extend it by incorporating other types of relationships. since precondition describes the causal relationship between subtasks, it imposes a constraint on the order in which subtasks can be performed (e.g., the system can make a payment only after the user confirms the payment). formally, we define the precondition as a boolean expression consisting of boolean constants (e.g., true or false), boolean variables and logical connectives (e.g., and we will use these different views of the precondition (i.e., as a boolean expression, graph or function) interchangeably. the subtask graph visualizes the preconditions f 1 , . . . of the subtasks (see figure 1 for examples). we note that the subtask graph has been adopted in various settings @xcite @xcite and subsumes other task graph formats @xcite @xcite , flowchart @xcite , and workflow @xcite . ## conclusion this work introduced a novel framework for improving the efficiency and predictive accuracy of task-oriented dialogues models. by leveraging the concept of subtask graph and generalizing it to a tod-flow graph, we accurately inferred the latent task structure within a dialogue. as showcased through extensive experimentation with two public tod datasets, the proposed technique has been proven to effectively generate accurate and human-interpretable graphs. importantly, we have integrated these inferred graphs with a range of dialogue models, without necessitating retraining, resulting in a substantial enhancement in performance in both dialog act classification and end-toend response generation.