Elamur Research⌕
☰
home / papers / 2021 / Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristics

Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristics

Paper · 2021 · Prajjwal Bhargava, Aleksandr Drozd and Anna Rogers

Summary

The paper asks whether BERT-style models fine-tuned on MNLI can avoid the shallow cues that the adversarial HANS set is built to expose. Those cues are lexical overlap, subsequence and constituent heuristics, which lead models to answer "entailment" whenever premise and hypothesis share words. The authors test five strategies on BERT, RoBERTa and ALBERT variants. Two change the data or the scale: subsampling MNLI with dataset cartography, and growing model size. Three change the architecture: Siamese Transformers that encode the two sentences separately, adapters, and HEX debiasing against a naive CBOW-style model. Siamese networks and HEX stay at chance on HANS. Adapters land between those and plain fine-tuning without beating it. Two approaches give cautious gains: training on a well-chosen "hard" subsample, and using bigger models with longer fine-tuning. A probing experiment shows that when confidence is low, models lean toward entailment even after lexical overlap is broken by character noise. The work matters as a carefully documented record of negative results. It also shows how much reported generalization depends on implementation and random variation.

Key points

  • Evaluation setup
    • HANS has 30K test-only examples.
    • Because an MNLI-trained model predicts three classes and HANS has only two, the authors report accuracy averaged over the two HANS labels.
    • MNLI results are given on the matched dev set.
  • Architectural strategies
    • Siamese networks and HEX debiasing hover near 50–52% on HANS.
    • With adapters, RoBERTa-large reaches 90.4 on MNLI but only about 75.9 on HANS. Its vanilla fine-tuned counterpart gets roughly 80.
  • Cartography subsampling
    • For RoBERTa-large, a subsample of "hard" examples covering about 25% of MNLI works well on both MNLI and HANS.
    • Adding roughly 13% more biased data destroys the HANS gain.
    • No such subset was found for BERT-base.
  • Model size
    • HANS accuracy rises from chance with BERT-tiny to about 80–82% with RoBERTa-large.
    • The small ALBERT models generalize surprisingly well, which points to the value of parameter sharing.
    • Longer fine-tuning helps generalization while barely moving MNLI scores for large models.
  • Implementation variance
    • Published HANS scores for vanilla BERT-base range from 50.0% to 62.5%.
    • The authors' PyTorch-Lightning trainer reaches 69% (mean of 16 runs) with no architectural change.
  • Corruption probe
    • Random character insert, substitute, swap or delete was applied to "hard" samples.
    • Across corruptions and both base models, contradiction accuracy falls by roughly 10–20 points and entailment accuracy rises by roughly 10–30 points.

Interesting ideas

  • I1. Map each training example by the model's confidence and the variability of that confidence across epochs, then train on a curated mix of hard and ambiguous items; this can expose a small, informative subset, though the paper also shows the optimal mix is fragile and model-specific.
  • I2. Perturb low-confidence inputs with random noise and check whether predictions scatter evenly or collapse toward one label; a systematic drift reveals a hidden default answer that ordinary benchmark scores can hide.
  • I3. When the model's label set does not match the test set's, average accuracy per test label rather than overall, so that a degenerate model cannot look good by favouring the collapsed class.
  • I4. Run the same model under more than one training implementation and many seeds before believing a generalization claim, since trainer details alone moved HANS results by several points.
  • I5. Choosing a tiny training sample by clustering for diversity, rather than at random, improved in-distribution results under low resource, even though it did not fix out-of-distribution transfer.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (learn): Silver trees and frames could be charted by how consistently witness parsers and training epochs agree, so that retraining focuses on hard or ambiguous sentences instead of the easy bulk.
  • I2 (learn): As a negative control, corrupt words in test passages and check whether readers drift toward "yes" or "entailed" answers, which would flag a fallback on surface overlap.
  • I3 (answer): School-test and fable-QA scoring could report per-answer-type accuracy so that a reader biased toward one answer type is caught immediately.
  • I4 (tree): Comparisons between the perceptron parser and gparse should use repeated runs and, where possible, two training pipelines before a LAS gain on transferred treebanks is attributed to a design change.
  • I5 (learn): When an LLM teacher tier is expensive, sentences sent for teacher labels could be picked by clustering, while out-of-domain gains are still verified separately.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

