TL;DR
Standard adversarial training tries to teach models to ignore deceptive text implicitly through data augmentation, but it frequently fails to make them truly robust. By equipping language models with an extractive "rationale" filter explicitly supervised to identify and mask out adversarial tokens, this work recovers up to 10% in attacked accuracy—closing the gap to clean test performance while requiring 10× fewer adversarial training examples.
What Problem Does This Paper Address?
Pre-trained language models like BERT and RoBERTa remain fragile against adversarial manipulation. In reading comprehension and question answering, an adversary can mount an additive attack (such as AddSent): inserting a syntactically convincing, distracting sentence into a document to mislead the model without changing the true answer.
The prevailing defense is adversarial training via data augmentation—simply adding attacked instances to the training set and hoping the model implicitly learns to tune out malicious noise. However, deep neural nets often fail to learn what to disregard, picking up on spurious shortcuts instead. The authors ask: What if we explicitly train the model to discard attacking tokens using an input filter?
Methods
The authors adopt a two-stage rationalization framework (Lei et al., 2016) consisting of:
- Rationale Extractor ($g$): Inspects the full input sequence $x$ (document + query) and outputs soft selection weights $\hat{r} \in [0, 1]$ for document tokens (query tokens are always preserved).
- Predictor ($f$): Receives the masked text sequence $m(x, \hat{r}) = \hat{r} \cdot x$ and predicts the task label $\hat{y}$.
Input x ────► [ Rationale Extractor g ] ────► Mask r̂
│ │
▼ ▼
[ Masking m(x, r̂) ] ────────► [ Predictor f ] ────► Output ŷ
Unlike classic unsupervised rationale models that rely solely on sparsity heuristics, this architecture is directly supervised with token-level targets:
- **`Adv.
- Atk. Sup.` (Adversarial Rationale Supervision):** Synthetic attack tokens are assigned ground-truth label $0$ (ignore) and clean document tokens are assigned $1$ (keep).
- **Human Rationales (
Human Sup./ `Adv. - Human Sup.`):** Models are supervised to retain only the human-annotated supporting evidence.
The joint loss combines label classification cross-entropy, rationale prediction cross-entropy weighted by $\lambda_1$, and an $L_1$ rationale sparsity penalty weighted by $\lambda_2$: $$\mathcal{L} = \mathcal{L}_{CE}(\hat{y}, y) + \lambda_1 \mathcal{L}_{CE}(\hat{r}, r) + \lambda_2 \|\hat{r}\|_1$$
At test time, the mask is discretized into binary values to completely block filtered tokens from reaching the predictor.
Datasets
The authors evaluate on three reading comprehension benchmarks:
- MultiRC: Multi-sentence reading comprehension requiring reasoning over multiple context sentences (includes human rationales).
- FEVER: Fact extraction and verification benchmark (subsampled to 25% training size; includes human rationales).
- SQuAD (v1.1): Span-extraction QA benchmark evaluated against original clean dev data, synthetic rule-based attacks (
AddSent_S), and human-rewritten/validated attacks (AddSent_HandAddOneSent_H).
Key Insights and Ideas
- Explicit supervision beats implicit learning: Training a model to explicitly mask out attacker tokens outperforms standard data augmentation baselines across the board. Furthermore, it outperforms baselines augmented with 10× more attack data (
Adv.-10x), proving that token-level guidance is substantially more sample-efficient. - Synthetic training generalizes to human attacks: Although the extractor is trained exclusively on synthetic rule-generated attacks, it successfully transfers to human-written adversarial sentences on SQuAD, ignoring over 70% of human-crafted attack tokens while keeping 99% of original context.
- Human rationales are not a silver bullet for robustness: While human rationales improve model sparsity and interpretability, they provide minimal extra defense compared to simply supervising the model to drop attack tokens. In fact, aggressive human-rationale masking sometimes drops necessary context in long or dense passages, increasing false negatives.
Key Results
- Robustness gains: `Adv.
- Atk. Sup.
improves accuracy on attacked test sets by an average of **10.4%** over undefended baselines (No Adv.) and beats standard adversarial augmentation (Adv.`) by 2.4% on average (e.g., +4.6% on BERT MultiRC, +2.9% on BERT FEVER, and +2.7% F1 on BERT SQuAD). - Closing the clean vs. attacked gap: On RoBERTa evaluated on MultiRC and FEVER, the rationale defense virtually eliminates the attack penalty, reaching 85.1% accuracy on attacked MultiRC (compared to 82.9% for standard
Adv.and 85.2% clean). - Attack token filtering: The extractor successfully filters out over 90% of synthetic attack tokens on MultiRC and FEVER (leaving $\le 6\%$ attack tokens in the rationale) while preserving 95–98% of clean document tokens.
Limitations and Future Work
- Attack scope: The framework was tested exclusively against additive attacks (
AddSent) in QA/reading comprehension. It cannot natively defend against token deletion or word substitution/flipping without architectural changes. - Known attack positions: The supervision requires knowing exactly which tokens are adversarial during training, which may not always be realistic for in-the-wild attacks.
- Compute cost: Employing separate extractor and predictor language model modules roughly doubles parameter count (e.g., 220M parameters for BERT, 708M for RoBERTa) and roughly doubles training wall-clock time.
- Future direction: The authors propose extending the extractor into an active "defender" layer that can fill gaps left by token removal via generative inpainting or pair with dynamic self-supervised adversaries.
Summary updated