Fast time series classification using numerosity reduction

Xiaopeng Xi, Eamonn J. Keogh, Christian R. Shelton, Li Wei, Chotirat Ann RatanamahatanaICML 2006

One of the most persistent bottlenecks in time series analysis is the high computational cost of Dynamic Time Warping (DTW). While using a 1-Nearest Neighbor (1NN) classifier with DTW is widely considered the gold standard for classification accuracy, it is notoriously slow for real-time applications.

In this research, the authors introduce a novel approach to prune the training set—a process known as "numerosity reduction"—while dynamically adjusting DTW parameters to maintain, or even improve, classification accuracy.

The Computational Tax of DTW

In time series classification, the simple combination of 1NN and DTW is exceptionally hard to beat, frequently outperforming more complex models like Support Vector Machines (SVMs), Neural Networks, and Bayesian classifiers on standard benchmarks. However, DTW carries a heavy computational tax. Unlike simple Euclidean distance which compares points one-to-one, DTW compares sequences by finding an optimal alignment, allowing for shifts in the time axis. This flexibility traditionally requires $O(n^2)$ time complexity.

DTW alignment and the warping window matrix

Researchers have previously tried to speed this up by either speeding up the math (using lower bounds like LB_Keogh to prune unnecessary calculations) or by discarding redundant training instances (numerosity reduction). The authors argue we have reached the "asymptotic limit" of speeding up the math. The remaining challenge is how to perform numerosity reduction specifically for DTW without sacrificing the accuracy that makes it so desirable.

The Core Innovation: AWARD

The paper introduces AWARD (Adaptive WARping winDow), an algorithm that drastically speeds up time series classification by intelligently pruning data. The method relies on two main components:

  1. Naïve Rank Reduction: A greedy pruning strategy that ranks every instance in the training set based on its "contribution" to correct classification. Instances that successfully help classify others get high ranks. Conversely, instances that are misclassified (likely noise) or simply don't help classify others get low ranks and are discarded first.
  2. Adaptive Warping Window: Standard DTW uses a "warping window" ($r$) to limit how much the sequences can shift, preventing pathological alignments. The authors observed a crucial empirical relationship: the optimal warping window size depends on the number of objects in the training set.

As the dataset size ($N$) decreases through pruning, AWARD gradually increases the warping window ($r$). This added flexibility compensates for the loss of data points, allowing the remaining instances to "stretch" further to match new queries.

Accuracy vs. Warping Window for varying dataset sizes

This insight shatters a long-held myth that wider warping windows are always better for accuracy. In reality, large datasets need small windows (tight constraints to prevent false matches), while small datasets need large windows (more freedom to find alignments).

To make this tractable for large datasets, the authors also developed FastAWARD, which uses caching and admissible lower bounds to avoid recomputing DTW from scratch every time an instance is pruned.

Key Results and Performance

The authors validated their observations on 13 diverse datasets from the UCR Time Series Archive, including synthetic patterns, image contours (Swedish Leaf), ECGs, and sensor data. The results demonstrated significant improvements:

  • Extreme Pruning: On the "Two Patterns" dataset, AWARD maintained near-perfect accuracy even after discarding 90% of the training data.
  • Massive Speedups: Using the FastAWARD optimization, the number of DTW computations required during the reduction phase dropped from a brute-force $6 \times 10^8$ to just 53.
  • Anytime Performance: Because AWARD ranks instances, it functions effectively as an "anytime" algorithm. On the Two Patterns dataset, it achieved 99.85% accuracy using only the first 120 ranked instances (12% of the training set), whereas fixed-window methods were stuck at ~87% at that same stage.

Limitations and Future Work

While highly effective, the relationship between dataset size and the warping window is presented as an empirical observation. The paper does not provide a formal mathematical proof or a universal formula for the $N$ vs. $r$ curve, though it was confirmed across all 13 tested datasets. Additionally, the initial "best" warping window must still be found via cross-validation on the full training set, representing a one-time preprocessing cost. Finally, the scope of this work focuses strictly on 1NN classification, leaving the dynamics of $k$-NN (where $k > 1$) for future exploration.

Summary updated

BibTeX
@inproceedings{xi2006fast,
  author = {Xiaopeng Xi and Eamonn J. Keogh and Christian R. Shelton and Li Wei and Chotirat Ann Ratanamahatana},
  title = {{Fast time series classification using numerosity reduction}},
  booktitle = {International Conference on Machine Learning},
  year = {2006},
  url = {https://openreview.net/forum?id=HyWn0cb_bH},
}
Figure