Elamur Research⌕
☰
home / papers / 2020 / Stress Test Evaluation of Transformer-based Models in Natural Language Understanding Tasks

Stress Test Evaluation of Transformer-based Models in Natural Language Understanding Tasks

Paper · 2020 · Carlos Aspillaga, Andrés Carvallo and Vladimir Araujo

Summary

The paper examines whether large pre-trained Transformer encoders are actually robust, or whether they still have the weaknesses earlier recurrent models showed under adversarial and noisy inputs. The authors fine-tuned the large versions of BERT, XLNet and RoBERTa (via HuggingFace) on two NLU tasks. For NLI they used MultiNLI and the stress-test suite of Naik et al., which covers distraction, spelling noise, antonymy and numerical reasoning. For extractive QA they used SQuAD v1.1 with the adversaries of Jia and Liang (AddSent, AddOneSent, AddAny, AddCommon), plus a new typo-noised SQuAD set that they released. LSTM-based systems served as reference points: BiDAF, Match-LSTM, a BiLSTM and the RepEval 2017 winner. The Transformers lose much less accuracy than the older models. However, they still break in specific ways: negation cues mislead them, they reason poorly about numbers, and they can be highly confident about wrong answers. The authors also inspected attention maps. The work matters because it shows that higher benchmark accuracy only means better robustness on average, not reliable understanding.

Key points

  • On the negation distraction set (a tautology with "false"/"not" added to the hypothesis), all three Transformers fall below 60% accuracy, close to the LSTM baselines.
    • BERT and XLNet mostly turn entailment into neutral (93% and 91% of their errors).
    • RoBERTa mostly makes the opposite mistake, neutral into entailment (85%).
  • Word-overlap distraction costs the Transformers about 20 points, leaving them near 60%. Appending the tautology five times to the premise (length mismatch) barely hurts them.
  • On SQuAD AddSent, the drop from original accuracy is much smaller for the Transformers than for the LSTM models:
    • RoBERTa-Large: 85.8 → 70.3
    • XLNet-Large: 85.2 → 67.7
    • BERT-Large: 82.5 → 64.6
    • BiDAF: 75.5 → 45.7
    • Match-LSTM: 60.8 → 30.0
  • Adversaries generated against one model transfer only partly to others, so some attacks are model-specific.
  • Attention probes suggest the models rarely link the words that matter:
    • In an antonym example, only 1.5–2.9% of layer-heads connect the swapped word with its antonym.
    • In a SQuAD failure, RoBERTa gave a distractor entity 99.9% confidence.
    • The noisy dataset is published as noisy-squad.

Interesting ideas

  • I1. Append content-free filler that changes nothing logically (for example a tautology repeated several times) and check that the prediction stays the same; this separates real inference from surface-similarity heuristics.
  • I2. Report which way the confusions go (entailment→neutral versus neutral→entailment), not just overall accuracy; two models with the same score can fail for opposite reasons.
  • I3. Build adversarial inputs against one system, then measure how far they carry over to other systems; this shows whether a weakness is generic or belongs to one model.
  • I4. Inject a single realistic typo per sentence, either by swapping adjacent letters or by replacing a letter with a neighbouring key, as a cheap test of robustness to noise.
  • I5. Check whether the model's internal links actually connect the evidence that decides the answer, and look at how confident it is when it is wrong; a correct-looking answer from the wrong evidence counts as a failure.

For Mova

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

  • I1 (learn): Add tautology-padded copies of test items as negative controls, and flag any change in the answer as a regression.
  • I2 (answer): Break down school-test and fable-QA errors by which wrong label was chosen, to see whether negation handling pushes the reader towards "unknown" or towards "yes".
  • I3 (tree): Collect sentences that break the perceptron parser and run them through gparse and the other witness parsers, so that silver agreement does not hide errors all the parsers share.
  • I4 (tokens): Generate keyboard-typo variants of treebank sentences to test whether the tagger and lemmatizer degrade gracefully instead of corrupting the whole analysis.
  • I5 (world): When a distractor sentence adds a plausible rival entity (like a fake company taking over another), confirm that the answer's derivation path runs through the entity state from the original text, not the appended claim.

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

 Fields, topics and concepts

Cite

