Introduction
Deep learning models for Natural Language Processing (NLP) are notoriously brittle. A common vulnerability is the "AddText" attack, where a distractor sentence is inserted into a document. Even if the added text is nonsensical or irrelevant, it can frequently trick state-of-the-art models into changing their predictions. While researchers have traditionally explored extractive rationalization to improve model interpretability, this paper investigates whether these mechanisms can also serve as a security feature.
The Rationale-then-Predict Pipeline
Extractive rationale models operate via a two-stage pipeline: a rationalizer selects the most relevant snippets of text (the "rationale"), and a predictor uses only those snippets to make a final decision. This architecture creates a natural "shield." If the rationalizer successfully filters out adversarial noise, the predictor remains unaffected.
The authors evaluate two primary rationale frameworks:
- Variational Information Bottleneck (VIB): A stochastic approach that samples masks to identify relevant text.
- SPECTRA: A deterministic approach that utilizes constrained inference to select rationales.
These are compared against standard Full-Context (FC) models, which process the entire input text without filtering.
Adversarial Attacks and Datasets
To test robustness, the study employs three variations of "AddText" attacks:
- AddText-Rand: Insertion of random words.
- AddText-Wiki: Insertion of random sentences from Wikipedia.
- AddText-Adv: Insertion of adversarially crafted sentences designed with high lexical overlap to the query or context.
The evaluation spans five diverse datasets, covering sentence-level tasks like fact verification (FEVER) and question answering (MultiRC, SQuAD), as well as token-level multi-aspect sentiment analysis (BeerAdvocate, Hotel Reviews).
Augmented Rationale Training (ART)
A key contribution of this work is Augmented Rationale Training (ART). This strategy explicitly teaches the model to ignore irrelevant text. During training, the model is presented with random sentences and penalized via a negative cross-entropy loss if it includes these distractors in its rationale. This proactive approach encourages the rationalizer to distinguish between task-relevant information and noise.
Key Findings
The Shield Effect
Rationale models demonstrate significantly higher robustness than full-context models. Under the strongest attack (AddText-Adv), rationale models typically saw performance drops of less than 10%, whereas full-context models plummeted by 11% to 27%. For instance, on the BeerAdvocate dataset, the SPECTRA model suffered only a 5.7% drop in accuracy, compared to a 34.3% crash for the full-context baseline.
The Supervision Paradox
Counter-intuitively, training models with human-annotated rationales (VIB-sup) does not always enhance robustness. These models often develop a higher Attack Capture Rate (AR), meaning they become overly sensitive to text that "looks" like a rationale, even when that text is an adversarial distractor.
Position Bias and Lexical Gravity
Despite their advantages, rationale models are not immune to biases. They exhibit Position Bias, showing greater vulnerability when attacks are placed at the beginning of a document. Furthermore, they suffer from Lexical Gravity—a tendency to be "pulled" toward specific keywords. In the Hotel dataset, rationalizers struggled to ignore words like "dirty" or "clean" even when they were part of an attack sentence, due to the strong association between these tokens and the task labels.
Impact of ART
ART proved highly effective in mitigating these vulnerabilities. For the VIB-sup model on the FEVER dataset, ART reduced the performance drop from 8.8 points to just 3.9 points. It also significantly improved the model's ability to select the "gold" (correct) rationale while successfully avoiding adversarial distractors.
Conclusion
Extractive rationalization provides a promising path toward more robust NLP systems. By filtering input before prediction, these models can effectively shield themselves from additive adversarial attacks. While challenges like lexical gravity and position bias remain, training strategies like ART demonstrate that we can explicitly teach models to ignore malicious noise, bridging the gap between interpretability and security.
Summary updated