TL;DR
PRCIS (Pattern Representation Comparison in Series) is a novel distance measure designed for long, unstructured time series where traditional methods like DTW fail. By summarizing time series into "dictionaries" of representative shapes and comparing them using a robust median-based distance, PRCIS achieves state-of-the-art results in clustering and classification while remaining resilient to noise, phase shifts, and missing data.
What Problem Does This Paper Address?
Most time series research focuses on "atomic" events—a single heartbeat, a specific gesture, or a single day of traffic. For these short segments, Euclidean Distance and Dynamic Time Warping (DTW) are highly effective. However, these measures break down when applied to long time series (e.g., hours of ECG data or years of power demand).
The authors identify three main failure modes for traditional measures in long series:
- Phase Sensitivity: DTW cannot easily "explain away" an extra heartbeat in a minute-long trace, leading to a large, misleading distance.
- Global Trends: A slow, multi-year increase in traffic volume can completely swamp the local daily patterns that actually define the similarity between two roads.
- Ordering and Cardinality: In a workout routine, an athlete might change the order of exercises or skip a set. Standard measures expect a rigid sequence, whereas the "semantic" similarity remains high.
While "bag-of-features" methods (using means, variance, etc.) exist, they lose the critical local shape information that often distinguishes different behaviors.
Methods
The core idea of PRCIS is to move from comparing raw data points to comparing dictionaries of representative patterns.
- Dictionary Creation: For each long time series, the algorithm extracts a small set of representative subsequences (motifs). While the method is agnostic to how these are found, the authors primarily use "Yeh’s Dictionary," which leverages the Matrix Profile to find the most conserved patterns.
- Phase-Invariant Comparison ($RI\_dist$): To compare two patterns (e.g., "cat" vs "atc"), the algorithm uses a rotation-invariant distance. This ensures that two similar shapes are recognized even if they start at different points in their cycle.
- Cross-Dictionary Mapping: For every pattern in Dictionary A, the algorithm finds its nearest neighbor in Dictionary B, and vice versa.
- Robust Aggregation: This is a key innovation. Instead of averaging these distances, PRCIS takes the median. This allows the measure to ignore "unique" patterns—such as a one-time sensor glitch or a rare event—that would otherwise dominate and ruin the distance calculation.
Datasets
The authors evaluated PRCIS on a diverse range of challenging datasets:
- Electrical Power Demand: Three years of hourly data from 25 European countries.
- Business Merchants: Three years of hourly transaction counts for 38 merchants (e.g., vending machines, toll booths).
- Milling Machine: High-frequency (250Hz) acoustic emissions from the NASA/Berkeley dataset.
- Human Activity (USC-HAD & WeAllWalk): Inertial sensor data from daily activities and blind walkers.
- Industrial Anomaly: Vibration data from a 2hp motor powering an industrial paper shear.
Key Insights and Ideas
- The Power of the Median: By using the median distance between dictionary elements, PRCIS becomes incredibly robust. It can successfully cluster time series even when they contain significant noise, spikes, or large chunks of missing data.
- Semantic vs. Structural Similarity: PRCIS captures what a time series contains rather than how it is aligned. This is why it succeeds on the "athlete workout" problem where the order of events doesn't matter.
- Efficiency: Because it operates on small dictionaries rather than the full raw data, the comparison is computationally efficient ($O(m^2 n^2)$ where $n$ is the small dictionary size).
Key Results
- Clustering: On the European Power Demand dataset, PRCIS produced a highly intuitive clustering that reflected geographical and cultural regions (e.g., Mediterranean, Scandinavian, Baltic), despite the data having "wandering baselines" and missing segments.
- Classification: In head-to-head tests against SOTA methods like ROCKET and Catch22, PRCIS achieved 100% accuracy on the WeAllWalk dataset and 73.33% on USC-HAD, outperforming the baselines which struggled with the unstructured nature of the long traces.
- Anomaly Detection: PRCIS was able to detect a subtle 32-second paper jam in an 11-minute motor vibration trace. Traditional anomaly detectors like the Matrix Profile or Telemanom failed because they were tuned for shorter, "atomic" anomalies rather than shifts in the composition of complex behaviors.
Limitations and Future Work
- Parameter Selection: Currently, the user must specify the pattern length ($L$) and the dictionary size ($S$). While the authors show the method is relatively stable, they suggest that future work could use Minimum Description Length (MDL) to automate these settings.
- Metric Properties: PRCIS is a distance measure but not a formal metric (it doesn't strictly satisfy the triangle inequality). While the authors argue this is often a feature rather than a bug in time series analysis, it may limit the use of certain indexing structures.
- Dictionary Methods: The paper is agnostic to the dictionary creation method; exploring how different summarization techniques affect the distance measure remains an open area.
Summary updated