Cite as Carlos Aspillaga, Andrés Carvallo and Vladimir Araujo. 2020. Stress Test Evaluation of Transformer-based Models in Natural Language Understanding Tasks. Proceedings of the Twelfth Language Resources and Evaluation Conference.

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{aspillaga2020stress,
  title = {{Stress Test Evaluation of Transformer-based Models in Natural Language Understanding Tasks}},
  author = {Carlos Aspillaga, Andrés Carvallo and Vladimir Araujo},
  booktitle = {Proceedings of the Twelfth Language Resources and Evaluation Conference},
  year = {2020},
  url = {https://aclanthology.org/2020.lrec-1.232/}
}

References

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

  1. Agrawal, A., Batra, D., and Parikh, D. (2016). Analyzing the behavior of visual question answering models. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 1955– 1960, Austin, Texas, November. Association for Computational Linguistics.
  2. Belinkov, Y. and Bisk, Y. (2018). Synthetic and natural noise both break neural machine translation. In International Conference on Learning Representations. ↗
  3. Bengio, Y., Ducharme, R., and Vincent, P. (2001). A neural probabilistic language model. In T. K. Leen, et al., editors, Advances in Neural Information Processing Systems 13, pages 932–938. MIT Press.
  4. Carvallo, A. and Parra, D. (2019). Comparing word embeddings for document screening based on active learning. find
  5. Dehghani, M., Gouws, S., Vinyals, O., Uszkoreit, J., and Kaiser, Ł. (2018). Universal transformers. arXiv preprint arXiv:1807.03819. ↗
  6. Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2018). Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805. ↗
  7. Ebrahimi, J., Lowd, D., and Dou, D. (2018). On adversarial examples for character-level neural machine translation. In Proceedings of the 27th International Conference on Computational Linguistics, pages 653–663, Santa Fe, New Mexico, USA, August. Association for Computational Linguistics. ↗
  8. Gururangan, S., Swayamdipta, S., Levy, O., Schwartz, R., Bowman, S., and Smith, N. A. (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, June. Association for Computational Linguistics.
  9. Hochreiter, S. and Schmidhuber, J. (1997). Long short-term memory. Neural computation, 9(8):1735–1780. ↗
  10. Hsieh, Y.-L., Cheng, M., Juan, D.-C., Wei, W., Hsu, W.-L., and Hsieh, C.-J. (2019). On the robustness of self-attentive models. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1520–1529, Florence, Italy, July. Association for Computational Linguistics. find
  11. Iyyer, M., Wieting, J., Gimpel, K., and Zettlemoyer, L. (2018). Adversarial example generation with syntactically controlled paraphrase networks. 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 1875–1885, New Orleans, Louisiana, June. Association for Computational Linguistics.
  12. Jia, R. and Liang, P. (2017). Adversarial examples for evaluating reading comprehension systems. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pages 2021–2031, Copenhagen, Denmark, September. Association for Computational Linguistics.
  13. Jin, D., Jin, Z., Zhou, J. T., and Szolovits, P. (2019). Is bert really robust? a strong baseline for natural language attack on text classification and entailment.
  14. Kroening, D., Sharygina, N., Tonetta, S., Tsitovich, A., and Wintersteiger, C. M. (2008). Loop summarization using abstract transformers. In International Symposium on Automated Technology for Verification and Analysis, pages 111–125. Springer. find
  15. Levy, O., Remus, S., Biemann, C., and Dagan, I. (2015). Do supervised distributional methods really learn lexical inference relations? In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 970–976, Denver, Colorado, May–June. Association for Computational Linguistics.
  16. Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. (2019). Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692. ↗
  17. Max, A. and Wisniewski, G. (2010). Mining naturally-occurring corrections and paraphrases from Wikipedia’s revision history. In Proceedings of the Seventh conference on International Language Resources and Evaluation (LREC’10), Valletta, Malta, May. European Languages Resources Association (ELRA). find
  18. Nadeau, D. and Sekine, S. (2007). A survey of named entity recognition and classification. Lingvisticae Investigationes, 30(1):3–26. ↗
  19. Naik, A., Ravichander, A., Sadeh, N., Rose, C., and Neubig, G. (2018). Stress test evaluation for natural language inference. In The 27th International Conference on Computational Linguistics (COLING), Santa Fe, New Mexico, USA, August. ↗
  20. Nangia, N., Williams, A., Lazaridou, A., and Bowman, S. (2017). find
  21. The RepEval 2017 shared task: Multi-genre natural language inference with sentence representations. In Proceedings of the 2nd Workshop on Evaluating Vector Space Representations for NLP, pages 1–10, Copenhagen, Denmark, September. Association for Computational Linguistics.
  22. Nie, Y. and Bansal, M. (2017). Shortcut-stacked sentence encoders for multi-domain inference. In Proceedings of the 2nd Workshop on Evaluating Vector Space Representations for NLP, pages 41–45, Copenhagen, Denmark, September. Association for Computational Linguistics. find
  23. Niven, T. and Kao, H.-Y. (2019). Probing neural network comprehension of natural language arguments. arXiv preprint arXiv:1907.07355. ↗
  24. Pennington, J., Socher, R., and Manning, C. (2014). Glove: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1532– 1543, Doha, Qatar, October. Association for Computational Linguistics.
  25. Radford, A. and Sutskever, I. (2018). Improving language understanding by generative pre-training. find
  26. Rajpurkar, P., Zhang, J., Lopyrev, K., and Liang, P. (2016). SQuAD: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2383–2392, Austin, Texas, November. Association for Computational Linguistics. ↗
  27. Ribeiro, M. T., Singh, S., and Guestrin, C. (2018). Semantically equivalent adversarial rules for debugging NLP models. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 856–865, Melbourne, Australia, July. Association for Computational Linguistics. find
  28. Šebesta, K., Bedřichová, Z., Šormová, K., Štindlová, B., Hrdlička, M., Hrdličková, T., Hana, J., Petkevič, V., Jelı́nek, T., Škodová, S., Janeš, P., Lundáková, K., Skoumalová, H., Sládek, Š., Pierscieniak, P., Toufarová, D., Straka, M., Rosen, A., Náplava, J., and Poláčková, M. (2017). CzeSL grammatical error correction dataset (CzeSL-GEC). LINDAT/CLARIN digital library at the Institute of Formal and Applied Linguistics (ÚFAL), Faculty of Mathematics and Physics, Charles University. find
  29. Seo, M., Kembhavi, A., Farhadi, A., and Hajishirzi, H. (2016). Bidirectional attention flow for machine comprehension. ArXiv, abs/1611.01603. ↗
  30. Smith, N. A. (2012). Adversarial evaluation for models of natural language. arXiv preprint arXiv:1207.0245. ↗
  31. Tsoumakas, G. and Katakis, I. (2007). Multi-label classification: An overview. International Journal of Data Warehousing and Mining (IJDWM), 3(3):1–13. find
  32. Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. In Advances in neural information processing systems, pages 5998–6008.
  33. Vaswani, A., Bengio, S., Brevdo, E., Chollet, F., Gomez, A. N., Gouws, S., Jones, L., Kaiser, Ł., Kalchbrenner, N., Parmar, N., et al. (2018). Tensor2tensor for neural machine translation. arXiv preprint arXiv:1803.07416. ↗
  34. Vig, J. (2019). A multiscale visualization of attention in the transformer model. arXiv preprint arXiv:1906.05714. ↗
  35. Wang, S. and Jiang, J. (2016). Machine comprehension using match-lstm and answer pointer. ArXiv, abs/1608.07905. ↗
  36. Williams, A., Nangia, N., and Bowman, S. (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.
  37. Wisniewski, K., Schöne, K., Nicolas, L., Vettori, C., Boyd, A., Meurers, D., Abel, A., and Hana, J. (2013). MERLIN: An online trilingual learner corpus empirically grounding the European Reference Levels in authentic learner data. URL https://www.ukp.tu-darmstadt.de/data/spelling-correction/rwse-datasets. ↗
  38. Wolf, T., Debut, L., Sanh, V., Chaumond, J., Delangue, C., Moi, A., Cistac, P., Rault, T., Louf, R., Funtowicz, M., and Brew, J. (2019). Huggingface’s transformers: State-of-the-art natural language processing. ArXiv, abs/1910.03771. ↗
  39. Yang, Z., Dai, Z., Yang, Y., Carbonell, J., Salakhutdinov, R., and Le, Q. V. (2019). Xlnet: Generalized autoregressive pretraining for language understanding. arXiv preprint arXiv:1906.08237. ↗
  40. Zesch, T. (2012). Measuring contextual fitness using error contexts extracted from the Wikipedia revision history. In Proceedings of the 13th Conference of the European Chapter of the Association for Computational Linguistics, pages 529–538, Avignon, France, April. Association for Computational Linguistics. ↗
  41. Zhang, C., Bengio, S., Hardt, M., Recht, B., and Vinyals, O. (2017). Understanding deep learning requires rethinking generalization. ↗

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/aspillaga-2020-stress-test-evaluation-transformer-based/