NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Towards Transparent and Explainable Attention Models, ML Reproducibility Challenge 2020

Kacper Jacek Kubara, Blazej Manczak, Blazej Dolicki, Kacper SawiczOpenReview 2021

TL;DR

This paper tackles the challenge of making attention mechanisms in NLP models truly explainable. The authors reproduce and extend prior work on "diversity-driven" and "orthogonalized" LSTMs, finding that these modifications can indeed improve model faithfulness without sacrificing performance. They further explore these techniques with Transformer models, suggesting that Transformers might inherently be more interpretable than LSTMs.

What Problem Does This Paper Address?

Attention mechanisms in deep learning models, particularly in Natural Language Processing (NLP), are often lauded for their ability to highlight which parts of the input are most important for a given prediction. This feature is seen as a key step towards making these complex "black box" models more transparent and explainable. However, a growing body of research questions whether these attention distributions are truly "faithful" or "plausible" explanations. Some argue that the lack of variability in hidden state representations might be a root cause. This paper aims to address this by investigating methods to increase this variability, specifically through diversity-driven training and orthogonalization, and to verify if these methods lead to more trustworthy explanations.

Methods

The core of this work involves reproducing and extending the methods proposed in a prior paper [9]. The key techniques explored are:

  • Diversity-driven training: This approach aims to increase the variability of hidden state representations within LSTM models.
  • Orthogonalization: This technique further encourages variability by enforcing orthogonality on hidden states.
  • Conicity: The paper uses "conicity" as a metric to quantify the variability of attention values. Lower conicity is associated with more diverse attention.
  • Transformer Extension: The authors extend the diversity and orthogonalization concepts to Transformer models, a popular architecture that relies heavily on self-attention.

The researchers implemented parts of the original pipeline and added their own scripts to run experiments on a GPU cluster. They also containerized their environment using Docker for better reproducibility.

Datasets

The paper utilizes a variety of datasets for their experiments, primarily focusing on text classification tasks.

  • Original Datasets: The authors attempted to reproduce experiments on 12 datasets used in the original paper [9]. They successfully reproduced 7 out of 12. Some datasets were difficult to obtain due to licensing issues (MIMIC ICD9 Anemia and Diabetes) or were too computationally expensive to process (Yelp, Amazon). The CNN dataset was unavailable due to an expired download link.
  • Multilingual Datasets: To extend the original work, they introduced a cross-lingual sentiment classification dataset (CLS) comprising English, German, French, and Japanese. This dataset was automatically downloaded and preprocessed.
  • Transformer Datasets: For Transformer experiments, they used datasets similar to those in the original paper, including binary classification tasks and cross-lingual sentiment classification.

Key Insights and Ideas

  • Improved Faithfulness without Performance Loss: The most significant finding is that diversity-driven training and orthogonalization can indeed make LSTM attention mechanisms more faithful (i.e., better reflections of the model's decision-making process) without substantially degrading performance. This directly addresses a key concern in explainable AI.
  • Transformers Might Be Inherently More Interpretable: The study found that vanilla Transformer models exhibit significantly lower conicity in their attention values compared to vanilla LSTMs. This suggests that the Transformer architecture might be less prone to the "meaningless attention" problem that plagues some LSTM models, potentially making them more interpretable out-of-the-box.
  • Conicity as a Key Metric: The paper consistently uses conicity as a measure of attention variability and interpretability. The reduction in conicity achieved by the proposed methods is a central theme.
  • Reproducibility is Achievable (with caveats): The authors emphasize the ease of reproducing the original code, highlighting the paper's good reproducibility. However, they also note challenges with dataset availability and computational resources, underscoring the practical hurdles in large-scale NLP research.

Key Results

  • Claim 1 (LSTM Performance): All claims by the original paper regarding modified LSTMs not hurting performance were confirmed, with accuracy changes generally within 1-3%.
  • Claim 2 (LSTM Faithfulness): Experiments on removing attention weights and permuting attention weights largely supported the claim that modified LSTMs provide more faithful explanations.
  • Conicity Reduction: Diversity and Orthogonal LSTMs consistently showed significantly lower conicity values than vanilla LSTMs across various datasets. For example, the Vanilla Transformer had 3 times smaller conicity values than Vanilla LSTMs.
  • Transformer Conicity: Vanilla Transformers exhibited much smaller conicity (mean 0.24) compared to vanilla LSTMs (mean 0.58), leading to a rejection of Claim 3 (that Transformer conicity is similar to LSTM conicity).
  • Multilingual Performance: For multilingual datasets, a similar trend was observed: vanilla LSTMs performed best, but diversity and orthogonal variants had much lower conicity. There was a slight accuracy drop (1-3%) for orthogonal models compared to vanilla LSTMs.
  • Transformer Diversity: Diversity-driven training did not significantly impact the performance of Transformer variants, similar to the LSTM findings.

Limitations and Future Work

  • Dataset Availability and Cost: The authors faced challenges in obtaining certain datasets due to licensing issues and high computational costs for others. This highlights a broader issue in NLP research regarding dataset accessibility and the resources required for thorough evaluation.
  • Rationale Experiment Ambiguity: The experiment on "rationale length" (the minimal set of tokens needed for a prediction) did not definitively confirm or deny Claim 2. The authors suggest this requires further research.
  • Transformer Interpretability: While Transformers showed lower conicity, the paper suggests that further experiments are needed to fully confirm their enhanced interpretability compared to LSTMs.
  • Dataset Size/Training Time Information: The authors recommend that future work include tables detailing dataset sizes or training times to aid reproducibility.
  • No Author Contact: The authors did not have contact with the original authors, which might have limited their ability to clarify certain aspects or resolve ambiguities.

Summary updated

BibTeX
@misc{kubara2021towards,
  author = {Kacper Jacek Kubara and Blazej Manczak and Blazej Dolicki and Kacper Sawicz},
  title = {{Towards Transparent and Explainable Attention Models, ML Reproducibility Challenge 2020}},
  year = {2021},
  url = {https://openreview.net/forum?id=r3R_osip5G},
  howpublished = {OpenReview},
}
Figure