Breaking BERT: A Comprehensive Study of Transformer Robustness to Linguistically Grounded Semantic Perturbations

The results for transformer models, such as BERT are good on many NLP benchmarks, but the models’ accuracy doesn’t guarantee understanding of the language. This paper evaluates all of these (DistilBERT, Bi-LSTM, TextCNN and Logistic Regression) with respect to paraphrase detection on the Quora Question Pairs (QQP) dataset and compares each of them against a newly created Tricky Dataset containing 51,338 perturbed pairs over four transformations: negation insertion, quantifier swap, entity replacement, and distractor prefix. DistilBERT’s top results on the standard QQP hold 89.9% accuracy, whereas it fails to get over 13.8% on the quantifier swaps, a 76.1%-point below random chance. Content-word overlap is identified as the important thing by LIME and by ”attention-map” analysis and systematic neglect of logical operators is identified in the models. Realistic expectations for the abilities of these models are higher than the scores found in the standards. A gap is revealed with a perturbation-based evaluation.