Rationalizing Neural Predictions

Tao Lei, Regina Barzilay, Tommi Jaakkola

Neural networks are notoriously opaque. While they excel at complex tasks like sentiment analysis or machine translation, they rarely offer a "why" behind their predictions. In high-stakes domains like medicine or law, this lack of interpretability is a dealbreaker.

In their paper "Rationalizing Neural Predictions," Tao Lei and colleagues from MIT CSAIL propose a clever solution: a model that doesn't just predict, but also extracts a "rationale"—a short, coherent snippet of the original text—that justifies its decision.

TL;DR

The authors introduce a modular framework that jointly learns to extract short, sufficient text fragments (rationales) and use them to make predictions. By treating rationale selection as a latent variable and training via a REINFORCE-style approach, the model provides human-interpretable justifications without requiring any human-labeled explanation data for training.

What Problem Does This Paper Address?

Standard neural models are "black boxes." Even if a model correctly identifies a 5-star beer review, we don't know if it focused on the description of the "ruby red-amber color" or just got lucky with random keywords.

Previous attempts at interpretability often relied on attention mechanisms, which highlight important words. However, attention can be "noisy" and doesn't always yield a concise, readable phrase. This paper aims for extractive rationales: actual subsets of the input text that are both short (to be interpretable) and sufficient (to yield the same prediction as the full text).

Methods

The framework consists of two modular components trained to work in tandem:

  1. The Generator ($gen(x)$): This component acts as a selector. It reads the input text $x$ and produces a binary mask $z$, deciding for each word whether it should be part of the rationale. To ensure the rationale is readable, the authors use a regularizer that penalizes both the total number of words selected and the number of "transitions" (to encourage contiguous phrases).
  2. The Encoder ($enc(z, x)$): This component takes only the words selected by the generator and performs the actual task (e.g., predicting a sentiment score).

Because the selection process is discrete (a word is either in or out), the authors cannot use standard backpropagation. Instead, they employ a doubly stochastic gradient approach (a REINFORCE-style algorithm) to estimate the gradients by sampling rationales during training.

Datasets

The authors evaluated their approach on two distinct tasks:

  • Multi-aspect Sentiment Analysis: Using the BeerAdvocate dataset (1.5 million reviews). The model had to predict ratings for specific aspects like Appearance, Smell, and Palate. A small subset of 994 reviews with manual sentence-level annotations was used to evaluate the precision of the extracted rationales.
  • Similar Text Retrieval: Using the AskUbuntu dataset (167k questions). The goal was to extract rationales from long, noisy question bodies that were sufficient to retrieve similar questions.

Key Insights and Ideas

  • Rationales as Latent Variables: The most powerful idea here is that you don't need "ground truth" explanations to learn to explain. By simply defining what a good explanation looks like (short and sufficient), the model discovers them automatically.
  • The Sparsity-Accuracy Trade-off: There is a natural tension between how much text you extract and how accurate the prediction is. As shown in the figure below, the model can achieve performance very close to a full-text encoder while using only a fraction of the words.
Figure 2: Mean squared error of all aspects on the test set (y-
  • Coherency Matters: By penalizing transitions between selected and unselected words, the model learns to pick out meaningful phrases (like "pleasant ruby red-amber color") rather than a "bag of words" that might be harder for a human to parse.

Key Results

  • Superior Precision: On the BeerAdvocate task, the proposed rationale generator achieved up to 96% precision in identifying the correct sentences for the "Appearance" aspect, vastly outperforming a bigram SVM (38%) and a standard attention-based baseline (80%).
  • Robustness across Aspects: The model consistently outperformed baselines across different aspects (Smell, Palate), as shown in the precision-sparsity curves.
Figure 4: Precision (y-axis) when various percentages of text
  • Retrieval Performance: In the AskUbuntu task, rationales extracted from the noisy question bodies achieved a Mean Average Precision (MAP) of 56.5%, which is competitive with using the human-written question titles (60%) and better than using the full, noisy body (53%).

Limitations and Future Work

  • Extractive Only: The model is limited to selecting existing words. It cannot generate a summary in its own words (abstractive rationale).
  • Search Space Complexity: Training via sampling (REINFORCE) can be unstable and sensitive to hyperparameters. The authors suggest that variance reduction techniques could further stabilize training.
  • Generalization: While successful in text, the authors note that the framework could potentially be extended to other modalities, such as identifying "rationales" in images (regions of interest).

Summary updated

BibTeX
@inproceedings{lei2016rationalizing,
  author = {Tao Lei and Regina Barzilay and Tommi Jaakkola},
  title = {{Rationalizing Neural Predictions}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2016},
  url = {https://openreview.net/forum?id=B1EsNMMOWS},
}
Figure