Source-linked AI summary

TIMING: Temporality-Aware Integrated Gradients for Time Series Explanation

Hyeongwon Jang, Changhun Kim, Eunho Yang

arXiv:2506.05035v1cs.LGcs.AI

TL;DR

Existing time-series XAI evaluations can cancel opposing attribution effects, while conventional IG paths ignore temporal relationships and introduce out-of-distribution samples. The paper proposes CPD/CPP and TIMING, a temporality-aware IG method, and reports that TIMING outperforms existing baselines while classical IG outperforms recent methods under the new metrics.

  • Problem

    Current time-series XAI metrics can cancel positive and negative attribution effects, underestimating methods that identify directional importance.

    Source: §1 · p. 1, §3.1 · p. 3
  • Method

    The paper introduces CPD and CPP for cumulative evaluation and TIMING, which uses temporality-aware stochastic baselines and segment-based masking within IG.

    Source: §1 · pp. 1–2, §3.2 · p. 3, §4.2 · p. 4
  • Results

    TIMING outperforms existing time-series XAI baselines, while classical IG outperforms recent methods under CPD and CPP.

    Source: §1 · p. 2, §7 · p. 9
  • Takeaways & Limitations

    CPD and CPP reveal directional attribution performance that conventional evaluations can miss, supporting TIMING as an effective temporality-aware enhancement of IG.

    Source: §1 · pp. 1–2

    Current performance-drop evaluations can depend on ground-truth labels and may reward removing irrelevant or spuriously attended regions when performance improves.

    Source: §3.1 · p. 3

Abstract

from arXiv · show

Recent explainable artificial intelligence (XAI) methods for time series primarily estimate point-wise attribution magnitudes, while overlooking the directional impact on predictions, leading to suboptimal identification of significant points. Our analysis shows that conventional Integrated Gradients (IG) effectively capture critical points with both positive and negative impacts on predictions. However, current evaluation metrics fail to assess this capability, as they inadvertently cancel out opposing feature contributions. To address this limitation, we propose novel evaluation metrics-Cumulative Prediction Difference (CPD) and Cumulative Prediction Preservation (CPP)-to systematically assess whether attribution methods accurately identify significant positive and negative points in time series XAI. Under these metrics, conventional IG outperforms recent counterparts. However, directly applying IG to time series data may lead to suboptimal outcomes, as generated paths ignore temporal relationships and introduce out-of-distribution samples. To overcome these challenges, we introduce TIMING, which enhances IG by incorporating temporal awareness while maintaining its theoretical properties. Extensive experiments on synthetic and real-world time series benchmarks demonstrate that TIMING outperforms existing time series XAI baselines. Our code is available at https://github.com/drumpt/TIMING.

1. Introduction

The paper argues that time-series XAI evaluations overlook directional attribution, then introduces CPD, CPP, and TIMING to address this gap. Experiments report that directional IG performs strongly under the new metrics and that TIMING outperforms existing baselines.

1. Introduction

  • Existing time-series XAI methods commonly emphasize attribution magnitude while overlooking whether features reinforce or oppose predictions.This limits identification of positively contributing features and weakens evaluation of directional attribution.Source: §1 · p. 1
  • Conventional evaluation metrics can cancel opposing contributions, underestimating Integrated Gradients despite its ability to identify important points.This bias favors methods with aligned attribution directions over methods that preserve directional information.Source: §1 · p. 1
  • CPD and CPP evaluate directed and undirected attribution methods by monitoring cumulative changes rather than simultaneous changes.CPD evaluates high-attribution points, while CPP evaluates low-attribution points.Source: §1 · p. 1
  • Under the proposed metrics, traditional gradient-based methods such as IG perform remarkably well compared with state-of-the-art methods.The result supports directional attribution as a way to identify points influencing model behavior.Source: §1 · p. 2
  • TIMING enhances IG with temporality-aware stochastic baselines to address temporal dependencies and out-of-distribution integration paths.The method is designed to retain IG’s theoretical properties while improving time-series attribution.Source: §1 · p. 2
  • Extensive experiments show that TIMING outperforms existing time-series XAI baselines while maintaining IG’s efficiency and theoretical properties.The contribution is evaluated on synthetic and real-world datasets.Source: §1 · p. 2

2. Problem Setup

The paper formulates time-series feature attribution as assigning contribution values to time-step features for a classifier’s chosen class. It distinguishes signed attributions, which encode direction, from unsigned attributions, which encode only magnitude.

