[Paper Review] Stress Test Evaluation of Transformer-based Models in Natural Language Understanding Tasks
This paper evaluates the robustness of state-of-the-art Transformer-based models—RoBERTa, XLNet, and BERT—under adversarial stress tests in Natural Language Inference (NLI) and Question Answering (QA) tasks. Despite showing greater resilience than prior RNN models, the models exhibit unexpected failures under severe perturbations, revealing persistent vulnerabilities in generalization and reasoning under stress.
There has been significant progress in recent years in the field of Natural Language Processing thanks to the introduction of the Transformer architecture. Current state-of-the-art models, via a large number of parameters and pre-training on massive text corpus, have shown impressive results on several downstream tasks. Many researchers have studied previous (non-Transformer) models to understand their actual behavior under different scenarios, showing that these models are taking advantage of clues or failures of datasets and that slight perturbations on the input data can severely reduce their performance. In contrast, recent models have not been systematically tested with adversarial-examples in order to show their robustness under severe stress conditions. For that reason, this work evaluates three Transformer-based models (RoBERTa, XLNet, and BERT) in Natural Language Inference (NLI) and Question Answering (QA) tasks to know if they are more robust or if they have the same flaws as their predecessors. As a result, our experiments reveal that RoBERTa, XLNet and BERT are more robust than recurrent neural network models to stress tests for both NLI and QA tasks. Nevertheless, they are still very fragile and demonstrate various unexpected behaviors, thus revealing that there is still room for future improvement in this field.
Motivation & Objective
- To systematically evaluate the robustness of state-of-the-art Transformer-based models (RoBERTa, XLNet, BERT) under extreme stress conditions.
- To investigate whether these models generalize well or still rely on dataset artifacts and superficial cues, as seen in earlier RNN models.
- To identify failure modes and unexpected behaviors under adversarial inputs, such as noise, negation, and antonymy.
- To compare the performance degradation of Transformer models against their RNN predecessors under identical stress test scenarios.
- To release a new adversarial SQuAD dataset to support future robustness research and adversarial training.
Proposed method
- Applied stress tests including distraction (e.g., irrelevant but plausible content), noise (e.g., typos, word swaps), negation, and antonymy on NLI and QA tasks.
- Used the MultiNLI dataset for Natural Language Inference and the SQuAD dataset for Question Answering, with adversarial examples generated via controlled perturbations.
- Developed a new adversarial SQuAD dataset by introducing noise and adversarial examples, released publicly at https://github.com/caspillaga/noisy-squad.
- Conducted quantitative performance analysis across all stress test conditions, measuring accuracy drops and model behavior shifts.
- Performed attention matrix inspection during inference to analyze model focus and detect misalignment between input and attention patterns.
- Compared model performance across RoBERTa, XLNet, and BERT under identical stress conditions to assess relative robustness and model-specific failure patterns.
Experimental results
Research questions
- RQ1How do RoBERTa, XLNet, and BERT perform under adversarial stress tests in NLI and QA tasks compared to previous RNN-based models?
- RQ2To what extent do these models rely on dataset artifacts or superficial cues rather than true semantic understanding?
- RQ3Which types of adversarial perturbations (e.g., noise, negation, antonymy) most severely degrade model performance?
- RQ4Are there model-specific vulnerabilities that affect one model more than others under the same stress conditions?
- RQ5Can attention matrices reveal misalignment between input and model focus during adversarial inference, indicating flawed reasoning?
Key findings
- RoBERTa, XLNet, and BERT demonstrated greater robustness than RNN-based models under stress tests, particularly in handling noise and antonymy, likely due to large-scale pre-training.
- The distraction test significantly reduced performance, especially in the negation condition, indicating persistent difficulty with logical reasoning and semantic reversal.
- Models showed strong performance on antonymy tasks, suggesting that pre-training on diverse corpora may have implicitly captured lexical oppositions.
- The annotation artifacts test revealed that models consider both premise and hypothesis, not just label biases, indicating they do not exploit dataset artifacts in NLI.
- In QA tasks, adversarial and noisy examples degraded performance across all models, though the drop was smaller than for RNNs, confirming improved robustness.
- Some adversarial examples were model-specific, affecting one model but not others, highlighting unique failure points even among state-of-the-art Transformers.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.