Source-linked AI summary
Towards Explainable NLP: A Generative Explanation Framework for Text Classification
Hui Liu, Qingyu Yin, William Yang Wang
TL;DR
Neural text classifiers often lack human-readable, fine-grained explanations, limiting interpretability. The paper proposes a generative explanation framework using an explainable factor and minimum risk training, evaluates it on two datasets, and reports improved classification and explanation quality, with concise generated explanations.
Problem
Existing explainability approaches often overlook fine-grained information and do not explicitly generate human-readable explanations for classification decisions.
Method
The paper introduces a model-agnostic Generative Explanation Framework that jointly predicts classifications and generates fine-grained explanations using an explainable factor and minimum risk training.
Results
The framework enhances base-model performance and improves the quality of generated explanations across the evaluated datasets.
Takeaways & Limitations
Fine-grained information can serve both as explanations for classification decisions and as a signal associated with improved model performance.
Takeaways & Limitations
Generated text explanations tend to be shorter than the golden explanations, and the authors suggest length rewards or penalties as a possible remedy.
Abstract
from arXiv · showhide
Building explainable systems is a critical problem in the field of Natural Language Processing (NLP), since most machine learning models provide no explanations for the predictions. Existing approaches for explainable machine learning systems tend to focus on interpreting the outputs or the connections between inputs and outputs. However, the fine-grained information is often ignored, and the systems do not explicitly generate the human-readable explanations. To better alleviate this problem, we propose a novel generative explanation framework that learns to make classification decisions and generate fine-grained explanations at the same time. More specifically, we introduce the explainable factor and the minimum risk training approach that learn to generate more reasonable explanations. We construct two new datasets that contain summaries, rating scores, and fine-grained reasons. We conduct experiments on both datasets, comparing with several strong neural network baseline systems. Experimental results show that our method surpasses all baselines on both datasets, and is able to generate concise explanations at the same time.
1 Introduction
The paper addresses the lack of human-readable, fine-grained explanations in neural text classification by proposing a generative framework that jointly predicts classifications and generates explanations.
- Motivation: Neural NLP models often achieve strong performance but remain difficult to trust because their predictions are black boxes.For applications such as essay scoring, scores without explicit reasons provide limited justification.
- Motivation: Existing explainability methods interpret model outputs or input-output connections but often overlook fine-grained information and do not explicitly generate explanations.The paper identifies this as a limitation of prior text-classification explainability work.
- Approach: The proposed generative explanation framework jointly produces classification predictions and fine-grained explanatory information from text.It uses a hybrid generative-discriminative design with an explainable factor and minimum risk training.
- Approach: The framework connects generated explanations with predictions to generate more reasonable explanations and improve classification performance.The authors describe these connections as central to the framework’s design.
- Data and evaluation: Experiments on two datasets show considerable improvements over neural-network baseline systems while producing explanations for classification results.The method is evaluated with several baseline architectures and is presented as a model-agnostic framework.
- Data and evaluation: Two publicly available datasets provide fine-grained explanatory information for evaluating explainable text classification.The datasets include review texts with comments, summaries, rating scores, or related fine-grained information.
2 Task Definition and Notations
The paper formulates explainable classification as generating fine-grained information that explains a model’s decision while potentially improving classification performance.
- Task definition: The central task is to generate fine-grained explanations for the decisions made by a classification model.The paper illustrates explanations as attribute-level information that is consistent with the predicted class.
- Task definition: The model predicts a category for an input text sequence and simultaneously produces generative fine-grained explanations for that category.The input is represented as a sequence of texts, and the explanation is associated with the predicted category.
3 Generative Explanation Framework
The Generative Explanation Framework jointly predicts text categories and generates fine-grained explanations, linking explanations to predictions through an explanation factor and minimum risk training.
- Framework architecture: GEF combines an encoder, category predictor, explanation generator, and classifier to produce predictions and explanations from input text.The encoder maps the input to a representation used by the predictor and generator, while the classifier evaluates generated and golden explanations.
- Framework architecture: The framework targets fine-grained explanations that clarify why a classification decision was made, rather than treating generated explanations as independent outputs.The paper motivates this design because simple supervised generation does not establish strong connections between explanations and predicted overall results.
- Explanation factor: The explanation factor measures discrepancies between generated explanations, golden explanations, and the original text through ground-truth class probabilities.Its two components compare generated versus golden explanations and generated explanations versus the original text’s prediction.
- Minimum risk training: Minimum risk training minimizes expected loss over predicted outcomes and uses the explanation factor to optimize the framework against task-specific evaluation metrics.The final objective adds explanation-generation loss because matching predicted probabilities alone does not guarantee similarity to golden explanations.
- Training objective: The overall loss performs best with a 1 :1 weighting scheme for its components.The paper reports trying different weighting schemes before selecting this setting.
- Explanation formats: GEF supports textual and numerical fine-grained explanations and is applied to CVAE for generating positive, negative, and neutral text comments.In CVAE+GEF, generated and golden explanations consist of three comments, and the classifier processes these comments to predict the overall rating.
4 Dataset
The study evaluates GEF on PCMag and Skytrax review datasets containing review texts paired with fine-grained textual or numerical information and overall ratings.
- PCMag Review Dataset: The PCMag dataset pairs each long product review with positive, negative, and neutral short comments plus an overall rating score.The comments summarize the review from three perspectives, while the rating ranges from 0 to 5.
- PCMag Review Dataset: The PCMag corpus is filtered for shorter inputs and split into 10919/1373/1356 train/dev/test pairs.Reviews with more than 70 sentences or comments with more than 75 tokens are removed before splitting.
- Skytrax User Reviews Dataset: The Skytrax dataset pairs airline reviews with five sub-field scores and an overall score.The sub-field scores cover seat comfortability, cabin stuff, food, in-flight environment, and ticket value; sub-field scores range from 0 to 5 and overall scores from 1 to 10.
- Skytrax User Reviews Dataset: The Skytrax corpus is filtered for reviews of at most 300 tokens and split into 21676/2710/2709 train/dev/test pairs.The overall rating distribution is reported in Table 2.
- Dataset and experiment documentation: The experiments report rating-score distributions for the PCMag and Skytrax datasets and list shared experimental settings in Table 3.The PCMag distribution appears in Table 1, the Skytrax distribution in Table 2, and CNN additionally uses 256 filters with sizes [3, 4, 5, 6].
5 Experiments and Analysis
Experiments show that GEF improves explanation quality and classification performance across text and numerical explanations, while remaining limited by shorter outputs and rare-word generation.
- Text explanations: BLEU scores improve substantially for CVAE+GEF over CVAE, indicating higher-quality generated text explanations.The target explanations’ low BLEU-3 and BLEU-4 scores are attributed to low-frequency domain-specific words.
- Text explanations: CVAE+GEF generates explanations that are closer to the overall classification results than the baseline.
- Text explanations: CVAE+GEF achieves better top-1 and top-3 classification results than CVAE on both test and development sets.However, classifier C performs better than both CVAE and CVAE+GEF, supporting the assumption that explanations can provide useful classification information.
- Numerical explanations: GEF improves accuracy for all five Skytrax sub-field numerical explanations: seat comfortability, cabin stuff, food, in-flight environment, and ticket value.These sub-field ratings are used to evaluate the quality of generated numerical explanations.
- Numerical explanations: Accuracy or top-3 accuracy improves when Skytrax classification models are combined with GEF.The classifier also outperforms LSTM (+GEF) and CNN (+GEF).
- Error analysis: Generated explanations capture key points and are grammatical and logically reasonable, but they tend to be shorter than the golden explanations.The authors attribute shorter outputs to greater loss from longer explanations and suggest length rewards or penalties through reinforcement learning.
- Error analysis: GEF-generated explanations can contain ⟨UNK⟩ tokens because rare domain-specific words are difficult to embed and generate.The authors suggest a copy mechanism as a possible remedy.
6 Related Work
Related work explains predictions through input rationalization, feature contribution, or human-written explanations, whereas this paper generates abstractive text and numerical explanations alongside classification.
- Lei et al. (2016) rationalize neural predictions by extracting phrases from input texts, while this work generates abstractive explanations.
- Hancock et al. (2018) use human-annotated natural-language explanations for classification, whereas this work uses natural attributes as explanations.
- This framework generates explanations in both textual and numerical-score forms rather than only rationalizing predictions.
7 Conclusion
The paper concludes that GEF combines fine-grained explanations with classification to improve both prediction performance and explanation quality.
- GEF is a model-agnostic framework that uses fine-grained information and minimum risk training to generate explanations for classification decisions.
- Combining GEF with base models enhances classification performance and improves the quality of generated explanations.
- The framework can be combined with other NLP tasks, such as summarization and extraction, which the authors leave for future work.
- One referenced dataset is not publicly available, so further experiments on it await its release.
Supplemental Material
The supplemental material describes a CVAE extension of SEQ2SEQ for generating explanations conditioned on encoded input text and a fine-grained control signal. It also outlines the latent-variable networks, training-versus-testing procedure, and example outputs.
- CVAE structure: The model extends SEQ2SEQ into a Conditional Variational Autoencoder for explanation generation.
- CVAE structure: The control signal specifies positive, negative, or neutral fine-grained information, and the Input Encoder supplies the encoded text.
- CVAE structure: The condition c combines the control signal vc with the encoded input v0, while x denotes the explanations to generate.
- Latent-variable networks: The decoder approximates p(x|z, c), the Prior Network approximates p(z|c), and the Recognition Network approximates the posterior p(z|x, c).
- Examples: The supplemental experiments provide numerical explanation examples in Table 10 and text explanation examples, including unknown-word markers, in Table 11.
- Training and testing: During training, z is used to train z′ and passed to the decoder; during testing, z′ is passed to the decoder without ground-truth explanations.