Structured Attention for Unsupervised Dialogue Structure Induction (2020)

Abstract: Inducing a meaningful structural representation from one or a set of dialogues is a crucial but challenging task in computational linguistics. Advancement made in this area is critical for dialogue system design and discourse analysis. It can also be extended to solve grammatical inference. In this work, we propose to incorporate structured attention layers into a Variational Recurrent Neural Network (VRNN) model with discrete latent states to learn dialogue structure in an unsupervised fashion. Compared to a vanilla VRNN, structured attention enables a model to focus on different parts of the source sentence embeddings while enforcing a structural inductive bias. Experiments show that on two-party dialogue datasets, VRNN with structured attention learns semantic structures that are similar to templates used to generate this dialogue corpus. While on multi-party dialogue datasets, our model learns an interactive structure demonstrating its capability of distinguishing speakers or addresses, automatically disentangling dialogues without explicit human annotation.

## introduction grammatical induction for capturing a structural representation of knowledge has been studied for some time @xcite . given the achievement in related areas like learning hidden markov acoustic models in speech recognition @xcite and sentence dependency parsing in language understanding @xcite , our work aims to explore a more sophisticated topic: learning structures in dialogues. figure 1 shows the underlying semantic structure of conversations about bus information request from sim-dial dataset @xcite , with one 1 the code is released at https://github.com/ liang-qiu/svrnn-dialogues . this paper makes the following contributions. we propose to incorporate a structured attention layer in vrnn to learn latent structures in dialogues. to our knowledge, no work connecting structured attention with unsupervised dialogue structure learning has been done. we prove our proposed vrnn-linearcrf learns better structures than the baseline vrnn on the simdial dataset for semantic structure learning in two-party dialogues. for interactive structure learning in multi-party dialogues, we combine vrnn with a non-projective dependency tree attention layer. it achieves similar generation performance as the baseline gsn model @xcite on ubuntu chat corpus (uthus and aha, 2013; @xcite , while our model can identify the speaker/addressee information without trained on explicit labels. we release our code as well as the processed datasets to help stimulate related researches. ## related work attention mechanism @xcite has been widely adopted as a way for embedding categorical inference in neural networks for performance gain and interpretability @xcite . however, for many tasks, we want to model richer structural dependencies without abandoning end-to-end training. structured attention networks @xcite can extend attention beyond the standard soft-selection approach by attending to partial segments or subtrees. people have proven its effectiveness on a variety of synthetic and real tasks: tree transduction, neural machine translation, question answering, and natural language inference @xcite . in this paper, we propose to utilize structured attention to explore dialogue structures. specifically, we work on two types of dialogue structures, semantic structures (dialogue intent transitions), and interactive structures (addressee/speaker changes). semantic structures have been studied extensively. some previous works, such as (jurafsky, 1997), learned semantic structures relying on human annotations, while such annotations are costly and can vary in quality. other unsupervised studies used hidden markov model (hmm) @xcite @xcite . recently, variational autoencoders (vaes) @xcite and their recurrent version, variational recurrent neural networks (vrnns) @xcite , connects neural networks and traditional bayes methods. because vrnns apply a point-wise nonlinearity to the output at every timestamp, they are also more suitable to model highly non-linear dynamics over the simpler dynamic bayesian network models. @xcite proposed the vhred model by combining the idea of vrnns and hierarchical recurrent encoder-decoder (hred) @xcite for dialogue generation. similarly, @xcite proposed to use vaes to learn discrete sentence representations. @xcite used two variants of vrnns to learn the dialogue semantic structures and discussed how to use learned structure to improve reinforcement learning-based dialogue systems. but none of the previous work has tried to incorporate structured attention in vrnns to learn dialogue structure. compared to semantic structures, the interactive structure of dialogues is not clearly defined. @xcite initiated some work about dialogue disentanglement, which is defined as dividing a transcript into a set of distinct conversations. serban and pineau (2015) tested standard rnn and its conditional variant for turn taking and speaker identification. both of the tasks are highly related to understanding the interactive structure but not identical. our task, different from both of them, aims to construct an utterance dependency tree to represent a multi-party dialogue's turn taking. the tree can not only be used to disentangle the conversations but also label each utterance's speakers and addressees. we compare our model with graph structured network (gsn), recently proposed by @xcite . gsn builds a conversation graph utilizing explicit speaker/addressee information in ubuntu chat corpus (uthus and aha, 2013) to improve the dialogue generation performance. our model shows similar generation performance as them while demonstrating its capability of learning the utterance dependency tree. ## problem formulations we discuss the semantic and interactive dialogue structure learning separately. in task-oriented twoparty dialogues (between system and user), we want to discover a semantic probabilistic grammar shared by dialogues in the same domain. while for multi-party dialogues, e.g., conversations in a chatroom, which may have multiple conversations occur simultaneously, we are more interested in finding an interactive structure that could help disentangle the conversation and identify the speakers/addressees. our method of structure learning is flexible to handle both problems with the formula-tions as shown below. for semantic dialogue structure learning, we formulate the problem as labeling the dialogue with a sequence of latent states. each conversational exchange x i (a pair of system and user utterances at time step i) belongs to a latent state z i , which has an effect on the future latent states and the words the interlocutors produce. the latent dialogue state is defined to be discrete, i.e., z @xmath0, 2, ..., n }, where n is the number of states predefined from experience. our goal is to generate the current sentence pair x i that maximizes the conditional likelihood of x i given the dialogue history while jointly learning a latent state sequence @xmath1, z 2 , ..., z n ]: a multi-party dialogue session can be formulated as an utterance-level dependency tree t(v, e), where v is the set of nodes encoding the utterances, @xmath2,j } m @xmath3, 1} indicates whether utterance i is the parent of utterance j, and m is the maximum number of possible edges. ## variational recurrent neural network with structured attention the overall architecture of structured-attention variational recurrent neural network (svrnn) is illustrated in figure 3 . the lstm @xcite word-level encoder marked in pink encodes each utterance into a sentence embedding. then an utterance-level encoder vrnn with different structured attention layers encodes the dialogue history into a latent state z. a decoder marked in blue will decode the next utterances from the latent state. we describe more details about the key components of our model in the following subsections. ## experiments we incorporate structured attention in vrnns to explore two types of dialogue structure, semantic structure, and interactive structure. ## conclusion this paper proposed to inject structured attention into variational recurrent neural network models for unsupervised dialogue structure learning. we explored two different structure inductive biases: linear crf for utterance-level semantic structure induction in two-party dialogues; and non-projective dependency tree for interactive structure learning in multi-party dialogues. both models are proved to have a better structure learning performance over the state of the art algorithms. in the future, we will further explore how to explicitly incorporate linguistics information, such as named entities into the latent states. tiancheng zhao and maxine eskenazi. 2018. zeroshot dialog generation with cross-domain latent actions. in proceedings of the 19th annual sigdial meeting on discourse and dialogue, pages 1-10, melbourne, australia. association for computational linguistics. tiancheng zhao, kyusong lee, and maxine eskenazi. 2018. unsupervised discrete sentence representation learning for interpretable neural dialog generation. in proceedings of the 56th annual meeting of the association for computational linguistics (volume 1: long papers), pages 1098-1107, melbourne, australia. association for computational linguistics. tiancheng zhao, ran zhao, and maxine eskenazi. 2017. learning discourse-level diversity for neural dialog models using conditional variational autoencoders. in proceedings of the 55th annual meeting of the association for computational linguistics (volume 1: long papers), pages 654-664, vancouver, canada. association for computational linguistics. a appendices a.1 learned structures of simdial 0.72 greeting request a bus 0.68 request #from_loc inform #from_loc 0.91 request #to_loc inform #to_loc request #datetime inform #datetime 0.52 0.75 inform default request #duration 0.73 inform default request #arrival 0.94 inform arrival goodbye 0.93 inform default goodbye 0.91 inform duration goodbye goodbye silence 0.31 0.16 0.23 0.26 0.13 0.12 0.15 0.16 figure 6: learned dialogue structure from vrnn without structured attention in simdial bus domain.