Unifying Model Explainability and Robustness for Joint Text Classification and Rationale Extraction

Dongfang Li, Baotian Hu, Qingcai Chen, Tujie Xu, Jingcong Tao, Yunan Zhang

TL;DR

This paper introduces AT-BMC, a framework that jointly performs text classification and rationale extraction while significantly improving model robustness. By combining mixed adversarial training with a novel boundary-matching constraint, the authors demonstrate that building models that "explain themselves" through rationales actually makes them much harder to fool with adversarial attacks.

What Problem Does This Paper Address?

Deep learning models for NLP, particularly those based on Pre-trained Language Models (PLMs) like BERT, are often criticized for being "black boxes." While they achieve high accuracy, it is difficult to understand why they make specific predictions. To solve this, researchers use rationale extraction—identifying the specific snippets of text (rationales) that support a model's decision.

However, two major hurdles remain:

  1. Robustness: These models are notoriously fragile. Small, meaning-preserving changes to an input (adversarial attacks) can flip a prediction from "positive" to "negative," even if the extracted rationale remains the same. This creates a crisis of trust.
  2. Inaccurate Extraction: Standard sequence labeling methods (like CRFs) often struggle to precisely locate the boundaries of these rationales, sometimes producing illegal or fragmented sequences.

The authors argue that explainability and robustness are two sides of the same coin: a truly trustworthy model should not only provide a good explanation but also maintain its prediction under small perturbations.

Methods

The authors propose AT-BMC, a joint classification and rationale extraction model. The architecture, shown in Figure 1, uses a shared encoder (like BERT or RoBERTa) with two specialized heads.

Figure 1: Overall architecture of the proposed AT-BMC method for joint classification and rationale extraction with mixed adversarial training and boundary match constraint.

The framework introduces two key innovations:

  • Mixed Adversarial Training (AT): The model is trained against two types of perturbations simultaneously. First, it uses discrete perturbations (word-level edits like replacing names or numbers) that preserve the original label and rationales. Second, it applies continuous perturbations in the embedding space (Virtual Adversarial Training), which acts as a powerful regularizer to improve generalization.
  • Boundary Match Constraint (BMC): Instead of relying solely on a Conditional Random Field (CRF) to label tokens, the authors add a mechanism that explicitly matches predicted start and end indices of rationales. This "global" view helps the model focus on boundary-relevant regions and prevents the generation of fragmented, nonsensical rationale spans.

Datasets

The model was evaluated on two benchmark datasets that include human-annotated rationales:

  • Movie Reviews: A sentiment analysis dataset (IMDB-based) where humans marked the specific phrases that justify a "positive" or "negative" rating.
  • MultiRC: A complex multi-sentence reasoning dataset where the model must identify which sentences in a passage support the answer to a question.

Key Insights and Ideas

  • The Robustness-Explainability Link: The most significant insight is that making a model robust to adversarial attacks naturally leads to better, more human-aligned rationales. When a model is forced to ignore "noise" through adversarial training, it focuses more intently on the core features that actually define the class.
  • Complementary Perturbations: The authors found that discrete text-space attacks and continuous embedding-space attacks are complementary. Using both provides a much stronger defense than using either alone.
  • Joint Learning Synergy: Unlike pipeline approaches (where you extract, then classify), joint learning allows the classification signal to guide the extraction process. By embedding the predicted label back into the extraction head, the model learns to find evidence specifically for the class it just predicted.

Key Results

AT-BMC achieved state-of-the-art results across the board. As shown in the performance comparison (Figure 6), AT-BMC (using RoBERTa-large) reached a Token F1 of 59.6 on Movie Reviews, a massive jump over previous pipeline and semi-supervised baselines.

Table 2: Performance comparison on two text classification tasks

In terms of robustness, the results were even more striking. Under the PWWS adversarial attack (a common method for fooling NLP models), the baseline BERT model had a success rate of 96.67%. AT-BMC slashed this attack success rate to 26.92%—a 69% improvement in robustness (see Figure 5).

Figure 3: Comparison in task accuracy shown in red and extraction performance shown in blue as the number of ratio- nales retained in the training set varies.

Limitations and Future Work

The authors noted a few areas for improvement:

  • Fragmented Rationales: Error analysis showed that the model still occasionally outputs "bags of small fragments" rather than continuous, clean sentences.
  • Annotation Artifacts: The model can sometimes pick up on "superficial clues" or artifacts in the human-labeled data rather than learning deep reasoning.
  • Domain Expansion: The current work focuses on sentiment and general QA. The authors plan to explore more high-stakes domains, such as medical and legal text, where explainability and robustness are not just academic goals but safety requirements.

Summary updated

BibTeX
@inproceedings{li2022unifying,
  author = {Dongfang Li and Baotian Hu and Qingcai Chen and Tujie Xu and Jingcong Tao and Yunan Zhang},
  title = {{Unifying Model Explainability and Robustness for Joint Text Classification and Rationale Extraction}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i10.21342},
}
Figure