Generating Token-Level Explanations for Natural Language Inference

James Thorne, Andreas Vlachos, Christos Christodoulopoulos, Arpit Mittal

TL;DR

This paper explores how to generate token-level explanations for Natural Language Inference (NLI) models without relying on explicit token-level training data. The authors compare black-box post-hoc explanation methods (LIME and Anchors) against a novel white-box approach that uses Multiple Instance Learning (MIL) to regularize attention weights. While the MIL method is three orders of magnitude faster, black-box methods like LIME yield explanations that align significantly better with human judgments.

What Problem Does This Paper Address?

Natural Language Inference (NLI) is the task of determining the semantic relationship—entailment, contradiction, or neutrality—between a pair of sentences (a premise and a hypothesis). While deep learning models achieve high accuracy on NLI, their inner workings are notoriously difficult to interpret.

Most prior interpretability research has focused on generating token-level highlights for single-sentence classification tasks. Extending this to sentence pairs introduces unique challenges, and collecting human-annotated rationales to train these models explicitly is highly expensive. This paper addresses the gap by investigating how to extract faithful, token-level explanations from sentence-pair classifiers without explicitly training them on human explanation data.

Methods

The authors build their experiments on a standard LSTM-based NLI architecture featuring cross-sentence attention. They evaluate two primary paradigms for generating token-level explanations:

  1. White-Box Attention with Multiple Instance Learning (MIL): Standard attention weights often fail to correlate with human rationale. To fix this, the authors treat explanation generation as an unsupervised tagging task. They introduce three regularizers to the loss function:
  2. $R_1$ (Entropy penalty): Prevents the model from uniformly distributing attention across all tokens.
  3. $R_2$ (Selection constraint): Penalizes the model if it fails to highlight at least one token in both sentences (except for neutral relations).
  4. $R_3$ (Sparsity penalty): Forces at least one attention weight close to zero.
  5. Black-Box Post-Hoc Explanations: The authors adapt LIME and Anchor Explanations to sentence pairs by running perturbation analyses twice—once independently for the premise and once for the hypothesis.

These methods are compared against a Fully Supervised Baseline (an LSTM-CRF jointly trained on both the classification task and human-annotated token highlights).

Datasets

The models are evaluated using the e-SNLI dataset (Camburu et al., 2018). This dataset extends the popular Stanford Natural Language Inference (SNLI) dataset by adding human-annotated, token-level highlights that explicitly show which words justify the entailment label.

Key Insights and Ideas

  • Attention is Not Explanation by Default: Simply thresholding raw attention weights yields poor alignment with human rationales, particularly for the premise sentence.
  • MIL Regularization Steers Attention Effectively: Adding MIL regularizers successfully forces the attention distributions to be sparser. This dramatically improves precision and recall for the hypothesis sentence without requiring any token-level labels during training.
  • The Black-Box Performance Premium: Black-box methods (especially LIME) generate explanations that match human judgments much better than attention-based methods, but they come with a massive computational trade-off.
  • Dataset Bias in Supervised Models: Surprisingly, the fully supervised model suffered from low recall because it learned dataset artifacts (e.g., heavily prioritizing common words like "man", "woman", or "dog" that frequently appear in SNLI premises) rather than finding instance-specific keywords.

Key Results

  • Performance vs. Speed Trade-off: The white-box MIL method (+ MIL Regularizers (R1 + R2 + R3)) achieved an F1 score of 22.18% on the premise and 57.78% on the hypothesis. LIME outperformed it significantly on the premise, reaching 53.72% F1.
  • Inference Speed: The thresholded attention method is incredibly fast, taking just 0.01 seconds per instance. In contrast, LIME requires 64 seconds per instance—a 6,400x slowdown, making it impractical for real-time applications.
Token-level explanation performance and runtime comparison across different models.

Limitations and Future Work

The primary limitation of the attention-based models is their poor performance on the premise sentence. The authors attribute this to the model's independent sentence encoding structure. Because NLI relies heavily on pairwise token interactions (such as identifying synonyms or antonyms between the two sentences), treating the sentences separately limits the attention mechanism's explanatory power.

For future work, the authors propose incorporating explicit cross-sentence semantic knowledge (such as external word-pair embeddings like pair2vec) to allow the model to reason over pairwise token comparisons rather than independent sentence representations.

Summary updated

BibTeX
@inproceedings{thorne2019generating,
  author = {James Thorne and Andreas Vlachos and Christos Christodoulopoulos and Arpit Mittal},
  title = {{Generating Token-Level Explanations for Natural Language Inference}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  url = {https://openreview.net/forum?id=H1bDd7WdWS},
}
Figure