More Bang for Your Buck: Natural Perturbation for Robust Question Answering (2020)

Abstract: Deep learning models for linguistic tasks require large training datasets, which are expensive to create. As an alternative to the traditional approach of creating new instances by repeating the process of creating one instance, we propose doing so by first collecting a set of seed examples and then applying human-driven natural perturbations (as opposed to rule-based machine perturbations), which often change the gold label as well. Such perturbations have the advantage of being relatively easier (and hence cheaper) to create than writing out completely new examples. Further, they help address the issue that even models achieving human-level scores on NLP datasets are known to be considerably sensitive to small changes in input. To evaluate the idea, we consider a recent question-answering dataset (BOOLQ) and study our approach as a function of the perturbation cost ratio, the relative cost of perturbing an existing question vs. creating a new one from scratch. We find that when natural perturbations are moderately cheaper to create (cost ratio under 60%), it is more effective to use them for training BOOLQ models: such models exhibit 9% higher robustness and 4.5% stronger generalization, while retaining performance on the original BOOLQ dataset.

## introduction creating large datasets to train nlp models has become increasingly expensive. while many datasets @xcite targeting different linguistic tasks have been proposed, nearly all are created by repeating a fixed process used for writing a single example. this approach results in many independent examples, each generated from scratch. we propose an alternative, often substantially cheaper training set construction method where, after collecting a few seed examples, the set is expanded by applying humanauthored minimal perturbations to the seeds. is the "yonge street" the longest street in the world? was the "yonge street" the longest street in the world in the past? will the "yonge street" become the longest street in the world? was yonge street the longest street in the world at some point? was the 'yonge street' the longest street in the world before 2000? was the 'yonge street' the longest street in the world before 1980? training set creation via minimalperturbation clusters. left: seed dataset d s with 3 instances (shown as different shapes). right: expanded dataset d with 10 instances, comprising 2-4 minimalperturbations (illustrated as rotation, fills, etc.) of each seed instance. human-authored perturbations aren't required to always preserve the answer (yes/no in the example) and often add richness by altering the answer. fig. 1 illustrates our proposal of using natural perturbations. we use the traditional approach to first create a small scale seed dataset d s , shown as the red rectangle on the left with three instances (denoted by different shapes). however, rather than simply repeating this process to scale up d s to a larger dataset d, we set up a different task: ask crowdworkers to create multiple minimal perturbations of each seed instance (shown as rotation, fills, etc.) with an encouragement to change the answer. the end result is a larger dataset d of a similar size as d but with an inherent structure: clusters of minimally-perturbed instances with mixed labels, denoted by the green rectangle at the right in fig. 1 . an inspiration for our approach is the lack of robustness of current state-of-the-art models to mi-nor adversarial changes in the input @xcite . we observed a similar phenomenon even with model-agnostic, human-authored changes to yes/no questions (as shown in fig. 1 ), despite models achieving near-human performance on this task. specifically, we found the accuracy of a roberta model trained on boolq @xcite to drop by 15% when evaluated on locally perturbed questions. these new questions were, however, no harder for humans. this raises the question: can a different way of constructing training sets help alleviate this issue? minimal perturbations, as we show, provide an affirmative answer. perturbing a given example is generally a simpler task, costing only a fraction of the cost of creating a new example from scratch. we call this fraction the perturbation cost ratio (henceforth referred to as cost ratio), and assess the value of our perturbed training datasets as a function of it. as this ratio decreases (i.e., perturbations become cheaper), one, of course, obtains a larger dataset than the traditional method, at the same cost. more importantly, even when the ratio is only moderately low (at 0.6), models trained on our perturbed datasets exhibit desirable advantages: they are 9% more robust to minor changes and generalize 4.5% better across datasets than models trained on boolq. specifically, our generalization experiment with the multirc @xcite dataset demonstrates that models trained on perturbed data outperform those trained on traditional data when evaluated on unseen, unperturbed questions from a different domain. second, we assess robustness by evaluating on boolq-e @xcite , a test set of expert-generated perturbations that deviate from the patterns common in large-scale crowdsourced perturbations. our zero-shot results here indicate that models trained on perturbed questions go beyond simply learning to memorize particular patterns in the training data. third, we find that training on the perturbed data, for the most part, continues to retain performance on the original task. even with the worst case cost ratio of 1.0 (when perturbing existing questions is no cheaper than writing new ones), models trained on perturbed examples remain competitive on all our evaluation sets. this is an important use case for situations that simply do not allow for sufficiently many distinct training examples (e.g., low resource settings, limited amounts of real user data, etc.). our results at ratio 1.0 suggest that simply applying minimal perturbations to the limited number of real examples available in these situations can be just as effective as (hypothetically) having access to large amounts of real data. in summary, we propose a novel method to construct datasets that combines traditional independent example collection approach with minimal natural perturbations. we show that for many reasonable cases, using perturbation clusters for training can result in cost-efficiently trained high-quality, robust models that generalize across datasets. ## related work data augmentation. there is a handful of work that studies semi-automatic contextual augmentation @xcite , often with the goal of creating better systems. we, however, study natural human-authored perturbations as an alternative dataset construction method. a related recent work is by @xcite , who, unlike the goal here, study the value of naturalperturbations in reducing artifacts. ## expansion via perturbation clusters our approach mainly differs from traditional approaches in how we expand the dataset given seed examples. rather than repeating the process to generate more examples, we apply minimal alterations to the seed examples, in two high-level steps: the first step generates the initial set of examples with natural perturbations. it should respect certain principles: (a) the construction should apply minimal changes (similar to the ones in fig. 1 ), otherwise the resulting clusters might be too heterogeneous and less meaningful. (b) a substantial proportion of natural perturbations should change the answer to the questions. (c) it should incentivize creativity and diversity in local perturbations by, for instance, showing thought-provoking suggestions, using a diverse pool of annotators @xcite , etc. the second independent verification step ensures dataset quality by (a) getting the true gold label and (b) ensuring all generated questions are answerable given the relevant paragraph, in isolation from the original question. boolq : boolq expansion. we obtain d s by sampling questions from boolq @xcite , which is a qa dataset where each boolean ("yes"/"no" answer) question could be inferred from an associated passage. we then follow the above two-step process, resulting in boolq , a naturally perturbed dataset with 17k questions derived from 4k seed questions: a) minimal perturbations: crowdworkers are given a question and its corresponding gold answer based on supporting paragraph. then the workers are asked to change the question in order to flip the answer to the question. while making changes, the workers are guided to keep their changes minimal (adding or removing up to 4 terms) while resulting in proper english questions. additionally, for each seed question, crowd-workers are asked to generate perturbations till the modified question is challenging for a machine solver (i.e., roberta trained on boolq, should have low confidence on the correct answer). note that we do not require the model to answer the question incorrectly and not all ques-tions are challenging for the model. our main goal here is to encourage interesting questions by using the trained model as the guide. sample questions generated by our process are shown in fig. 1 . we evaluate the impact of perturbations via this dataset. dataset subsampling. we sample questions from this expanded dataset to evaluate the value of perturbations as a function of different parameters. to simplify exposition, we will use the following notation. we assume a fixed budget b for constructing the dataset where each new question costs 1 unit, i.e., traditional methods would construct a dataset of size b in the given budget. the perturbation cost ratio @xmath0. when r ≈ 1, perturbations are equally costly as writing out new instances. if r 1, perturbations are cheap. for instance, if @xmath1.5, each hand-written question costs the same as two perturbed questions. we denote the total number of instances and clusters with n, c, respectively. we use boolq b,c,r to denote the largest subset of boolq that can be generated with a total budget of b, with a maximum cluster size of c, and relative cost ratio of r. in the special case where all clusters are of the exact same size c, these parameters are related as follows: @xmath2, the plots indicate that including additional perturbations in each cluster (going left to right), particularly when they are cheap (closer to the @xmath3, adds value to the dataset by increasing model accuracy. figure 3 : model accuracy (y-axis) with a fixed total budget b and varying cost ratio r (x-axis), in two cases: (i) @xmath4, (ii) @xmath5. the smaller the cost, the higher the returns. for a moderately low cost ratio such as 0.6, the model trained on our perturbed datasets gains of 3-5% over a model trained on the traditionally constructed dataset. to create boolq b,c,r we subsample a maximum of c questions from each perturbation cluster, such that total number of clusters is no more than b 1+(c-1)r and the ratio of "yes" to "no" questions is 0.55. our subsampling starts with clusters of size at least c and also considers smaller clusters if necessary. boolq b,1,r (singleton clusters) corresponds to a dataset constructed in a similar fashion to boolq, whereas boolq b,4,r (big clusters) roughly corresponds to the boolq dataset. ## experiments to assess the impact of our perturbation approach, we evaluate standard roberta-large model that has been shown to achieve state-of-the-art results on many tasks. each experiment considers the effect of training on subsamples of boolq obtained under different conditions. each of the points in the figures are averaged over 5 random subsampling of the dataset (with error bars to indicate the standard deviation). the appendix includes further details about the setup as well as additional experiments. we evaluate the qa model trained on various question sets on three test sets. (i) for assessing robustness, we use an expert-generated set boolqe published in @xcite with 339 highquality perturbed questions based on boolq. (ii) for assessing generalization, we use the subset of 260 training questions from multirc @xcite that have binary (yes/no) answers, from training section of the their data. foot_1 (c) the original boolq test set, to ensure models trained on perturbed questions also retain performance on the original task. ## discussion a key question with respect to the premise of this work is whether the idea would generalize to other tasks. here, we chose yes/no questions since this is the least-explored sub-area of qa (compared to extractive qa, for example) and hence could benefit from more efficient dataset construction. we (the authors) are cautiously optimistic that it would, although that is subject to factors such as the rel-ative cost of creating diverse and challenging perturbations. concurrent works have also explored a similar construction for other tasks but with different purposes @xcite . we note that we assume a typical qa dataset construction process where workers write questions based on given fixed contexts @xcite . this assumption may not always hold for alternative dataset generation pipelines, such as using an already available set of questions @xcite . even in such cases, one can still use the lessons learned here to apply natural perturbations to a different stage in the annotation pipeline to make it more cost efficient. ## conclusion we proposed an alternative approach for constructing training sets, by expanding seed examples via natural perturbations. our results demonstrate that models trained on perturbations of boolq questions are more robust to minor variations and generalize better, while preserving performance on the original boolq test set as long as the natural perturbations are moderately cheap to create. creating perturbed examples is often cheaper than creating new ones and we empirically observed notable gains even at a moderate cost ratio of 0.6. while this is not a dataset paper (since our focus is on more on the value of natural perturbations for robust model design), we provide the natural perturbations resource for boolq constructed during the course of this study. 4 this work suggests a number of interesting lines of future investigation. for instance, how do the results change as a function of the total dataset budget b or large values of c? over-generation of perturbations can result in overly-similar (lessinformative) variations of a seed example, making larger clusters valuable only up to a certain extent. while we leave a detailed study to future work, we expect general trends regarding the value of perturbations to hold broadly.