Robustness Testing of Language Understanding in Task-Oriented Dialog (2021)

Abstract: Most language understanding models in task-oriented dialog systems are trained on a small amount of annotated training data, and evaluated in a small set from the same distribution. However, these models can lead to system failure or undesirable output when being exposed to natural language perturbation or variation in practice. In this paper, we conduct comprehensive evaluation and analysis with respect to the robustness of natural language understanding models, and introduce three important aspects related to language understanding in real-world dialog systems, namely, language variety, speech characteristics, and noise perturbation. We propose a model-agnostic toolkit LAUG to approximate natural language perturbations for testing the robustness issues in task-oriented dialog. Four data augmentation approaches covering the three aspects are assembled in LAUG, which reveals critical robustness issues in state-of-the-art models. The augmented dataset through LAUG can be used to facilitate future research on the robustness testing of language understanding in task-oriented dialog.

## introduction recently task-oriented dialog systems have been attracting more and more research efforts @xcite , where understanding user utterances is a critical precursor to the success of such dialog systems. while modern neural networks have achieved state-of-the-art results on language understanding (lu) @xcite @xcite @xcite , their robustness to changes in the input distribution is still one of the biggest challenges in practical use. real dialogs between human participants involve language phenomena that do not contribute so much to the intent of communication. as shown in fig. 1 , user expressions can be of high lexical and syntactic diversity when a system is deployed to users; typed texts may differ significantly from those recognized from voice speech; interaction environments may be full of chaos and even users themselves may introduce irrelevant noises such that the system can hardly get clean user input. unfortunately, neural lu models are vulnerable to these natural perturbations that are legitimate inputs but not observed in training data. for example, @xcite found that popular conversational assistants frequently failed to understand real health-related scenarios and were unable to deliver adequate responses on time. although many studies have discussed the lu robustness @xcite @xcite @xcite @xcite , there is a lack of systematic studies for real-life robustness issues and corresponding benchmarks for evaluating task-oriented dialog systems. in order to study the real-world robustness issues, we define the lu robustness from three aspects: language variety, speech characteristics and noise perturbation. while collecting dialogs from deployed systems could obtain realistic data distribution, it is quite costly and not scalable since a large number of conversational interactions with real users are required. therefore, we propose an automatic method laug for language understanding augmentation in this paper to approximate the natural perturbations to existing data. laug is a black-box testing toolkit on lu robustness composed of four data augmentation methods, including word perturbation, text paraphrasing, speech recognition, and speech disfluency. we instantiate laug on two dialog corpora frames (el @xcite and multiwoz @xcite to demonstrate the toolkit's effectiveness. quality evaluation by annotators indicates that the utterances augmented by laug are reasonable and appropriate with regards to each augmentation approach's target. a number of lu models with different categories and training paradigms are tested as base models with in-depth analysis. experiments indicate a sharp performance decline in most baselines in terms of each robustness aspect. real user evaluation further verifies that laug well reflects real-world robustness issues. since our toolkit is model-agnostic and does not require model parameters or gradients, the augmented data can be easily obtained for both training and testing to build a robust dialog system. our contributions can be summarized as follows: (1) we classify the lu robustness systematically into three aspects that occur in real-world dialog, including linguistic variety, speech characteristics and noise perturbation; (2) we propose a general and model-agnostic toolkit, laug, which is an integration of four data augmentation methods on lu that covers the three aspects. (3) we conduct an in-depth analysis of lu robustness on two dialog corpora with a variety of baselines and standardized evaluation measures. (4) quality and user evaluation results demonstrate that the augmented data are representative of real-world noisy data, therefore can be used for future research to test the lu robustness in task-oriented dialog 1 . ## robustness type we summarize several common interleaved challenges in language understanding from three aspects, as shown in fig. 1b : language variety a modern dialog system in a text form has to interact with a large variety of real users. the user utterances can be characterized by a series of linguistic phenomena with a long tail of variations in terms of spelling, vocabulary, lexical/syntactic/pragmatic choice @xcite @xcite @xcite . speech characteristics the dialog system can take voice input or typed text, but these two differ in many ways. for example, written language 1 the data, toolkit, and codes are available at https: //github.com/thu-coai/laug , and will be merged into https://github.com/thu-coai/convlab-2 @xcite . tends to be more complex and intricate with longer sentences and many subordinate clauses, whereas spoken language can contain repetitions, incomplete sentences, self-corrections and interruptions @xcite @xcite @xcite . noise perturbation most dialog systems are trained only on noise-free interactions. however, there are various noises in the real world, including background noise, channel noise, misspelling, and grammar mistakes @xcite @xcite @xcite . ## laug: language understanding augmentation this section introduces commonly observed out-ofdistribution data in real-world dialog into existing corpora. we approximate natural perturbations in an automatic way instead of collecting real data by asking users to converse with a dialog system. to achieve our goals, we propose a toolkit laug, for black-box evaluation of lu robustness. it is an ensemble of four data augmentation approaches, including word perturbation (wp), text paraphrasing (tp), speech recognition (sr), and speech disfluency (sd). noting that laug is modelagnostic and can be applied to any lu dataset theoretically. each augmentation approach tests one or two proposed aspects of robustness as capacity lv sc np word perturbation (wp) √ √ text paraphrasing (tp) √ speech recognition (sr) √ √ speech disfluency (sd) √ task formulation given the dialog context x @xmath0, . . . , x 2t-1 , x 2t } at dialog turn t, where each x is an utterance and m is the size of sliding window that controls the length of utilizing dialog history, the model should recognize y t , the dialog act (da) of x 2t . empirically, we set @xmath1. let u, s denote the set of user/system utterances, respectively. then, we have x 2t-2i ∈ u and x 2t-2i-1 ∈ s. the task of this paper is to examine different lu models whether they can predict y t correctly given a perturbed input xt . the perturbation is only performed on user utterances. word perturbation inspired by eda (easy data augmentation) @xcite , we propose its semantically conditioned version, sc-eda, which considers task-specific augmentation operations in lu. sc-eda injects word-level perturbation into each utterance x and updates its corresponding semantic label y . original i want to go to cambridge . da attraction { inform (@xmath2. i wishing to go to cambridge . insert i need want to go to cambridge . swap i to want go to cambridge . delete i want to go to cambridge . svr i want to go to liverpool . da attraction { inform (@xmath3: an sc-eda example. syno., insert, swap and delete are four operations described in eda, of which the dialog act is identical to the original one. svr denotes slot value replacement. synonym replacement and slot value replacement aim at increasing the language variety, while random word insertion/deletion/swap test the robustness of noise perturbation. from another perspective, four operations from eda perform an invariance test, while slot value replacement conducts a directional expectation test according to @xcite . text paraphrasing the target of text paraphrasing is to generate a new utterance @xmath4, i.e. @xmath5. we applied sc-gpt @xcite , a finetuned language model conditioned on the dialog acts, to paraphrase the sentences as data augmentation. specifically, it characterizes the conditional probability p θ (x|y) = k @xmath6, y), where @xmath7. the model parameters θ are trained by maximizing the log-likelihood of p θ . da train * { inform ( @xmath8; @xmath9:45 ) } text hi, i'm looking for a train that is going to cambridge and arriving there by 20:45, is there anything like that? da train { inform ( @xmath10; @xmath11:45 ) } text yes, to cambridge, and i would like to arrive by 20:45. we observe that co-reference and ellipsis frequently occurs in user utterances. therefore, we propose different encoding strategies during paraphrasing to further evaluate each model's capacity for context resolution. in particular, if the user mentions a certain domain for the first time in a dialog, we will insert a "*" mark into the sequential dialog act y to indicate that the user tends to express without co-references or ellipsis, as shown in it should be noted that slot values of an utterance can be paraphrased by models, resulting in a different semantic meaning y . to prevent generating irrelevant sentences, we apply automatic value detection in paraphrases with original slot values by fuzzy matching foot_0 , and replace the detected values in bad paraphrases with original values. in addition, we filter out paraphrases that have missing or redundant information compared to the original utterance. ## related work robustness in lu has always been a challenge in task-oriented dialog. several studies have investigated the model's sensitivity to the collected data distribution, in order to prevent models from overfitting to the training data and improve robustness in the real world. @xcite collected dialogs with templates and paraphrased with crowdsourcing to achieve high coverage and diversity in training data. @xcite proposed a training schema that involves human in the loop in dialog systems to enhance the model's defense against human attack in an iterative way. @xcite injected natural perturbation into the dialog history manually to refine over-controlled data generated through crowd-sourcing. all these methods require laborious human intervention. this paper aims to provide an automatic way to test the lu robustness in task-oriented dialog. various textual adversarial attacks @xcite have been proposed and received increasing attentions these years to measure the robustness of a victim model. most attack methods perform whitebox attacks @xcite @xcite based on the model's internal structure or gradient signals. even some black-box attack models are not purely "black-box", which require the prediction scores (classification probabilities) of the victim model @xcite @xcite . however, all these methods address random perturbation but do not consider linguistic phenomena to evaluate the real-life generalization of lu models. while data augmentation can be an efficient method to address data sparsity, it can improve the generalization abilities and measure the model robustness as well @xcite . paraphrasing that rewrites the utterances in dialog has been used to get diverse representation and thus enhancing robustness @xcite @xcite . word-level operations @xcite @xcite including replacement, insertion, and deletion were also proposed to increase language variety. other studies @xcite worked on the out-of-vocabulary problem when facing unseen user expression. some other research 9 see appendix for case study. ## conclusion and discussion in this paper, we present a systematic robustness evaluation of language understanding (lu) in taskoriented dialog from three aspects: language variety, speech characteristics, and noise perturbation. accordingly, we develop four data augmentation methods to approximate these language phenomena. in-depth experiments and analysis are conducted on multiwoz and frames, with both classification-and generation-based lu models. the performance drop of all models on augmented test data indicates that these robustness issues are challenging and critical, while pre-trained models are relatively more robust to lu. ablation studies are carried out to show the effect and orthogonality of each augmentation approach. we also conduct a real user evaluation and verifies that our augmentation methods can reflect and help alleviate real robustness problems. existing and future dialog models can be evaluated in terms of robustness with our toolkit and data, as our augmentation model does not depend on any particular lu models. moreover, our proposed robustness evaluation scheme is extensible. in addition to the four approaches in laug, more methods to evaluate lu robustness can be considered in the future.