Correlation-Aware Distance Measures for Data Series

Katsiaryna Mirylenka, Michele Dallachiesa, Themis Palpanas

Standard distance measures like Euclidean distance (ED) are the workhorse of data series analysis, used extensively in fields ranging from finance to medicine. However, their "point-wise" nature is a significant limitation. This paper introduces three correlation-aware measures—based on autocorrelation, Markov chains, and local distance distributions—that significantly improve classification accuracy by accounting for the temporal dependencies inherent in data series.

The Problem: The Point-Wise Blind Spot

In data series analysis, the most common way to compare two sequences is Euclidean distance. While fast and effective for large datasets, ED treats every point in a sequence as independent, effectively ignoring the temporal order. This leads to what the authors call the "invariance trap."

As shown in the figure above, one can swap points within a series or change its "jaggedness" without changing its Euclidean distance to a query. This means ED cannot distinguish between a smooth trend and a volatile one if their aggregate values are similar. To improve tasks like 1-Nearest Neighbor (1NN) classification, distance measures must become "correlation-aware," capturing the associations between neighboring values.

Proposed Methodologies

The authors propose three distinct approaches to capture sequence correlations:

  1. Autocorrelation Distance (ACD): Instead of comparing raw values, this method calculates the autocorrelation vector for each series—measuring how a signal correlates with a lagged version of itself. The distance is then the Euclidean distance between these autocorrelation vectors.
  2. Markovian Distance: The series is first discretized into symbols (using iSAX). The authors then build a Markov chain (typically of order 3) to model the transition probabilities between states. The distance is defined as the negative log-probability that one sequence was generated by the model of the other.
  3. Local Distance Distribution (LDD): This method uses a sliding window to create a distribution of local Euclidean distances between sub-sequences. It then uses a ranking function to determine the probability that one series is the nearest neighbor based on these local distributions.

Hybrid Strategy: Failure Prediction

Because correlation-aware measures are more computationally expensive than ED, the authors propose a hybrid Failure Prediction strategy. By default, the system uses the efficient Euclidean distance. It only switches to a complex correlation-aware measure when the "confidence" in the ED result is low. This confidence is calculated based on the relative distance to the two nearest neighbors from different classes.

Experimental Results

The researchers evaluated their methods using 43 datasets from the UCR Time Series Classification Archive. The results demonstrate that all three proposed methods outperformed standard Euclidean distance when the system correctly identified that ED was likely to fail.

Key findings include:

  • ACD Performance: On specific datasets like "Trace," switching to Autocorrelation Distance improved classification accuracy from 76% to 100%.
  • Markovian Success: The Markovian method with failure prediction outperformed ED in 20 out of the 43 datasets tested.
  • Oracle Potential: When testing a "perfect oracle" (assuming we know exactly when ED will fail), switching to correlation-aware measures led to improvements across all 43 datasets. This suggests the primary bottleneck is not the measures themselves, but the accuracy of the failure predictor.

Conclusion and Future Work

While correlation-aware measures offer a powerful alternative to point-wise distances, the current failure predictor is only about 75% accurate. Future work will focus on developing more sophisticated "meta-classifiers" to better predict ED failure and exploring ensemble methods that combine ACD, Markovian, and LDD into a single robust metric.

Summary updated

BibTeX
@inproceedings{mirylenka2017correlation,
  author = {Katsiaryna Mirylenka and Michele Dallachiesa and Themis Palpanas},
  title = {{Correlation-Aware Distance Measures for Data Series}},
  booktitle = {EDBT},
  year = {2017},
  doi = {10.5441/002/edbt.2017.55},
}
Figure