TL;DR
This paper introduces the first highly scalable, linear-space algorithms for order-preserving frequent pattern mining in time series data. By designing a practical algorithm to construct Order-Preserving Suffix Trees (OPST) and leveraging efficient tree traversals, the authors reduce the worst-case time complexity for mining maximal and closed frequent patterns from cubic ($\Omega(n^3)$) to linear ($\mathcal{O}(n)$).
What Problem Does This Paper Address?
Time series data—such as stock prices, ECG recordings, and sensor data—is ubiquitous. A common goal is to find frequent patterns (or trends) within this data. Traditional methods typically convert continuous numbers into rigid symbols or rely on distance metrics, both of which can easily miss underlying trends due to minor fluctuations or scaling differences.
To solve this, researchers use order-preserving (OP) matching. Instead of looking at absolute values, OP matching looks at the relative ranks of elements. For example, the sequences $(4, 2, 5, 5, 1)$ and $(5, 2, 7, 7, 0)$ share the exact same relative trend or rank sequence: $(3, 2, 4, 4, 1)$.
While OP matching is highly effective at capturing the "shape" of data, existing mining algorithms (like MOPP-Miner) scale poorly, requiring $\Omega(n^3)$ time in the worst case. The ideal data structure for this task, the Order-Preserving Suffix Tree (OPST), previously lacked a practical, efficient construction algorithm. This paper bridges the gap, making order-preserving pattern mining scalable to multi-million-point datasets.
Methods
The authors tackle the scalability bottleneck through a three-part algorithmic framework:
- Practical OPST Construction: The authors adapt McCreight’s classic suffix tree construction algorithm to the OP setting. They utilize a "letter oracle" based on range predecessor/successor searches to efficiently encode string prefixes. By proving that the maximum outdegree of any branching node in an OPST is bounded by $2\sigma + 1$ (where $\sigma$ is the alphabet size), they achieve a practical construction time of $\mathcal{O}(n\sigma \log \sigma)$ using $\mathcal{O}(n)$ space. They also present a purely theoretical deterministic algorithm running in $\mathcal{O}(n \log \sigma)$ time.
- Maximal Frequent OP Pattern Mining: A pattern is "maximal" if it cannot be extended in either direction without dropping below a minimum frequency threshold ($\tau$). Given an OPST, the authors use a two-phase bottom-up depth-first search (DFS). Phase I identifies right-maximal candidates, and Phase II filters for left-maximality using suffix links. This takes a clean $\mathcal{O}(n)$ time.
- Closed Frequent OP Pattern Mining: The authors formalize "closed" OP patterns (patterns that cannot be extended without losing frequency). Because closedness does not propagate upward cleanly in an OPST, they enhance their bottom-up traversal with constant-time Lowest Common Ancestor (LCA) queries, avoiding a naive $\Omega(n^2)$ pairwise comparison bottleneck to achieve $\mathcal{O}(n)$ time.
Datasets
The algorithms were evaluated on six large-scale, real-world datasets spanning various domains:
- Household (HOU): Electricity consumption data ($n \approx 6.1\text{M}, \sigma = 88$).
- Solar (SOL): Solar power production ($n \approx 7.1\text{M}, \sigma = 1,666$).
- ECG Pain (ECG): Electrocardiogram recordings from a pain study ($n \approx 23\text{M}, \sigma = 31,731$).
- Traffic (TRA): Road traffic data ($n \approx 15.1\text{M}, \sigma = 6,176$).
- Temperature (TEM): Climate data ($n \approx 114.9\text{M}, \sigma = 76$).
- Whales (WHA): Marine mammal vocalizations ($n \approx 308.9\text{M}, \sigma = 554,635$).
Two standard benchmarks from the UCR archive (CinCECGTorso and Wafer) were also used for clustering case studies.
Key Insights and Ideas
- The Alphabet Size Bottleneck is a Myth in Practice: Although the practical OPST construction algorithm has a theoretical worst-case bound of $\mathcal{O}(n\sigma \log \sigma)$, empirical evaluations revealed that it scales linearly ($\mathcal{O}(n)$) on real-world datasets, completely bypassing the alphabet size ($\sigma$) bottleneck.
- LCA Queries to the Rescue: While maximal patterns propagate predictably up the tree, closed patterns do not. The clever application of constant-time LCA queries allowed the authors to verify left-closedness efficiently without triggering a combinatorial explosion.
- Amortized Indexing: Tree construction accounts for roughly 80% of the total runtime. Because the OPST only needs to be built once, users can run multiple subsequent mining queries with different frequency thresholds ($\tau$) almost instantaneously.
Key Results
- Orders of Magnitude Speedup: The proposed
OPST-MPalgorithm successfully processed the massive Whales dataset (over 308 million data points) in just 1,071 seconds. State-of-the-art competitors like MOPP-Miner and standard Apriori baselines timed out (failed to finish within 24 hours) on datasets larger than 10–20 million points. - Threshold Independence: Unlike previous methods, the runtime of the proposed mining algorithms is entirely independent of the frequency threshold ($\tau$), making it exceptionally fast even when mining rare, low-frequency patterns.
- Downstream Effectiveness: In clustering case studies, using maximal OP patterns as features yielded perfect clustering accuracy (Normalized Mutual Information = 1.0) against ground-truth labels, vastly outperforming raw data clustering.
Limitations and Future Work
- Memory Overhead: While the space complexity is strictly linear ($\mathcal{O}(n)$), the underlying index structure (storing nodes, edges, and suffix links) inherently requires more memory than simple sliding-window baselines.
- Strict Orderings: The current framework relies on exact rank matching. A compelling direction for future work is extending this approach to approximate order-preserving pattern mining to better accommodate noisy data streams.
Summary updated