Research map / Time series / Foundation models for time series
ShapeX: Shapelet-Driven Post Hoc Explanations for Time Series Classification Models
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes ShapeX, which segments time series into shapelet-driven segments via a learned Shapelet Describe-and-Detect module and attributes them with Shapley values, yielding more accurate and causally framed post-hoc time series explanations.
Problem
Post-hoc explanation of time series classifiers typically assigns importance per timestep, ignoring that classification is driven by key subsequences (shapelets), so explanations are fragmented and less faithful.
Approach
Learn a compact, diverse set of discriminative shapelets with a descriptor-detector layer and composite loss (classification, matching, diversity), use their activation maps to cut the input into shapelet-aligned segments, perturb them with linear interpolation baselines, and compute Shapley values over these segments; the paper argues the Shapley value equals a model-level CATE.
Key results
- On synthetic datasets, ShapeX exceeds the second-best method in AUPRC by an average of 58.12%, with the largest gain of 146.07% on MTC-E.
- On ECG, ShapeX reaches AUPRC 0.7228 and AUR 0.6961, versus 0.6599 AUPRC for the best baseline TimeX++.
- Occlusion evaluation across the UCR archive shows ShapeX with the highest average AUROC and most stable degradation curve across perturbation ratios.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| use shapelet-driven ShapeX instead of the strongest baseline | time-series explanations with Transformer classifier · MCC-E, MCC-H, MTC-E, MTC-H, and ECG | AUPRC: MCC-E: 0.4762 -> 0.6407; MCC-H: 0.6393 -> 0.8113; MTC-E: 0.3569 -> 0.6100; MTC-H: 0.3903 -> 0.6792; ECG: 0.6599 -> 0.722 | Helped |
| use ShapeX instead of the strongest baseline | time-series explanations with Transformer classifier · MCC-E, MCC-H, MTC-E, MTC-H, ECG | AUP: MCC-E: 0.5238 -> 0.5614; MCC-H: 0.6668 -> 0.6838; MTC-E: 0.6301 -> 0.3962; MTC-H: 0.8996 -> 0.4255; ECG: 0.7260 -> 0.839 | Mixed |
| use ShapeX instead of the strongest baseline | time-series explanations with Transformer classifier · MCC-E, MCC-H, MTC-E, MTC-H, ECG | AUR: MCC-E: 0.6313 -> 0.3679; MCC-H: 0.7210 -> 0.7431; MTC-E: 0.5402 -> 0.5472; MTC-H: 0.5430 -> 0.9019; ECG: 0.4595 -> 0.696 | Mixed |
| add matching loss (ablation) | ShapeX · ECG | AUPRC: 0.2398 -> 0.7225 | Helped |
| add diversity loss (ablation) | ShapeX · ECG | AUPRC: 0.3671 -> 0.7225 | Helped |
| add shapelet encoder (ablation) | ShapeX · ECG | AUPRC: 0.2073 -> 0.7225 | Helped |
| use linear rather than zero-mask perturbation (ablation) | ShapeX · ECG | AUPRC: 0.7085 -> 0.7225 | Helped |
| aggregate saliency by shapelet-driven segments (ablation) | ShapeX · ECG | AUR: 0.3847 -> 0.6958 | Helped |
| use SDD rather than ShapeFormer for shapelet learning (ablation) | ShapeX · ECG | AUPRC: 0.4723 -> 0.7228 | Helped |
| replace shapelet-driven perturbation with equally spaced segments (ablation) | ShapeX · two real-world datasets | AUROC | Hurt |
Surprising findings
- TimeX and TimeX++ perform much worse on equal-amplitude motif datasets (MCC-E, MTC-E) than on high-amplitude ones, suggesting they label amplitude outliers as salient.
- ShapeX shows a slight decline in AUP relative to some baselines on synthetic data, despite gains in AUPRC.
Limitations
- Several user-defined hyperparameters (number and length of shapelets, activation threshold) may need dataset-specific tuning.
- A separate shapelet training phase adds computational overhead relative to purely gradient-based methods.
- Method is limited to univariate time series in the current formulation.
Experimental setup
Datasets: MCC-E MCC-H MTC-E MTC-H ECG UCR Archive
Benchmarks: MCC-E MCC-H MTC-E MTC-H ECG UCR Archive (112-114 datasets)
Metrics: AUPRC AUP AUR AUROC
Baselines: TimeX++ TimeX Dynamask CoRTX Integrated Gradients WinIT MILLET ShapeFormer
Builds on: ShapeFormer TimeX++ Describe-and-Detect Integrated Gradients
Closest papers by meaning
- Diffusion Language-Shapelets for Semi-supervised Time-Series Classification (AAAI 2024 · similarity 0.90)
- Learning Soft Sparse Shapes for Efficient Time-Series Classification (ICML 2025 · similarity 0.89)
- Abstracted Shapes as Tokens - A Generalizable and Interpretable Model for Time-series Classification (NeurIPS 2024 · similarity 0.89)
- Explain Temporal Black-Box Models via Functional Decomposition (ICML 2024 · similarity 0.85)
- InteDisUX: Intepretation-Guided Discriminative User-Centric Explanation for Time Series (AAAI 2025 · similarity 0.85)
- TimeXL: Explainable Multi-modal Time Series Prediction with LLM-in-the-Loop (NeurIPS 2025 · similarity 0.85)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
