ONCE and ONCE+: Counting the Frequency of Time-constrained Serial Episodes in a Streaming Sequence

Hui Li, Sizhe Peng, Jian Li, Jingjing Li, Jiangtao Cui, Jianfeng MaarXiv 2018

Abstract

Sequential pattern mining in high-velocity data streams requires algorithms that can operate in a single pass while adhering to strict temporal constraints. This paper presents ONCE and ONCE+, two algorithms that leverage a novel hierarchical data structure, the Occurrence Map (OccMap), to achieve these goals. By maintaining a "Minimum Monotonicity" property and utilizing greedy validation strategies, ONCE and ONCE+ provide accurate frequency counts for non-overlapped and distinct episodes. Evaluation on real-world telecom data and synthetic benchmarks shows that these algorithms achieve throughputs in the millions of events per second, outperforming existing baselines by nearly an order of magnitude with a negligible memory footprint.

Introduction

Identifying ordered sequences of events, such as "Event A followed by B followed by C," is a cornerstone of modern data analysis in fields like telecommunications, finance, and cybersecurity. In these contexts, patterns are often time-sensitive; a sequence is only meaningful if it completes within a specific duration $\tau$. Processing such patterns in a streaming environment introduces significant complexity. Traditional multi-pass algorithms are infeasible, and existing single-pass methods based on Finite State Automata (FSA) struggle with overlapping occurrences and the correct application of time windows.

The Challenges of Streaming and Time Constraints

The primary difficulty lies in tracking multiple potential starts for the same pattern. When a new event arrives, it might be the start of a new occurrence, the middle of another, or the end of a third. Standard automata-based miners often fail to efficiently manage these overlapping states, leading to either excessive memory consumption or incorrect results when a "timer" is naively added to the state machine. This failure is particularly evident when patterns involve repeated events or high-frequency signals.

Methodology: The OccMap Innovation

To address these challenges, the authors introduce the OccMap (Occurrence Map). The OccMap consists of $k$ hierarchical lists, where $k$ is the length of the target episode.

  • List Update and Minimum Monotonicity: When an event arrives, its timestamp is only added to the $i$-th layer if the $(i-1)$-th layer contains at least one valid timestamp. This ensures that every entry in a higher layer has at least one potential predecessor, a property termed "Minimum Monotonicity."
  • Self-Pruning: The OccMap is inherently memory-efficient. Timestamps that are older than the current time minus the window $\tau$ are automatically pruned, as they can no longer contribute to a valid occurrence. This keeps the memory footprint exceptionally low, typically under 20 KB even for complex patterns.
A step-by-step progression of the algorithm tracking multiple episodes (M1-M4) across different states as events arrive.

Algorithm Variants

  1. ONCE (Non-overlapped Frequency): This algorithm counts occurrences that do not intersect in time. It employs a greedy bottom-up traversal of the OccMap to identify the "latest minimum occurrence." By selecting the latest possible start time for a given end time, ONCE maximizes the probability of satisfying the time constraint $\tau = t_{end} - t_{start}$.
  2. ONCE+ (Distinct Frequency): This variant counts occurrences that do not share any specific event. It uses a top-down traversal logic to manage event sharing across potential matches.

Experimental Evaluation

The performance of ONCE and ONCE+ was evaluated using a real-world dataset of 8.8 million telecom alarms from a service provider in Guizhou, China, and various synthetic datasets.

  • Extreme Throughput: The algorithms process events in less than 1 microsecond, enabling throughputs of millions of events per second. This is nearly an order of magnitude faster than the SASE++ baseline.
  • Scalability and Stability: The system demonstrates near-linear scalability with respect to input length and maintains stable performance even as pattern selectivity (the frequency of matches) increases.
  • Practical Impact: The algorithms were successfully integrated into a live telecom management system, where they processed over 250,000 daily alarms with sub-millisecond latency.

Conclusion

ONCE and ONCE+ represent a significant advancement in streaming sequential pattern mining. By replacing complex automata with the efficient OccMap structure, the authors have created a solution that is both faster and more memory-efficient than previous state-of-the-art methods. Future research will focus on extending these techniques to handle multi-dimensional signals and high-dimensional data streams where events may have additional attributes like location or severity.

Summary updated

BibTeX
@misc{li2018once,
  author = {Hui Li and Sizhe Peng and Jian Li and Jingjing Li and Jiangtao Cui and Jianfeng Ma},
  title = {{ONCE and ONCE+: Counting the Frequency of Time-constrained Serial Episodes in a Streaming Sequence}},
  year = {2018},
  eprint = {1801.09639},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1801.09639},
}
Figure