Pretrained Transformers Improve Out-of-Distribution Robustness

Dan Hendrycks, Xiaoyuan Liu, Eric Wallace, Adam Dziedzic, Rishabh Krishnan +1 more
4/13/2020
cs.CLcs.LG
transformer-attention

Official code: camelop/NLP-Robustness (59 stars, Python, last commit 2020-04-15).

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 distribution shifts.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

OOD Generalization and Detection (ACL 2020)

599Python, JsonnetJul 25, 20196 years ago
albertbertdomain-generalizationout-of-distributionout-of-distribution-detection+4 more

Similar Papers

Cite this paper

@article{hendrycks2020pretrained,
  title  = {Pretrained Transformers Improve Out-of-Distribution Robustness},
  author = {Dan Hendrycks and Xiaoyuan Liu and Eric Wallace and Adam Dziedzic and Rishabh Krishnan and Dawn Song},
  year   = {2020},
  eprint = {2004.06100},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2004.06100}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2004.06100.svg)](https://codeofpaper.com/paper/2004.06100)

Discussion