Discovery of Meaningful Rules in Time Series

Mohammad Shokoohi-Yekta, Yanping Chen, Bilson J. L. Campana, Bing Hu, Jesin Zakaria, Eamonn J. KeoghKDD 2015

TL;DR

This paper introduces a robust framework for discovering "meaningful" rules in real-valued time series—predicting that if pattern A occurs, pattern B will follow within a certain timeframe. By leveraging Minimum Description Length (MDL) as a scoring metric, the authors solve a long-standing problem in the field: the tendency of previous algorithms to find "spurious" rules in completely random data.

What Problem Does This Paper Address?

Most time series research focuses on forecasting—predicting the next numerical value in a stream (like a stock price). This paper focuses on rule-based prediction: identifying specific "trigger" shapes (antecedents) that reliably precede "event" shapes (consequents).

The major challenge in this sub-field has been "spuriousness." Previous state-of-the-art methods were notoriously unreliable; for instance, some reported 68% accuracy in predicting trends in "random walk" data (pure noise), which is mathematically impossible. These older methods failed because they relied on flawed quantization techniques or simple distance measures that didn't account for the complexity and "meaning" of the patterns. The authors set out to create a method that finds rules in real data but correctly finds nothing in noise.

Methods

The authors propose a rule representation as a 4-tuple: $\{R_a, R_c, maxlag, t\}$.

  • $R_a$ (Antecedent): The trigger pattern.
  • $R_c$ (Consequent): The predicted pattern.
  • $maxlag$: The maximum time allowed between the trigger and the event.
  • $t$: The distance threshold for matching the trigger.

The "secret sauce" is the MDL-based scoring function. Instead of just looking at how close two shapes are in Euclidean distance, the algorithm asks: "How many bits can I save by using this rule to compress the data?" If a rule truly represents a recurring structure in the data, it will allow for better compression than a generic model.

To make the search for these rules computationally feasible (since checking every possible subsequence is impossible), the authors use Time Series Motifs—the most frequently repeating patterns in a dataset—as the primary candidates for rules. They also implement a probabilistic early abandoning strategy, allowing the algorithm to stop searching once the likelihood of finding a better rule falls below a user-defined threshold.

Datasets

The researchers evaluated their framework on a diverse set of real-world and synthetic data:

  • Audio: MFCC-transcribed recordings of Edgar Allan Poe’s "The Raven."
  • Bioacoustics: Vocalizations of Zebra finches recorded over 60 days.
  • Energy Disaggregation: The AMPds dataset, tracking home appliance usage (e.g., Clothes Washer and Dryer).
  • Human Activity: Telemetry from IMU sensors worn by subjects performing daily tasks (e.g., drinking from a cup).
  • NASA Telemetry: Solenoid valve voltage measurements from shuttle tests.
  • Sanity Check: Pure random walk data (noise).

Key Insights and Ideas

  • The Random Walk Litmus Test: The most profound insight is that a rule-discovery algorithm is only valid if it fails to find rules in noise. By passing this "sanity check," the authors prove their MDL approach captures genuine underlying mechanisms rather than coincidental alignments.
  • Compression is Prediction: By framing rule discovery as a data compression problem, the authors provide a way to compare rules of different lengths and "lags" on a level playing field. A longer, slightly less accurate rule might be "better" (save more bits) than a very short, perfect one.
  • Motifs as Rule Seeds: The realization that good rules are almost always derived from time series motifs (highly conserved patterns) allows the algorithm to prune the search space drastically without losing accuracy.
  • Handling "Concept Drift": The experiments with bird songs showed that rules discovered on "Day 40" of a bird's life still worked on "Day 100," even as the bird's song evolved, proving the robustness of the shape-based approach.

Key Results

  • Accuracy: On the Zebra finch data, the algorithm achieved a $Q$-score (a ratio of rule error to random error) as low as 0.19, where values significantly less than 1.0 indicate high-quality structure discovery.
  • Real-world Utility: In the energy dataset, the algorithm automatically discovered a "Washer $\to$ Dryer" rule with a 20-minute $maxlag$, reflecting actual human behavior. In the activity dataset, it correctly identified the "lifting cup $\to$ tilting head" sequence.
  • Speed: By using motif-based pruning and early abandoning, the algorithm is highly efficient. For example, it processed months of insect EPG data in just a few minutes.
  • Reliability: Unlike previous methods, the proposed algorithm found zero rules in random walk data, confirming it does not overfit to noise.

Limitations and Future Work

The authors acknowledge that while Euclidean distance is fast and effective, it might be too rigid for some applications. They suggest that Dynamic Time Warping (DTW) could be more robust for "concept drift" but note it is computationally more expensive.

Additionally, the current framework focuses on simple $A \to B$ rules. The authors suggest that future work could involve more complex logical connectives, such as "If $A$ AND $B$ occur, then $C$ will follow," though they warn this would require significantly more training data to avoid overfitting. Finally, creating standardized benchmarks for time series rule discovery remains an open challenge for the community.

Summary updated

BibTeX
@inproceedings{shokoohiyekta2015discovery,
  author = {Mohammad Shokoohi-Yekta and Yanping Chen and Bilson J. L. Campana and Bing Hu and Jesin Zakaria and Eamonn J. Keogh},
  title = {{Discovery of Meaningful Rules in Time Series}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2015},
  doi = {10.1145/2783258.2783306},
}
Figure