Abstract
CrossMatch is a high-performance algorithm designed to identify common local patterns between two evolving data streams in real-time. By leveraging a reversible scoring function and a one-pass streaming architecture, it enables the use of Dynamic Time Warping (DTW) distance with constant time and space complexity per update. This paper details the methodology and experimental validation of CrossMatch across diverse datasets, demonstrating its efficiency and accuracy in monitoring co-evolving sensors and financial trends.
Introduction
In modern data analysis, monitoring co-evolving data streams—such as sensor networks, financial markets, or human motion capture—is a critical task. A recurring challenge in these domains is identifying common local patterns between two streams in real-time. Unlike traditional query-based matching, where a fixed pattern is sought within a stream, stream-to-stream matching requires identifying unknown patterns of varying lengths and start times as they emerge.
A significant hurdle in stream matching is temporal warping, where similar patterns occur at different speeds. Dynamic Time Warping (DTW) is the standard metric for addressing this, but its $O(N^2)$ computational complexity has historically limited its use in high-speed, infinite data streams. CrossMatch addresses this by providing a streaming solution that maintains the accuracy of DTW without the prohibitive computational cost.
Methodology
The authors introduce CrossMatch, a one-pass streaming algorithm that achieves constant time and space complexity per update. CrossMatch avoids the overhead of maintaining full distance matrices by employing several key innovations:
- Reversible Scoring Function: Instead of raw DTW distance, CrossMatch uses a cumulative scoring function. This function rewards similarity and penalizes divergence. When a potential match's similarity drops below a threshold, the score resets to zero, effectively pruning unpromising paths. Crucially, this score can be mathematically converted back into the exact DTW distance.
- Position Tracking: The algorithm maintains a position matrix to track the starting coordinates of qualifying patterns, allowing for immediate reporting of matches.
- Optimal and Foremost Matching: CrossMatch can report the "optimal" alignment or the "foremost" match (the first to satisfy a similarity threshold), which is particularly useful for low-latency monitoring.
Experimental Evaluation
The performance of CrossMatch was validated using a variety of real-world and synthetic datasets, including environmental sensors (humidity and temperature), human activity (CMU Mocap), and solar activity (sunspots).
Key Results
- Efficiency: CrossMatch maintains $O(w)$ complexity per update (where $w$ is the warping window), representing a massive speedup over naive $O(nw^2)$ approaches that explode as the stream length $n$ grows.
- Scalability: The algorithm scales effectively to high-dimensional data, such as 8D motion capture streams, accurately distinguishing between complex activities like walking and jumping.
- Sampling Gains: By applying adaptive sampling based on the Nyquist frequency, the authors reduced computational resource consumption by over 90% in some cases with negligible impact on the Diarization Error Rate.
Conclusion
CrossMatch represents a significant advancement in stream mining, providing the accuracy of DTW with the efficiency required for real-time applications. By shifting from distance-based to score-based pruning, it enables the discovery of complex, warped patterns in infinite data streams without the need for pre-defined queries or excessive computational overhead. Future work may address the "many streams" problem to compare dozens of streams simultaneously with similar efficiency.
Summary updated