TL;DR
This paper introduces a "Self-Explaining Framework" for NLP models that integrates an interpretation layer directly into the model architecture. This approach makes models inherently explainable without needing separate probing models and allows for explanations at the phrase or sentence level, not just word-level, while simultaneously improving performance.
What Problem Does This Paper Address?
Deep learning models in Natural Language Processing (NLP) are often criticized for being "black boxes," making it difficult to understand why they make certain predictions. Existing methods to explain these models typically fall into two traps:
- Decoupling: They use a separate "probing" or "surrogate" model to interpret the main NLP model. This means the explanation tool itself isn't explained, and the interpretation might be approximate due to the separation.
- Word-Level Focus: Most interpretation methods focus on assigning importance scores to individual words (e.g., using saliency maps). This is insufficient for understanding complex language, where meaning arises from phrases, sentences, and their interactions. Simply averaging word scores doesn't capture the nuanced semantic composition.
The authors aim to create NLP models that are both interpretable and performant, addressing these limitations by making explanations an intrinsic part of the model.
Methods
The core innovation is the Interpretation Layer, added on top of any existing NLP model (like Transformers, BiLSTMs, or CNNs). Here's how it works:
- Span Information Collecting (SIC) Layer: This layer considers all possible text spans within an input sequence. For each span (e.g., a phrase or sentence), it generates a dense representation that aims to capture its semantic and syntactic information.
- Span Weighting: Each span's representation is then assigned a specific weight. These weights are learned during training and indicate how much that particular span contributes to the final prediction.
- Weighted Aggregation: The weighted sum of all span representations is fed into the final prediction layer (e.g., a softmax classifier).
This architecture has several key advantages:
- Self-Explainable: The interpretation layer is trained end-to-end with the main model, so the learned weights directly provide explanations without needing external tools.
- High-Level Explanations: The weights are associated with text spans of any length, allowing for explanations at phrase or sentence levels.
- No Performance Tradeoff: By integrating the interpretation layer, no information is lost, and the model can even see performance improvements.
The paper also proposes an efficient computation method for the SIC layer and uses a regularization term (λΣα²) to encourage the model to focus on a small number of important spans.
Datasets
The paper evaluates its framework on several standard NLP datasets:
- SST-5: Stanford Sentiment Treebank (for fine-grained sentiment classification).
- SNLI: Stanford Natural Language Inference corpus.
- IWSLT 2014 En→De: For machine translation.
- IMDB and Yahoo! Answers: Used for adversarial example generation experiments.
Key Insights and Ideas
- Interpretability as an Integrated Feature: The most significant insight is that interpretability doesn't have to be an afterthought or a separate module. By designing the model architecture to inherently produce explanations, the authors show it can lead to better performance.
- Beyond Word-Level Explanations: The framework's ability to assign importance to arbitrary text spans (phrases, sentences) is a crucial step beyond traditional word-level saliency methods, offering a more holistic understanding of model reasoning.
- The Power of Learned Span Weights: The learned weights (α) are not just for explanation; they actively contribute to the model's predictive power, suggesting that focusing on salient spans helps the model make better decisions.
Key Results
- State-of-the-Art Performance: The proposed self-explaining models achieved new State-of-the-Art (SOTA) results on SST-5 (59.1% accuracy) and SNLI (92.3% accuracy) when using RoBERTa-large as the backbone.
- Improved Interpretability: The framework consistently outperformed other interpretation methods (AvgGradient, AvgAttention, Rationale) across various evaluation setups (FullTrain-SpanTest, SpanTrain-FullTest, SpanTrain-SpanTest) on SST-5 and SNLI.
- Effective Adversarial Attack: The self-explaining approach, when combined with paraphrasing, significantly reduced classification accuracy on adversarial datasets, demonstrating its effectiveness in generating robust attacks.
- Effect of Regularization: The regularization parameter λ plays a crucial role in balancing performance and the sharpness of span attention, with optimal values found to be around 1.5 for SST-5 and 1.0 for SNLI.
Limitations and Future Work
- Computational Cost: While efforts were made to optimize computation, processing all possible spans (O(N²)) can still be computationally expensive for very long texts.
- Evaluation Metrics: The authors acknowledge that their interpretability evaluation metrics are not perfect and can potentially be "gamed." They suggest combining them with other evaluations.
- Future Directions: The paper suggests that the framework can be easily extended to other NLP tasks and models. The ability to generate adversarial examples by manipulating salient spans is also highlighted as a promising area for future research.
Summary updated