CoLaX: Context-Aware Local Explanations for Time Series Classification
Organizations: East China University of Science and Technology, China · Image Processing Laboratory, Universitat de València, Spain
Abstract
Post-hoc explanations for time series classifiers usually score local patterns, such as subsequences or shapelets, without regard to the rest of the sequence. Yet the same motif can carry different predictive meaning under different global temporal conditions, such as trends or regimes. We propose CoLaX, a context-aware post-hoc explanation framework that builds on shapelet-driven Shapley attribution and conditions local-pattern relevance on a learned representation of the full sequence. Global context acts at two levels: it produces sample-specific prototype weights and a temporally resolved signal that reweights the local activation map. The resulting context-conditioned segments are the players of a Shapley attribution game whose values come only from the frozen black-box classifier. On synthetic benchmarks where identical motifs change relevance across contexts, CoLaX improves AUPRC over the strongest baseline by 30% on average. On real-world data, it achieves the highest AUPRC on ECG. Additional ablations indicate that the gains come from input-dependent conditioning rather than from additional learnable weights. CoLaX is therefore most useful when recurring local motifs change relevance across sequence-level contexts.
Figures & tables
| MCC-E | MCC-H | |||||
| Method | AUPRC | AUP | AUR | AUPRC | AUP | AUR |
| IG | ||||||
| DYNAMASK | ||||||
| WINIT | ||||||
| CoRTX | ||||||
| MILLET |
| Method | AUPRC | AUP | AUR |
| IG | |||
| DYNAMASK | |||
| WINIT | |||
| CoRTX | |||
| MILLET | |||
| TimeX |
| MCC-E | MCC-H | |||||
| Method | AUPRC | AUP | AUR | AUPRC | AUP | AUR |
| Full | ||||||
| w/o Global | ||||||
| Random Global Context | ||||||
| Random Local Pattern | ||||||
| w/o |
| Method | AUPRC | AUP | AUR |
| TimeX | |||
| TimeX++ | |||
| ShapeX-M | |||
| CoLaX-M |
Appendix figures & tables16 assets
Supplementary material from the paper’s appendix.
Appendix
| Category | Dataset Name | Classes | Testing Samples | Training Samples | Length of Series | Description | True Saliency Score |
| Synthesis | MCC-E | 2 | 2,000 | 10,000 | 800 | Shapelet count for classification, equal amplitude | Yes |
| MCC-H | 2 | 2,000 | 10,000 | 800 | Shapelet count for classification, higher amplitude | Yes | |
| MTC-E | 2 | 2,000 | 10,000 | 800 | Shapelet type for classification, equal amplitude | Yes | |
| MTC-H | 2 | 2,000 | 10,000 | 800 | Shapelet type for classification, higher amplitude | Yes |
| Category | Dataset Name | Classes | Testing Samples | Training Samples | Length of Series | Description | True Saliency Score |
| Real-world Dataset | ECG | 2 | 37004 | 55507 | 360 | Biomedical ECG signals with expert annotation | No |
| ACSF1 | 10 | 100 | 100 | 1460 | Device | No | |
| ARROWHEAD | 3 | 175 | 36 | 251 | Image | No | |
| BME | 3 | 150 | 30 | 128 | Simulated | No | |
| CAR | 4 | 60 | 60 | 577 | Sensor | No | |
| CBF | 3 | 900 | 30 | 128 | Simulated | No |
| Parameter | MCCE | MCCH | MTCE | MTCH | ECG |
| Length of pattern | 100 | 100 | 100 | 100 | 40 |
| Number of local pattern | 2 | 2 | 2 | 2 | 2 |
| Number of global context | 2 | 2 | 2 | 2 | 2 |
| Number of CTEncoder | 6 | 6 | 6 | 1 | 1 |
| Number of GEncoder | 1 | 6 | 1 | 1 | 1 |
| Dataset | Gaussian Noise | Temporal Shift | Amplitude Scaling | |||
| IoU | IoU | IoU | ||||
| MCC-E | 0.9839 | 0.8618 | 0.9436 | 0.6635 | 0.9827 | 0.8402 |
| MCC-H | 0.9935 | 0.9056 | 0.9691 | 0.7797 | 0.9849 | 0.8093 |
| MTC-E | 0.9824 | 0.8461 | 0.9468 | 0.6493 | 0.9805 | 0.8226 |
| MTC-H | 0.9943 | 0.9085 | 0.9831 | 0.7976 | 0.9929 | 0.8948 |
| Average | 0.9885 | 0.8805 | 0.9607 | 0.7225 | 0.9853 | 0.8417 |
| Dataset | Method | AUPRC | AUP | AUR |
| MCC-E | CoLaX | 0.933 0.003 | 0.764 0.004 | 0.853 0.003 |
| Static Weights | 0.284 0.003 | 0.293 0.004 | 0.268 0.004 | |
| MCC-H | CoLaX | 0.977 0.000 | 0.904 0.002 | 0.769 0.005 |
| Static Weights | 0.785 0.002 | 0.798 0.003 | 0.671 0.005 | |
| MTC-E | CoLaX | 0.723 0.007 | 0.638 0.007 | 0.784 0.006 |
| Static Weights | 0.660 0.006 | 0.595 0.005 | 0.762 0.005 |
| Dataset | Method | AUPRC | AUP | AUR |
| MCC-E | CoLaX | |||
| Implet | ||||
| TIMING | ||||
| MCC-H | CoLaX | |||
| Implet | ||||
| TIMING |