Also on the byline: RIKEN Center for Computational Science.

📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 9,086 worksArtificial Intelligence · 8,889 worksArts and Humanities · 9,296 worksLanguage and Linguistics · 9,206 works

🧭 Topics 1Research subjects and languages the work is about.Reasoning · 510 works

Cite

Cite as Prajjwal Bhargava, Aleksandr Drozd and Anna Rogers. 2021. Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristics. Proceedings of the Second Workshop on Insights from Negative Results in NLP.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2021.insights-1.18

@inproceedings{bhargava2021generalization,
  title = {{Generalization in NLI: Ways (Not) To Go Beyond Simple Heuristics}},
  author = {Prajjwal Bhargava, Aleksandr Drozd and Anna Rogers},
  booktitle = {Proceedings of the Second Workshop on Insights from Negative Results in NLP},
  year = {2021},
  doi = {10.18653/v1/2021.insights-1.18},
  url = {https://doi.org/10.18653/v1/2021.insights-1.18}
}

References

43 references, 15 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Alexander A. Alemi, Ian Fischer, Joshua V. Dillon, and Kevin Murphy. 2016. Deep Variational Information Bottleneck. ↗
  2. Anonymous. 2021. Largely, right for better reasons:lexical generalization improves with model size. (Under review). find
  3. Yonatan Belinkov, Adam Poliak, Stuart Shieber, Benjamin Van Durme, and Alexander Rush. 2019. Don’t take the premise for granted: Mitigating artifacts in natural language inference. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 877–891, Florence, Italy. Association for Computational Linguistics.
  4. Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language Models are Few-Shot Learners. 33:1877–1901.
  5. Qian Chen, Xiaodan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. 2017. Enhanced LSTM for natural language inference. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1657–1668, Vancouver, Canada. Association for Computational Linguistics. find
  6. Sumit Chopra, Raia Hadsell, and Yann LeCun. 2005. Learning a similarity metric discriminatively, with application to face verification. In Proceedings of the 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05) - Volume 1 - Volume 01, CVPR ’05, page 539–546, USA. IEEE Computer Society. find
  7. Christopher Clark, Mark Yatskar, and Luke Zettlemoyer. 2020. Learning to Model and Ignore Dataset Bias with Mixed Capacity Ensembles. In Findings of the Association for Computational Linguistics: EMNLP 2020, pages 3031–3045, Online. Association for Computational Linguistics. find
  8. Matt Crane. 2018. Questionable Answers in Question Answering Research: Reproducibility and Variability of Published Results. Transactions of the Association for Computational Linguistics, 6:241–252. ↗
  9. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics. ↗
  10. Matt Gardner, William Merrill, Jesse Dodge, Matthew E. Peters, Alexis Ross, Sameer Singh, and Noah Smith. 2021. Competency Problems: On Finding and Removing Artifacts in Language Data. arXiv:2104.08646 [cs]. ↗
  11. Mor Geva, Yoav Goldberg, and Jonathan Berant. 2019. Are We Modeling the Task or the Annotator? An Investigation of Annotator Bias in Natural Language Understanding Datasets. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 1161–1166, Hong Kong, China. Association for Computational Linguistics. find
  12. Suchin Gururangan, Swabha Swayamdipta, Omer Levy, Roy Schwartz, Samuel Bowman, and Noah A. Smith. 2018. Annotation artifacts in natural language inference data. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 107–112, New Orleans, Louisiana. Association for Computational Linguistics. ↗
  13. Ruidan He, Linlin Liu, Hai Ye, Qingyu Tan, Bosheng Ding, Liying Cheng, Jiawei Low, Lidong Bing, and Luo Si. 2021. On the Effectiveness of Adapter-based Tuning for Pretrained Language Model Adaptation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 2208–2222, Online. Association for Computational Linguistics. ↗
  14. Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. 2019. Parameter-efficient transfer learning for NLP. In Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 2790–2799, Long Beach, California, USA. PMLR. ↗
  15. Angelos Katharopoulos and François Fleuret. 2018. Not all samples are created equal: Deep learning with importance sampling. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholmsmässan, Stockholm, Sweden, July 10-15, 2018, volume 80 of Proceedings of Machine Learning Research, pages 2530–2539. PMLR. ↗
  16. Gregory Koch, Richard Zemel, and Ruslan Salakhutdinov. 2015. Siamese neural networks for one-shot image recognition. In ICML deep learning workshop, volume 2. Lille. find
  17. Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. 2020. Albert: A lite bert for self-supervised learning of language representations. In International Conference on Learning Representations. find
  18. Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized BERT pretraining approach. CoRR, abs/1907.11692. ↗
  19. Rabeeh Karimi Mahabadi, Yonatan Belinkov, and James Henderson. 2020. Variational Information Bottleneck for Effective Low-Resource Fine-Tuning. In International Conference on Learning Representations. ↗
  20. Rabeeh Karimi Mahabadi, James Henderson, and Sebastian Ruder. 2021. Compacter: Efficient low-rank hypercomplex adapter layers. ↗
  21. R. Thomas McCoy, Junghyun Min, and Tal Linzen. 2019a. BERTs of a feather do not generalize together: Large variability in generalization across models with similar test set performance. arXiv:1911.02969 [cs]. ↗
  22. Tom McCoy, Ellie Pavlick, and Tal Linzen. 2019b. Right for the wrong reasons: Diagnosing syntactic heuristics in natural language inference. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3428–3448, Florence, Italy. Association for Computational Linguistics.
  23. Junghyun Min, R. Thomas McCoy, Dipanjan Das, Emily Pitler, and Tal Linzen. 2020. Syntactic data augmentation increases robustness to inference heuristics. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2339–2352, Online. Association for Computational Linguistics.
  24. Nafise Sadat Moosavi, Marcel de Boer, Prasetya Ajie Utama, and Iryna Gurevych. 2020. Improving Robustness by Augmenting Training Sentences with Predicate-Argument Structures. arXiv:2010.12510 [cs]. ↗
  25. Sharan Narang, Hyung Won Chung, Yi Tay, William Fedus, Thibault Fevry, Michael Matena, Karishma Malkan, Noah Fiedel, Noam Shazeer, Zhenzhong Lan, Yanqi Zhou, Wei Li, Nan Ding, Jake Marcus, Adam Roberts, and Colin Raffel. 2021. Do Transformer Modifications Transfer Across Implementations and Applications? arXiv:2102.11972 [cs]. ↗
  26. Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Te-jani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. 2019. Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d’Alché Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024–8035. Curran Associates, Inc. ↗
  27. Jonas Pfeiffer, Aishwarya Kamath, Andreas Rücklé, Kyunghyun Cho, and Iryna Gurevych. 2020. Adapterfusion: Non-destructive task composition for transfer learning.
  28. Adam Poliak, Jason Naradowsky, Aparajita Haldar, Rachel Rudinger, and Benjamin Van Durme. 2018. Hypothesis only baselines in natural language inference. In Proceedings of the Seventh Joint Conference on Lexical and Computational Semantics, pages 180–191, New Orleans, Louisiana. Association for Computational Linguistics. ↗
  29. Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1–67. ↗
  30. Nils Reimers and Iryna Gurevych. 2019. Sentence-BERT: Sentence embeddings using Siamese BERT-networks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3982–3992, Hong Kong, China. Association for Computational Linguistics. ↗
  31. Anna Rogers, Olga Kovaleva, Matthew Downey, and Anna Rumshisky. 2020a. Getting Closer to AI Complete Question Answering: A Set of Prerequisite Real Tasks. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 8722–8731. find
  32. Anna Rogers, Olga Kovaleva, and Anna Rumshisky. 2020b. A Primer in BERTology: What We Know About How BERT Works. Transactions of the Association for Computational Linguistics, 8:842–866. ↗
  33. Victor Sanh, Thomas Wolf, Yonatan Belinkov, and Alexander M. Rush. 2021. Learning from others’ mistakes: Avoiding dataset biases without modeling them. In International Conference on Learning Representations. ↗
  34. Swabha Swayamdipta, Roy Schwartz, Nicholas Lourie, Yizhong Wang, Hannaneh Hajishirzi, Noah A. Smith, and Yejin Choi. 2020. Dataset cartography: Mapping and diagnosing datasets with training dynamics. In Proceedings of the 2020 Conference on Chunhu Shi, Nicole Skoetz, Luc J. M. Smits, Kym I. E. Snell, Matthew Sperrin, René Spijker, Ewout W. Steyerberg, Toshihiko Takada, Ioanna Tzoulaki, Sander M. J. van Kuijk, Bas C. T. van Bussel, Iwan C. C. van der Horst, Florien S. van Royen, Jan Y. Verbakel, Christine Wallisch, Jack Wilkinson, Robert Wolff, Lotty Hooft, Karel G. M. Moons, and Maarten van Smeden. 2020. Prediction models for diagnosis and prognosis of covid-19: Systematic review and critical appraisal. 369:m1328. Empirical Methods in Natural Language Processing (EMNLP), pages 9275–9293, Online. Association for Computational Linguistics. find
  35. Naftali Tishby, Fernando C. Pereira, and William Bialek. 2000. The information bottleneck method. arXiv:physics/0004057. ↗
  36. Lifu Tu, Garima Lalwani, Spandana Gella, and He He. 2020. An Empirical Study on Robustness to Spurious Correlations using Pre-trained Language Models. Transactions of the Association for Computational Linguistics, 8:621–633. ↗
  37. Iulia Turc, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Well-read students learn better: On the importance of pre-training compact models. ↗
  38. Xiang Zhou and Mohit Bansal. 2020. Towards robustifying NLI models against lexical dataset biases. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8759– 8771, Online. Association for Computational Linguistics.
  39. Prasetya Ajie Utama, Nafise Sadat Moosavi, and Iryna Gurevych. 2020. Towards debiasing NLU models from unknown biases. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 7597–7610, Online. Association for Computational Linguistics. find
  40. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 5998–6008. Curran Associates, Inc.
  41. Haohan Wang, Zexue He, Zachary L. Lipton, and Eric P. Xing. 2019. Learning robust representations by projecting superficial statistics out. In International Conference on Learning Representations. ↗
  42. Adina Williams, Nikita Nangia, and Samuel Bowman. 2018. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 1112–1122. Association for Computational Linguistics. ↗
  43. Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pier-ric Cistac, Tim Rault, R’emi Louf, Morgan Funtowicz, and Jamie Brew. 2019. Huggingface’s transformers: State-of-the-art natural language processing. ArXiv, abs/1910.03771. Laure Wynants, Ben Van Calster, Gary S. Collins, Richard D. Riley, Georg Heinze, Ewoud Schuit, Marc M. J. Bonten, Darren L. Dahly, Johanna A. Damen, Thomas P. A. Debray, Valentijn M. T. de Jong, Maarten De Vos, Paula Dhiman, Maria C. Haller, Michael O. Harhay, Liesbet Henckaerts, Pauline Heus, Michael Kammer, Nina Kreuzberger, Anna Lohmann, Kim Luijken, Jie Ma, Glen P. Martin, David J. McLernon, Constanza L. Andaur Navarro, Johannes B. Reitsma, Jamie C. Sergeant, ↗

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/bhargava-2021-generalization-nli-ways-not-go/