Table of Contents
Fetching ...

Explaining Time Series Classification Predictions via Causal Attributions

Juan Miguel Lopez Alcaraz, Nils Strodthoff

TL;DR

Problem: understanding decisions of time-series classifiers by separating causal from associational explanations. Approach: CausalConceptTS uses predefined concepts and high-fidelity diffusion-based counterfactual imputation to estimate how each concept affects classifier outputs via ITE and ATE; provides both global and channel-specific attribution maps. Contributions: formalizes causal versus associational attribution for concept-based explanations in time series, demonstrates a diffusion-based pathway for counterfactuals, and provides empirical evidence across drought, ECG, and EEG tasks along with uncertainty quantification. Significance: reveals differences between causal and associational attributions, aligning causal insights with expert knowledge and offering a broadly applicable framework for causal explainability beyond time series.

Abstract

Despite the excelling performance of machine learning models, understanding their decisions remains a long-standing goal. Although commonly used attribution methods from explainable AI attempt to address this issue, they typically rely on associational rather than causal relationships. In this study, within the context of time series classification, we introduce a novel model-agnostic attribution method to assess the causal effect of concepts i.e., predefined segments within a time series, on classification outcomes. Our approach compares these causal attributions with closely related associational attributions, both theoretically and empirically. To estimate counterfactual outcomes, we use state-of-the-art diffusion models backed by state space models. We demonstrate the insights gained by our approach for a diverse set of qualitatively different time series classification tasks. Although causal and associational attributions might often share some similarities, in all cases they differ in important details, underscoring the risks associated with drawing causal conclusions from associational data alone. We believe that the proposed approach is also widely applicable in other domains to shed some light on the limits of associational attributions.

Explaining Time Series Classification Predictions via Causal Attributions

TL;DR

Problem: understanding decisions of time-series classifiers by separating causal from associational explanations. Approach: CausalConceptTS uses predefined concepts and high-fidelity diffusion-based counterfactual imputation to estimate how each concept affects classifier outputs via ITE and ATE; provides both global and channel-specific attribution maps. Contributions: formalizes causal versus associational attribution for concept-based explanations in time series, demonstrates a diffusion-based pathway for counterfactuals, and provides empirical evidence across drought, ECG, and EEG tasks along with uncertainty quantification. Significance: reveals differences between causal and associational attributions, aligning causal insights with expert knowledge and offering a broadly applicable framework for causal explainability beyond time series.

Abstract

Despite the excelling performance of machine learning models, understanding their decisions remains a long-standing goal. Although commonly used attribution methods from explainable AI attempt to address this issue, they typically rely on associational rather than causal relationships. In this study, within the context of time series classification, we introduce a novel model-agnostic attribution method to assess the causal effect of concepts i.e., predefined segments within a time series, on classification outcomes. Our approach compares these causal attributions with closely related associational attributions, both theoretically and empirically. To estimate counterfactual outcomes, we use state-of-the-art diffusion models backed by state space models. We demonstrate the insights gained by our approach for a diverse set of qualitatively different time series classification tasks. Although causal and associational attributions might often share some similarities, in all cases they differ in important details, underscoring the risks associated with drawing causal conclusions from associational data alone. We believe that the proposed approach is also widely applicable in other domains to shed some light on the limits of associational attributions.
Paper Structure (10 sections, 8 equations, 15 figures, 4 tables)

This paper contains 10 sections, 8 equations, 15 figures, 4 tables.

Figures (15)

  • Figure 1: Schematic representation of the proposed CausalConceptTS approach. Starting from a sample belonging to a specific class, the time series is segmented into predefined concepts, either expert-defined (e.g., ECG segments) or inferred via clustering. For a selected concept, we generate counterfactual versions by imputing the corresponding segments using two different imputation models: one trained on samples from the original class, and another from a chosen baseline class (typically healthy controls). This process yields two sets of counterfactual samples, which are passed through a predefined classifier that we aim to investigate. The log difference between the mean output probabilities for the two sets yields an individual treatment effect (ITE), a causal attribution quantifying the effect of the concept on the classifier's output. By averaging the ITEs across samples, we obtain the average treatment effect (ATE), which we visualize using both channel-agnostic and channel-specific causal attribution maps.
  • Figure 2: Causal graph underlying our approach. The data generating process starts from a class state $CS$, which influences a (concept) mask $M$. The combination of $CS$ and $M$ determines the specific numerical values $X^c_M$ for each concept $c$, leading to the input signal $X$. This input is passed through a predefined classifier $f$. We investigate the causal effect of $X^c_M$ on the classifier output by intervening on the class state $CS$. In our experiments, we assume that the class state $CS$ has no causal effect, and thus the concept mask $M$ is kept unchanged. We also omit potential confounders, such as static metadata that could influence $X^c_M$ or $M$, as indicated by the dashed lines.
  • Figure 3: Schematic representation of identified concepts in the drought dataset for a sample encompassing all channels. Concept assignments (A-E) were derived using k-means clustering.
  • Figure 5: Schematic representation of identified concepts in the ECG dataset for a sample encompassing all channels. Concept assignments (P-wave, PQ segment, QRS complex, ST segment, T wave, and TP segment) were collected from the segmentation maps provided by wagner2023explaining.
  • Figure 7: Spatial distribution of brain activity patterns during different states of brain processing. Dark red indicates increased activity, while dark blue signifies decreased activity.
  • ...and 10 more figures