Attention Interpretability Across NLP Tasks
Shikhar Vashishth, Shyam Upadhyay, Gaurav Singh Tomar, Manaal Faruqui
TL;DR
The paper tackles conflicting claims about attention interpretability in NLP by conducting a broad empirical analysis across text classification, natural language inference, and neural machine translation, using multiple attention variants and self-attention models. It shows that attention can be interpretable and correlate with feature importance in tasks where it is essential to prediction, particularly in pairwise and generation tasks, while often behaving as a gating mechanism in single-sequence tasks. Through systematic weight perturbations, permutation studies, and manual interpretability evaluations, the work reconciles earlier contradictory findings and delineates the conditions under which attention serves as a reliable explanation. Overall, it clarifies when attention weights reflect underlying reasoning and when they function primarily as gating signals within the network.
Abstract
The attention layer in a neural network model provides insights into the model's reasoning behind its prediction, which are usually criticized for being opaque. Recently, seemingly contradictory viewpoints have emerged about the interpretability of attention weights (Jain & Wallace, 2019; Vig & Belinkov, 2019). Amid such confusion arises the need to understand attention mechanism more systematically. In this work, we attempt to fill this gap by giving a comprehensive explanation which justifies both kinds of observations (i.e., when is attention interpretable and when it is not). Through a series of experiments on diverse NLP tasks, we validate our observations and reinforce our claim of interpretability of attention through manual evaluation.
