GALACTIC: Global and Local Agnostic Counterfactuals for Time-series Clustering
Organizations: University of Ioannina Ioannina, Greece · Archimedes, Athena Research Center Athens, Greece · Université Paris Cité, LIPADE, F-75006 Paris, France
Abstract
Time-series clustering is a fundamental tool for pattern discovery, yet existing explainability methods, primarily based on feature attribution or metadata, fail to identify the transitions that move an instance across cluster boundaries. While Counterfactual Explanations (CEs) identify the minimal temporal perturbations required to alter the prediction of a model, they have been mostly confined to supervised settings. This paper introduces GALACTIC, the first unified framework to bridge local and global counterfactual explainability for unsupervised time-series clustering. At instance level (local), GALACTIC generates perturbations via a cluster-aware optimization objective that respects the target and underlying cluster assignments. At cluster level (global), to mitigate cognitive load and enhance interpretability, we formulate a representative CE selection problem. We propose a Minimum Description Length (MDL) objective to extract a non-redundant summary of global explanations that characterize the transitions between clusters. We prove that our MDL objective is supermodular, which allows the corresponding MDL reduction to be framed as a monotone submodular set function. This enables an efficient greedy selection algorithm with provable approximation guarantees. Extensive experimental evaluation on the UCR Archive demonstrates that GALACTIC produces significantly sparser local CEs and more concise global summaries than state-of-the-art baselines adapted for our problem, offering the first unified approach for interpreting clustered time-series through counterfactuals.
Figures & tables
| Dataset | KNN | TSEvo | Glacier-L | Glacier-G | Galactic-L | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | |
| ACSF1 | 100 | 0.08 | 24.82 | 1460 | 0.15 | 100 | 0.09 | 24.82 | 1460 | 405.54 | 28.33 | 0.01 | 21.88 | 1460 | 9.69 | 26.67 | 0.01 | 21.94 | 1459.94 | 9.95 | 98.33 | 0.03 | 7.75 | 892.08 | 22.12 |
| ArrowHead | 100 | 0.1 | 35.79 | 251 | 0.17 | 100 | 0.09 | 35.79 | 251 | 385.22 | 36.51 | 0 | 34.22 | 251 | 11.06 | 52.38 | 0.01 | 33.73 | 251 | 18.27 | 98.41 | 0.02 | 9.47 | 131.39 | 11.21 |
| Car | 100 | 0.12 | 27.61 | 577 | 0.07 | 100 | 0.17 | 27.61 | 577 | 240.77 | 69.44 | 0.01 | 27.44 | 577 | 12.04 | 88.89 | 0.01 | 27.25 | 576.97 | 15.22 | 100 | 0.03 | 7.36 | 318.06 | 5.13 |
| CBF | 100 | 0.16 | 26.49 | 128 | 1.34 | 100 | 0.19 | 26.49 | 128 | 1751.15 | 0.36 | 0.02 | 28 | 128 | 0.64 | 0.36 | 0.02 | 28 | 128 | 0.63 | 76.7 | 0.09 | 8.55 | 53.03 | 158.08 |
| Coffee | 100 | 0.24 | 14.76 | 286 | 0.05 | 100 | 0.21 | 14.76 | 286 | 105.57 | 29.41 | 0.06 | 15.6 | 286 | 3.14 | 58.82 | 0.06 | 15.3 | 286 | 5.99 | 94.12 | 0.18 | 4 | 119.75 | 4.82 |
| Galactic-G | Competitors | |||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Dataset | Optimal | Greedy | Hierarchical | Hierarchical Greedy | GLOBE-CE ∗ | Glacier-G ∗ | ||||||||||||||||||||||||
| eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | |
| ACSF1 | 62.8 | 0.031 | 3.7 | 813 | 4.17 | 62.8 | 0.021 | 3.7 | 812 | 0.66 | 37.6 | 0.010 | 3.4 | 591 | 1.49 | 37.6 | 0.009 | 3.2 | 581 | 0.89 | 21.2 | 0.006 | 4.0 | 730 | 60.93 | 31.2 | 0.006 | 5.4 | 1022 | 0.01 |
| ArrowHead | 75.9 | 0.021 | 5.0 | 102 | 49.55 | 75.9 | 0.019 | 4.7 | 102 | 5.34 | 72.0 | 0.021 | 4.9 | 97 | 3.34 | 72.0 | 0.019 | 4.6 | 102 | 2.80 | 54.6 | 0.088 | 9.4 | 251 | 35.57 | 20.2 | 0.006 | 7.9 | 167 | 10.30 |
| Car | 70.8 | 0.024 | 4.8 | 350 | 106.68 | 70.8 | 0.023 | 4.8 | 361 | 3.18 | 55.2 | 0.015 | 4.4 | 282 | 3.24 | 58.6 | 0.015 | 4.2 | 280 | 2.41 | 74.2 | 0.056 | 6.7 | 433 | 32.16 | 33.4 | 0.008 | 8.8 | 577 | 0.00 |
| CBF | 39.4 | 0.105 | 3.3 | 47 | 36.93 | 39.4 | 0.105 | 3.3 | 47 | 10.21 | 33.7 | 0.098 | 3.3 | 51 | 1.57 | 33.7 | 0.094 | 3.3 | 51 | 1.65 | 26.0 | 0.186 | 7.1 | 128 | 50.57 | 0.0 | - | - | - | 0.00 |
Appendix figures & tables7 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning |
|---|---|
| Space of series ; Series length | |
| A time-series instance of length | |
| Dataset containing series | |
| Underlying clustering algorithm | |
| Cluster partition | |
| Probabilistic surrogate classifier |
| Dataset | Instances | Length | Clusters | Type | ResNet Acc. | Dataset | Instances | Length | Clusters | Type | ResNet Acc. |
|---|---|---|---|---|---|---|---|---|---|---|---|
| ArrowHead | 211 | 251 | 3 | IMAGE | 73.81% | ItalyPowerDemand | 1096 | 24 | 2 | SENSOR | 95.45% |
| Lightning7 | 143 | 319 | 7 | SENSOR | 75.86% | CBF | 930 | 128 | 3 | SIMUL. | 100.00% |
| Car | 120 | 577 | 4 | SENSOR | 91.67% | MiddlePhalanxTW | 553 | 80 | 6 | IMAGE | 58.56% |
| Coffee | 56 | 286 | 2 | SPECTRO | 100.00% | Computers | 500 | 720 | 2 | DEVICE | 92.00% |
| CricketZ | 780 | 300 | 12 | HAR | 84.62% | PowerCons | 360 | 144 | 2 | DEVICE | 82.61% |
| Earthquakes | 461 | 512 | 2 | SENSOR | 75.27% | Rock | 70 | 2844 | 4 | SPECTRO | 78.57% |
| Dataset | KNN | TSEvo | Glacier-L | Glacier-G | Galactic-L | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | |
| Computers | 100 | 0.1 | 29.83 | 720 | 0.41 | 100 | 0.07 | 29.83 | 720 | 906.87 | 35.33 | 0 | 29.68 | 640.91 | 31.52 | 36 | 0 | 29.72 | 648.85 | 34.47 | 87.33 | 0.01 | 8.53 | 399.92 | 29.42 |
| CricketZ | 100 | 0.09 | 30.22 | 300 | 1.01 | 100 | 0.1 | 30.22 | 300 | 2366.73 | 11.97 | 0.01 | 32.11 | 300 | 22.94 | 14.53 | 0.01 | 32.97 | 300 | 26.57 | 99.57 | 0.01 | 8 | 190.56 | 75.75 |
| Earthquakes | 100 | 0.24 | 39.67 | 512 | 0.37 | 100 | 0.19 | 39.67 | 512 | 1289.46 | 31.65 | 0.01 | 41.41 | 509.32 | 27.06 | 34.53 | 0 | 41.56 | 509.77 | 29.7 | 94.24 | 0.03 | 10.97 | 294.5 | 65.15 |
| ECG5000 | 100 | 0.07 | 20.15 | 140 | 7.12 | 100 | 0.14 | 20.15 | 140 | 9583.36 | 3.27 | 0.01 | 26.51 | 133.78 | 28.94 | 5.13 | 0.01 | 24.45 | 128.92 | 44.97 | 61.8 | 0.01 | 7.43 | 50.2 | 282.68 |
| ECGFiveDays | 100 | 0.11 | 22.79 | 136 | 1.47 | 100 | 0.09 | 22.79 | 136 | 1737.3 | 22.93 | 0.01 | 22.44 | 132.8 | 36.41 | 52.63 | 0.02 | 22.51 | 129.69 | 78.49 | 100 | 0.03 | 5.94 | 36.84 | 121.5 |
| Galactic-G | Competitors | |||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Dataset | Optimal | Greedy | Hierarchical | Hierarchical Greedy | GLOBE-CE ∗ | Glacier-G ∗ | ||||||||||||||||||||||||
| eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | eff | afc | asc | atc | RT | |
| Computers | 36.9 | 0.006 | 5.0 | 580 | 303.33 | 36.9 | 0.006 | 5.0 | 580 | 25.60 | 34.7 | 0.007 | 5.0 | 577 | 17.03 | 34.9 | 0.006 | 5.0 | 579 | 8.12 | 42.1 | 0.012 | 7.8 | 720 | 218.32 | 8.2 | 0.003 | 12.5 | 720 | 15.24 |
| CricketZ | 29.4 | 0.014 | 3.6 | 178 | 145.44 | 29.0 | 0.012 | 3.8 | 175 | 10.90 | 15.6 | 0.009 | 4.1 | 167 | 6.35 | 15.7 | 0.009 | 4.1 | 168 | 5.09 | 85.8 | 0.032 | 6.4 | 275 | 29.49 | 4.4 | 0.006 | 5.8 | 250 | 25.44 |
| Earthquakes | 50.1 | 0.055 | 3.7 | 241 | 303.97 | 50.1 | 0.055 | 3.7 | 241 | 30.57 | 36.1 | 0.029 | 4.0 | 233 | 20.74 | 40.3 | 0.034 | 3.9 | 234 | 15.52 | 21.3 | 0.034 | 7.0 | 512 | 139.45 | 3.1 | 0.005 | 7.0 | 512 | 20.94 |
| ECG5000 | 48.3 | 0.018 | 4.6 | 37 | 778.67 | 48.1 | 0.019 | 4.6 | 37 | 41.15 | 44.7 | 0.018 | 4.6 | 36 | 47.73 | 45.2 | 0.017 | 4.5 | 35 | 31.83 | 75.7 | 0.106 | 8.4 | 140 | 175.61 | 0.2 | 0.000 | 3.0 | 27 | 0.00 |
Counterfactual Explanations
Counterfactual explanations show how changing an input could alter a model’s prediction, supporting model understanding, auditing, and actionable recourse.
See all 115 papers