What went wrong and when? Instance-wise Feature Importance for Time-series Models

Sana Tonekaboni, Shalmali Joshi, David Duvenaud, Anna GoldenbergarXiv 2020

Introduction

Machine learning models are increasingly deployed in high-stakes time-series domains, such as predicting patient mortality in Intensive Care Units (ICUs). However, these models often function as "black boxes," making it difficult for practitioners to trust their outputs. While numerous methods exist for explaining static models (e.g., identifying which pixels in an image represent a specific object), time-series data presents a unique challenge: temporal dependency.

Existing explanation methods often fail in this context for three primary reasons. First, they frequently ignore time; perturbation-based methods like feature shuffling often create "impossible" data points that disregard the signal's history. Second, many methods are model-specific, restricted to architectures like LSTMs or Attention-based models. Finally, they often lack temporal precision. In a clinical setting, a heart rate of 100 might be normal at 2:00 PM but life-threatening at 2:05 PM following a sudden drop in blood pressure. We need to know exactly when a feature becomes critical to the model's decision.

The FIT Framework

The authors propose FIT (Feature Importance in Time), a model-agnostic framework designed to identify which specific observations in a multivariate time-series drive a model's predictions. The core logic of FIT is to quantify how much a new observation at time $t$ helps the model approximate its final "full-information" prediction.

Quantifying Importance via Distributional Shifts

FIT defines importance as the difference between two KL-divergence terms:

  1. Temporal Shift (T1): Measures how much the model's prediction changed from time $t-1$ to $t$ given all observed data.
  2. Unexplained Shift (T2): Measures how much the prediction would have changed if only a specific subset of features $\mathbf{x}_s$ were observed at time $t$, while the remaining features were estimated based on historical trends.
Figure 2: Visualizing the FIT importance score logic. The framework identifies importance by comparing the actual predictive shift (T1) against the shift unexplained by a feature subset (T2).

As illustrated in the figure above, a subset of features is considered important ($I(\mathbf{x}_s, t) > 0$) if it explains the predictive temporal shift. If the subset is irrelevant, the shift remains unexplained ($I = 0$), and if the subset contradicts the overall trend, the importance can even be negative.

Generative Counterfactuals

To calculate the "Unexplained Shift," FIT requires a way to "fill in the blanks" for unobserved features. Rather than using simple means or random noise—which can lead to out-of-distribution artifacts—the authors utilize a Recurrent Latent Variable Model. This generator learns the underlying dynamics of the data, allowing FIT to create statistically realistic counterfactuals that respect the signal's history.

Experimental Evaluation

The authors evaluated FIT on both synthetic and real-world clinical data from the MIMIC-III dataset. The synthetic benchmarks included "State Data" (where importance depends on a hidden Markov state) and "Switch-Feature Data" (involving non-stationary shifts induced by Gaussian Process mixtures).

Key Results

In synthetic experiments with known ground-truth importance, FIT significantly outperformed standard interpretability methods. On the complex "State Data," FIT achieved an AUROC of 0.798, compared to 0.565 for Integrated Gradients (IG) and 0.482 for LIME.

Figure 3: Performance comparison on synthetic State and Switch-Feature data. FIT consistently outperforms baselines in identifying ground-truth important features.

On real-world clinical data (MIMIC-III), the authors conducted a "deletion" test. By removing the top 5% of observations identified as important by FIT, the black-box model's performance dropped significantly more than when removing observations flagged by other methods. This demonstrates that FIT successfully identifies the "load-bearing" data points that most influence the model's behavior.

Conclusion

FIT provides a robust, model-agnostic approach to time-series interpretability by grounding feature importance in temporal shifts and realistic generative counterfactuals. While the method is more computationally intensive than gradient-based alternatives due to its reliance on Monte Carlo sampling, its ability to pinpoint what went wrong and when offers a significant step forward for reliable AI in time-critical applications.

Summary updated

BibTeX
@misc{tonekaboni2020what,
  author = {Sana Tonekaboni and Shalmali Joshi and David Duvenaud and Anna Goldenberg},
  title = {{What went wrong and when? Instance-wise Feature Importance for Time-series Models}},
  year = {2020},
  eprint = {2003.02821},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2003.02821},
}
Figure