Fast Subsequence Search on Time Series Data

Yuhong Li, Bo Tang, Leong Hou U, Man Lung Yiu, Zhiguo Gong

Introduction

Subsequence search is a fundamental operation in time series analysis, often described as the "needle in a haystack" problem. Given a query pattern $q$ of length $m$, the goal is to find the most similar segment within a much larger time series $t$. Applications range from monitoring medical EKG signals to analyzing financial market fluctuations.

While the UCR Suite currently represents the state-of-the-art for this task, its performance begins to degrade as datasets reach the scale of trillions of data points. The primary bottleneck is that even the most efficient lower-bounds in the UCR Suite often require $O(m)$ time to compute. This paper introduces "FAST" (Fast Accelerated Subsequence search for Time series), which utilizes computationally inexpensive lower-bounds to prune the search space before more expensive calculations are performed.

Methodology: The FAST Approach

The authors propose a multi-stage filtering pipeline that prioritizes speed over precision in the early stages. The goal is to discard "easy" mismatches using constant-time or near-constant-time checks.

1. Triangle Inequality Bound ($O(1)$)

The most significant innovation is the exploitation of temporal locality. In a sliding window search, a candidate subsequence at index $i$ is nearly identical to the one at index $i-1$, shifted by a single point. By applying the triangle inequality and maintaining running sums, the algorithm can estimate a lower bound for the current distance in $O(1)$ time based on the previous distance.

2. Incremental PAA Bound ($O(\phi)$)

Piecewise Aggregate Approximation (PAA) is a dimensionality reduction technique that represents a sequence by its segment averages. The authors developed an incremental update method for PAA. Instead of re-calculating averages for every window, they use running sums to update the PAA representation in $O(\phi)$ time, where $\phi$ is the reduced dimensionality (typically much smaller than $m$).

Figure 4: Incremental lower bound calculation across successive subsequences.

These bounds act as a "pre-filter." If a candidate is pruned by these cheap checks, the algorithm skips the standard $O(m)$ and $O(mr)$ calculations entirely, leading to massive cumulative time savings.

Experimental Evaluation

The FAST methods were evaluated against the standard UCR Suite using Random Walk (RW) data, a common benchmark for simulating natural time series fluctuations. The experiments tested query lengths from 512 to 8,192 points against a target series of 2 million points.

Key Results and Discussion

The integration of these cheap bounds led to substantial performance improvements. For Euclidean Distance (ED), the proposed filters pruned 99.8% of candidates before the original UCR logic was even invoked.

Figure 6: Running time comparison between UCR Suite and FAST methods for (a) Euclidean Distance and (b) Dynamic Time Warping.

As illustrated in Figure 6, FAST-ED achieved speedups of up to 11x, while FAST-DTW was up to 3x faster than the baseline. Notably, the performance advantage of the FAST methods increases with query length, making them particularly effective for long-pattern matching in massive datasets.

Conclusion

This work demonstrates that "cheap" pruning is often more valuable than "precise" pruning in large-scale search tasks. By leveraging temporal locality and incremental updates, the FAST methodology significantly extends the scalability of time series subsequence search, providing a vital tool for handling the ever-growing volume of temporal data.

Summary updated

BibTeX
@inproceedings{li2017fast,
  author = {Yuhong Li and Bo Tang and Leong Hou U and Man Lung Yiu and Zhiguo Gong},
  title = {{Fast Subsequence Search on Time Series Data}},
  booktitle = {EDBT},
  year = {2017},
  doi = {10.5441/002/edbt.2017.58},
}
Figure