TLDR: A new research paper proposes using Wasserstein distance to measure the similarity between time-series datasets by modeling them as multivariate normal distributions. This method helps identify similar datasets, aids in estimating the performance of foundation models on unseen data, and offers a more informative measure of similarity compared to traditional methods, potentially saving significant computational resources in model selection and fine-tuning.
In the rapidly evolving world of artificial intelligence, especially with the rise of powerful ‘foundation models’ for time-series data, a crucial question emerges: how do we effectively measure the similarity between different time-series datasets? This isn’t just an academic exercise; it has significant practical implications for selecting the right models, fine-tuning them for specific tasks, and even visualizing complex data relationships.
Imagine you have a powerful AI model trained on a vast collection of time-series data, like stock prices or weather patterns. When you want to apply this model to a new, unseen dataset, how can you predict its performance without spending countless hours on trial-and-error training? The answer, as a recent research paper suggests, lies in understanding how similar your new dataset is to the data the model was originally trained on.
A Novel Approach to Dataset Similarity
Researchers from Dolby Labs. and Adobe Research have proposed a new method to measure time-series dataset similarity using a concept called the Wasserstein distance. Their core idea is to treat each time-series dataset not just as raw numbers, but as an ’empirical instantiation’ of an underlying multivariate normal distribution (MVN). Think of it as summarizing the key statistical characteristics – like the average behavior and how different parts of the time series move together – into a compact mathematical representation.
This MVN modeling offers several advantages. Firstly, it standardizes time series that might originally have different lengths into a common format. Secondly, it naturally allows for the application of the Wasserstein distance, a powerful metric for comparing probability distributions. Lastly, it aligns well with common practices in time-series forecasting, where data is often processed into fixed-length samples.
Understanding Wasserstein Distance
The Wasserstein distance, sometimes called the ‘Earth Mover’s Distance,’ intuitively measures the minimum ‘cost’ to transform one distribution into another. In the context of time-series datasets modeled as MVNs, this distance considers two main factors: how far apart their average behaviors (mean vectors) are, and how different their patterns of variability and co-movement (covariance matrices) are. Essentially, for two datasets to be considered similar, they need to have both similar average trends and similar ways in which their data points fluctuate together.
Validation and Practical Benefits
The researchers conducted extensive experiments to validate their approach. They visualized the pairwise Wasserstein distances between 30 diverse time-series datasets, ranging from electricity consumption to Wikipedia visits. The resulting heatmaps and force-directed graphs clearly showed that the Wasserstein distance effectively groups similar datasets together, revealing hidden clusters and subclusters that other common distance measures (like Euclidean distance or Dynamic Time Warping) failed to identify as clearly.
Perhaps the most compelling finding relates to foundation models. By testing two popular time-series foundation models, Lag-llama and PatchTST, on various datasets, they found a strong correlation (over 0.60) between the Wasserstein distance to the source dataset and the model’s inference performance (loss) on the target dataset. This means that if a target dataset is statistically ‘closer’ to the source dataset in terms of Wasserstein distance, the foundation model is likely to perform better on it.
This breakthrough has significant practical implications. Instead of blindly applying a foundation model or spending valuable computational resources fine-tuning it on every possible dataset, researchers and practitioners can now use the Wasserstein distance to quickly estimate how well the model will perform. This allows for more informed model selection and can drastically reduce computational costs and time. For more technical details, you can refer to the full research paper here.
Also Read:
- Optimizing LLM Specialization: A New Framework for Data Source Evaluation
- Bridging Data Gaps in Time Series with Representation Decomposition
Future Directions
While promising, the proposed method does rely on the assumption that the sampled time series data is independent and identically distributed (i.i.d.) and can be accurately modeled as a multivariate normal distribution. Future research will explore its applicability to non-i.i.d. data and investigate factors that might lead to negative correlations in some outlier datasets. This work is expected to pave the way for advancements in meta-learning, data distillation, and the development of even more robust foundation models for time series.