2. Problem Setup

  • Feature attribution is defined as a real-valued T × D matrix whose entries quantify feature contributions to the classifier’s predicted class probability.The classifier maps a T-step, D-dimensional time series to class probabilities.Source: §2 · p. 2
  • Signed attributions use positive values for prediction-enhancing features and negative values for prediction-suppressing features, with absolute value indicating influence strength.This representation preserves both direction and magnitude.Source: §2 · p. 2
  • Figure 1 illustrates that CPD can favor a perfect method with misaligned signs over a poorly performing method with aligned signs, unlike raw prediction difference.The comparison is shown as d versus c rather than b versus a.Source: Figure 1 · p. 2
  • Unsigned attribution methods report feature importance through contribution magnitude without indicating whether a feature increases or decreases the prediction.The distinction motivates evaluation methods that can assess directional information.Source: §2 · p. 2

3. Proposed Metrics

Current time-series XAI metrics can misjudge attribution quality because simultaneous removals cancel opposing contributions. CPD and CPP instead evaluate cumulative prediction changes, enabling fairer assessment of signed and unsigned methods.

3.1. Limitations of Current Time Series XAI Metrics

  • Simultaneous removal of top-attribution points can cancel positive and negative contributions, favoring sign-aligned but poorly ranked features.This bias can make imperfectly ranked, directionally aligned attributions outperform perfectly ranked but misaligned ones.Source: §3.1 · p. 3
  • Table 1 shows that aligning positively or negatively attributed points with IG significantly outperforms existing baselines under Acc (10%), exposing a metric flaw.Acc (10%) measures the ratio of retained predictions after masking 10% of points.Source: §3.1 · p. 3, Table 1 · p. 3

3.2. New Metrics: Cumulative Prediction Difference and Preservation

  • CPD sequentially removes highest-absolute-attribution points and cumulatively measures consecutive prediction differences, with larger values indicating better attribution quality.It computes cumulative differences between class-probability vectors across time steps using the ℓ1 norm.Source: §3.2 · p. 3
  • CPP sequentially removes lowest-absolute-attribution points and measures consecutive prediction differences, with smaller values indicating more stable predictions.This evaluates whether points deemed less important can be removed without materially changing model predictions.Source: §3.2 · p. 3
  • CPD and CPP assess signed and unsigned attribution methods on equal footing and provide holistic ranking evaluation by varying K.For signed methods, alternating positive and negative points by absolute-value order can inflate the metric, so attribution signs should not manipulate ordering.Source: §3.2 · pp. 3–4
  • The proposed metrics are designed to improve faithfulness evaluation while extending naturally beyond time-series data.Their cumulative construction monitors internal changes rather than relying on simultaneous changes.Source: §3.2 · p. 3

4. Proposed Method

This section reviews conventional Integrated Gradients and introduces TIMING, which uses temporality-aware masking to address disrupted temporal relationships and out-of-distribution paths. It also presents efficient computation and axiomatic properties, while noting that TIMING sacrifices IG’s completeness property.

4.1. Background: Integrated Gradients

  • Naive IG integrates gradients along a straight-line path from a typically zero baseline, which can miss disrupted temporal relationships and produce unreliable attributions from out-of-distribution samples.Scaling all points toward zero preserves existing temporal relationships while making intermediate paths potentially unlike training data.Source: §4.2 · p. 4, §4.1 · p. 4

4.2. TIMING: Temporality-Aware Integrated Gradients

  • TIMING first partially retains original values through binary masks, then estimates attribution by averaging MaskingIG over randomly sampled masks.The retained baseline is (1 − M) ⊙ x, and random masks determine which points are scaled down or retained.Source: §4.2 · pp. 4–5
  • TIMING applies segment-level masking with temporality-aware stochastic baselines, preserving temporal dependencies and mitigating out-of-distribution intermediate samples.It selects segments with lengths in [smin, smax] rather than masking individual points, reflecting subsequence-level information in each IG computation.Source: §4.2 · pp. 4–5

4.3. Theoretical Properties

  • Randomization along the integration path avoids repeatedly computing IG across different baselines, and experiments use a single sample to approximate the expectation efficiently.Proposition 4.1 supports replacing repeated baseline computations with randomly selected binary masks along the path.Source: §4.3 · p. 5
  • TIMING satisfies sensitivity and implementation invariance, preserving nonzero attribution for changed influential points and consistency across functionally equivalent models.These properties establish consistency with key axiomatic aspects of Integrated Gradients.Source: §4.3 · p. 5
  • TIMING does not guarantee completeness: its attributions need not sum to the model-output difference because it aggregates information across multiple baseline contexts.This broader baseline perspective provides richer contextual interpretation but sacrifices the completeness property guaranteed by standard IG for one baseline.Source: §4.3 · pp. 5–6
  • Table 2 compares XAI methods on MIMIC-III mortality prediction using zero substitution, 20% and cumulative masking, and CPD, Acc, CE, Suff, and Comp metrics.Results are aggregated as mean ± standard error over five random cross-validation repetitions, with CPD evaluated at K = 50 and K = 100.Source: Table 2 · p. 6

5. Experiments

