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

Input-Cell Attention Reduces Vanishing Saliency of Recurrent Neural Networks

Aya Abdelsalam Ismail, Mohamed K. Gunady, Luiz Pessoa, Héctor Corrada Bravo, Soheil Feizi

Introduction

Recurrent Neural Networks (RNNs), particularly Long Short-Term Memory (LSTM) networks, are fundamental to sequence modeling. However, their utility in high-stakes domains like clinical medicine or neuroscience is often hampered by a lack of interpretability. While saliency maps are commonly used to explain model decisions by highlighting influential input features, this paper identifies a critical phenomenon termed "vanishing saliency." This bias causes interpretability tools to disproportionately highlight features at the end of a sequence, even when early events are the true drivers of a prediction.

The Vanishing Saliency Problem

Vanishing saliency is distinct from the well-known vanishing gradient problem. A model can successfully learn to utilize early information for accurate predictions (demonstrating no vanishing gradient) yet still produce saliency maps that suggest early inputs were irrelevant. This "recency bias" occurs because gradients backpropagated through long recurrent chains are attenuated by the cumulative effect of "forget gates." Mathematically, the authors demonstrate that the product of forget gates across many time steps tends toward zero, effectively washing out the historical "blame" or "credit" in the saliency map.

Proposed Solution: Input-Cell Attention

To mitigate this, the authors propose Input-Cell Attention. Unlike standard LSTMs where gates only consider the current input and the immediate previous hidden state, this architecture incorporates:

  1. History Awareness: At each time step $t$, the model observes the entire input history from $0$ to $t$.
  2. Internal Attention Mechanism: A self-attention layer generates a weighted summary matrix ($M_t$) of the past.
  3. Direct Gradient Paths: This summary is fed directly into the LSTM gates. This creates a shortcut for gradients, allowing them to bypass the recurrent chain and flow directly back to early time steps during saliency calculation.

Experimental Evaluation

The method was validated across synthetic and real-world datasets, including Sequential MNIST and the Human Connectome Project (HCP) fMRI data. In the fMRI task, the goal was to classify brain activity during specific tasks (e.g., memory vs. gambling).

Comparison of saliency maps between a standard LSTM and the proposed Input-Cell Attention model on fMRI data. The standard LSTM (a) shows vanishing saliency for early time steps, while the proposed model (b) maintains consistent interpretability throughout the sequence.

As shown in the fMRI results above, the standard LSTM exhibits a clear temporal bias, only highlighting active brain regions toward the end of the scan ($t=40$). In contrast, the Input-Cell Attention model identifies relevant neurological patterns across the entire duration, aligning with known brain activity during these tasks.

Key Results

  • Synthetic Accuracy: On the "Earlier Box" dataset (where the signal is at the very start), standard LSTMs achieved a Weighted Jaccard similarity of 0.000—meaning they completely failed to identify the important features. The Input-Cell Attention model achieved a score of 0.103.
  • MNIST: For digits like "7," where the defining horizontal bar is at the top (the beginning of the sequence), the proposed model recovered the saliency of that bar, whereas the vanilla LSTM failed.
  • Interpretability vs. Accuracy: The authors emphasize that accuracy does not guarantee interpretability. An LSTM can be highly accurate while producing a useless saliency map that only highlights the end of a sequence.

Conclusion

Input-Cell Attention effectively decouples model accuracy from interpretability limitations. By providing a direct path for gradients through an internal attention mechanism, the model eliminates vanishing saliency without sacrificing predictive performance. This advancement is crucial for deploying deep learning in fields where understanding the temporal evolution of features is as vital as the final classification.

Summary updated

BibTeX
@inproceedings{ismail2019input,
  author = {Aya Abdelsalam Ismail and Mohamed K. Gunady and Luiz Pessoa and Héctor Corrada Bravo and Soheil Feizi},
  title = {{Input-Cell Attention Reduces Vanishing Saliency of Recurrent Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=RoIr-HOVg_},
}
Figure