INSHAPE: Instance-Level Shapelets for Interpretable Time-Series Classification Seongjun Lee1∗ , Seokhyun Lee1∗ and Changhee Lee1† 1 Department of Artificial Intelligence, Korea University {pyoung7307, nshuhsn, changheelee}@korea.ac.kr
arXiv:2605.20088v1 [cs.LG] 19 May 2026
Abstract Discovering shapelets – i.e., discriminative temporal patterns within time series – has been widely studied to address the inherent complexity of time-series classification (TSC) and to make model decisionmaking processes more transparent. However, existing methods primarily focus on population-level shapelets optimized across the entire dataset, which leads to two fundamental limitations: (i) populationlevel patterns often misalign with instance-specific features, resulting in suboptimal performance and potentially misleading interpretations, and (ii) most methods treat shapelets as independent entities, overlooking important temporal dependencies and interactions among multiple patterns. To address these limitations, we propose INSHAPE, an interpretable TSC framework that discovers variable-length, discriminative temporal patterns specific to each time series. INSHAPE identifies these patterns as nonoverlapping segments and models their temporal dependencies, thereby providing clear instance-level interpretations while achieving strong predictive performance. Furthermore, INSHAPE bridges local and global interpretability through a bottom-up approach, aggregating instance-level shapelets into prototypical (population-level) shapelets. Extensive experiments on 128 UCR and 30 UEA benchmark datasets show that INSHAPE consistently outperforms state-of-the-art shapelet-based methods while providing more intuitive and interpretable insights.
1
Introduction
Shapelets are highly informative subsequences that distinguish between classes in time-series data [Ye and Keogh, 2009]. By discovering class-discriminative temporal patterns across an entire population, shapelets provide global interpretability, revealing which temporal features differentiate one class from another. In addition, shapelets also support local interpretability by pinpointing whether and where these patterns ∗ †
Equal contribution. Corresponding author.
Figure 1: Local interpretation with (a) population-level shapelets and (b) instance-level shapelets. Population-level shapelets (i.e., SBM, ShapeNet) often result in overlapping and less interpretable patterns, whereas our instance-level shapelets show non-overlapping discriminative regions that align well with the input time series.
occur within individual instances – typically through posthoc overlay. These two levels of interpretability are particularly valuable in high-stakes domains such as healthcare [Hyland et al., 2020; Gumbsch et al., 2020; Li and Zhao, 2023; Qin et al., 2025; Neves et al., 2021]: global explanations help clinicians identify population-level temporal biomarkers, while local explanations provide case-specific insights for understanding individual-level diagnoses. While recent deep learning models for time-series classification (TSC) achieve strong predictive performance, their inherent complexity has driven the development of shapelet-based methods that integrate interpretable temporal patterns directly into the prediction process [Li et al., 2021; Zuo et al., 2023; Qu et al., 2024; Wen et al., 2025; Liu et al., 2025]. However, these methods face two critical limitations when applied to instance-level prediction and interpretation. First, most methods rely on population-level shapelets optimized to capture broad class characteristics, which often result in patterns that are overly smoothed or poorly aligned with individual in-
stances. Second, despite the dependence of TSC decisions on the interaction, order, or relative position of multiple temporal patterns [Mohammadi Foumani et al., 2024], existing methods typically discover shapelets independently, and therefore fail to capture these crucial temporal dependencies. Figure 1(a) illustrates the consequence of these limitations: when overlapped and input-misaligned population-level shapelets are presented as local explanations, they obscure which temporal patterns are truly discriminative for a specific instance, thereby limiting the reliability of instance-level interpretation. Motivated by the above limitations, we propose INSHAPE (INstance-level SHAPElets)1 , a novel interpretable-by-design framework for TSC. Instead of relying on a fixed set of globally optimized shapelets, INSHAPE discovers discriminative temporal patterns directly from each input time series while capturing their temporal dependencies. Specifically, INSHAPE first partitions each time series into variable-length, statistically coherent time-series segments. It then employs a gating mechanism – comprising an amortized selector and a temporal predictor – to identify segments that are most predictive of the target label. This enables the discovery of instance-level shapelets that account for complex temporal interactions, providing local explanations that faithfully reflect the input’s temporal structure as shown in Figure 1(b). Extensive experiments on 128 UCR and 30 UEA benchmark datasets demonstrate that INSHAPE achieves superior classification performance compared to state-of-the-art shapeletbased models. Furthermore, INSHAPE offers a novel pathway to global interpretability. By aggregating discovered discriminative instance-level shapelets across the dataset, our framework constructs a set of high-quality, population-level shapelets. When combined with our selector’s localization capability, these population-level shapelets reveal not only which global patterns are identified, but also where and how they manifest across instances, bridging the gap between local and global interpretability.
2
Related Work
2.1
Population-level Shapelet Discovery
In TSC, shapelets [Ye and Keogh, 2009] are widely used to provide global interpretability by identifying temporal patterns that frequently occur in specific classes. Early shapelet discovery methods relied on exhaustive search to evaluate all possible candidate subsequences, which is computationally prohibitive for large datasets. To address this, more recent works have focused on improving efficiency by pruning candidates with symbolic aggregate approximation [Lin et al., 2007; Rakthanmanon and Keogh, 2013], clustering candidate patterns [Grabocka et al., 2015; Zuo et al., 2023; Li et al., 2021], and learning shapelets directly as learnable parameters via gradient descent [Grabocka et al., 2014; Qu et al., 2024; Wen et al., 2025]. Despite these advances, existing methods treat candidate segments independently during the discovery process. Hence, by ignoring the temporal dependencies among segments, these methods are restricted to interpreting individual patterns in isolation, failing to capture how the collective 1
Code: https://github.com/nshuhsn/INSHAPE IJCAI.
interaction and ordering of multiple patterns jointly contribute to the final classification.
2.2
Population-level Shapelets for Classification
Shapelet transform-based methods [Hills et al., 2014; Lines et al., 2012] leverage population-level shapelets for instancelevel prediction and interpretation by representing each time series as a vector of minimum distances from a fixed set of shapelets. The resulting distance-based representation of each time series is then utilized by various types of classifiers, including linear models [Grabocka et al., 2014; Wen et al., 2025], SVMs [Li et al., 2021], and neural networks [Qu et al., 2024; Zuo et al., 2023], which learn class-discriminative decision boundaries based on the relative similarity. Local interpretability is typically provided through post-hoc analysis by overlaying each shapelet at its closest matching location within a given time-series instance. However, such post-hoc overlays often fail to capture instance-specific discriminative patterns, leading to local explanations that are weakly aligned with the true temporal patterns of individual time series. Moreover, because the shapelet transform primarily encodes the presence of shapelets via distance-based representations, positional information and temporal dependencies among multiple shapelets are often discarded [Mohammadi Foumani et al., 2024] (See Supplementary A). While recent work attempts to mitigate this limitation by incorporating population-level shapelets into deep neural networks that model temporal dependencies for TSC [Zuo et al., 2023], these dependencies are still not considered during the shapelet discovery stage. Unlike prior works, INSHAPE selects discriminative segments at the instance level while accounting for their temporal dependencies to predict the target class during the selection process. The most closely related work is SoftShape [Liu et al., 2025], which partitions time-series segments into top-k “important” and “unimportant” groups, encoding them separately and modeling their interactions to construct the final prediction. However, because unimportant segments – which do not correspond to any shapelet patterns – still contribute to the prediction, it remains unclear which specific temporal patterns are truly responsible for the TSC. In contrast, INSHAPE employs hard gating via Bernoulli sampling [Maddison et al., 2016; Yoon et al., 2018; Kim et al., 2024; Lee et al., 2022]. This stochastic selection process learns to flexibly select any number of important time-series segments while ensuring the classification depends exclusively on the selected segments for each time-series instance. Consequently, INSHAPE captures complex temporal interactions among instance-level shapelets whose contributions are directly attributable, thereby enabling clearer and more reliable local interpretations.
3
Problem Formulation
Consider a dataset comprising n time-series instances, i.e., (i) n D = (x1:T , y (i) ) i=1 where x1:T = (x1 , . . . , xT ) ∈ RT denotes a univariate time series of length T and y ∈ {1, . . . , C} is its associated label in a C-class classification task. For notational simplicity, we focus on the univariate setting; however, our formulation naturally extends to p-dimensional (i) multivariate time series x1:T ∈ Rp×T . We will omit the
dependency for the instance index (i) when it is clear from the context. Definition 3.1 (Partial Segmentation). Given a time-series instance x1:T , a valid partial segmentation divides it into M non-overlapping segments, each potentially of varying length, as described below: def s(x1:T ) = (s1 , . . . , sM ),
(1)
s e s , . . . , xτ e ) with τ where each segment sm = (xτm m ≤ τm < m s τm+1 for all m ∈ {1, . . . , M − 1}. The number of segments M can range from 1 to T , i.e., 1 ≤ M ≤ T . s A time series is considered fully segmented if τm+1 = e τm + 1 for all m ∈ {1, . . . , M − 1}, and we denote such a segmentation as s̄(x1:T ) = (s̄1 , . . . , s̄M ). Unlike full segmentation, partial segmentation selects only a subset of the time series, such that the total number of selected time points may PM be less than T , i.e., m=1 |sm | ≤ T . This reflects our focus on identifying only the most informative regions rather than covering the entire sequence. Each time-series instance can have multiple valid partial segmentations that vary not only in the number of segments but also in their individual lengths. Denote S(x1:T ) be the set of all such valid partial segmentations of x1:T . Then, we can formally define instance-level shapelets as follows: Definition 3.2 (Instance-level Shapelets). The instance-level shapelet of a time series x1:T is defined as the most discriminative partial segmentation with respect to the target label:
s∗ = (s∗1 , . . . , s∗M ∗ ) = argmax p(y | s)
(2)
s∈S(x1:T )
PM ∗ subject to the constraints m=1 |s∗m | ≤ δ1 and |s∗m | ≥ δ2 for m ∈ {1, . . . , M ∗ }, where δ1 limits the total length of selected segments and δ2 constrains a minimum segment length. These constraints ensure that the selected segments remain concise and provide compact interpretations. Challenges. Unfortunately, solving the optimization problem in (2) is highly non-trivial for several reasons. First, it requires estimating the objective function – specifically, the conditional distribution of the target label given any arbitrary partial segmentation. Second, the space of possible partial segmentations for each instance, i.e., S(x1:T ), is combinatorially large, making the discrete optimization computationally intractable. Third, the solution must satisfy interpretability constraints such that selecting a small number of segments while ensuring each segment is sufficiently long to capture semantically meaningful patterns.
4
INSHAPE: INstance-level SHAPElet
To overcome the challenges outlined above, we reformulate instance-level shapelet discovery as a problem of selecting discriminative segments from a fully segmented time series. To do so, we introduce a gating mechanism designed to distinguish between discriminative and non-discriminative segments. Given a fully-segmented time series, s̄(x1:T ), we define a binary gate vector as follows: g = (g1 , . . . , gM ) ∈ {0, 1}T ,
(3)
Figure 2: Representative transition point algorithms. Note that both algorithms consistently divide a given time series into similar statistically coherent regions. e s where each gate gm is a binary vector of length τm − τm + 1, set to all ones if the corresponding segment is selected, and all zeros otherwise. The instance-level shapelets of x1:T can then be discovered by optimizing the gate vector to maximize the following objective:
g∗ = argmax p(y | s̄(x1:T ) ⊙ g),
(4)
g∈{0,1}T
where ⊙ denotes element-wise multiplication. The resulting instance-level shapelet is thus given by s∗ = s̄(x1:T ) ⊙ g∗ . Solving this optimization problem in (4) presents two key challenges: (Time Series Segmentation) We must fully segment each time-series instance into meaningful temporal patterns. This is crucial to avoid the computationally intractable burden of discrete optimization across all possible full segmentations. (Amortized Gate Vector Optimization) To manage the cost of solving a per-instance optimization problem, we amortize this expense across a population of input time series. This is achieved by training a neural network to learn inputdependent gate vectors for segment selection. We will describe each in turn in the following subsections.
4.1
Segmenting Time Series into Meaningful Patterns
To reduce the combinatorial burden of exploring all possible full segmentations of a time-series instance, we instead focus on identifying meaningful transition points that delineate segment boundaries. Motivated by recent studies [Kacprzyk et al., 2024] that break down time series into interpretable patterns, we propose the following two properties that such transition points should satisfy for a desirable full segmentation: • Transition points should be frequent in regions exhibiting abrupt and large fluctuations, as these often correspond to extreme values informative for predicting the target class y. • Transition points should be sparse in regions showing gradual, smooth variations, as such segments typically represent coherent trends relevant to y. Hence, we adopt two representative transition point algorithms that reflect these properties from different perspectives: Automated Knot Selection [Dierckx, 1982]: Denote T = {τ1 , . . . , τK } be a set of knots (i.e., transition points) that partition [0, T ] into K − 1 intervals, with B-spline basis functions km (t) used on each interval [τm , τm+1 ] for m ∈ {1, . . . , K − 1}. To automatically determine the placement and number of these knots, we employ an iterative method that begins with a single segment (i.e., K = 2). In each step, a
new knot is inserted into the interval with the largest residual until the following inequality holds: K−1 m+1 X τX
c1 (km (t), xt ) ≤ β
(5)
m=1 t=τm
where c1 (·, ·) is the residual (e.g., squared error) and β > 0 is the smoothing parameter. PELT Algorithm [Killick et al., 2012]: The Pruned Exact Linear Time (PELT) algorithm identifies transition points by minimizing a penalized sum of segment-wise costs using dynamic programming with pruning: min T
K−1 X
c2 (xτm :τm+1 ) + β|T |
(6)
m=1
where T = {τ1 . . . τK } is the set of transition points. The term c2 (·) represents the cost associated with each segment (e.g., using an RBF-based cost function), and β > 0 penalizes the number of change points |T | to prevent over-segmentation. Consequently, these transition point algorithms identify statistically coherent segments, s̄(x1:T ), thereby avoiding the computational burden of full segmentation and providing segments with meaningful temporal patterns that serve as a basis for intuitive, reliable explanations (Figure 2). In this work, we adopt PELT as our default segmentation algorithm due to its computational efficiency; the effect of utilizing B-spline and uniform segmentation is also provided in Section 5.3.
4.2
Amortized Gate Vector Optimization
The optimization in (4) is inherently memoryless, requiring independent computation for each input time series without leveraging patterns from previously seen (and possibly similar) instances. To overcome this inefficiency, we reformulate the problem using amortized optimization by introducing a gating mechanism. Specifically, we define a selector (parameterized by ϕ) that stochastically maps a varying length time-series segment s̄m to a single binary gate gm . To achieve the gate vector g, each segment is processed by the shared selector using a masked self-attention mechanism that captures the representation of its eshape as illustrated in Figure 3. Formally, the s selector, πϕ : Rτm −τm +1 → [0, 1], outputs a Bernoulli parameter based on s̄m , such that gm ∼ Bern(πϕ (s̄m )). We also define a predictor hθ : RT → [0, 1]C that estimates the conditional distribution over class labels given any selected subset of segments. This leads to the following joint optimization: h i minimize Ex1:T ,y Eg L y, hθ (s̄(x1:T )⊙g) +λ∥g∥0 , (7) θ,ϕ
where λ > 0 is a coefficient that balances the selected number of segments. The element-wise product s̄(x1:T ) ⊙ g masks non-selected segments with redundant zero-terms rather than removing them, thereby preserving the original temporal context and positional information for the predictor. Additionally, since the discrete sampling of g makes (7) non-differentiable with respect to ϕ, we adopt ReinMax [Liu et al., 2023], a second-order accurate gradient estimator for binary random variables that reduces gradient bias compared to StraightThrough Estimators (STE) [Bengio et al., 2013]. Notably,
other gradient estimation techniques such as STGS [Jang et al., 2016], REINFORCE [Williams, 1992] can also be applied within our framework. We implement the selector, πϕ , using Transformer [Vaswani et al., 2017] followed by an MLP layer, with both components shared across all segments to efficiently process variablelength segments in a single forward pass. For the predictor, hθ , we utilize an InceptionTime architecture [Ismail Fawaz et al., 2020], whose multi-level convolutional filters are adept at capturing diverse dependencies among the selected segments; we further evaluate alternative predictor architectures in Section 5.3. Through joint optimization, the InceptionTime predictor generates rich and informative gradient signals that are propagated back to the selector. This feedback loop is crucial: it enables the selector to implicitly learn and account for inter-segment dependencies, even though the selector processes each segment individually. Once trained, INSHAPE provides local interpretability for an individual time-series instance by first applying the segmentation algorithm and then leveraging the selector’s output; the segments corresponding to the activated gates are identified as instance-level shapelets.
4.3
Bridging Local and Global Interpretability
Local interpretability alone is not sufficient to answer population-level questions, such as identifying which temporal patterns are commonly important for distinguishing between classes across the dataset. To address this, we adopt a selectthen-cluster strategy to derive population-level shapelets. Specifically, we first use the trained selector to extract instancelevel shapelets from all time-series instances. These selected segments are then clustered via FastDTW [Salvador and Chan, 2007], which naturally handles varying-length time-series segments, and the resulting cluster centroids are defined as the population-level shapelets (see Figure 3). By restricting the candidate pool to selected discriminative segments rather than clustering raw subsequences, INSHAPE substantially reduces the search space and enables the discovery of more representative and meaningful population-level shapelets. Building on the discovered population-level shapelets, our framework goes beyond identifying global patterns by explicitly bridging local and global interpretations and providing quantitative insights into their class-wise correspondences: • Bridging Local and Global Interpretations: Each instance-level shapelet is assigned to its nearest populationlevel shapelet based on the FastDTW distance. This assignment connects global trends to local explanations by revealing where the discovered population-level shapelets manifest within individual instances (see Figure 4(b)). • Quantitative Global Insights: We compute the class-wise frequency of each population-level shapelet assigned to timeseries instances. This reveals which global patterns commonly characterize each class. Visualizing these frequent patterns across the population provides insights into shared temporal structures and dependencies (see Figure 5). Detailed procedures for population-level shapelet discovery, local interpretation using population-level shapelets, and the computation of quantitative global insights are provided in Supplementary Material Section B.4.
Figure 3: Overview of our INSHAPE framework. (Top) During training, the transition point algorithm segments the input time series, and the shared stochastic selector πϕ learns a Bernoulli parameter for each segment to identify discriminative regions. The gate vector g ∼ Bern(πϕ (s̄)) masks non-selected segments with zeros (while preserving positional information), and the predictor hθ performs TSC based on the masked time series. To make gradient flow through the non-differentiable discrete Bernoulli sampling process, we employ a gradient estimator (i.e., ReinMax), allowing end-to-end training. (Bottom) For population-level shapelet discovery, the pre-trained (frozen) selector extracts instance-level shapelets across the dataset, which are then clustered using FastDTW to obtain representative cluster centroids.
IS PS SD w/ TD Pred w/ TD
LTS
ShapeNet
ShapeConv
SVP-T
SBM
Ours
✗ ✓ ✗ ✗
✗ ✓ ✗ ✗
✗ ✓ ✗ ✗
✗ ✓ ✗ ✓
✗ ✓ ✗ ✗
✓ ✓ ✓ ✓
(a)
(b)
Table 1: Comparison of shapelet-based methods. (IS: Instancelevel shapelet, PS: Population-level shapelet, SD: Shapelet Discovery, Pred: Prediction, TD: Temporal Dependency)
5
Experiments
We evaluate INSHAPE on the UCR archive (128 univariate datasets) [Dau et al., 2019] and the UEA archive (30 multivariate datasets) [Bagnall et al., 2018], comparing against six representative shapelet-based methods summarized in Table 1. All experiments follow established evaluation protocols from prior works [Liu et al., 2025; Wen et al., 2025]. • In Section 5.1, we compare classification accuracy and interpretability against baselines, showing that INSHAPE achieves superior performance with clearer interpretations. • In Section 5.2, we show how population-level shapelets can be used for local and global interpretation. • In Section 5.3, we conduct ablation studies to analyze the effects of segmentation strategies and predictor architectures. Implementation details, baseline configurations, and metric definitions are provided in Supplementary Material Section B.
5.1 Classification Performance and Interpretability Performance Analysis. Table 2(a) summarizes the average classification accuracy and ranking statistics on the UCR and UEA datasets. For a fair comparison, we use the interpretable variant of SoftShape; details of this modification and comparison with the original model are provided in Supplementary Material Section B. Across all baselines, INSHAPE achieves the highest average accuracy and the best overall ranking. This highlights that preserving instance-specific information and
(c)
(d)
Figure 4: Local explanations on ECG5000 (Left) and MixedShapesRegularTrain (Right). Selected shapelets from (a) INSHAPE, (b) INSHAPE (population), (c) ShapeNet, and (d) SBM are overlaid on the test instance. INSHAPE provides clearer local interpretations with non-overlapping segments.
modeling temporal dependencies are crucial for accurate TSC. Local Interpretability Analysis. For local interpretation, existing shapelet-based methods typically overlay discovered shapelets on the input time series at positions with the smallest distance. We compare local interpretability between INSHAPE and three representative shapelet transform-based baseline methods on the UCR and UEA datasets in Table 2(b). To quantify this, we measure the following metrics for the top-k most important shapelets (ranked by absolute linear classifier weights) and the complete set of all available shapelets: • Coverage: Proportion of the input time series covered by
Baseline Methods (UCR 128)
Univariate (UCR 128) Metric
LTS
Shape Net
SVP-T
Shape Conv
SBM
Soft Shape
Ours
Avg. Acc ↑ Avg. Rank ↓ Wins/Draws Losses Top-1 Top-3
0.6262 5.797 116 12 2 11
0.7213 4.371 93 35 30 46
0.7018 4.277 102 26 16 48
0.7479 4.117 108 20 9 50
0.7375 3.938 98 30 29 49
0.7820 3.105 82 46 0 84
0.8405 2.395 – – 46 105
Multivariate (UEA 30) Metric
LTS
Shape Net
Avg. Acc ↑ Avg. Rank ↓ Wins/Draws Losses Top-1 Top-3
0.7150 3.183 16 14 3 19
0.6306 4.950 24 6 3 6
SVP-T
Shape Conv
SBM
Ours
0.6783 3.700 25 5 3 13
0.6655 4.050 22 8 5 10
0.7277 2.567 16 14 10 22
0.7429 2.550 – – 11 23
(a) Classification performance (Average Acc and Rank).
Baseline Methods (UEA 30)
Metric (Avg.)
LTS
Shape Net
SBM
Metric (Avg.)
LTS
Shape Net
SBM
Coverage (Top-1) Coverage (Top-2) Coverage (Top-3) Coverage (Full)
0.3950 0.5564 0.6493 0.9852
0.2840 0.4554 0.5827 0.8935
0.4478 0.5872 0.6806 0.9814
Coverage (Top-1) Coverage (Top-2) Coverage (Top-3) Coverage (Full)
0.4379 0.5813 0.6769 0.9845
0.2953 0.4546 0.5469 0.7289
0.4943 0.6487 0.7290 0.9797
Overlap (Top-1) Overlap (Top-2) Overlap (Top-3) Overlap (Full)
0.0000 0.2734 0.4160 0.9727
0.0000 0.1310 0.2581 0.7685
0.0000 0.3033 0.4398 0.9679
Overlap (Top-1) Overlap (Top-2) Overlap (Top-3) Overlap (Full)
0.0000 0.2910 0.4236 0.9714
0.0000 0.1301 0.2432 0.5760
0.0000 0.3490 0.4934 0.9653
Acc (Top-1) Acc (Top-2) Acc (Top-3) Acc (Full)
0.4163 0.4089 0.4025 0.6262
0.3246 0.3439 0.3438 0.7213
0.4016 0.4147 0.4217 0.7375
Acc (Top-1) Acc (Top-2) Acc (Top-3) Acc (Full)
0.2345 0.2496 0.2497 0.7150
0.3072 0.2868 0.3253 0.6306
0.2516 0.2784 0.2921 0.7277
Ours (UCR 128) Avg. Shapelet Num Avg. Coverage Avg. Overlap Avg. Acc
2.4151 0.4949 0.0000 0.8405
Ours (UEA 30) Avg. Shapelet Num Avg. Coverage Avg. Overlap Avg. Acc
1.5266 0.5539 0.0000 0.7429
(b) Local interpretability (Coverage and Overlap).
Table 2: Comparison of predictive performance and interpretability on the UCR (128 datasets) and UEA (30 datasets) benchmarks.
Avg. Acc ↑ Avg. Rank ↓
LTS
Shape Net
SVP-T
Shape Conv
SBM
Soft Shape
Ours (Pop.)
0.6542 5.944
0.7601 3.889
0.7233 4.278
0.7876 3.444
0.772 3.778
0.7863 3.500
0.8145 3.167
Table 3: Classification performance using population-level shapelets in place of instance-level shapelets on 18 UCR datasets.
shapelets. Lower coverage indicates more compact explanations that focus on the most critical temporal regions. • Overlap: Proportion of temporal overlap among selected shapelets. Lower overlap provides clearer interpretations by avoiding redundant highlighting of the same regions. • Shapelet Num: Average number of instance-level shapelets selected per instance. In multivariate settings, Coverage and Overlap are measured separately for each channel and then averaged across channels. In Table 2(b), INSHAPE selects an average of 2.4 and 1.5 instance-level shapelets per time series on the UCR and UEA datasets, respectively. We therefore compare INSHAPE against baselines using their top-1, top-2 and top-3 shapelets. Under these sparse settings, INSHAPE achieves comparable coverage to baselines while exhibiting zero overlap by architectural design, clearly identifying distinct discriminative regions per instance. In contrast, baselines show substantial overlap (13-44% on UCR, 0-35% on UEA) even across the most important shapelets, obscuring which patterns drive predictions. Restricting baseline methods to make predictions solely on the top-k shapelets leads to a substantial drop in classification accuracy, as evidenced by the top-1 and top-2 results. To recover the original performance, these methods need to utilize the entire shapelet set. This results in near-complete coverage (>98%) and overlap (>96%) for a given time-series instance, demonstrating that a sparse, focused local interpretation is not achievable with these methods. In contrast, INSHAPE achieves superior prediction performance while relying exclusively on a small set of non-overlapping temporal regions for each time series, thereby providing clearer and more intuitive
local interpretations. Figure 4 shows this distinction: baseline methods produce overlapping, misaligned explanations, while INSHAPE provides compact, non-overlapping segments that offer clearer explanations. Similar trends are observed in the UEA datasets (see Supplementary Material Section C.1).
5.2
Instance-level to Population-level Shapelets
In this subsection, we evaluate the population-level shapelets derived by INSHAPE. We derive population-level shapelets, denoted as P = {p1 , . . . , pnP }, by clustering the discriminative instance-level shapelets extracted from all training timeseries instances as described in Section 4.3 (see Supplementary Material Algorithm 1 for details). Faithfulness of Population-level Shapelets. To validate that population-level shapelets preserve instance-level discriminative information, we replace each instance-level shapelet with its nearest population-level counterpart (based on FastDTW distance), mask all non-selected regions, and then evaluate classification performance. As shown in Table 3, INSHAPE with population-level shapelets achieves the highest average accuracy (0.8145) and the best average rank (3.167), confirming that our bottom-up approach produces faithful populationlevel shapelets. Quantitative Global Insights. To provide global insights, we compute the usage frequency uc,k for each class c, by counting the number of instance-level shapelets from class-c instances that are assigned to each population-level shapelet pk . P The normalized frequency ūc,k = uc,k / k′ uc,k′ quantifies how frequently each class relies on specific population-level shapelets (see Supplementary Material Algorithm 3). Figure 5 illustrates this global interpretation on the ECG5000 dataset. We first select the top-3 most frequently used shapelets for each class and take their union, resulting in 5 representative shapelets: {p0 , p1 , p5 , p8 , p12 }. Figure 5(a) presents the class-wise usage proportions ūc,k . Although these population-level shapelets are shared across classes, their usage proportions differ substantially, indicating that class distinctions arise not only from which shapelets appear, but also
Avg. Acc ↑ Avg. Coverage Avg. Shapelet Num
β̄ 0.01 0.1∗ 1 5 10
0.8370 0.8677 0.8230 0.8444 0.7901
0.5347 0.4834 0.5591 0.6979 0.8170
2.3371 2.7396 1.7816 1.1171 0.9358
Table 4: Ablation study on the (normalized) penalty parameter β̄. Fixed Length
Segmentation
Metric
W=1
W=2
B-Spline
PELT
Avg. Acc ↑ Avg. Rank ↓ Avg. Coverage Avg. Shapelet Num
0.7992 2.6389 0.5299 5.4933
0.7666 3.1944 0.5146 4.4152
0.8288 2.2222 0.5019 2.6570
0.8677 1.9444 0.4834 2.7396
Table 5: Ablation study on transition point algorithms. TimesNet ModernTCN
Figure 5: Global interpretation via population-level shapelets on the ECG5000 dataset. (a) Class-wise usage frequency ūc,k for 5 representative shapelets. (b)-(c) Visualization of population-level shapelets (colored) overlaid over time-series instances (gray) for Class 0 and Class 4.
from their combinations and relative frequencies. To further investigate these differences, Figure 5(b) and (c) illustrate population-level shapelets overlaid on the timeseries instances with Class 0 and 4, which have a similar shapelet composition but with different proportions. While both classes are characterized by Shapelet 1 (pink) appearing in the early time steps, Class 0 predominantly relies on Shapelet 12 (light blue) in later time steps, whereas Class 4 relies more on Shapelet 5 (green). This comparison underscores that different temporal dependencies among the same set of shapelets serve as a critical discriminative factor between classes. Moreover, the localized regions identified for Class 0 closely align with the instance-level discriminative regions shown in Figure 4, demonstrating consistency between local and global interpretations. Overall, these results show that our framework extends naturally beyond instance-level explanations, enabling rich global insights such as class-wise shapelet utilization and analysis of temporal dependencies.
5.3
Ablation Study
We perform ablation studies on the penalty parameter β in the PELT algorithm, the choice of transition point algorithms, and the predictor architectures, using the 18 UCR datasets following prior work [Liu et al., 2025]. Sensitivity Analysis on the Segmentation Parameter. We use PELT [Killick et al., 2012] as the default transition point algorithm. To ensure consistent segmentation behavior across datasets with varying sequence lengths, we normalize the penalty parameter β in (6) as β̄ = β/T and tune β̄ as the hyperparameter. The actual penalty is then computed as β = β̄ × T . Table 4 summarizes the average ACC, coverage, and the number of discovered shapelets under different β̄ values. When β̄
Avg. Acc ↑ Avg. Coverage Avg. #S
0.7855 0.5569 2.4431
0.8209 0.5295 2.3396
Table 6: Ablation study on predictor architectures.
is too small, the algorithm produces excessive transition points, leading to over-segmentation that fragments even smooth temporal trends into meaningless patterns. Conversely, when β̄ is too large, the algorithm becomes overly conservative and misses important transitions. The default (β̄ = 0.1) provides the best trade-off, confirming that the two transition point properties for desirable segmentation described in Section 4.1 are critical for the instance-level shapelet discovery. Segmentation algorithm comparison. Table 5 compares fixed-length segmentation against adaptive methods (B-Spline and PELT). Adaptive methods outperform fixed-length approaches across all metrics, achieving higher accuracy with fewer shapelets. These results confirm that statistically coherent regions identified by adaptive segmentation align well with discriminative patterns in time series. Predictor architecture. To demonstrate INSHAPE’s robustness across different predictor architectures, we evaluate performance using two recent time-series classification models as the predictor [Luo and Wang, 2024; Wu et al., 2022]. As shown in Table 6, INSHAPE maintains strong performance with both architectures, demonstrating its compatibility with diverse predictors that can capture temporal dependencies to provide informative gradient signals to the selector.
6
Conclusion
We propose INSHAPE, an interpretable-by-design framework for TSC that discovers instance-level shapelets through variable-length segmentation and a gating mechanism, enabling precise alignment with input time series and capturing the underlying temporal dependencies. Furthermore, by adopting a select-then-cluster strategy, INSHAPE derives population-level shapelets that provide better global insight. This unified perspective is particularly valuable for high-stakes domains such as healthcare.
Ethical Statement While our framework offers both local and global interpretability for TSC through both instance-level and population-level shapelets, the discovered temporal patterns should be validated by domain experts before deployment in high-stakes applications. This is particularly important in healthcare settings, where our method could be used to identify temporal biomarkers or support clinical decision-making. We emphasize that INSHAPE is intended to augment, not replace, expert judgment. In this work, we evaluate our method on publicly available UCR and UEA benchmark datasets, which do not contain personally identifiable information. Any future application to sensitive domains such as clinical diagnostics should follow appropriate ethical guidelines and data governance protocols established by the respective institutions.
Acknowledgements We thank the reviewers for their comments and suggestions. This work is supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (No. RS-2024-00358602) and the Institute of Information & Communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT), Artificial Intelligence Graduate School Program (No. RS-2019II190079, Korea University), the Artificial Intelligence Star Fellowship Support Program to nurture the best talents (No. RS-2025-02304828), and the AI Research Hub Project (No. RS-2024-00457882).
References [Abedin, 2021] Zainul Abedin. Differential diagnosis of wide qrs tachycardia: A review. Journal of arrhythmia, 37(5):1162–1172, 2021. [Bagnall et al., 2018] Anthony Bagnall, Hoang Anh Dau, Jason Lines, Michael Flynn, James Large, Aaron Bostrom, Paul Southam, and Eamonn Keogh. The uea multivariate time series classification archive, 2018. arXiv preprint arXiv:1811.00075, 2018. [Bengio et al., 2013] Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. arXiv preprint arXiv:1308.3432, 2013. [Dau et al., 2019] Hoang Anh Dau, Anthony Bagnall, Kaveh Kamgar, Chin-Chia Michael Yeh, Yan Zhu, Shaghayegh Gharghabi, Chotirat Ann Ratanamahatana, and Eamonn Keogh. The ucr time series archive. IEEE/CAA Journal of Automatica Sinica, 6(6):1293–1305, 2019. [Dierckx, 1982] Paul Dierckx. A fast algorithm for smoothing data on a rectangular grid while using spline functions. SIAM Journal on Numerical Analysis, 19(6):1286–1304, 1982. [Eldele et al., 2024] Emadeldeen Eldele, Mohamed Ragab, Zhenghua Chen, Min Wu, and Xiaoli Li. Tslanet: Rethinking transformers for time series representation learning. International Conference on Machine Learning, 2024.
[Grabocka et al., 2014] Josif Grabocka, Nicolas Schilling, Martin Wistuba, and Lars Schmidt-Thieme. Learning timeseries shapelets. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 392–401, 2014. [Grabocka et al., 2015] Josif Grabocka, Martin Wistuba, and Lars Schmidt-Thieme. Scalable discovery of time-series shapelets. arXiv preprint arXiv:1503.03238, 2015. [Gumbsch et al., 2020] Thomas Gumbsch, Christian Bock, Michael Moor, Bastian Rieck, and Karsten Borgwardt. Enhancing statistical power in temporal biomarker discovery through representative shapelet mining. Bioinformatics, 36(Supplement 2):i840–i848, 2020. [He et al., 2015] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance on imagenet classification. In Proceedings of the IEEE international conference on computer vision, pages 1026–1034, 2015. [Hills et al., 2014] Jon Hills, Jason Lines, Edgaras Baranauskas, James Mapp, and Anthony Bagnall. Classification of time series by shapelet transformation. Data mining and knowledge discovery, 28(4):851–881, 2014. [Hyland et al., 2020] Stephanie L Hyland, Martin Faltys, Matthias Hüser, Xinrui Lyu, Thomas Gumbsch, Cristóbal Esteban, Christian Bock, Max Horn, Michael Moor, Bastian Rieck, et al. Early prediction of circulatory failure in the intensive care unit using machine learning. Nature medicine, 26(3):364–373, 2020. [Ismail Fawaz et al., 2020] Hassan Ismail Fawaz, Benjamin Lucas, Germain Forestier, Charlotte Pelletier, Daniel F Schmidt, Jonathan Weber, Geoffrey I Webb, Lhassane Idoumghar, Pierre-Alain Muller, and François Petitjean. Inceptiontime: Finding alexnet for time series classification. Data Mining and Knowledge Discovery, 34(6):1936–1962, 2020. [Jang et al., 2016] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. [Kacprzyk et al., 2024] Krzysztof Kacprzyk, Tennison Liu, and Mihaela van der Schaar. Towards transparent time series forecasting. In The Twelfth International Conference on Learning Representations, 2024. [Killick et al., 2012] Rebecca Killick, Paul Fearnhead, and Idris A Eckley. Optimal detection of changepoints with a linear computational cost. Journal of the American Statistical Association, 107(500):1590–1598, 2012. [Kim et al., 2024] Chohee Kim, Mihaela Van Der Schaar, and Changhee Lee. Discovering features with synergistic interactions in multiple views. In Forty-first International Conference on Machine Learning, 2024. [Kingma and Ba, 2014] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
[Lee et al., 2022] Changhee Lee, Fergus Imrie, and Mihaela van der Schaar. Self-supervision enhanced feature selection with correlated gates. In International conference on learning representations, 2022. [Li and Zhao, 2023] Yingxiang Li and Xuejing Zhao. Patientspecific warning of epileptic seizure upon shapelets features. Heliyon, 9(11), 2023. [Li et al., 2021] Guozhong Li, Byron Choi, Jianliang Xu, Sourav S Bhowmick, Kwok-Pan Chun, and Grace LaiHung Wong. Shapenet: A shapelet-neural network approach for multivariate time series classification. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pages 8375–8383, 2021. [Lin et al., 2007] Jessica Lin, Eamonn Keogh, Li Wei, and Stefano Lonardi. Experiencing sax: a novel symbolic representation of time series. Data Mining and knowledge discovery, 15(2):107–144, 2007. [Lines et al., 2012] Jason Lines, Luke M Davis, Jon Hills, and Anthony Bagnall. A shapelet transform for time series classification. In Proceedings of the 18th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 289–297, 2012. [Liu et al., 2023] Liyuan Liu, Chengyu Dong, Xiaodong Liu, Bin Yu, and Jianfeng Gao. Bridging discrete and backpropagation: Straight-through and beyond. Advances in Neural Information Processing Systems, 36:12291–12311, 2023. [Liu et al., 2025] Zhen Liu, Yicheng Luo, Boyuan Li, Emadeldeen Eldele, Min Wu, and Qianli Ma. Learning soft sparse shapes for efficient time-series classification. International Conference on Machine Learning, 2025. [Luo and Wang, 2024] Donghao Luo and Xue Wang. Moderntcn: A modern pure convolution structure for general time series analysis. In The twelfth international conference on learning representations, pages 1–43, 2024. [Maddison et al., 2016] Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016. [Middlehurst et al., 2024] Matthew Middlehurst, Patrick Schäfer, and Anthony Bagnall. Bake off redux: a review and experimental evaluation of recent time series classification algorithms. Data Mining and Knowledge Discovery, 38(4):1958–2031, 2024. [Mohammadi Foumani et al., 2024] Navid Mohammadi Foumani, Lynn Miller, Chang Wei Tan, Geoffrey I Webb, Germain Forestier, and Mahsa Salehi. Deep learning for time series classification and extrinsic regression: A current survey. ACM Computing Surveys, 56(9):1–45, 2024. [Mueen et al., 2011] Abdullah Mueen, Eamonn Keogh, and Neal Young. Logical-shapelets: an expressive primitive for time series classification. In Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 1154–1162, 2011.
[Neves et al., 2021] Inês Neves, Duarte Folgado, Sara Santos, Marı́lia Barandas, Andrea Campagner, Luca Ronzio, Federico Cabitza, and Hugo Gamboa. Interpretable heartbeat classification using local model-agnostic explanations on ecgs. Computers in biology and medicine, 133:104393, 2021. [Perslev et al., 2021] Mathias Perslev, Sune Darkner, Lykke Kempfner, Miki Nikolic, Poul Jørgen Jennum, and Christian Igel. U-sleep: resilient high-frequency sleep staging. NPJ digital medicine, 4(1):72, 2021. [Qin et al., 2025] Xuewei Qin, Yi Sun, Jiemin Ji, and Jun Li. Fetalet: interpretable fetal heart rate anomaly detection via shapelet learning. Complex & Intelligent Systems, 11(11):1– 16, 2025. [Qu et al., 2024] Eric Qu, Yansen Wang, Xufang Luo, Wenqiang He, Kan Ren, and Dongsheng Li. Cnn kernels can be the best shapelets. In The Twelfth International Conference on Learning Representations, 2024. [Rakthanmanon and Keogh, 2013] Thanawin Rakthanmanon and Eamonn Keogh. Fast shapelets: A scalable algorithm for discovering time series shapelets. In proceedings of the 2013 SIAM International Conference on Data Mining, pages 668–676. SIAM, 2013. [Rock and Palmer, 1990] Irvin Rock and Stephen Palmer. The legacy of gestalt psychology. Scientific American, 263(6):84–91, 1990. [Salvador and Chan, 2007] Stan Salvador and Philip Chan. Toward accurate dynamic time warping in linear time and space. Intelligent data analysis, 11(5):561–580, 2007. [Vaswani et al., 2017] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017. [Wen et al., 2025] Yunshi Wen, Tengfei Ma, Ronny Luss, Debarun Bhattacharjya, Achille Fokoue, and Anak Agung Julius. Shedding light on time series classification using interpretability gated networks. In The Thirteenth International Conference on Learning Representations, 2025. [Williams, 1992] Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3):229–256, 1992. [Wu et al., 2022] Haixu Wu, Tengge Hu, Yong Liu, Hang Zhou, Jianmin Wang, and Mingsheng Long. Timesnet: Temporal 2d-variation modeling for general time series analysis. International Conference on Learning Representations, 2022. [Ye and Keogh, 2009] Lexiang Ye and Eamonn Keogh. Time series shapelets: a new primitive for data mining. In Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 947– 956, 2009. [Yoon et al., 2018] Jinsung Yoon, James Jordon, and Mihaela Van der Schaar. Invase: Instance-wise variable selection
using neural networks. In International conference on learning representations, 2018. [Zuo et al., 2023] Rundong Zuo, Guozhong Li, Byron Choi, Sourav S Bhowmick, Daphne Ngar-yin Mah, and Grace LH Wong. Svp-t: A shape-level variable-position transformer for multivariate time series classification. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 11497–11505, 2023.
A
Synthetic: Latent Problem of Modern Shapelet Transform Approaches
separated by a short distance (20 time steps), while the other contains peaks separated by a long distance (50 time steps).
Review of Shapelet Transform. Shapelets are discriminative subsequences that are representative of a class in time-series classification. The shapelet transform (ST) method [Hills et al., 2014; Lines et al., 2012] converts a raw time-series input x ∈ RT into an interpretable feature representation by measuring its similarity to a set of shapelets s = {s1 , . . . , sn }. Specifically, for each shapelet sk , the transform computes a distance feature dk as: dk = min dist(xi:i+|sk | , sk ) i
Dataset
LTS
ShapeNet
ShapeConv
SBM
Ours
Distance Dataset Order Dataset
0.531 0.522
0.507 0.525
0.4980 0.534
0.552 0.528
1.000 1.000
Table 7: Quantitative analysis. Classification accuracy on synthetic datasets.
(8)
where xi:i+|sk | denotes a subsequence of x starting at position i with length |sk |, and dist(·, ·) is typically the Euclidean distance. The resulting distance vector d = {d1 , . . . , dn } is then fed into a classifier for the final prediction. Trade-off of ST-based approaches. While the shapelet transform (ST) approach provides transparency by revealing how individual shapelets influence predictions, we identify a fundamental limitation that prevents us from adopting this approach. The shapelet transform faces an inherent trade-off in shapelet length selection: short shapelets fail to capture temporal dependencies adequately, while long shapelets, though capable of encoding richer temporal patterns, sacrifice local interpretability by making it difficult to identify which specific shapes serve as the key patterns for instance-level predictions. Figure 7: Qualitative analysis. Visualization of discovered shapelets for (a) Ours, (b) clustering-based ShapeNet, and (c) learning-based SBM.
Figure 6: Synthetic dataset examples. (Left) Order dataset. (Right) Distance dataset.
Synthetic dataset for empirical test. To empirically validate this argument, we construct two synthetic peak datasets designed to isolate different temporal decision factors: ordering and distance between peaks. Each time series contains two peaks of fixed length (11 time steps) embedded in background noise, where peak positions are randomly sampled subject to specific constraints that test either temporal ordering or inter-peak distance as the classification criterion. • Order dataset, class labels are determined by the relative ordering of the two peaks. Specifically, one class corresponds to an up-peak followed by a down-peak (up→down), while the other corresponds to a down-peak followed by an uppeak (down→up). • Distance dataset, class labels are determined by the temporal distance between the two peaks. One class contains peaks
In this experiment, we evaluate whether shapelet transformbased methods can capture temporal dependencies between multiple shapelets while preserving interpretability. To this end, we consider representative shapelet-aware models that rely on the shapelet transform [Grabocka et al., 2014; Li et al., 2021; Qu et al., 2024; Wen et al., 2025]. To explicitly expose their limitations, we fix the shapelet length of each model to the true peak length (11 time steps) and evaluate classification accuracy on the two synthetic datasets, as reported in Table 7, together with qualitative visualizations of the discovered shapelets in Figure 7. Despite the simplicity of the datasets, shapelet transform-based methods exhibit nearrandom performance, indicating their inability to capture the temporal dependencies required for correct classification. Although these methods can attain perfect accuracy by using longer shapelets that span multiple peaks, this degrades interpretability, as they fail to identify which regions are truly important for prediction. Notably, temporal dependencies among multiple discriminative patterns are common in real-world time-series data, amplifying the impact of this limitation in practice. In contrast, as shown in Figure 7, our model precisely selects only the discriminative regions and achieves superior predictive performance by explicitly modeling temporal dependencies between instance-level shapelets.
B
Experimental Details
We reproduce all baseline methods following their official codebases and provided hyperparameter settings.23456 The key characteristics of each shapelet-based method and modifications for fair comparison are summarized as follows: • LTS [Grabocka et al., 2014]: This method formulates shapelet discovery as a learning problem rather than an exhaustive search. It jointly optimizes shapelet patterns and a linear classifier using stochastic gradient descent, with a soft-minimum function to compute differentiable distances between time series and shapelets. • ShapeNet [Li et al., 2021]: This model addresses multivariate time series classification by embedding shapelet candidates of varying lengths into a unified representation space using dilated causal convolutions. It employs a cluster-wise triplet loss for training and selects representative shapelets through clustering, followed by an SVM classifier. • SVP-T [Zuo et al., 2023]: This transformer-based method operates at the shape level rather than the timestamp level. It uses clustering to identify discriminative subsequences from different variables and positions, encoding them with a novel positional embedding scheme that captures variable ID, start timestamp, and end timestamp. • ShapeConv [Qu et al., 2024]: This method establishes a theoretical equivalence between convolution operations and shapelet transforms, treating convolutional kernels as shapelets. It introduces shaping regularization to ensure learned kernels remain interpretable as meaningful subsequence patterns. • SBM [Wen et al., 2025]: The Shapelet Bottleneck Model constructs logical predicates using a variant of shapelet transforms to provide interpretable classification decisions based on shapelet distances. • InterpGN [Wen et al., 2025]: This model builds upon SBM by integrating it with a deep neural network through a mixture-of-experts (MoE) gating mechanism. The gating function routes samples based on the confidence of the interpretable expert. Since the deep learning module processes the entire input time series, it cannot provide interpretability. We therefore compare only its SBM component in our experiments. • SoftShape [Liu et al., 2025]: This method introduces soft shape sparsification, which assigns attention-based weights to candidate subsequences based on their classification contribution scores rather than discarding non-selected shapes. It employs an MoE architecture for intra-shape pattern learning and a shared expert for inter-shape dependencies. The original architecture applies top-k thresholding to select informative segments but then processes both selected and non-selected segments through shared deep networks, causing information mixing that obscures which segments truly 2
https://openreview.net/forum?id=O8ouVV8PjF https://www.comp.hkbu.edu.hk/∼csgzli/mtsc/ 4 https://github.com/YunshiWen/InterpretGatedNetwork 5 https://github.com/ZLiu21/SoftShape 6 https://github.com/rdzuo/svp-transformer 3
drive classification. We use a modified version that processes only the top-k segments, eliminating this mixing. The top-k value is set to match the coverage ratio of INSHAPE for fair comparison. To comprehensively evaluate INSHAPE’s performance, we also compare against the full versions of InterpGN and SoftShape that leverage deep learning modules on the entire time series, as shown in Table 8. UCR 128
Metric Avg. Acc
InterpGN
SoftShape
Ours
0.7988
0.8400
0.8405
Table 8: Comparison with full versions of InterpGN and SoftShape on UCR 128 datasets.
Despite using deep learning modules that process the entire time series, INSHAPE achieves comparable or superior performance. This demonstrates the effectiveness of identifying statistically coherent regions and modeling their interactions, rather than relying on global time series information.
B.1
Implementation Details
To instantiate the selector, we adopt a Transformer encoder coupled with a lightweight MLP head, both of which are shared across all segments. This design allows the model to efficiently process variable-length segments within a single forward pass. In addition, parameter sharing significantly improves memory efficiency and acts as a regularizer, reducing the risk of overfitting and mitigating noise sensitivity—issues commonly reported in Transformer-based architectures [Eldele et al., 2024]. Furthermore, the selector is permutationinvariant by design, ensuring a consistent and reliable selection of the most informative temporal patterns at the segment level for the downstream predictor. For the predictor, we utilize an InceptionTime module [Ismail Fawaz et al., 2020], which has demonstrated superior performance in time series classification tasks due to its ability to capture a wide range of temporal patterns using multi-level convolutional filters [Middlehurst et al., 2024]. This capability in extracting diverse patterns enables the predictor to serve as a good signal for training the selector. In particular, as the selector and predictor are jointly optimized, the selector can more effectively identify and select the segments that are most informative for the predictor. When adapting INSHAPE to multivariate time-series data, we employ a shared selector across channels while adding a learnable channel position embedding to the input, enabling channel-specific selection strategies. The InceptionTime [Ismail Fawaz et al., 2020] predictor processes the full multichannel input, with dimensionality reduced via bottleneck layers. All experiments are conducted on a single GPU machine7 . 7 CPU: Intel Xeon Gold 6526Y (16 cores, 32 threads); GPU: NVIDIA A6000 (48GB VRAM).
Component
Hyperparameter Setting
General Setup Initialization Optimization Mini-batch size Training Configuration Predictor learning rate Selector learning rate Training epochs Coefficient λ PELT hyperparameter β Model Architecture No. of transformer layers No. of inception layers No. of InceptionTime kernels Kernel size Bottleneck size Hidden dimension
He [He et al., 2015] Adam [Kingma and Ba, 2014] {16, 64, 512} (UEA), {64, 512} (UCR) 0.001 0.0005 500 {0.1, 0.2, 0.5} {0.1, 0.5, 1} 1 6 3 41 32 32
Table 9: Hyperparameters of INSHAPE
B.2
Model and Dataset Configurations
Model Hyperparameters. Table 9 summarizes the hyperparameter settings for INSHAPE. We use Adam optimizer [Kingma and Ba, 2014] with He initialization [He et al., 2015]. The selector and predictor are trained with different learning rates (0.0005 and 0.001, respectively) to balance their joint optimization. The coefficient λ and PELT hyperparameter β are tuned via grid search from {0.1, 0.2, 0.5} and {0.1, 0.5, 1}, respectively. Dataset Splits and Preprocessing. For the UCR datasets, we follow the train-validation-test split of 60%-20%-20% as in [Liu et al., 2025]. For the UEA datasets, we use the predefined train-test splits, following the work [Wen et al., 2025]. Detailed statistics of the UCR [Dau et al., 2019] and UEA [Bagnall et al., 2018] datasets are available at the official archive8 .
B.3
Algorithm Details
The resulting population-level shapelets can be utilized for both local and global interpretations with the trained selector. For local interpretations, aligning the population-level shapelets with the regions identified by the trained selector reveals how globally important patterns manifest within individual instances. For global interpretations, we identify which population-level shapelets are close to the selected regions for each instance, and then statistically analyze these correspondences to determine which shapelets are essential for characterizing each class. • Algorithm 1 details the aggregation of variable-length instance-level shapelets into population-level shapelets via DTW-based clustering. We determine the optimal number of clusters k per class by maximizing silhouette scores, evaluating k in the range [5, 15]. Additionally we define a normalized DTW metric by dividing the distance by the maximum length of the two compared shapelets. We remove a shapelet if its normalized distance to any existing one falls below the threshold ϵ = 0.8. • Algorithm 2 provides local interpretations by aligning population-level shapelets with instance-specific discriminative regions, revealing how global patterns manifest in individual instances. To preserve the characteristic shape of population-level shapelets during the interpolation and pooling process, we use DTW warping path projection. This approach aligns shapelets by following the DTW path: averaging values for compression and repeating values for stretching, thereby maintaining the original pattern morphology. • Algorithm 3 provides global interpretations by computing usage frequency statistics of population-level shapelets across classes, identifying which shapelets are essential for characterizing each class.
Detailed Metric Definitions
We introduce coverage and overlap metrics to quantify the quality of local interpretations. These metrics evaluate how compactly and distinctly shapelets explain the time series. Let x ∈ RT denote a time series instance and s∗ = {s∗1 , . . . , s∗M ∗ } denote the set of selected shapelets, where each shapelet s∗m = s , . . . , xτ e } corresponds to a contiguous subsequence of {xτm m x. We define coverage and overlap as follows: P SM ∗ | i=1 s∗i | i̸=j |si ∩ sj | Coverage = , Overlap = (9) |x| |x| where | · | denotes the number of time points (i.e., |x| = T ). Coverage measures the proportion of the time series covered by the selected shapelets. Lower coverage indicates that the model focuses on fewer, more critical regions, providing more compact explanations. Overlap measures the proportion of temporal positions that are covered by multiple shapelets. Lower overlap indicates that shapelets highlight distinct, nonredundant regions, making it easier to identify which specific parts contribute to the prediction. 8
B.4
https://www.timeseriesclassification.com/dataset.php
Algorithm 1 DTW-based Clustering for Population-level Shapelets Input: Trained selector πϕ , training set D = {(x(i) , y (i) )}N i=1 , number of clusters per class K = {k1 , . . . , kC }, similarity threshold ϵ Output: Population-level shapelets P = {p1 , . . . , pnP } 1: Extract instance-level shapelets from all training instances using πϕ : S ∗ ← {(s∗i , y (i) )}N i=1 2: Partition S ∗ by class labels: Sc ← {s∗i | (s∗i , y (i) ) ∈ S ∗ , y (i) = c} for c ∈ {1, . . . , C} 3: P ← ∅ 4: for c = 1 to C do 5: {p1 , . . . , pkc } ← DTW-K MEANS(Sc , kc ) ▷ Cluster centroids 6: P ← P ∪ {p1 , . . . , pkc } 7: end for 8: Remove redundant patterns from P with normalized DTWdistance < ϵ 9: return P
Algorithm 2 Local Interpretation via Population-level Shapelets Input: Trained selector πϕ , input instance x1:T , population-level shapelets P = {p1 , . . . , pnP }. Output: Interpreted instance x̃ with discriminative regions replaced by aligned population-level shapelets 1: Extract instance-level shapelets s∗ = {s∗1 , . . . , s∗M ∗ } from x using πϕ 2: Initialize aligned shapelets P̃ ← ∅ 3: for each s∗j ∈ s∗ do 4: p∗ ← arg minp∈P DTW(p, s∗j ) ▷ Find closest shapelet 5: if |p∗ | < |s∗j | then 6: p̃j ← I NTERPOLATE(p∗ , s∗j ) ▷ Upsample 7: else if |p∗ | > |s∗j | then 8: p̃j ← P OOL(p∗ , s∗j ) ▷ Downsample 9: else 10: p̃j ← p∗ 11: end if 12: P̃ ← P̃ ∪ {p̃j } 13: end for 14: x̃ ← A LIGN(x, s∗ , P̃) ▷ Replace s∗ with P̃ 15: return x̃
Algorithm 3 Global Interpretation via Population-level Shapelets Input: Trained selector πϕ , partitioned instance-level shapelets S ∗ = {S1 , . . . , SC }, population-level shapelets P = {p1 , . . . , pnP } Output: Usage frequency matrix U ∈ RC×nP where uc,k denotes the frequency of pk in class c 1: Initialize U ← 0C×nP 2: for c = 1 to C do 3: for each s∗ ∈ Sc do 4: for each sj ∈ s∗ do 5: k ← arg mink∈{1,...,nP } DTW(pk , sj ) ▷ Find closest shapelet 6: uc,k ← uc,k + 1 7: end for 8: end for 9: end for 10: return U
C
Additional Results
INSHAPE is an interpretable-by-design model that provides both local and global explanations. In this section, we present additional qualitative results on multivariate time series, computational complexity analysis, and full results corresponding to Table 2 in the main paper.
C.1
Local Interpretation on Multivariate Time Series
Figure 8 compares local interpretations on a CharacterTrajectories sample from the UEA archive, which consists of three channels representing pen movement trajectories. In (a), INSHAPE identifies instance-level shapelets that capture distinct, non-overlapping discriminative segments across channels. In (b), we show local interpretation via population-level shapelets, where population-level shapelets are matched to their corre-
Figure 8: Qualitative comparison of local interpretations on a multivariate time series from CharacterTrajectories (UEA). Each column represents a channel (pen trajectory dimension), and colored segments indicate discovered shapelets. Gray regions denote nonselected parts of the time series.
sponding instance-level shapelets based on FastDTW distance. In contrast, the baseline methods exhibit notable limitations. ShapeNet (c) produces shapelets with substantial overlap across different patterns, making it difficult to distinguish which temporal regions are truly discriminative. SBM (d) generates fragmented and noisy shapelets that fail to capture coherent temporal structures, resulting in interpretations that are difficult to understand. These comparisons highlight that INSHAPE provides clearer, more coherent local explanations suitable for multivariate time-series analysis.
C.2
Full Results of Global Interpretation
In the main paper, we presented quantitative analysis using the usage frequency matrix U for the ECG5000 dataset, with detailed interpretation for classes 0 and 4. Here, we provide the full results across all five classes. Figure 9 shows the class-wise proportion of each population-level shapelet (Left) and their overlay on representative instances per class (Right). Class 1 is predominantly characterized by Shapelet 5, which consistently appears in the tail region across instances. In contrast, Class 2 exhibits a more balanced distribution across multiple shapelets (p5 , p8 , p12 ), requiring consideration of temporal dependency for discrimination with other classes. Classes 3 and 4 share similar shapelet distributions, with Shapelets 1 and 5 being dominant in both. This behavior parallels tree-based models [Ye and Keogh, 2009; Mueen et al., 2011], where features are selected to maximize information gain—suggesting that INSHAPE implicitly learns to identify shapelets that are most informative for distinguishing between classes. Figure 10 shows the top-3 frequent shapelets for each class in the MedicalImages dataset. Similar to the ECG5000 analysis, the proportion bar plot derived from the frequency matrix U enables intuitive class-level interpre-
Figure 9: Full global interpretation results on ECG5000. (Left) Class-wise proportion of the top-5 population-level shapelets. (Right) Overlay of the corresponding shapelets on time-series instances for each class, with gray lines representing individual samples.
Train (s)
LTS
ShapeConv
SBM
Ours
Metric
Value
0.74
1.45
0.67
1.17
Average inference time (s) Peak GPU memory (MB)
0.4913 19.85
Table 10: Computational cost comparison in seconds. Training time is measured per epoch on ECG5000.
tation. Class 2 exhibits a more balanced distribution across Shapelets p4 , p5 , and p6 , suggesting the temporal dependency for discriminating class.
C.3
Computational Cost Analysis
We investigate the computational cost of INSHAPE by measuring the training time on the ECG5000 dataset. Table 10 reports the average training time per epoch. The results show that INSHAPE maintains practical training efficiency compared with existing shapelet-based baselines. Inference Cost in a Real-World Scenario. We further evaluate the inference efficiency of INSHAPE in an EEG-based sleep-stage classification. Following standard sleep-stage prediction protocols, each input sample corresponds to a 30second EEG segment sampled at 128 Hz [Perslev et al., 2021], resulting in 3,840 time points per inference. Under this setting, INSHAPE requires an average inference time of 0.4913 seconds per sample and a peak GPU memory usage of 19.85 MB, as reported in Table 11. These results suggest that IN-
Table 11: Average per-sample inference time and peak GPU memory usage of INSHAPE on the EEG dataset, where each sample consists of a 30-second segment sampled at 128 Hz.
SHAPE is computationally feasible for practical deployment scenarios, including frequent dynamic prediction and resourceconstrained environments.
C.4
Domain-Grounded Analysis on ECG5000
To further examine whether the shapelets discovered by INSHAPE are consistent with domain knowledge, we conduct an additional analysis on ECG5000. ECG5000 is constructed from the BIDMC Congestive Heart Failure Database by extracting and normalizing fixed-length heartbeat segments [Dau et al., 2019]. The dataset categorizes heartbeats into five classes: normal beat, R-on-T premature ventricular contraction, premature ventricular contraction, supraventricular premature or ectopic beat, and unclassifiable beat. In electrocardiogram analysis, the QRS complex, which corresponds to ventricular depolarization, is one of the most important morphological components for distinguishing normal beats from ectopic or abnormal beats [Abedin, 2021].
Motivated by this clinical observation, we construct a domaingrounded reference region by aligning class-annotated beats from the original database with respect to the R-peak and identifying the corresponding Q-to-S interval. This interval provides a clinically meaningful reference for assessing whether the discovered shapelets are localized around diagnostically relevant waveform regions. Figure 11 shows the population-level shapelets discovered by INSHAPE and the corresponding QRS reference regions. The selected shapelets are consistently localized within or near the QRS complex, indicating that INSHAPE captures temporal patterns that are well aligned with established ECG morphology. This result provides additional evidence that the proposed instance-level shapelet discovery process can identify discriminative subsequences that are not only predictive but also meaningful from a domain perspective. It is important to note that ectopic beats often exhibit substantial heterogeneity across patients, including variations in morphology, timing, and cardiac-cycle position. Therefore, a fixed population-level pattern may not fully capture the patientspecific characteristics required for reliable interpretation. By selecting shapelets at the instance level, INSHAPE can adaptively identify discriminative regions tailored to each individual heartbeat while still supporting population-level analysis through the aggregation procedure described in Section B.4. This property is particularly useful in clinical time-series analysis, where patient-specific temporal patterns may carry important diagnostic information.
C.5
Interpretability of Contiguous Instance-Level Shapelets
INSHAPE discovers instance-level shapelets as contiguous and non-overlapping temporal segments. This design choice improves interpretability because each selected region can be understood as a coherent temporal unit rather than as a fragmented collection of isolated timestamps. From a perceptual perspective, this is consistent with the Gestalt principle of connectedness, where connected visual elements are naturally perceived as belonging to the same group [Rock and Palmer, 1990]. In time-series interpretation, contiguous segments therefore provide a more intuitive explanation of which temporal regions contribute to the prediction. This property also distinguishes INSHAPE from attributionbased explanations that may highlight scattered timestamps across the input sequence. Although such fragmented explanations can indicate point-wise importance, they are often difficult to interpret as meaningful temporal patterns. In contrast, the contiguous shapelets discovered by INSHAPE correspond to local waveform structures, making them easier to inspect, compare, and aggregate across instances. Together with the non-overlapping selection constraint, this leads to compact explanations that identify distinct discriminative regions without redundant temporal coverage.
Figure 10: Global interpretation results on MedicalImages. (Top) Class-wise proportion of the top-3 population-level shapelets extracted from the frequency matrix U. (Bottom) Overlay of corresponding shapelets on time-series instances for each class. Gray lines represent individual samples.
Figure 11: Domain-grounded analysis on ECG5000. Population-level shapelets discovered by INSHAPE are overlaid on ECG5000 heartbeat instances, together with the corresponding clinical reference regions based on the QRS complex. The alignment between the discovered shapelets and the QRS regions indicates that INSHAPE captures discriminative temporal patterns consistent with ECG-domain knowledge.
dataset
#train #test
#total length #class
ACSF1 Adiac AllGestureWiimoteX AllGestureWiimoteY AllGestureWiimoteZ ArrowHead Beef BeetleFly BirdChicken BME Car CBF Chinatown ChlorineConcentration CinCECGTorso Coffee Computers CricketX CricketY CricketZ Crop DiatomSizeReduction DistalPhalanxOutlineAgeGroup DistalPhalanxOutlineCorrect DistalPhalanxTW DodgerLoopDay DodgerLoopGame DodgerLoopWeekend Earthquakes ECG200 ECG5000 ECGFiveDays ElectricDevices EOGHorizontalSignal EOGVerticalSignal EthanolLevel FaceAll FaceFour FacesUCR FiftyWords Fish FordA FordB FreezerRegularTrain FreezerSmallTrain Fungi GestureMidAirD1 GestureMidAirD2 GestureMidAirD3 GesturePebbleZ1 GesturePebbleZ2 GunPoint GunPointAgeSpan GunPointMaleVersusFemale GunPointOldVersusYoung Ham HandOutlines Haptics
100 100 200 390 391 781 300 700 1000 300 700 1000 300 700 1000 36 175 211 30 30 60 20 20 40 20 20 40 30 150 180 60 60 120 30 900 930 20 343 363 467 3840 4307 40 1380 1420 28 28 56 250 250 500 390 390 780 390 390 780 390 390 780 7200 16800 24000 16 306 322 400 139 539 600 276 876 400 139 539 78 80 158 20 138 158 20 138 158 322 139 461 100 100 200 500 4500 5000 23 861 884 8926 7711 16637 362 362 724 362 362 724 504 500 1004 560 1690 2250 24 88 112 200 2050 2250 450 455 905 175 175 350 3601 1320 4921 3636 810 4446 150 2850 3000 28 2850 2878 18 186 204 208 130 338 208 130 338 208 130 338 132 172 304 146 158 304 50 150 200 135 316 451 135 316 451 136 315 451 109 105 214 1000 370 1370 155 308 463
1460 176 Vary Vary Vary 251 470 512 512 128 577 128 24 166 1639 286 720 300 300 300 46 345 80 80 80 288 288 288 512 96 140 136 96 1250 1250 1751 131 350 131 270 463 500 500 301 301 201 Vary Vary Vary Vary Vary 150 150 150 150 431 2709 1092
10 37 10 10 10 3 5 2 2 3 4 3 2 3 4 2 2 12 12 12 24 4 3 2 6 7 2 2 2 2 5 2 7 12 12 4 14 4 14 50 7 2 2 2 2 18 26 26 26 6 6 2 2 2 2 2 2 5
LTS
ShapeNet SVP-T ShapeConv SBM SoftShape
Ours
0.5000 0.1410 0.1340 0.1140 0.1370 0.5762 0.3167 0.9250 0.7500 0.7111 0.6333 0.9978 0.9288 0.5517 0.9754 0.7818 0.6180 0.4974 0.4397 0.5128 0.4718 0.5815 0.7370 0.6354 0.6944 0.3875 0.8000 0.9500 0.8000 0.7300 0.9332 0.8960 0.7363 0.4221 0.4566 0.2537 0.4271 0.6435 0.8978 0.4552 0.5229 0.9238 0.9082 0.7650 0.7642 0.7122 0.3853 0.2824 0.1618 0.7082 0.6951 0.7300 0.5756 0.6133 0.7244 0.5442 0.8591 0.3699
0.6450 0.4443 0.4670 0.4670 0.4810 0.9529 0.8556 0.5667 0.7750 0.7873 0.8250 0.9400 0.9989 0.7833 0.9505 0.5579 0.8901 0.9478 0.9667 0.6560 0.4910 0.4718 0.9276 0.9750 0.4795 0.5046 0.9938 0.8014 0.7216 0.7660 0.9759 0.7644 0.9744 0.4433 0.7588 0.9222 0.8100 0.9294 0.9910 0.5733 0.7079 0.5399 0.7983 0.6270 0.3188 0.7720 0.9818 0.7533 0.5923 0.8057 0.7602 0.6273 0.7769 0.9337 0.9218 1.0000 0.5091 0.4173
0.8050 0.7682 0.2160 0.4950 0.2660 0.9051 0.8333 0.8750 0.7750 0.9889 0.8917 1.0000 0.9724 0.6336 0.9993 1.0000 0.7120 0.7718 0.7346 0.7936 0.7003 1.0000 0.7736 0.6587 0.7551 0.6139 0.8671 0.9808 0.7983 0.9100 0.9516 1.0000 0.8019 0.7432 0.7029 0.4152 0.6933 0.9462 0.9142 0.5768 0.9171 0.9441 0.9262 0.9343 0.9840 1.0000 0.6594 0.5297 0.3164 0.9769 0.9639 0.9850 0.9690 0.9823 0.9534 0.7759 0.9022 0.4860
0.7450 0.7183 0.8120 0.8400 0.7790 0.9048 0.6667 0.8250 1.0000 1.0000 0.8417 1.0000 0.9722 0.9865 0.9894 1.0000 0.8500 0.8051 0.7885 0.8526 0.7472 0.9844 0.8519 0.8114 0.7236 0.5367 0.8155 0.9490 0.7983 0.8200 0.9600 1.0000 0.8076 0.7224 0.7724 0.8600 0.9609 0.9565 0.9542 0.6928 0.8571 0.8632 0.9135 0.9433 0.9600 1.0000 0.6212 0.4524 0.2250 0.8650 0.8719 1.0000 0.9024 1.0000 0.9690 0.8411 0.8569 0.5161
0.5500 0.1274 0.6100 0.7150 0.4750 0.5116 0.3333 0.7500 0.5000 0.8611 0.4167 0.9946 0.9178 0.6763 0.9401 0.5833 0.6400 0.6538 0.6410 0.6603 0.7565 0.7846 0.7315 0.7784 0.7315 0.1250 0.4688 0.7188 0.7634 0.7500 0.9590 1.0000 0.8630 0.7517 0.6552 0.2736 0.9911 0.7391 0.9933 0.5359 0.6286 0.9269 0.9090 0.9983 0.9965 0.4390 0.3971 0.2353 0.1471 0.7213 0.5738 0.8000 0.9231 1.0000 1.0000 0.5814 0.8102 0.3871
0.7000 0.7070 0.5700 0.6350 0.5700 0.7910 0.4170 0.6250 0.8750 0.9440 0.7500 1.0000 0.9040 0.5600 0.9610 0.9170 0.6300 0.5900 0.6920 0.6220 0.6130 1.0000 0.7780 0.7840 0.7040 0.5310 0.9060 0.9690 0.7960 0.6750 0.9490 0.7910 0.8300 0.6830 0.4550 0.7260 0.9330 0.8700 0.8800 0.5750 0.8710 0.9010 0.9100 0.5000 0.5000 0.9760 0.4710 0.1030 0.2500 0.8850 0.9020 0.9750 0.9780 0.9780 0.9230 0.8370 0.8140 0.4410
0.5750 0.2551 0.3880 0.5050 0.4930 0.7381 0.3167 0.9250 0.6750 0.8889 0.6917 1.0000 0.9315 0.5977 0.9972 0.4545 0.6160 0.6538 0.6808 0.6782 0.5037 0.8646 0.7944 0.7771 0.7556 0.5000 0.7938 0.9625 0.8022 0.8800 0.9416 1.0000 0.8001 0.6510 0.5821 0.2557 0.9653 0.8696 0.9800 0.7768 0.7486 0.9138 0.9190 0.8473 0.8660 0.9220 0.5794 0.4118 0.2265 0.9148 0.9148 0.9600 0.9178 0.9867 0.9133 0.5581 0.8942 0.4624
Continued on next page
dataset
#train #test
#total length #class
LTS
ShapeNet SVP-T ShapeConv SBM SoftShape
Herring HouseTwenty InlineSkate InsectEPGRegularTrain InsectEPGSmallTrain InsectWingbeatSound ItalyPowerDemand LargeKitchenAppliances Lightning2 Lightning7 Mallat Meat MedicalImages MelbournePedestrian MiddlePhalanxOutlineAgeGroup MiddlePhalanxOutlineCorrect MiddlePhalanxTW MixedShapesRegularTrain MixedShapesSmallTrain MoteStrain NonInvasiveFetalECGThorax1 NonInvasiveFetalECGThorax2 OliveOil OSULeaf PhalangesOutlinesCorrect Phoneme PickupGestureWiimoteZ PigAirwayPressure PigArtPressure PigCVP PLAID Plane PowerCons ProximalPhalanxOutlineAgeGroup ProximalPhalanxOutlineCorrect ProximalPhalanxTW RefrigerationDevices Rock ScreenType SemgHandGenderCh2 SemgHandMovementCh2 SemgHandSubjectCh2 ShakeGestureWiimoteZ ShapeletSim ShapesAll SmallKitchenAppliances SmoothSubspace SonyAIBORobotSurface1 SonyAIBORobotSurface2 StarLightCurves Strawberry SwedishLeaf Symbols SyntheticControl ToeSegmentation1 ToeSegmentation2 Trace TwoLeadECG TwoPatterns
64 40 100 62 17 220 67 375 60 70 55 60 381 1194 400 600 399 500 100 20 1800 1800 30 200 1800 214 50 104 104 104 537 105 180 400 600 400 375 20 375 300 450 450 50 20 600 375 150 20 27 1000 613 500 25 300 40 36 100 23 1000
128 159 650 311 266 2200 1096 750 121 143 2400 120 1141 3633 554 891 553 2925 2525 1272 3765 3765 60 442 2658 2110 100 312 312 312 1074 210 360 605 891 605 750 70 750 900 900 900 100 200 1200 750 300 621 980 9236 983 1125 1020 600 268 166 200 1162 5000
0.6154 0.5250 0.2462 0.7226 0.6642 0.6136 0.9616 0.3507 0.7167 0.5931 0.9500 0.3333 0.6614 0.6850 0.7135 0.6225 0.6036 0.8503 0.7711 0.9388 0.4005 0.4518 0.4167 0.5910 0.6406 0.1668 0.5600 0.0254 0.2000 0.1175 0.1981 0.9286 0.8778 0.6033 0.6820 0.6992 0.5000 0.5857 0.3880 0.6122 0.1667 0.3567 0.7700 1.0000 0.3767 0.4453 0.9400 0.9806 0.9765 0.9516 0.6447 0.7342 0.9843 0.9850 0.5185 0.9212 0.6550 0.9957 0.9892
0.2571 0.7728 0.7434 0.9400 0.9468 0.5404 0.6099 0.9911 0.8402 0.6682 0.8620 0.4816 0.6252 0.9725 0.8107 0.3431 0.5043 0.5337 0.8586 0.8796 0.5377 0.9352 0.6467 0.4762 0.6860 0.9788 0.9583 0.6161 0.7297 0.7418 0.7353 0.6869 0.6292 0.7726 0.8028 0.8742 0.6895 0.7400 0.6111 0.5667 0.4069 0.6802 0.2251 0.7200 0.3016 0.7789 0.4559 0.9762 0.8250 0.8132 0.7340 0.7901 0.4800 0.6429 0.4133 0.7500 0.6744 0.4244 0.7367
64 119 550 249 249 1980 1029 375 61 73 2345 60 760 2439 154 291 154 2425 2425 1252 1965 1965 30 242 858 1896 50 208 208 208 537 105 180 205 291 205 375 50 375 600 450 450 50 180 600 375 150 601 953 8236 370 625 995 300 228 130 100 1139 4000
512 2000 1882 601 601 256 24 720 637 319 1024 448 99 24 80 80 80 1024 1024 84 750 750 570 427 80 1024 Vary 2000 2000 2000 Vary 144 144 80 80 80 720 2844 720 1500 1500 1500 Vary 500 512 720 15 70 65 1024 235 128 398 60 277 343 275 82 128
2 2 7 3 3 11 2 3 2 7 8 3 10 10 3 2 6 5 5 2 42 42 4 6 2 39 10 52 52 52 11 7 2 3 2 6 3 4 3 2 6 5 10 2 60 3 3 2 2 3 2 15 6 6 2 2 4 2 4
0.6154 0.9062 0.3231 1.0000 1.0000 0.5727 0.9727 0.8400 0.6400 0.3448 0.9833 0.5000 0.7467 0.8583 0.7207 0.6648 0.5946 0.9419 0.9347 0.9451 0.8898 0.8911 0.4167 0.5955 0.6955 0.2749 0.2000 0.1270 0.4762 0.5079 0.3767 0.9286 0.8194 0.8512 0.7654 0.7107 0.6000 0.5000 0.3200 0.7167 0.4944 0.6000 0.3000 0.4750 0.7750 0.6667 0.9333 0.9920 0.9694 0.9784 0.9188 0.8578 0.9902 0.9500 0.9444 0.7647 1.0000 1.0000 1.0000
0.6150 0.8440 0.5620 0.8730 0.7410 0.6520 0.9640 0.7600 0.8000 0.4140 0.9850 0.7500 0.5150 0.8460 0.7390 0.6540 0.6220 0.9330 0.8120 0.9370 0.8310 0.8910 0.4170 0.6740 0.8050 0.1680 0.5000 0.9050 0.8570 0.6350 0.4370 1.0000 0.9440 0.8510 0.6760 0.6860 0.6000 0.7860 0.4800 0.8110 0.3830 0.7060 0.7000 0.5500 0.7290 0.6800 0.8670 1.0000 0.8780 0.9690 0.7060 0.8800 0.9710 0.9580 0.7410 0.7940 0.9250 1.0000 0.9840
0.6231 0.8500 0.3569 0.8645 0.7623 0.6791 0.9598 0.6840 0.7500 0.8207 0.9833 0.3333 0.6886 0.8459 0.7568 0.6472 0.6216 0.9032 0.8962 0.9498 0.7424 0.8181 0.4167 0.7416 0.6910 0.2815 0.5600 0.0254 0.6571 0.4317 0.2512 0.9905 0.9333 0.7785 0.7348 0.7636 0.5933 0.4000 0.4293 0.7322 0.2533 0.6133 0.8800 0.8850 0.7592 0.6253 0.9600 0.9903 0.9878 0.9670 0.8640 0.8791 0.9843 0.9867 0.9593 0.9455 1.0000 1.0000 0.9952
0.5615 0.9373 0.5046 0.9871 0.9887 0.6995 0.9316 0.9227 0.7933 0.6926 0.9796 0.9833 0.7142 0.7947 0.7472 0.6442 0.4549 0.8335 0.8772 0.9450 0.8961 0.9410 0.4167 0.7965 0.6949 0.2028 0.7500 0.0417 0.6940 0.8814 0.1825 0.9905 0.9694 0.7983 0.7442 0.8017 0.6213 0.7714 0.5400 0.6000 0.5067 0.2000 0.9200 0.5700 0.8467 0.6907 0.8333 0.9935 0.9755 0.9790 0.6450 0.9218 0.9843 0.9633 0.9626 0.8856 0.9300 0.9957 0.9984
Ours 0.5871 0.9498 0.6677 1.0000 0.9811 0.6591 0.9772 0.9600 0.8750 0.8621 0.9942 1.0000 0.7686 0.8583 0.7255 0.7980 0.6667 0.9709 0.9596 0.9418 0.8853 0.8898 0.6667 0.8409 0.7641 0.3607 0.7700 0.2581 1.0000 0.9516 0.4791 0.9905 0.9444 0.8364 0.7935 0.8050 0.6960 0.7286 0.6400 0.8444 0.4389 0.7667 0.8700 1.0000 0.8692 0.7707 0.9667 0.9678 0.9337 0.9710 0.9847 0.9049 0.9853 0.9767 0.9245 0.8374 0.9750 1.0000 1.0000
Continued on next page
dataset
#train #test
#total length #class
LTS
ShapeNet SVP-T ShapeConv SBM SoftShape
Ours
UMD UWaveGestureLibraryAll UWaveGestureLibraryX UWaveGestureLibraryY UWaveGestureLibraryZ Wafer Wine WordSynonyms Worms WormsTwoClass Yoga
36 896 896 896 896 1000 57 267 181 181 300
180 4478 4478 4478 4478 7164 111 905 258 258 3300
0.6056 0.9542 0.7904 0.6855 0.7462 0.9939 0.4909 0.4751 0.4615 0.5846 0.7985
0.8200 0.7500 0.7133 0.6627 0.8200 0.9566 0.8663 0.6345 0.8969 0.8860 0.8142
0.7778 0.9576 0.7868 0.6987 0.7801 0.9986 0.5652 0.4972 0.4808 0.6538 0.8530
0.9720 0.9430 0.7790 0.7230 0.7050 0.9980 0.4780 0.6410 0.5770 0.6730 0.7210
0.8556 0.9685 0.8261 0.7315 0.7638 0.9955 0.4727 0.6939 0.5308 0.7346 0.8694
0.9056 0.9761 0.8249 0.7151 0.7867 0.9985 0.5308 0.6309 0.5624 0.6474 0.9445
0.9778 0.9283 0.8106 0.7620 0.7416 1.0000 0.6383 0.8011 0.8462 0.8846 0.9385
0.6262 5.7969
0.7213 4.3711
0.7018 4.2773
0.7479 4.1172
0.7375 3.9375
0.7820 3.1055
0.8405 2.3945
Avg. Acc Avg. Rank
144 3582 3582 3582 3582 6164 54 638 77 77 3000
150 945 315 315 315 152 234 270 900 900 426
3 8 8 8 8 2 2 25 5 2 2
Table 13: UCR dataset information and accuracy comparison.
dataset
#train
ArticularyWordRecognition AtrialFibrillation BasicMotions CharacterTrajectories Cricket DuckDuckGeese ERing EigenWorms Epilepsy EthanolConcentration FaceDetection FingerMovements HandMovementDirection Handwriting Heartbeat InsectWingbeat JapaneseVowels LSST Libras MotorImagery NATOPS PEMS-SF PenDigits PhonemeSpectra RacketSports SelfRegulationSCP1 SelfRegulationSCP2 SpokenArabicDigits StandWalkJump UWaveGestureLibrary
275 300 575 144 15 15 30 640 40 40 80 100 1422 1436 2858 119 108 72 180 1197 50 50 100 270 30 270 300 65 128 131 259 17948 137 138 275 206 261 263 524 1751 5890 3524 9414 62 316 100 416 50 160 74 234 400 150 580 730 52 204 205 409 405 25000 25000 50000 22 270 370 640 29 2459 2466 4925 36 180 180 360 45 278 100 378 3000 180 180 360 51 267 173 440 144 7494 3498 10992 8 3315 3353 6668 217 151 152 303 30 268 293 561 896 200 180 380 1152 6599 2199 8798 93 12 15 27 2500 120 320 440 315
Avg. Acc Avg. Rank
#test
#total length #class 25 3 4 20 12 5 6 5 4 4 2 2 4 26 2 10 9 14 15 2 6 7 10 39 4 2 2 10 3 8
LTS
ShapeNet SVP-T ShapeConv SBM
Ours
0.9907 0.4533 1.0000 0.9677 0.9861 0.4360 0.9622 0.5710 0.9870 0.2935 0.6598 0.5640 0.4649 0.1391 0.7356 0.5272 0.9627 0.6437 0.7733 0.6640 0.8778 0.8301 0.9618 0.2401 0.8829 0.8689 0.5333 0.9928 0.5600 0.9194
0.9933 0.1250 1.0000 0.9624 0.9444 0.3600 0.9259 0.5606 0.8841 0.2348 0.5681 0.4200 0.2432 0.2753 0.6408 0.2425 0.9351 0.5393 0.7444 0.4600 0.8111 0.8506 0.8668 0.1795 0.8026 0.8231 0.5667 0.9273 0.2500 0.7812
0.9833 0.2667 1.0000 0.9847 1.0000 0.4400 0.8630 0.6260 0.9783 0.2776 0.5094 0.5700 0.2703 0.5000 0.7610 0.5772 0.9811 0.3208 0.8611 0.4800 0.9056 0.8555 0.9377 0.1524 0.8684 0.7065 0.5000 0.9636 0.3333 0.8750
0.9767 0.4667 1.0000 0.9819 0.8611 0.4200 0.8704 0.5649 0.9058 0.2738 0.5738 0.5900 0.4054 0.1635 0.7805 0.1653 0.9081 0.3491 0.7889 0.5900 0.8944 0.8035 0.9794 0.1047 0.8158 0.8874 0.5611 0.9345 0.5333 0.8156
0.9933 0.4533 1.0000 0.9799 0.9806 0.3840 0.9667 0.6092 0.9928 0.3049 0.6633 0.6080 0.4757 0.3624 0.7366 0.4594 0.9632 0.6349 0.8589 0.6860 0.8789 0.8428 0.9719 0.2535 0.8974 0.8642 0.5289 0.9939 0.5733 0.9125
0.9733 0.4400 0.9750 0.9882 0.9861 0.6320 0.9096 0.7542 0.9754 0.2814 0.6560 0.6100 0.4054 0.6294 0.7630 0.6829 0.9860 0.3526 0.8844 0.6000 0.9556 0.8220 0.9731 0.3023 0.8816 0.8703 0.5556 0.9982 0.5600 0.8844
0.7150 3.1833
0.6306 4.9500
0.6783 3.7000
0.6655 4.0500
0.7277 0.7429 2.5667 2.5500
Table 15: UEA dataset information and accuracy comparison.
dataset
#train #test #total length #class
LTS
ShapeNet SVP-T ShapeConv
SBM
SoftShape Ours (Pop.)
ArrowHead CBF CricketX DistalPhalanxOutlineAgeGroup DistalPhalanxOutlineCorrect ECG5000 EOGVerticalSignal EthanolLevel Fish GunPoint InsectWingbeatSound ItalyPowerDemand MelbournePedestrian MiddlePhalanxTW MixedShapesRegularTrain OSULeaf Trace WordSynonyms
36 30 390 400 600 500 362 504 175 50 220 67 1194 399 500 200 100 267
0.5762 0.9978 0.4974 0.7370 0.6354 0.9332 0.4566 0.2537 0.5229 0.7300 0.6136 0.9616 0.6850 0.6036 0.8503 0.5910 0.6550 0.4751
0.9529 0.9400 0.9478 0.9276 0.9750 0.9759 0.7588 0.9222 0.7079 0.6273 0.5404 0.6099 0.9725 0.5043 0.5337 0.4762 0.6744 0.6345
0.5116 0.9946 0.6538 0.7315 0.7784 0.9590 0.6552 0.2736 0.6286 0.8000 0.5727 0.9727 0.8583 0.5946 0.9419 0.5955 1.0000 0.4972
0.7910 1.0000 0.5900 0.7780 0.7840 0.9490 0.4550 0.7260 0.8710 0.9750 0.6520 0.9640 0.8460 0.6220 0.9330 0.6740 0.9250 0.6410
0.7381 1.0000 0.6538 0.7944 0.7771 0.9416 0.5821 0.2557 0.7486 0.9600 0.6791 0.9598 0.8459 0.6216 0.9032 0.7416 1.0000 0.6939
0.9051 1.0000 0.7718 0.7736 0.6587 0.9516 0.7029 0.4152 0.9171 0.9850 0.6995 0.9316 0.7947 0.4549 0.8335 0.7965 0.9300 0.6309
0.8605 0.9194 0.7244 0.9074 0.7898 0.9560 0.6207 0.6517 0.8143 0.9750 0.6500 0.8773 0.7840 0.6396 0.9487 0.8764 0.9250 0.7403
0.6542 5.9444
0.7601 3.8889
0.7233 4.2778
0.7876 3.4444
0.7720 3.7778
0.7863 3.5000
0.8145 3.1667
Avg. Acc Avg. Rank
175 900 390 139 276 4500 362 500 175 150 1980 1029 2439 154 2425 242 100 638
211 930 780 539 876 5000 724 1004 350 200 2200 1096 3633 553 2925 442 200 905
251 128 300 80 80 140 1250 1751 463 150 256 24 24 80 1024 427 275 270
3 3 12 3 2 5 12 4 7 2 11 2 10 6 5 6 4 25
Table 17: UCR18 dataset information and accuracy comparison (population-level shapelets).
TimesNet
ModernTCN
InceptionTime
Dataset
Acc
Coverage Shapelet Num
Acc
Coverage Shapelet Num
Acc
Coverage Shapelet Num
ArrowHead CBF DistalPhalanxOutlineAgeGroup DistalPhalanxOutlineCorrect ECG5000 EOGVerticalSignal EthanolLevel Fish GunPoint InsectWingbeatSound ItalyPowerDemand MelbournePedestrian MiddlePhalanxTW MixedShapesRegularTrain OSULeaf Trace WordSynonyms
0.8810 1.0000 0.8333 0.8171 0.9570 0.4759 0.5672 0.8000 0.9500 0.6409 0.9635 0.8664 0.6273 0.9111 0.6023 1.0000 0.6298
0.5461 0.4466 0.5116 0.6414 0.4862 0.4359 0.6212 0.6734 0.5450 0.4082 0.5672 0.5670 0.5261 0.4806 0.6875 0.9859 0.3950
0.9070 1.0000 0.8611 0.7886 0.9500 0.6276 0.8905 0.8571 0.9750 0.6409 0.9406 0.8652 0.6306 0.9470 0.6136 0.9750 0.6851
0.4617 0.4505 0.4659 0.5054 0.3768 0.4598 0.6213 0.5040 0.5667 0.3206 0.3721 0.6356 0.5310 0.5107 0.6498 1.0000 0.6108
0.9048 1.0000 0.8519 0.8114 0.9600 0.7724 0.8600 0.8571 1.0000 0.6591 0.9772 0.8583 0.6667 0.9709 0.8409 0.9750 0.8011
0.5029 0.4493 0.5440 0.5736 0.3938 0.4996 0.2659 0.5043 0.5458 0.3229 0.5200 0.5556 0.4623 0.5017 0.5812 0.5527 0.3820
3.0476 1.0000 1.3704 2.9714 2.2390 1.5310 2.0000 3.0000 1.9750 3.4659 1.0183 1.0014 2.5182 5.0393 5.6023 1.2250 2.6575
3.1628 0.9892 1.8704 1.4743 2.0960 1.8000 2.0000 2.0000 2.0000 3.1909 0.7078 1.0014 2.5315 5.0530 5.9432 1.0000 3.2210
Table 18: Predictor architecture ablation results. Best accuracy per dataset is highlighted in bold.
3.0714 2.0430 2.9722 2.9657 2.5910 1.7931 2.3100 3.0000 2.0000 3.4659 1.1370 1.6259 2.1622 3.0752 7.2273 1.7500 3.1602
W =1 Dataset
Acc
Cov
#S
W =2 Rank
Acc
Cov
#S
B Spline Rank
Acc
Cov
#S
PELT Rank
Acc
Cov
#S
Rank
ArrowHead 0.7677 0.5119 3.5936 4.0000 0.8060 0.5833 3.3173 2.0000 0.7869 0.5326 1.6163 3.0000 0.8519 0.5440 2.9722 1.0000 CBF 0.9957 0.4846 12.0602 1.0000 0.9785 0.6252 9.7151 3.0000 0.9903 0.5118 6.3022 2.0000 0.9048 0.5029 3.0714 4.0000 CricketX 0.8231 0.5141 16.2231 3.0000 0.7346 0.3164 12.9460 4.0000 0.8308 0.6043 4.8872 2.0000 0.8519 0.5440 2.9630 1.0000 DistalPhalanxOutlineAgeGroup 0.8163 0.5548 3.2344 1.0000 0.7977 0.5645 3.1691 4.0000 0.8107 0.3267 1.3807 3.0000 0.8114 0.5736 2.9657 2.0000 0.7865 0.6255 2.8465 2.0000 0.7683 0.4878 2.7656 4.0000 0.7957 0.6651 1.9126 1.0000 0.7724 0.4996 1.7931 3.0000 DistalPhalanxOutlineCorrect ECG5000 0.9468 0.3727 5.7886 2.0000 0.9290 0.5017 4.3428 3.0000 0.9506 0.4310 2.5948 1.0000 0.8600 0.2659 2.3100 4.0000 0.5691 0.5940 5.2389 3.0000 0.4889 0.5206 3.3368 4.0000 0.6823 0.6179 1.9849 2.0000 0.8571 0.5043 3.0000 1.0000 EOGVerticalSignal EthanolLevel 0.4920 0.5814 2.8291 4.0000 0.5933 0.4829 1.8935 3.0000 0.7561 0.5273 1.8209 2.0000 1.0000 0.5458 2.0000 1.0000 0.9114 0.5226 2.6400 1.0000 0.7029 0.3449 3.0371 3.0000 0.8914 0.5119 2.2000 2.0000 0.6591 0.3229 3.4659 4.0000 Fish GunPoint 0.9650 0.5554 1.8850 3.5000 0.9650 0.6046 2.0300 3.5000 0.9750 0.3743 1.0500 2.0000 0.9772 0.5200 1.1370 1.0000 InsectWingbeatSound 0.6241 0.5429 7.6386 3.0000 0.5909 0.4388 3.6136 4.0000 0.6577 0.5925 2.7309 2.0000 0.8583 0.5556 1.6259 1.0000 0.9544 0.4069 1.8926 1.0000 0.9142 0.5626 1.7382 2.0000 0.8805 0.4240 1.0037 3.0000 0.6667 0.4623 2.1622 4.0000 ItalyPowerDemand MelbournePedestrian 0.8560 0.4689 1.5189 2.0000 0.7149 0.6505 1.2103 4.0000 0.8525 0.5564 1.2103 3.0000 0.9709 0.5017 3.0752 1.0000 0.6239 0.5171 3.0272 2.0000 0.5985 0.5660 2.7353 3.0000 0.5785 0.5498 1.0995 4.0000 0.8409 0.5812 7.2273 1.0000 MiddlePhalanxTW MixedShapesRegularTrain 0.8379 0.4536 6.8568 4.0000 0.9422 0.4096 3.9528 3.0000 0.9450 0.5471 3.8971 2.0000 0.9750 0.5527 1.7500 1.0000 OSULeaf 0.7920 0.5543 10.5734 4.0000 0.8507 0.3530 6.0274 2.0000 0.8779 0.4614 6.6648 1.0000 0.8011 0.3820 3.1602 3.0000 Trace 0.9150 0.6067 3.3000 3.0000 0.6700 0.4980 5.6850 4.0000 0.9200 0.3879 1.9850 2.0000 1.0000 0.4493 2.0430 1.0000 WordSynonyms 0.7083 0.6703 7.7326 4.0000 0.7536 0.7521 7.9580 2.0000 0.7370 0.4115 3.4851 3.0000 0.9600 0.3938 2.5910 1.0000
Table 19: Ablation study comparing fixed length (W = 1), average PELT length (W = 2), B-spline smoothing, and PELT-based segmentation. Best accuracy per dataset is highlighted in bold.