TIMING is evaluated across synthetic and real-world time-series benchmarks using directional metrics, ablations, qualitative analysis, and efficiency tests. It improves CPD broadly, preserves strong synthetic explanation quality, benefits from segment masking, and remains robust and efficient.

5.1. Experimental Setup

  • Experiments use synthetic and six real-world datasets, 13 XAI baselines, primarily single-layer GRU classifiers, and CPD/CPP alongside established evaluation metrics.CNN and Transformer evaluations are reported in the appendix.Source: §5.1 · pp. 6–7, §5 · p. 6

5.2. Main Results

  • TIMING improves zero-substitution CPD by 8.7% on MIMIC-III, 5.1% on PAM, 109.8% on Boiler, 11.1% on Epilepsy, 34.8% on Wafer, and 1.0% on Freezer.These results span multivariate and univariate real-world datasets.Source: §5.2 · p. 7
  • On synthetic datasets, TIMING achieves high CPD on Switch-Feature and State despite ContraLSP and Extrmask better estimating Switch-Feature saliency maps.The result distinguishes saliency-map estimation from effective model explanations.Source: §5.2 · p. 7, Table 4 · p. 8

5.3. Ablation Study

  • TIMING outperforms standard IG and RandIG across substitution strategies, with particularly large gains under zero substitution.The comparison attributes the advantage to segment-level temporal structure rather than independently disrupting points.Source: §5.3 · p. 8, Table 5 · p. 8

5.4. Further Analysis

  • TIMING’s explanations identify clinically coherent patterns, including lactate for true positives and stable blood-pressure or BUN/Cr patterns for true negatives.Further analysis reports compact and reasonable feature attributions.Source: §5.4 · p. 8
  • Average-performance discrepancies across hyperparameter configurations are at most 0.04 with average substitution and 0.019 with zero substitution.The default setting (n, smin, smax) = (50, 10, 48) achieves optimal results, while smax = 10 slightly degrades performance.Source: §5.4 · p. 8, Table 6 · p. 8
  • TIMING achieves 0.04 sec/sample while delivering the best CPD performance among the compared non-training-based methods.The efficiency analysis uses logarithmic elapsed-time measurements and CPD with K = 50 on MIMIC-III.Source: §5.4 · pp. 8–9, Figure 4 · p. 9

6. Related Work

Related work spans modality-agnostic and time-series-specific XAI methods, but the field still faces challenges from temporal dependence, directional influence, and evaluation coherence.

Modality-agnostic explainable artificial intelligence methods

  • Modality-agnostic methods such as SHAP, LIME, IG, DeepLIFT, FO, and AFO often treat observations independently, limiting their suitability for temporally dependent data.These methods have been validated predominantly in image and language domains.Source: §6 · p. 9

Explainable artificial intelligence for time series data

  • Time-series XAI methods incorporate temporal dependencies through distributional shifts, temporal aggregation, dynamic masks, learned perturbations, contrastive gates, surrogates, or information bottlenecks.Examples include FIT, WinIT, Dynamask, Extrmask, ContraLSP, TimeX, and TimeX++.Source: §6 · p. 9
  • Despite these advances, existing work leaves unresolved the directional influence of individual points and a cohesive framework for evaluating their significance.These are the gaps addressed by the paper.Source: §6 · p. 9

7. Conclusion

The paper introduces CPD and CPP to address directional-attribution and evaluation problems, then develops TIMING to make integrated gradients temporally aware. Experiments report improved faithfulness, coherence, and efficiency.

7. Conclusion

  • CPD and CPP address flawed evaluations that fail to capture directional attributions, revealing that classical IG outperforms recent methods.The metrics are designed to avoid cancellation between opposing contributions.Source: §7 · p. 9
  • TIMING enhances IG with segment-based masking to capture complex temporal dependencies while avoiding out-of-distribution samples.The method preserves the integrated-gradients foundation while adapting it to time series.Source: §7 · p. 9
  • Extensive experiments demonstrate superior TIMING performance in attribution faithfulness, coherence, and efficiency.The conclusion positions the method for more reliable, interpretable time-series insights in real-world applications.Source: §7 · p. 9

Impact Statement

The impact statement connects more reliable time-series explanations with transparency in safety-critical applications. The included algorithm material specifies TIMING’s efficient attribution procedure.

Impact Statement

  • The work targets greater transparency for healthcare, energy systems, and infrastructure monitoring, supporting clinicians, engineers, and operators in understanding AI-driven decisions.The stated aim is to promote responsible deployment where interpretability matters for safety and effectiveness.Source: Impact Statement · p. 10

A. Algorithm

  • TIMING’s efficient algorithm samples segment baselines, interpolates between baselines and the input, accumulates gradients, and outputs attributions adjusted by unmask counts.The procedure uses n segments with lengths between smin and smax across nsamples interpolation steps.Source: A. Algorithm · p. 13

