Metamorphic Testing for Evaluating Robustness of Sentiment Analysis Models
Not on the map. Why?
Abstract (arXiv)
Machine learning systems are challenging to test using traditional software testing methods because their behavior is learned from data rather than explicitly programmed. This challenge is particularly significant in natural language processing (NLP), where small input variations can lead to unexpected model behavior. Conventional evaluation metrics, such as accuracy and F1-score, often fail to capture such inconsistencies. Metamorphic testing addresses this limitation by evaluating expected relationships between original and transformed inputs. With the increasing prevalence of generative artificial intelligence (GenAI) and language-based AI systems, the need for systematic robustness testing has become even more pronounced. Motivated by this growing need, this paper presents a lightweight, batch-based metamorphic testing approach for evaluating the robustness of such systems. In particular, we consider sentiment analysis as a representative NLP task and evaluate a pretrained classifier under four transformations: synonym replacement, typo injection, word-order variation, and negation. Using consistency score, flip accuracy, and confidence change, we identify strengths in handling semantic variations and vulnerabilities to textual noise and logical transformations. These findings highlight the value of metamorphic testing in identifying behavioral inconsistencies beyond conventional performance metrics and demonstrate its potential as a systematic framework for evaluating the robustness of language-based AI systems and guiding performance improvements before deployment.
Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 19 of its 53 references that are in the map. Submitted 1 Nov 2026.
Builds on
19 of 53 references.
References · 19
- 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 12,277
- 2015Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shiftcited by 7,168
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,616
- 2020Bootstrap your own latent: A new approach to self-supervised Learningcited by 4,858
- 2021Barlow Twins: Self-Supervised Learning via Redundancy Reductioncited by 1,886
- 2018ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustnesscited by 1,474
- 2021VICReg: Variance-Invariance-Covariance Regularization for Self-Supervised Learningcited by 1,130
- 2019Making Convolutional Networks Shift-Invariant Againcited by 405
- 2018Generalisation in humans and deep neural networkscited by 249
- 2021Partial success in closing the gap between human and machine visioncited by 189
- 2018Greedy Layerwise Learning Can Scale to ImageNetcited by 121
- 2019Putting An End to End-to-End: Gradient-Isolated Learning of Representationscited by 90
7 more
- 2017Classification and Geometry of General Perceptual Manifoldscited by 64
- 2020Local plasticity rules can learn deep representations using self-supervised contrastive predictionscited by 50
- 2023Learning Efficient Coding of Natural Images with Maximum Manifold Capacity Representationscited by 32
- 2023Blockwise Self-Supervised Learning at Scalecited by 27
- 2017Why do similarity matching objectives lead to Hebbian/anti-Hebbian networks?cited by 22
- 2020The shape and simplicity biases of adversarially robust ImageNet-trained CNNscited by 15
- 2023Layerwise complexity-matched learning yields an improved model of cortical area V2cited by 2
Built on by
Not cited yet.