Abstract
The shift to electronic medical records (EMRs) has engendered research into machine learning and natural language technologies to analyze patient records, and to predict from these clinical outcomes of interest. Two observations motivate our aims here. First, unstructured notes contained within EMR often contain key information, and hence should be exploited by models. Second, while strong predictive performance is important, interpretability of models is perhaps equally so for applications in this domain. Together, these points suggest that neural models for EMR may benefit from incorporation of attention over notes, which one may hope will both yield performance gains and afford transparency in predictions. In this work we perform experiments to explore this question using two EMR corpora and four different predictive tasks, that: (i) inclusion of attention mechanisms is critical for neural encoder modules that operate over notes fields in order to yield competitive performance, but, (ii) unfortunately, while these boost predictive performance, it is decidedly less clear whether they provide meaningful support for predictions.
Introduction
Electronic Medical Records (EMRs) are a goldmine of data, but much of the most valuable information is buried in unstructured clinical notes. These notes are often long, repetitive, and filled with "noise" irrelevant to a specific medical question. To handle this, researchers use attention mechanisms—components in neural networks that learn to assign "weights" to specific words, theoretically focusing on the most important parts of a text. In the medical field, these weights are frequently used to create heatmaps for clinicians, ostensibly explaining why a model predicted a high risk of mortality or readmission. This paper investigates a critical question: Is attention actually a faithful explanation, or is it merely a tool that improves performance without providing a reliable window into model logic?
Methods
The authors evaluated three common neural architectures—BiLSTMs, CNNs, and simple Embedding Projections—across several clinical tasks using two major EMR sources:
- MIMIC-III: Tasks included predicting 30-day readmission, 1-year mortality, and phenotyping (identifying 25 acute care conditions).
- Mass General Hospital (MGH): Predicting complications following hip or knee surgery.
To test if attention provides a faithful explanation, they employed three "stress tests":
- Gradient Correlation: Checking if attention weights correlated with gradient-based feature importance.
- Adversarial Permutations: Searching for "adversarial" attention distributions—weights that are as different as possible from the original ones but result in the same prediction.
- Log-Odds Substitution: Replacing learned attention weights with "log-odds" scores from a simple linear model.
Results and Discussion
Attention as a Performance Driver
For RNNs like LSTMs, attention is essential rather than optional. Adding attention to an LSTM provided an absolute gain of approximately 10 points in AUC across tasks, making the neural models competitive with strong linear baselines. Without it, LSTMs performed worse than simple "Bag-of-Words" linear models.
The Interpretability Gap
The most striking insight is the existence of "adversarial" attention. The researchers consistently found that multiple, vastly different attention distributions could produce the same prediction. This suggests that the "explanation" provided by attention heatmaps is highly malleable.
As shown in Figure 5, the Jensen-Shannon Divergence (JSD) between original and adversarial attention distributions often approaches 1.0, meaning the distributions were almost entirely different, while the model's output changed by less than 0.01. If two different heatmaps explain the same result, neither can be considered a definitive explanation.
In specific tasks like Knee Surgery (Figure 2), the median output difference remains low across various attention bins. Furthermore, attention weights only weakly correlated with gradient-based importance measures, suggesting that what the attention mechanism "looks at" isn't necessarily what the rest of the model uses to make its final decision.
Conclusion
While adding attention mechanisms to neural networks significantly boosts their performance on clinical prediction tasks, these weights are often misleading as "explanations." The existence of adversarial attention distributions highlights a significant interpretability gap. Clinicians should be extremely cautious when using attention heatmaps for decision support, as they may provide "misleading rationales." Future work should focus on developing models designed from the ground up to be inherently transparent.
Summary updated