NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Mining Sequential Patterns of Event Streams in a Smart Home Application

Marwan Hassani, Christian Beecks, Daniel Töws, Thomas Seidl

Abstract

As smart homes evolve, they generate continuous streams of data from various appliances. Extracting meaningful sequential patterns from these streams is vital for energy management and activity recognition. However, traditional batch-based mining algorithms often suffer from the "boundary problem" and "premature pruning," leading to lost patterns. This paper presents StrPMiner, a real-time, incremental algorithm that processes events item-by-item. By utilizing a specialized tree structure and a pattern builder (PBuilder), StrPMiner achieves a 30% increase in accuracy over existing batch-based approaches while maintaining perfect recall for the most frequent patterns.

Introduction: The Limitations of Batch Processing

In a smart home environment, sensors record a "firehose" of events, such as a toaster turning on or a television turning off. Sequential pattern mining aims to identify sequences of these events that occur frequently in a specific order (e.g., "Alarm rings" followed by "Coffee maker starts").

Interleaved event streams from multiple smart home appliances representing typical daily activities.

Most current algorithms utilize a batch approach, processing data in discrete chunks. This methodology introduces two critical flaws:

  1. The Boundary Problem: Patterns that span across the end of one batch and the start of the next are often missed.
  2. Premature Pruning: Infrequent items within a single small batch may be discarded before they can demonstrate their long-term significance across the entire stream.

Methodology: The StrPMiner Framework

To address these issues, the researchers developed StrPMiner, which moves away from batching in favor of an incremental, real-time approach. The framework consists of two primary components:

PBuilder (Pattern Builder)

PBuilder serves as the core engine, processing every new event as it arrives. Instead of waiting for a batch to fill, it recursively appends the new item as a "postfix" to existing sequences. This allows the system to build candidate patterns incrementally without losing context at artificial boundaries.

StrPMiner and the $T_0$ Tree

StrPMiner manages multiple data streams, compressing incoming events into labels and timestamps. These are fed into PBuilder, and the resulting patterns are stored in a specialized tree structure known as a $T_0$ tree.

The $T_0$ tree structure used to store and update sequential patterns as new items and timestamps arrive in the stream.

To maintain computational efficiency, the system implements a Maximum Pattern Length constraint, preventing an exponential explosion of sequences by limiting the search to the most recent $N$ items. Additionally, the system supports various window models—Landmark, Sliding, and Damped—to cater to different analytical needs.

Experimental Evaluation

The algorithm was evaluated using the REDD (Reference Energy Disaggregation Data set), which contains high-frequency power consumption data from real households. Raw power readings were preprocessed into discrete event streams (e.g., oven + for power on, oven - for power off).

StrPMiner was compared against SS-BE, a state-of-the-art batch-based algorithm. The results demonstrated:

  • 30% Accuracy Improvement: StrPMiner consistently outperformed SS-BE across various time steps.
  • Perfect Recall: For the "Top 100" most frequent patterns, StrPMiner achieved 100% accuracy, whereas SS-BE struggled with event ordering.
  • Robustness to Noise: In environments with many overlapping events, StrPMiner maintained high performance while batch-based methods saw significant drops due to aggressive pruning.

Conclusion and Future Work

StrPMiner demonstrates that a batch-free, incremental approach is essential for accurate sequential pattern mining in dynamic smart home environments. While the item-by-item processing introduces some computational overhead, the gains in accuracy and recall are substantial. Future research will focus on optimizing the $T_0$ tree structure for faster insertions and exploring distributed processing to handle even larger sensor networks.

Summary updated

BibTeX
@inproceedings{hassani2015mining,
  author = {Marwan Hassani and Christian Beecks and Daniel Töws and Thomas Seidl},
  title = {{Mining Sequential Patterns of Event Streams in a Smart Home Application}},
  booktitle = {LWA},
  year = {2015},
}
Figure