Adversarial Question Answering Robustness: A Multi-Level Error Analysis and Mitigation Study
Agniv Roy Choudhury, Vignesh Ponselvan Rajasingh
TL;DR
This work analyzes adversarial robustness in extractive QA by performing a multi-level error analysis on AddSent and ELECTRA variants, uncovering negation confusion and entity substitution as the dominant failure modes. It shows that a simple adversarial training mix of 80% clean and 20% adversarial data yields strong gains, but capacity bottlenecks in small models limit generalization; scaling to ELECTRA-base Removes the robustness-accuracy trade-off and delivers substantial improvements on both clean and adversarial data. Building on this, the authors propose three mitigation strategies and find that NER-guided Entity-Aware contrastive learning provides the best overall performance, achieving AddSent EM of 89.89% and SQuAD EM of 90.73% with a 94.9% closure of the adversarial gap, i.e., near parity between clean and adversarial performance. These results underscore that model capacity and targeted linguistic-awareness training are key to robust QA, with practical implications for deploying resistant systems in real-world settings.
Abstract
Question answering (QA) systems achieve impressive performance on standard benchmarks like SQuAD, but remain vulnerable to adversarial examples. This project investigates the adversarial robustness of transformer models on the AddSent adversarial dataset through systematic experimentation across model scales and targeted mitigation strategies. We perform comprehensive multi-level error analysis using five complementary categorization schemes, identifying negation confusion and entity substitution as the primary failure modes. Through systematic evaluation of adversarial fine-tuning ratios, we identify 80% clean + 20% adversarial data as optimal. Data augmentation experiments reveal a capacity bottleneck in small models. Scaling from ELECTRA-small (14M parameters) to ELECTRA-base (110M parameters) eliminates the robustness-accuracy trade-off, achieving substantial improvements on both clean and adversarial data. We implement three targeted mitigation strategies, with Entity-Aware contrastive learning achieving best performance: 89.89% AddSent Exact Match (EM) and 90.73% SQuAD EM, representing 94.9% closure of the adversarial gap. To our knowledge, this is the first work integrating comprehensive linguistic error analysis with Named Entity Recognition (NER)-guided contrastive learning for adversarial QA, demonstrating that targeted mitigation can achieve near-parity between clean and adversarial performance.
