An Empirical study to understand the Compositional Prowess of Neural Dialog Models (2022)

Abstract: In this work, we examine the problems associated with neural dialog models under the common theme of compositionality. Specifically, we investigate three manifestations of compositionality: (1) Productivity, (2) Substitutivity, and (3) Systematicity. These manifestations shed light on the generalization, syntactic robustness, and semantic capabilities of neural dialog models. We design probing experiments by perturbing the training data to study the above phenomenon. We make informative observations based on automated metrics and hope that this work increases research interest in understanding the capacity of these models.

## introduction fully data-driven and end-to-end approaches to dialog response generation @xcite @xcite @xcite within the sequence-tosequence (seq2seq) @xcite @xcite framework have become ubiquitous and now produce competitive results. recently, there have been a few attempts to explore the capabilities of such models. a well known problem in seq2seq modeling is the tendency to generate short and meaningless replies in conversation @xcite . by drawing a parallel between machine translation and dialog generation, @xcite suggest that such models encounter a severe mis-alignment problem i.e a given input utterance can have many plausible replies. @xcite empirically investigate the information captured in seq2seq models by synthetically perturbing the test set during inference. they demonstrate an inability of seq2seq models to use all the information that is presented. they ⇤ equal contribution, work done while students at cmu also present their study as a "diagnostic tool" to evaluate dialog models. although they provide useful insights, such studies fail to systematically demonstrate the compositional features of seq2seq dialog models. further, their "diagnostic tool" is only helpful for evaluating syntactic robustness of models at test time. in this work, we carefully design experiments to investigate and evaluate the compositional generalizability of neural dialog models. compositionality has been well studied for neural machine translation @xcite as well as some other tasks. in these works, for a system to be compositional, it should be able to generalize beyond its observations. for example, @xcite observe that neural gpus are able to generalize addition and multiplication to larger sequences than what they are trained on. however, one should carefully note that such a definition of compositionality is peripheral and represents only a part of what it truly means. to provide a complete picture, @xcite collect the different manifestations of compositionality and translate them into a series of theoretically-grounded tests. by adapting (and modifying) some of these tests, the experiments in this paper aim to quantitatively elucidate the compositional nature of seq2seq based neural dialog models. below, we provide a motivation and description for each of the adapted tests: productivity -upon taking part in a number of reasonable length conversations, it might not be difficult for humans to carry conversations consisting of a larger number of turns. based on this intuition, we test the ability of a dialog system to extend its prediction beyond the length of the observed conversational history. substitutivity -there is a many-to-many correspondence between utterances and their possible responses. given the responses of a particular conversation, if we encounter a semantically equivalent conversation, we can easily produce the same set of responses to this new conversation. based on this, we attempt to observe if dialog models are also capable of such reasoning. this property of compositionality accounts for the semantic expressiveness of neural models. systematicity -humans can understand how to fill in missing pieces of information, or to introduce additional words which can make an utterance in a conversation more fluent. this makes humans capable of recombining known fragments and rules. without the presence of topic-inducing words, it might become difficult for humans to make sense of a conversation. based on this intuition, we test the ability of the model to recombine known fragments and rules. this property of compositionality accounts for the syntactic robustness of neural models. the contributions of this paper are threefold: (i) we observe that neural dialog models don't generalize well to dialogs with longer turns when they are trained on dialogs with shorter number of turns. (ii) neural dialog models pay less attention to the topic inducing "content words" of the dialog. in fact, we observe that they are highly sensitive to the stop words (a type of "function word") present in utterances. (iii) we also observe that the neural dialog models don't perform well when the same utterance is presented to the model in a semantically similar but syntactically different fashion i.e they are not robust to syntactic variations. the code for reproducing results is released along with this paper foot_0 . ## datasets following @xcite , we experiment with using an open domain, a closed domain, and a synthetically generated dataset. the details of the dataset are presented below: dailydialog: an open domain, manually labelled dataset @xcite consisting of conversations on multiple topics which can occur on a daily basis. there are 13,118 total dialogs with an average of 7.9 turns per dialog. mutual friends: a task-oriented dataset @xcite ) that encourages open-ended dialog acts. it has a total of 11,157 dialogs with an average length of 11.4 utterances per dialog. babi: a synthetic dataset created by @xcite . we use task 5 of this dataset which requires the prediction of the text of the entire dialog and not just dialog acts. each dialog in this task has an average of 13 utterances and there is a total of 1,000 dialogs. ## experiments and results we investigate using seq2seq(s2s) @xcite , seq2seq-attention(s2sa) @xcite and transformer models (vaswani et al. @xcite . the behaviour of these models is examined using the three standard datasets described in section 2. both s2s and s2sa utilise a two-layer lstm for the encoder and the decoder. each layer has 128 hidden units with a dropout of 0.1. on the other hand, the transformer utilises a 300 dimensional embedding with 2 layers and 2 attention heads. perplexity has been shown to correlate well with human judgement for dialog systems (adiwardana et al., 2020) making it a suitable metric for our study. by choosing perplexity we also remain consistent with the previous study conducted by @xcite . note that we do not aim to achieve state-of-the-art results, but rather, our aim is to observe and characterize the behaviour of the models based on different aspects of compositionality. hence we pick three seminal models that tackles the problem of language generation and probe them to understand their manifestations. the upcoming subsections first provides a brief description of the experimental setup employed for measuring the compositional capabilities of the various models, and then later discusses the results. ## conclusion this work interprets the behaviour of seq2seq based neural dialog models under the general umbrella of compositionality. we observe that such models lack the ability to reason and produce response based on surface level information. the results provided in this paper motivate the need for better modelling approaches.