Abstract
Clustering data streams is a significant challenge due to the continuous evolution and varying densities of incoming data. While hierarchical density-based algorithms offer high-quality results, their computational overhead—specifically the need to rebuild graph structures from scratch—often precludes real-time application. This paper introduces I-HASTREAM (Incremental HASTREAM), an algorithm that significantly speeds up the clustering process by employing incremental updates to the Minimal Spanning Tree (MST). By localizing changes and utilizing a movement threshold, I-HASTREAM achieves up to a 78% reduction in offline processing time while maintaining or improving clustering purity.
Introduction
In the context of data streams, clustering is a "moving target." Unlike static datasets, streams arrive continuously and evolve over time, requiring algorithms that can adapt to new patterns without exhaustive recalculation. The primary bottleneck in existing hierarchical density-based methods, such as the original HASTREAM, lies in the "offline" phase. To identify clusters, these methods build a complete Mutual Reachability Graph (MRG) of data summaries (microclusters) and extract a Minimal Spanning Tree (MST). Traditionally, every change in the stream—such as the birth of a new microcluster or the expiration of an old one—triggers a full reconstruction of these structures, making real-time response difficult for high-speed streams.
The I-HASTREAM Framework
I-HASTREAM addresses this bottleneck by treating the clustering model as an evolving graph rather than a static one. The framework follows a multi-stage pipeline: processing the evolving input stream, maintaining a Mutual Reachability Graph (MRG), updating the Minimal Spanning Tree (MST), generating a dendrogram, and finally extracting a "flat" clustering.
Instead of global recalculation, I-HASTREAM focuses on localization. It identifies only the microclusters directly affected by an insertion or deletion (denoted as $\Delta$ and its affected neighbors). This allows the algorithm to maintain the MST property with significantly less computational effort.
Incremental Graph Maintenance
The core innovation of I-HASTREAM lies in its handling of graph updates:
- Incremental Insertion: When new data arrives, the algorithm adds a vertex, creates a temporary cycle, and removes the heaviest edge in that cycle to restore the MST property in linear time.
- Incremental Deletion: If a microcluster is removed, the MST may split into disconnected components. I-HASTREAM uses a "supervertex" approach to reconnect these components efficiently using only necessary edges from the MRG.
- Movement Threshold ($MT$): To handle "drift" where microclusters shift slightly without disappearing, the authors implement a threshold. If a microcluster's movement is below this threshold, the graph is not updated, saving substantial CPU cycles.
Key Results and Insights
The researchers evaluated I-HASTREAM using the Network Intrusion (KDD Cup 99) and Physiological sensor datasets. The results demonstrated massive speedups, saving over 30% of total runtime on the high-dimensional Network Intrusion data and over 78% of the offline phase runtime on the Physiological dataset.
Interestingly, the incremental approach sometimes yielded higher purity than full recalculation. This "lazy" update property prevents the algorithm from over-reacting to noise or minor shifts, maintaining more stable cluster structures. Furthermore, the introduction of a "divergence" measure confirmed that the incremental MST remains structurally sound, with minimal error compared to a ground-truth MST built from scratch.
Conclusion
I-HASTREAM demonstrates that complex machine learning challenges can be addressed efficiently by applying classical graph theory to dynamic data. By replacing brute-force processing with localized, incremental maintenance, the algorithm provides the superior quality of hierarchical density-based clustering at a speed comparable to simpler, non-hierarchical methods. Future work will focus on auto-tuning the movement threshold and exploring scalability in even higher-dimensional spaces.
Summary updated