Abstract
Visualizing massive time series datasets often presents a binary choice: a cluttered "hairball" of overlapping lines or an overwhelming number of individual charts. TiVy addresses this trade-off by automatically clustering visually similar subsequences using an optimized Dynamic Time Warping (DTW) approach and sequential pattern mining. By transforming raw data into symbolic sequences, TiVy generates clean, interactive visual summaries that group similar trends together, achieving a 1000x speedup over standard DTW clustering methods.
Introduction
When analysts explore large collections of time series data—ranging from stock prices and server metrics to ECG heartbeats—they face a fundamental conflict between scalability and visual clarity. Traditional methods rely on either juxtaposition (plotting every series in its own chart) or superposition (overlaying all series on a single chart). Juxtaposition becomes unreadable as the number of series grows into the thousands, while superposition quickly devolves into a cluttered mess where individual patterns are lost.
The ideal solution is to group time series that share similar visual trends, allowing them to be superposed without losing readability. However, grouping based on visual similarity—which must account for slight temporal shifts rather than strict point-to-point alignment—is computationally expensive. Standard clustering algorithms scale poorly, making them impractical for the massive datasets common in modern analytics. TiVy bridges this gap by introducing a scalable pipeline for visual summarization.
Methodology
TiVy transforms raw time series into discrete symbolic sequences and mines them for frequent patterns to create a scalable visualization. The pipeline consists of four primary stages:
1. Discretization and LSH-Accelerated Clustering
Time series are first split into equal-length segments. To group visually similar segments, TiVy utilizes Dynamic Time Warping (DTW), a distance metric that aligns shapes even if they are slightly out of sync. Because standard DTW and hierarchical clustering are computationally prohibitive ($O(n^2)$), TiVy employs Locality-Sensitive Hashing (LSH) to bucket the series into coarse groups. It then samples from these buckets for the more expensive DTW clustering, drastically reducing total compute time.
2. Symbolic Representation and Pattern Mining
Once clusters are established, each segment is assigned a symbol based on its cluster membership. This process converts the continuous time series into a sequence of discrete symbols. TiVy then applies a custom sequential pattern mining algorithm to identify frequent contiguous subsequences across the dataset.
3. Greedy Grouping
To prevent a combinatorial explosion of overlapping patterns, TiVy uses a greedy algorithm to select the longest and most frequent patterns. This results in a concise, disjoint set of subsequence clusters that represent the most significant trends in the data.
4. WebGL-Powered Visualization
The resulting clusters are rendered as small multiples. To maintain real-time interactivity, TiVy avoids rendering millions of individual data points. Instead, it utilizes aggregated visual encodings, such as band graphs (polygons showing data bounds), density line charts, and central "medoid" lines. These are powered by pre-computed WebGL buffers to ensure high performance during user interactions.
Evaluation and Results
The system was evaluated using synthetic data, the MIT-BIH Arrhythmia ECG dataset (100,000 signals), and NASDAQ stock price data (4,470 series).
- Performance: The LSH-optimized DTW clustering achieved a 1000x speedup, reducing processing time for 100,000 time series from hours to seconds. The WebGL interface maintained high frame rates during filtering, panning, and zooming.
- ECG Analysis: TiVy successfully extracted and grouped visually distinct heartbeat anomalies, such as junctional escape beats and premature ventricular contractions, matching the annotations of expert cardiologists.
- Financial Trends: In the stock dataset, TiVy isolated a distinct "v-shaped" market drop in early 2016, allowing analysts to quickly identify which industry sectors were most affected by that specific temporal trend.
Discussion and Future Work
TiVy demonstrates that visual similarity is often more useful than exact alignment for exploratory analysis. By using LSH as a "cheat code" for DTW and focusing on pattern mining over raw clustering, the system identifies meaningful subsequences that whole-series clustering might miss.
Currently, the system requires regularly sampled time series and is sensitive to parameters like window size. Future work includes extending TiVy to handle multivariate data, adding interactive "query-by-sketch" features, and exploring deep learning models to learn visual similarity directly from time series projections, potentially further increasing scalability.
Summary updated