Skip to main content
QUICK REVIEW

[Paper Review] Feature Importance for Time Series Data: Improving KernelSHAP

Mattia Villani, Joshua Lockhart|arXiv (Cornell University)|Oct 5, 2022
Time Series Analysis and ForecastingComputer Science6 citations
TL;DR

This paper proposes VARSHAP, a time-series-adapted extension of KernelSHAP that uses Vector Autoregressive (VAR) models to compute Shapley values, enabling accurate feature importance estimation for time series. It introduces Time Consistent Shapley Values and an event detection method that aggregates SHAP values to identify causal features behind prediction jumps, significantly improving interpretability in temporal contexts.

ABSTRACT

Feature importance techniques have enjoyed widespread attention in the explainable AI literature as a means of determining how trained machine learning models make their predictions. We consider Shapley value based approaches to feature importance, applied in the context of time series data. We present closed form solutions for the SHAP values of a number of time series models, including VARMAX. We also show how KernelSHAP can be applied to time series tasks, and how the feature importances that come from this technique can be combined to perform "event detection". Finally, we explore the use of Time Consistent Shapley values for feature importance.

Motivation & Objective

  • To adapt KernelSHAP for time series data, where feature independence and long lookback windows challenge standard implementations.
  • To derive closed-form Shapley values for common time series models including AR, MA, ARMA, VARMA, and VARMAX.
  • To develop Time Consistent Shapley Values that reduce computational complexity by leveraging temporal structure.
  • To introduce an event detection technique that aggregates SHAP values across time steps to identify salient feature contributions during prediction changes.
  • To address the limitations of model-agnostic XAI methods in time series by incorporating temporal dependencies and autocorrelation.

Proposed method

  • Adapts KernelSHAP by replacing linear models with Vector Autoregressive (VAR) models to approximate Shapley values in time series, introducing VARSHAP.
  • Derives closed-form Shapley values for AR, MA, ARMA, VARMA, and VARMAX models using co-operative game theory principles.
  • Introduces Time Consistent Shapley Values, a method that reduces the sample space by enforcing temporal consistency in feature attribution.
  • Proposes an event detection framework that aggregates SHAP values across time steps to identify features responsible for sudden prediction changes.
  • Employs perturbation-based sampling with VAR models to estimate marginal contributions, ensuring convergence to true Shapley values under time series constraints.
  • Validates methods on synthetic and real-world time series data, demonstrating improved interpretability and detection of causal events.

Experimental results

Research questions

  • RQ1Can KernelSHAP be reliably extended to time series data by replacing linear models with VAR models?
  • RQ2How can closed-form Shapley values be derived for standard time series models like VARMAX and ARMA?
  • RQ3Can temporal consistency in feature attribution reduce computational complexity while preserving interpretability?
  • RQ4Can aggregated SHAP values detect meaningful events (e.g., prediction jumps) driven by specific features?
  • RQ5How do Time Consistent Shapley Values compare to VARSHAP in capturing feature importance under autocorrelation?

Key findings

  • VARSHAP successfully extends KernelSHAP to time series by using VAR models, preserving convergence guarantees to Shapley values under temporal constraints.
  • Closed-form Shapley values are derived for AR, MA, ARMA, VARMA, and VARMAX models, enabling exact attribution without approximation.
  • Time Consistent Shapley Values reduce the sample space for computation by enforcing temporal consistency, improving scalability for long sequences.
  • The event detection method successfully identifies feature contributions to prediction jumps, with submetering data showing that individual appliances drive distinct surges in target values.
  • VARSHAP and Time Consistent Shapley Values yield significantly different attribution patterns, suggesting distinct strengths in capturing model behavior under different temporal assumptions.
  • The method reveals that feature importance is highly dynamic across time steps, with certain features dominating during prediction shifts, underscoring the need for temporal-aware explanation techniques.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.