Towards Understanding Evolving Patterns in Sequential Data

Qiuhao Zeng, Long-Kai Huang, Qi Chen, Charles X. Ling, Boyu WangNeurIPS 2024

Machine learning models designed for sequential data—such as video streams, stock prices, text, and weather patterns—implicitly assume that the past influences the future. When we train autoregressive models like RNNs or Transformers, we rely on the presence of a predictable, evolving pattern over time.

But how do practitioners actually know that such a pattern exists in their dataset, or how far back it goes? If you flip a coin repeatedly, the sequence has no evolving pattern; the past doesn't predict the future. Currently, answering these questions relies heavily on human intuition, domain expertise, or expensive trial-and-error. Existing statistical metrics are often too computationally heavy for high-dimensional data (like video) or can only detect simple, cyclical patterns.

To address this, researchers have introduced EvoRate, a new metric based on Mutual Information (MI), to quantitatively measure the strength of these evolving patterns. EvoRate helps scientifically determine if a sequence is predictable, how much history a model should look at, and what features to use—even when data points aren't perfectly tracked across time.

The Core Challenges in Sequential Learning

In real-world deep learning, practitioners face several unanswered questions when dealing with time-series or sequential data:

  1. Existence: Does an evolving pattern actually exist in this dataset?
  2. Optimal Order: What is the optimal "order" of the sequence? (i.e., How many past steps should we feed into the model?)
  3. Feature Relevance: Are the features we collected actually capturing the evolution, or are they just noise?

The authors set out to create a scalable, quantitative metric to measure temporal dependency in deep learning to answer these exact questions.

Quantifying Temporal Dependencies: EvoRate and EvoRate$_\mathcal{W}$

The authors propose measuring evolving patterns using Mutual Information (MI) between a window of historical data and the next future data point.

Standard neural estimators for MI often fail on sequential data because they ignore temporal dependencies, leading to biased estimates. EvoRate fixes this by training an autoregressive function to minimize the squared error between the compressed history and the future state. The better the model can compress and predict the next step, the higher the EvoRate.

EvoRate and EvoRate_W accurately track True Mutual Information across training steps.

However, in many real-world scenarios, we only have "snapshots" of data over time but no direct tracking of individuals (e.g., medical data from a group of 20-year-olds, and a different group of 21-year-olds). Because we lack "correspondence" (knowing who is who across time), standard MI math breaks down.

To solve this, the authors introduce EvoRate$_\mathcal{W}$. This variant uses Optimal Transport (specifically, the Wasserstein distance) to estimate the most likely joint distribution between the two timestamps. By effectively reconstructing the missing links, MI can be calculated even across disconnected snapshots.

Key Results and Practical Applications

The authors evaluated their metric across a wide variety of domains, including synthetic data, time-series forecasting (M4, Crypto, NBA trajectories), Evolving Domain Generalization (EDG), and video prediction (KITTI).

  • Accurate Order Selection: On synthetic data generated with a 5-step dependency, EvoRate correctly peaked at $k=5$. On the real-world M4-Weekly dataset, EvoRate showed that increasing the historical window from 90 to 270 steps barely increased predictability (+0.03 EvoRate) but tripled the compute cost, guiding a smarter trade-off.
  • Feature Selection and Sanity Checking: EvoRate successfully identifies redundant and noisy features. When useless features or noise are included in the sequence, the metric drops noticeably. Similarly, when the authors randomly shuffled frames in the KITTI video dataset, the EvoRate plummeted, confirming the metric accurately captures continuous temporal structure.
Increasing data corruption significantly drops the estimated Mutual Information, validating EvoRate's sensitivity to noise.
  • Algorithm Improvement: By taking the Optimal Transport loss developed for EvoRate$_\mathcal{W}$ and using it to train a transition model, the authors created a new algorithm for Evolving Domain Generalization tasks that achieved an 11.7% higher average accuracy than the second-best baseline.
  • Prediction Error is Bound by Data: The authors mathematically prove that the expected risk of an autoregressive model is split into two parts: the model's error, and the inherent randomness of the data. If the data has low Mutual Information across time, even a mathematically perfect model will fail to predict the future.

Limitations and Future Work

While EvoRate provides a powerful new tool for sequential data analysis, it does have limitations. To make EvoRate computationally efficient for high-dimensional data (like images), the data is first passed through an encoder to reduce its size. Due to the "data-processing inequality" in information theory, this compression means EvoRate slightly underestimates the true mutual information of the raw data.

Additionally, the authors explicitly note that they did not test EvoRate on Large Language Models (LLMs) or heavy Natural Language Processing tasks due to the massive computational resources and memory required. However, as compute capacity expands, applying EvoRate to LLMs to understand context-window dependencies and token predictability is a highly promising next step for the field.

Summary updated

BibTeX
@inproceedings{zeng2024towards,
  author = {Qiuhao Zeng and Long-Kai Huang and Qi Chen and Charles X. Ling and Boyu Wang},
  title = {{Towards Understanding Evolving Patterns in Sequential Data}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=I2gVmVRgNk},
}
Figure