Abstract
Shapelet-based classification is a powerful technique for time series analysis, yet traditional methods suffer from high computational complexity due to exhaustive combinatorial searches. This paper presents FLAG (Fused LAsso Generalized eigenvector method), an optimization-based approach that learns discriminative subsequences directly. By combining the Generalized Eigenvector Method with Fused Lasso regularization, FLAG transforms shapelet discovery into a fast numerical task. Experiments on 26 benchmark datasets demonstrate that FLAG achieves orders-of-magnitude speedups—up to 1,000x—while maintaining competitive classification accuracy and providing interpretable results.
Introduction
In domains ranging from medical diagnostics to robotics, time series classification often relies on identifying "shapelets"—short, representative subsequences that characterize specific classes. For example, a specific dip in an ECG signal might indicate a heart condition. However, finding these shapelets is traditionally a "needle in a haystack" problem. Exhaustive search methods check every possible subsequence of every possible length, leading to cubic scaling with respect to time series length. As datasets grow in size and complexity, these traditional methods become a bottleneck, often taking hours or days to run.
Methodology: The FLAG Framework
The authors propose FLAG to replace discrete search with continuous mathematical optimization. The core innovation lies in how the algorithm "learns" the location of shapelets:
- Generalized Eigenvector Method (GEM): GEM identifies projections that maximize the variance of one class while minimizing the variance of the other, effectively picking out the most discriminative features.
- Fused Lasso Regularization: To ensure the learned features correspond to contiguous subsequences (shapelets), the authors employ a Fused Lasso penalty. While standard Lasso encourages sparsity (picking only a few points), Fused Lasso encourages adjacent points in the learned indicator vector to have similar values. This naturally forces the algorithm to identify sparse, "blocky" regions—exactly what a shapelet is.
- ADMM Solver: To solve the resulting complex optimization problem, they use the Alternating Direction Method of Multipliers (ADMM), an iterative framework that breaks the problem into smaller, easily solvable pieces.
Experimental Results
The authors evaluated FLAG on 26 different datasets from the UCR and UEA repositories, covering medical imaging, sensor data, and motion capture.
Key Performance Metrics
- Massive Speedups: FLAG is consistently three orders of magnitude (1,000x) faster than standard shapelet-transform methods. On the Chlorine dataset, while some methods took over 14 hours, FLAG finished in less than one second.
- High Accuracy: Despite its speed, FLAG was the second-best performer in accuracy across the 26 datasets, often outperforming the "Fast Shapelet" (FSH) algorithm and coming close to the much slower "Learning Time-series Shapelets" (LTS) method.
- Scalability: Once initial covariance matrices are calculated, FLAG's complexity depends mostly on the length of the sequences, not the number of samples. In tests on the StarlightCurves dataset (9,000+ curves), FLAG scaled linearly with the number of training samples.
Discussion and Conclusion
By reframing shapelet discovery as an optimization problem, FLAG bypasses the computational barriers of traditional methods. A key advantage is interpretability: because the Fused Lasso produces "blocky" indicator vectors, the resulting shapelets are easy for humans to visualize and understand, unlike many "black box" deep learning features.
While highly effective, the method can be sensitive to phase shifts where important patterns are shifted in time across samples. The authors demonstrate that pre-processing with Dynamic Time Warping (DTW) can mitigate this. Future work may focus on more integrated multiclass optimization and automated hyperparameter tuning for the regularization parameters.
Summary updated