B.1. Proof of Proposition 4.1

The propositions establish theoretical properties of TIMING, including its relationship to conventional IG, sensitivity, and implementation invariance.

B.1. Proof of Proposition 4.1

  • A single randomly selected binary mask can approximate TIMING’s expectation, avoiding repeated IG computations over different baselines.The resulting path fluctuates between the zero baseline and the input, and experiments use one sample for the inter-expectation.Source: §B.1 · pp. 13–14

B.2. Proof of Proposition 4.2

  • When a mask differs from the input at only coordinate (t, d), MaskingIG reduces to conventional IG for that coordinate, so TIMING inherits nonzero sensitivity.If F(x) ≠ F(x′), conventional IG is nonzero and TIMING_{t,d}(x) must also be nonzero.Source: §B.2 · p. 14

B.3. Proof of Proposition 4.3

  • Because TIMING depends only on model gradients, like IG, it satisfies implementation invariance.Source: §B.3 · p. 14

C. Existing Evaluation Metrics for Time Series XAI

The paper reviews established time-series XAI metrics, identifies their limitations, and situates experiments across two synthetic and six real-world datasets.

C. Existing Evaluation Metrics for Time Series XAI

  • Existing metrics include Accuracy, Cross-Entropy, Sufficiency, and Comprehensiveness, with lower or higher scores preferred depending on the metric.Accuracy and Sufficiency favor lower values, whereas Cross-Entropy and Comprehensiveness favor higher values.Source: C. Existing Evaluation Metrics for… · p. 15
  • Traditional metrics may be unreliable because AUP and AUR assume known ground-truth importance, while Acc, CE, Suff, and Comp remove multiple features simultaneously.The paper notes that integrating conventional measures with cumulative metrics could yield a more robust evaluation framework.Source: C. Existing Evaluation Metrics for… · p. 15

D. Description of Datasets

  • The experiments cover two synthetic datasets and six real-world datasets spanning clinical, activity, industrial, EEG, semiconductor, and household-power time series.The dataset inventory is summarized in Table 7.Source: Table 7 · p. 15, D. Description of Datasets · p. 15

D.1. Synthetic Datasets

The evaluation uses two synthetic benchmarks with known saliency annotations and six real-world datasets covering varied time-series lengths, dimensions, and applications.

D.1. Synthetic Datasets

  • Switch-Feature uses a three-state HMM with Gaussian-process mixture emissions and state-dependent means to generate multivariate sequences.Its setup includes an RBF kernel with γ = 0.2 and marginal variance 0.1.Source: §D.1 · pp. 15–16
  • Switch-Feature contains 1,000 sequences of length 100, split into 800 training and 200 test samples with state-based true saliency maps.Source: §D.1 · p. 16
  • State is a standard time-series XAI test-bed generated by a two-state HMM, with features sampled from state-conditioned Gaussian distributions.Source: §D.1 · p. 16
  • A second synthetic procedure generates 1,000 sequences of length 200, using 800 for training and 200 for evaluation with defined true saliency maps.Source: §D.1 · p. 16

D.2. Real-world Datasets

  • The real-world benchmarks comprise MIMIC-III, PAM, Boiler, Epilepsy, Wafer, and Freezer.MIMIC-III contains 22,988 ICU admissions with 32 features over 48 hours; PAM contains 5,333 samples with 600 steps and 17 channels; Epilepsy contains 11,500 samples with 178 steps and one channel.Source: §D.2 · pp. 16–17
  • Table 8 evaluates model consistency on MIMIC-III using Transformer and CNN models under masking strategies, reporting Acc and CPD at K = 50 and K = 100.Source: Table 8 · p. 17

E. Result on Different Black-Box Classifiers

TIMING is evaluated across black-box architectures, while qualitative MIMIC-III examples compare how signed and unsigned methods identify clinically meaningful features.

E. Result on Different Black-Box Classifiers

  • TIMING generalizes across GRU, CNN, and Transformer black-box classifiers in the reported MIMIC-III consistency evaluation.The primary experiments use a single-layer GRU with 200 hidden units, with CNN and Transformer added to assess generalizability.Source: E. Result on Different Black-Box… · p. 17

F. Qualitative Examples

  • Signed methods identify lactate at feature index 9 in relevant regions, aligning with its clinical association with lactic acidosis and mortality.The qualitative examples include true-positive and true-negative MIMIC-III cases with model outputs 0.625, 0.898, 0.020, and 0.081.Source: F. Qualitative Examples · p. 17, Figure 6 · p. 18, Figure 7 · p. 18
  • Unsigned methods do not clearly identify lactate as salient, limiting alignment between their explanations and clinical understanding.Source: F. Qualitative Examples · p. 17
Loading 2506.05035v1…