Pretrained Transformers Improve Out-of-Distribution Robustness
37951Authors
nan
Abstract
AbstractAlthough pretrained Transformers such as BERT achieve high accuracy on in-distribution examples, do they generalize to new distributions? We systematically measure out-of-distribution (OOD) generalization for seven NLP datasets by constructing a new robustness benchmark with realistic distribution shifts. We measure the generalization of previous models including bag-of-words models, ConvNets, and LSTMs, and we show that pretrained Transformers’ performance declines are substantially smaller. Pretrained transformers are also more effective at detecting anomalous or OOD examples, while many previous models are frequently worse than chance. We examine which factors affect robustness, finding that larger models are not necessarily more robust, distillation can be harmful, and more diverse pretraining data can enhance robustness. Finally, we show where future work can improve OOD robustness.
Keywords
Full Content
Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2744–2751 July 5 - 10, 2020. c⃝2020 Association for Computational Linguistics 2744 Pretrained Transformers Improve Out-of-Distribution Robustness Dan Hendrycks1∗ Xiaoyuan Liu1,2∗ Eric Wallace1 Adam Dziedzic3 Rishabh Krishnan1 Dawn Song1 1UC Berkeley 2Shanghai Jiao Tong University 3University of Chicago {hendrycks,ericwallace,dawnsong}@berkeley.edu Abstract Although pretrained Transformers such as BERT achieve high accuracy on in- distribution examples, do they generalize to new distributions? We systematically measure out-of-distribution (OOD) generalization for seven NLP datasets by constructing a new robustness benchmark with realistic distribu- tion shifts. We measure the generalization of previous models including bag-of-words models, ConvNets, and LSTMs, and we show that pretrained Transformers’ performance declines are substantially smaller. Pretrained transformers are also more effective at de- tecting anomalous or OOD examples, while many previous models are frequently worse than chance. We examine which factors affect robustness, finding that larger models are not necessarily more robust, distillation can be harmful, and more diverse pretraining data can enhance robustness. Finally, we show where future work can improve OOD robustness. 1 Introduction The train and test distributions are often not iden- tically distributed. Such train-test mismatches occur because evaluation datasets rarely charac- terize the entire distribution (Torralba and Efros, 2011), and the test distribution typically drifts over time (Quionero-Candela et al., 2009). Chasing an evolving data distribution is costly, and even if the training data does not become stale, models will still encounter unexpected situations at test time. Accordingly, models must generalize to OOD ex- amples whenever possible, and when OOD exam- ples do not belong to any known class, models must detect them in order to abstain or trigger a conservative fallback policy (Emmott et al., 2015). Most evaluation in natural language processing (NLP) assumes the train and test examples are in- ∗Equal contribution. https://github.com/camelop/NLP-Robustness dependent and identically distributed (IID). In the IID setting, large pretrained Transformer models can attain near human-level performance on nu- merous tasks (Wang et al., 2019). However, high IID accuracy does not necessarily translate to OOD robustness for image classifiers (Hendrycks and Di- etterich, 2019), and pretrained Transformers may embody this same fragility. Moreover, pretrained Transformers can rely heavily on spurious cues and annotation artifacts (Cai et al., 2017; Gururangan et al., 2018) which out-of-distribution examples are less likely to include, so their OOD robustness remains uncertain. In this work, we systematically study the OOD robustness of various NLP models, such as word embeddings averages, LSTMs, pretrained Trans- formers, and more. We decompose OOD robust- ness into a model’s ability to (1) generalize and to (2) detect OOD examples (Card et al., 2018). To measure OOD generalization, we create a new evaluation benchmark that tests robustness to shifts in writing style, topic, and vocabulary, and spans the tasks of sentiment analysis, textual entail- ment, question answering, and semantic similarity. We create OOD test sets by splitting datasets with their metadata or by pairing similar datasets to- gether (Section 2). Using our OOD generalization benchmark, we show that pretrained …
Content truncated to 500 words
Labeled Text
AbstractAlthough pretrained Transformers such as BERT achieve high accuracy on in-distribution examples, do they generalize to new distributions? We systematically measure out-of-distribution (OOD) generalization for seven NLP datasets by constructing a new robustness benchmark with realistic distribution shifts. We measure the generalization of previous models including bag-of-words models, ConvNets, and LSTMs, and we show that pretrained Transformers’ performance declines are substantially smaller. Pretrained transformers are also more effective at detecting anomalous or OOD examples, while many previous models are frequently worse than chance. We examine which factors affect robustness, finding that larger models are not necessarily more robust, distillation can be harmful, and more diverse pretraining data can enhance robustness. Finally, we show where future work can improve OOD robustness.
Publication Details
- Paper ID:
- 37951
- Year:
- 2020
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan