TL;DR
Inducing sparsity in attention mechanisms is often claimed to improve model interpretability, but this paper finds the opposite: sparse attention does not reliably highlight a small set of influential input tokens. In fact, as attention becomes sparser, the relationship between attention weights and actual feature importance weakens, suggesting that sparsity might actually make attention less useful as an explanatory tool.
Introduction
In deep learning, "attention" is frequently used as a window into the model’s "thought process." The logic is simple: if a model attends heavily to a specific word, that word must be important for the prediction. To make these "explanations" cleaner, researchers often use sparse attention (like sparsemax), which forces the model to assign zero weight to most items, highlighting only a few "key" features.
However, the authors point out a major conceptual gap: attention is almost never applied directly to the raw input tokens. Instead, it is applied to internal representations (hidden states) that have already been "contextualized." If the internal representations themselves are "blurry" mixtures of the input, does having a sparse distribution over those representations actually tell us anything about which input words mattered?
Methodology
The authors design experiments to track how information flows from inputs to outputs through the lens of sparsity. Their approach includes:
- Feature Importance (FI) Metrics: They use gradient-based methods and Leave-One-Out (LOO) methods to determine "true" token influence.
- Novel Entropy Metric: They introduce a normalized entropy-based metric to measure the dispersion of an input's influence. High entropy means influence is spread across many tokens; low entropy means it is concentrated.
- Varying Sparsity: They utilize Sparsegen, a projection function that allows them to tune the degree of sparsity in the attention mechanism using a hyperparameter $\lambda$. This allows them to observe trends as attention moves from dense (softmax) to extremely sparse.
- Architectures: They test both Recurrent Neural Networks (BiLSTMs) and Transformers across standard text classification tasks (IMDb, SST, 20News).
The Contextualization Problem
The authors verify that internal representations are highly contextualized "soups." The influence of a single input token $x_i$ on its corresponding hidden state $h_i$ is often quite low. This confirms that "attending to $h_i$" is not the same as "attending to $x_i$."
As shown in Figure 2, attention distributions consistently show a much higher correlation with intermediate representations than with the original input tokens, highlighting the gap between what the model attends to and the actual source of information.
The Sparsity Paradox
You might expect that forcing the model to pick fewer hidden states would force it to pick fewer input words. Instead, they found a negative correlation between attention sparsity and feature importance sparsity. As attention becomes sparser, the underlying input influence actually becomes more dispersed (higher entropy).
The authors suggest that when a model is forced to use sparse attention, it compensates by "packing" more global information into the few hidden states it is allowed to attend to. This "redistribution" makes the individual hidden states even less interpretable.
Key Results
The study finds that as the sparsity penalty increases, the correlation between attention weights and traditional feature importance measures (like gradients) drops significantly.
As illustrated in Figure 3, increasing the sparsity parameter leads to a plummeting correlation between attention and gradient-based feature importance, particularly evident in the IMDb dataset. This suggests that the "cleaner" sparse attention maps are actually less faithful to the model's internal logic.
Conclusion
The findings challenge the assumption that sparsity equals interpretability. While sparse attention provides a more focused visualization, it often masks a more complex and dispersed underlying feature importance. Future work should look for alternative ways to link sparse attention to inputs or develop new architectural constraints that prevent the "information redistribution" effect. Until then, we should not assume sparsity automatically improves the explanatory power of attention mechanisms.
Summary updated