Abstract
Neural networks have recently achieved human-level performance on various challenging natural language processing (NLP) tasks, but it is notoriously difficult to understand why a neural network produced a particular prediction. In this paper, we leverage the text-to-text framework proposed by Raffel et al.(2019) to train language models to output a natural text explanation alongside their prediction. Crucially, this requires no modifications to the loss function or training and decoding procedures -- we simply train the model to output the explanation after generating the (natural text) prediction. We show that this approach not only obtains state-of-the-art results on explainability benchmarks, but also permits learning from a limited set of labeled explanations and transferring rationalization abilities across datasets. To facilitate reproducibility and future work, we release our code used to train the models.
Introduction
Modern neural networks have revolutionized Natural Language Processing (NLP), often reaching or exceeding human performance. However, these models typically operate as "black boxes," making it difficult to discern the reasoning behind a specific output. Understanding whether a model's prediction is based on meaningful features or spurious correlations is critical for trust and safety. Previous research has explored attention weights or specialized architectures to provide interpretability, but these methods can be unreliable or difficult for humans to interpret. This work introduces "WT5" (Why, T5?), a method that trains models to explain themselves in plain natural language.
Methodology: The Text-to-Text Approach
The core of the WT5 approach is the use of the Text-to-Text Transfer Transformer (T5) framework. T5 treats every NLP task as a mapping from one text string to another. By leveraging this flexibility, the researchers can prompt the model to generate explanations without altering the underlying architecture or loss functions.
To train the model to explain, a simple prompting strategy is employed:
- Input Transformation: The prefix
"explain"is added to the standard task input. - Output Transformation: The model is trained to generate the target label followed by a natural language explanation (e.g.,
"positive explanation: the reviewer used the word 'loved'").
This unified format allows the model to treat "explaining" as just another language task, enabling it to learn from a mixture of data—some with explanations and some without.
Data Efficiency and Transferability
A significant finding of this work is the model's ability to learn to explain with relatively little supervision. For abstractive tasks like e-SNLI, the model maintains high performance even when the number of available human-written explanations is reduced significantly.
Furthermore, WT5 demonstrates impressive transfer learning capabilities. A model trained on one explanation dataset (e.g., e-SNLI) can generate high-quality explanations for a different but related dataset (e.g., MNLI) without any additional fine-tuning on explanations. This suggests that "explaining" is a generalizable skill that the model can acquire and apply across different domains and tasks.
Key Results and Human Evaluation
The WT5-11B model achieved new state-of-the-art (SoTA) results on the e-SNLI and Movie Reviews benchmarks. Importantly, the requirement to provide an explanation did not degrade the model's accuracy on the primary task; in some instances, it even led to slight improvements.
Human evaluations further validated the quality of these generated explanations. On the CoS-E dataset, human raters preferred WT5's explanations 30% of the time, while only preferring the original "ground truth" human explanations 16% of the time. This indicates that the model can produce explanations that are often clearer and more helpful than those found in existing datasets.
Conclusion: Plausibility vs. Faithfulness
While WT5 excels at producing plausible explanations—those that make sense to a human observer—the authors note a distinction between plausibility and faithfulness. A faithful explanation accurately reflects the internal logic the model used to reach its decision. As a generative model, WT5 could potentially "hallucinate" convincing but unfaithful reasons for its predictions. Future research is required to bridge this gap, ensuring that natural language explanations are not just persuasive stories, but true reflections of the model's decision-making process.
Summary updated