arXiv:2610.33330cs.AIOct 2026

Manuscript Offprint

arXiv:2610.33330

TempShap: When and How Much a Feature Matters in Time-Series Forecasting

Chi Zhao, Anastasiia Chelnokova, Jing Liu, Elena Parilina

ABSTRACT

Attribution for a time-series forecaster should answer two questions that a feature-level scalar cannot: when in the input window a feature acts, and how much its influence changes across the forecast horizon. Most existing Shapley explainers treat each feature as one player and therefore collapse both axes. We propose TempShap, a retrospective, loss-based Shapley framework whose players are the individual input cells (t,i)(t, i). Its attribution tensor yields temporal-localization and horizon-impact profiles. We validate these against planted temporal structures, a tractable exact cell game, and a closed-form attribution oracle for a real linear forecaster. Permutation sharing estimates the cell-level game at localized perturbation cost. Under redundant inputs, one-at-a-time scores under-credit substitutable information, whereas the signed Shapley decomposition preserves total value and yields more reliable held-out deletion rankings under mean masking. A planted counterexample isolates the redundancy mechanism. Experiments show a deletion-ranking advantage across Shapley estimators, forecasting benchmarks, and model families. TempShap therefore makes fine-grained Shapley attribution both practical and operationally useful.

1 INTRODUCTION

Two questions a practitioner cannot avoid when interpreting a multivariate forecaster: when in the input window does a feature exert its influence, and how much does that influence change across the prediction horizon. Yet most existing Shapley explainers (SHAP (Lundberg & Lee, 2017), KernelSHAP, FastSHAP (Jethani et al., 2022), Leverage SHAP (Musco & Witter, 2025), ShapG (Zhao et al., 2025b)) treat each feature as one player, returning one scalar per input feature. This collapses the input-lag and the whole output cell (forecast horizon and target) to that scalar. The standard evaluation does the same: estimators are ranked by a progressive feature-removal score (Petsiuk et al., 2018), a single curve that again collapses the input-lag and horizon axes. ShapTime (Zhang et al., 2024) explains temporal importance to guide forecasting improvements. Other time-series extensions push toward (feature, timestep) space by grouping (TimeSHAP (Bento et al., 2021), WindowSHAP (Nayebi et al., 2023), ShaTS (Franco de la Peña et al., 2025)); finer-grained approaches use cell-level Shapley perturbations (TimeSHAP) or localized per-position sensitivities (PAX-TS), but neither provides a uniform loss-based per-(sample, input-lag, input-feature, horizon, target) Shapley tensor from which temporal profiles are read; that tensor is this paper's contribution.

Our contributions are:

• A cell-level, loss-based Shapley framework (Section 3) whose attribution tensor yields temporal-localization, horizon-impact, and rank-settling profiles (Figure 1).

• Validation and robustness of this framework (Sections A.4 and 5.1): recovery of planted signals, exact-cell and linear-model oracle agreement, baseline-robust localization, and no consistent recency ordering across architectures.

• A signed, efficiency-respecting advantage under redundancy (Section 5.3): accounting for substitutable inputs improves held-out cell-deletion rankings across estimators under mean masking.

• A practical, unbiased estimator (Section 5.2): permutation sharing delivers axiomatic cell attribution at localized perturbation cost.

References (43)