Finding Dataset Shortcuts with Grammar Induction
30970Authors
nan
Abstract
AbstractMany NLP datasets have been found to contain shortcuts: simple decision rules that achieve surprisingly high accuracy. However, it is difficult to discover shortcuts automatically. Prior work on automatic shortcut detection has focused on enumerating features like unigrams or bigrams, which can find only low-level shortcuts, or relied on post-hoc model interpretability methods like saliency maps, which reveal qualitative patterns without a clear statistical interpretation. In this work, we propose to use probabilistic grammars to characterize and discover shortcuts in NLP datasets. Specifically, we use a context-free grammar to model patterns in sentence classification datasets and use a synchronous context-free grammar to model datasets involving sentence pairs. The resulting grammars reveal interesting shortcut features in a number of datasets, including both simple and high-level features, and automatically identify groups of test examples on which conventional classifiers fail. Finally, we show that the features we discover can be used to generate diagnostic contrast examples and incorporated into standard robust optimization methods to improve worst-group accuracy.
Keywords
Full Content
Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 4345 - 4363 December 7-11, 2022 ©2022 Association for Computational Linguistics Finding Dataset Shortcuts with Grammar Induction Dan Friedman, Alexander Wettig, Danqi Chen Department of Computer Science, Princeton University {dfriedman,awettig,danqic}@cs.princeton.edu Abstract Many NLP datasets have been found to con- tain shortcuts: simple decision rules that achieve surprisingly high accuracy. However, it is difficult to discover shortcuts automati- cally. Prior work on automatic shortcut de- tection has focused on enumerating features like unigrams or bigrams, which can find only low-level shortcuts, or relied on post-hoc model interpretability methods like saliency maps, which reveal qualitative patterns with- out a clear statistical interpretation. In this work, we propose to use probabilistic gram- mars to characterize and discover shortcuts in NLP datasets. Specifically, we use a context- free grammar to model patterns in sentence classification datasets and use a synchronous context-free grammar to model datasets in- volving sentence pairs. The resulting gram- mars reveal interesting shortcut features in a number of datasets, including both simple and high-level features, and automatically identify groups of test examples on which conventional classifiers fail. Finally, we show that the fea- tures we discover can be used to generate di- agnostic contrast examples and incorporated into standard robust optimization methods to improve worst-group accuracy.1 1 Introduction Many NLP datasets have been found to contain shortcuts: simple decision rules that achieve sur- prisingly high accuracy. For example, it is possible to get high classification accuracy on paraphrase identification datasets by predicting that sentences with many common words are paraphrases of each other (Zhang et al., 2019). Such classifiers are said to be “right for the wrong reason” (McCoy et al., 2019). Shortcuts are a problem if they do not gen- eralize to the intended test distribution (Geirhos 1Our code for inducing grammars and finding dataset shortcuts is available at https://github.com/princeton- nlp/ShortcutGrammar. et al., 2020). For example, paraphrase identifica- tion models might misclassify non-paraphrases that have many overlapping words. Shortcuts have been reported in many estab- lished datasets (e.g., McCoy et al., 2019; Guru- rangan et al., 2018; Niven and Kao, 2019; Schuster et al., 2019), as a consequence of annotation arti- facts or so-called spurious correlations. Typically, these discoveries are the result of human intuition about possible patterns in a particular dataset. Our goal in this paper is to discover shortcuts automat- ically. If we can identify shortcuts, we can iden- tify categories of examples on which conventional classifiers will fail, and try to mitigate these weak- nesses by collecting more training data or using robust optimization algorithms. The main challenge to automatically identify- ing shortcuts is to develop a formal framework for describing patterns in language data that can cap- ture both simple and high-level features and that makes it possible to search for these patterns ef- ficiently. Prior work has addressed only simple features like unigrams and bigrams (Wang and Cu- lotta, 2020; Wang et al., 2022; Gardner et al., 2021), and it is difficult …
Content truncated to 500 words
Labeled Text
AbstractMany NLP datasets have been found to contain shortcuts: simple decision rules that achieve surprisingly high accuracy. However, it is difficult to discover shortcuts automatically. Prior work on automatic shortcut detection has focused on enumerating features like unigrams or bigrams, which can find only low-level shortcuts, or relied on post-hoc model interpretability methods like saliency maps, which reveal qualitative patterns without a clear statistical interpretation. In this work, we propose to use probabilistic grammars to characterize and discover shortcuts in NLP datasets. Specifically, we use a context-free grammar to model patterns in sentence classification datasets and use a synchronous context-free grammar to model datasets involving sentence pairs. The resulting grammars reveal interesting shortcut features in a number of datasets, including both simple and high-level features, and automatically identify groups of test examples on which conventional classifiers fail. Finally, we show that the features we discover can be used to generate diagnostic contrast examples and incorporated into standard robust optimization methods to improve worst-group accuracy.
Publication Details
- Paper ID:
- 30970
- Year:
- 2022
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan