Trustworthy NLP models must be both explainable—providing clear justifications for their predictions—and robust against adversarial perturbations. This paper introduces AT-BMC (Adversarial Training with Boundary Match Constraint), a joint learning framework that unifies rationale extraction and text classification. The authors demonstrate that training a model to withstand adversarial attacks simultaneously enhances the accuracy and reliability of its explanations.
The Challenge: Fragile Explanations
In natural language processing, explainability and robustness are often treated as separate objectives. Traditional "pipeline" models first extract a rationale (a snippet of text) and then make a prediction based on that snippet. However, these models are highly vulnerable to adversarial attacks. A minor, label-preserving change (like a synonym swap) can flip a prediction, rendering the extracted rationale untrustworthy. Furthermore, existing methods often produce fragmented or imprecise highlights. AT-BMC addresses this by creating a unified architecture where robustness and explainability mutually reinforce one another.
Methods: The AT-BMC Framework
AT-BMC is a multi-task learning framework that jointly learns task prediction and rationale extraction using a shared encoder (e.g., BERT or RoBERTa) and specialized decoders.
Key innovations include:
- Mixed Adversarial Training (AT): The model is trained against perturbations in two spaces. In the discrete text space, adversarial examples are generated by swapping words outside the rationale spans. In the continuous embedding space, K-step Projected Gradient Descent (PGD) adds noise to embeddings to smooth decision boundaries.
- Boundary Match Constraint (BMC): To prevent fragmented tag sequences common in standard CRFs, BMC forces the model to predict explicit start and end indices of rationale spans, using a "match loss" to ensure structural integrity.
- Label Embedding: The rationale extraction decoder is conditioned on the predicted classification label, ensuring the evidence aligns with the model's final decision.
Datasets and Evaluation
The model was evaluated on two benchmark datasets with human-annotated rationales:
- Movie Reviews: Sentiment classification where rationales indicate positive or negative sentiment.
- MultiRC: A reading comprehension dataset requiring the extraction of supporting sentences for multiple-choice answers.
Key Results
AT-BMC demonstrates superior performance in both extraction quality and classification accuracy while significantly boosting robustness.
- Extraction Quality: On the Movie Reviews dataset, AT-BMC (BERT-base) improved rationale extraction by 4.3 Token F1 points over the best baseline. Upgrading to RoBERTa-large extended this lead to 13.3 F1 points.
- Classification Accuracy: Joint training improved accuracy by 0.8% on Movie Reviews and 2.3% on MultiRC compared to strong baselines.
- Adversarial Robustness: Under aggressive attacks like PWWS, the baseline BERT model had a 96.67% success rate. AT-BMC reduced this to 26.92%, a nearly 70% absolute reduction in vulnerability.
Key Insights
- Robustness Breeds Explainability: Defending against adversarial attacks directly improves the quality of extracted rationales.
- Boundary Matching Fixes Fragmentation: Explicitly matching start and end tokens reduces the "bag of fragments" problem, producing coherent rationale spans.
- Data Efficiency: The model is highly efficient; it achieves strong rationale extraction performance (over 40 F1) even when only 5% of training data contains human-labeled rationales.
Limitations and Future Work
Error analysis shows the model still occasionally produces rationales that overlap with, but do not perfectly match, human evidence. It also remains susceptible to human annotation biases and can miss evidence in very long, truncated texts. Future research will focus on applying this framework to high-stakes domains like medical and legal text processing, where reliable explainability is paramount.
Summary updated