Introduction
In the domain of data stream mining—encompassing sensor readings, stock tickers, and web logs—identifying recurring sequences of events is a fundamental task. Traditional sequential pattern mining often suffers from two significant limitations. First, it typically employs "binary thinking," recording only the presence or absence of a pattern within a transaction rather than its frequency. In many critical applications, such as power grid monitoring, the exact number of occurrences within a specific window is vital for accurate analysis. Second, most existing systems utilize a "batch" approach, re-processing the entire data window from scratch as it slides forward. This is computationally prohibitive for high-speed streams.
This paper introduces IncSeq, a novel framework designed for the incremental mining of frequent serial episodes while accounting for multiple occurrences. By maintaining and updating a specialized tree structure, IncSeq avoids redundant calculations, achieving significant performance gains over traditional methods.
The IncSeq Framework
The core of the IncSeq algorithm is the Prefix Sequential Pattern (PSP) tree. This memory-efficient structure represents patterns through two distinct types of links:
- Sequentiality (S): Representing one itemset following another in time.
- Composition (C): Representing items occurring simultaneously within the same itemset.
Incremental Update Process
When new data arrives and the sliding window moves, IncSeq updates the PSP tree through a four-step process:
- Deletion: Occurrences that have slid out of the current window are removed from the tree.
- Merging: The new incoming itemset is integrated into the existing tree structure.
- Completion: If a previously infrequent pattern becomes frequent due to new data, the algorithm scans the current window to recover its historical occurrences.
- Pruning: To maintain efficiency, patterns that fall below a user-defined frequency threshold ($\sigma$) are removed.
A key feature of IncSeq is its handling of "quasi-frequent" patterns—those just below the threshold. By retaining these in the tree, the algorithm can quickly promote them to "frequent" status without a full re-discovery phase, significantly saving processing time.
Experimental Evaluation
The authors evaluated IncSeq using both synthetic and real-world datasets. Synthetic data was generated to test the algorithm's limits, while real-world data consisted of 18,000 smart electrical meter readings. These readings were discretized using the SAX algorithm to identify consumption profiles for various households and businesses.
Key Results
- Performance: IncSeq demonstrated a 10x to 20x speedup compared to traditional batch processing methods (e.g., PrefixSpan). This performance gap widened as window sizes increased or support thresholds decreased.
- Scalability and Efficiency: Despite the complexity of the PSP tree, IncSeq maintained memory usage comparable to batch methods while offering vastly superior processing speeds.
- Practical Utility: On smart meter data, the algorithm effectively distinguished between different user types (e.g., industrial vs. residential) based on the complexity and depth of their identified consumption patterns.
Conclusion
IncSeq addresses the inefficiencies of batch-based sequential mining by providing a robust, incremental approach that considers multiple pattern occurrences. While performance can vary based on data variability—with repetitive industrial data leading to deeper trees—the framework's use of anti-monotonicity and quasi-frequent pattern tracking ensures high efficiency. Future work will explore condensed representations like "closed" or "maximal" patterns and the application of these techniques to complex graph-based data.
Summary updated