Abstract
Traditional time series comparison methods often rely on point-by-point distances or manual feature engineering, which fail to capture the underlying dynamics of stochastic processes. We present Data Smashing 2.0, a universal metric for time series comparison based on Sequence Likelihood (SL) divergence. By modeling data streams as Probabilistic Finite-State Automata (PFSA), we quantify deviations in hidden dynamics rather than raw data values. Our approach demonstrates superior discrimination accuracy and significant computational speedups over traditional methods like Dynamic Time Warping (DTW) across synthetic and real-world datasets, including EEG and gait analysis.
Introduction
Comparing time series is a fundamental challenge in data science. Standard metrics like Euclidean distance or Dynamic Time Warping (DTW) compare the "face value" of sequences, which can be misleading; visually distinct sequences may originate from the same stochastic process, while similar-looking sequences may have fundamentally different underlying dynamics.
Existing solutions often depend on domain-specific feature engineering, which is labor-intensive and requires expert knowledge. Data Smashing 2.0 addresses this by comparing the generators of the data. By treating time series as outputs of hidden stochastic engines, we can measure the intrinsic similarity of the processes themselves without manual feature selection.
Methods
The core of Data Smashing 2.0 is the transition from comparing data samples to comparing generative models.
PFSA Modeling
The authors employ Probabilistic Finite-State Automata (PFSA) to represent discrete-valued stochastic processes. PFSA are preferred over Hidden Markov Models (HMMs) because they offer closed-form solutions for key statistical quantities, making them computationally efficient.
Sequence Likelihood (SL) Divergence
To handle real-world data, the GenESeSS algorithm automatically extracts PFSA models from observed streams. The similarity between sequences is then quantified using Sequence Likelihood (SL) divergence, an information-theoretic generalization of KL divergence. SL divergence measures how much more "surprised" a model is by a sequence it did not generate.
The Smash2.0 Metric
Smash2.0 projects each sequence into a coordinate space defined by a fixed set of "base" PFSA models. Each coordinate represents the log-likelihood of the sequence under a specific base model. This reduces the comparison of thousands of sequences to simple vector distance calculations in a low-dimensional space, avoiding the $O(N^2)$ complexity typical of DTW.
Quantization
For continuous data, a systematic quantization scheme (e.g., D1N1[0]) is used to detrend, normalize, and symbolize data into a finite alphabet. The $r(D)$ ratio is used to evaluate and select the most effective quantization scheme for a given dataset.
Results
The algorithm was validated on three distinct datasets:
- Synthetic Data: Smash2.0 successfully distinguished processes that were nearly identical under DTW, proving its ability to capture subtle differences in stochastic dynamics.
- EEG Recordings (PhysioNet): The metric accurately differentiated between "rest" and "movement" (physical or imagined) states in 64-channel EEG data.
- Walking Activity (UCI): In gait analysis, the "universal" nature of the metric allowed for seamless multi-channel fusion (combining $x, y, z$ accelerometer axes), significantly boosting individual identification performance.
Computational benchmarks showed that Smash2.0's runtime remains nearly flat as sequence length increases, whereas DTW's runtime grows quadratically.
Conclusion
Data Smashing 2.0 provides a robust, fast, and domain-agnostic framework for time series analysis. By focusing on generators rather than samples, it captures the essential "identity" of data streams. Future work will explore optimal base model selection and the potential for "base-free" direct model comparison in unsupervised settings.
Summary updated