Abstract
This paper addresses the online clustering problem. When faced with high frequency streams of data, clustering raises theoretical and algorithmic pitfalls. Working under a sparsity assumption, a new online clustering algorithm is introduced. Our procedure relies on the PAC-Bayesian approach, allowing for a dynamic (i.e., time-dependent) estimation of the number of clusters. Its theoretical merits are supported by sparsity regret bounds, and an RJMCMC-flavored implementation called PACO is proposed along with numerical experiments to assess its potential.
Introduction
Clustering is a cornerstone of unsupervised learning, yet traditional methods often falter when applied to online data streams. In a streaming context, data arrives sequentially, and the underlying structure is rarely static: new clusters may emerge, and existing ones may vanish. Most standard approaches, such as $k$-means, suffer from two primary limitations: they typically require a pre-specified number of clusters ($K$) and involve significant computational overhead, often requiring batch re-processing that is unsuitable for high-frequency data.
This research introduces PACBO, a novel adaptive algorithm designed to perform clustering in a "sequential game" format. The objective is to minimize regret—the difference between the algorithm's cumulative performance and the best possible clustering strategy chosen in hindsight. By leveraging a quasi-Bayesian framework, PACBO dynamically estimates the number of clusters while maintaining computational efficiency and theoretical optimality.
The Quasi-Bayesian Approach
Unlike traditional Bayesian inference, which relies on a likelihood function (a specific model for data generation), the proposed quasi-Bayesian (or PAC-Bayesian) approach requires only a loss function. This shift makes the method significantly more robust to misspecified models where data may not follow a perfect Gaussian distribution.
Key Components of PACBO
- Gibbs Quasi-Posterior: The algorithm maintains a distribution over possible clusterings, favoring those with low cumulative loss on past data while remaining close to a prior distribution to prevent overfitting.
- Adaptive Learning Rate ($\lambda_t$): To handle streams where the time horizon ($T$) is unknown, the algorithm employs an adaptive "inverse temperature" parameter. This parameter cools over time, effectively balancing exploration of the cluster space with exploitation of known structures.
- Reversible Jump MCMC (RJMCMC): To navigate the complex, high-dimensional space of potential partitions, the authors utilize RJMCMC. This allows for "transdimensional moves," enabling the algorithm to jump between models with different numbers of clusters (e.g., transitioning from $K=3$ to $K=4$) in a single step.
- The Doubling Trick: To remain adaptive to the scale of incoming data when the range is unknown, the authors implement a doubling trick for the search space radius.
Theoretical Merits
The authors provide a rigorous theoretical foundation for PACBO, proving that its regret grows at a rate of $O(\sqrt{T \log T})$. This rate is demonstrated to be asymptotically minimax optimal, meaning no algorithm can achieve significantly better performance in this sequential clustering setting.
Experimental Evaluation
The performance of PACBO was evaluated against seven popular batch clustering methods (including Calinski-Harabasz, Silhouette, and Gap Statistic) across five synthetic data models ranging from 1D to 50D, including heavy-tailed distributions and dynamic settings.
Key Results
- Dynamic Accuracy: In a setting where 10 groups appeared sequentially over 200 time steps, PACBO correctly identified the true number of clusters in approximately 120 out of 200 observations. Its closest competitor, the Silhouette method, managed only 72.
- Computational Efficiency: PACBO is designed for high-frequency streams. By updating its state incrementally rather than re-clustering the entire history, it completed a 200-step simulation in roughly 28 seconds, compared to over 207 seconds for the Gap Statistic.
- Robustness: The algorithm successfully handled heavy-tailed Lognormal distributions where many traditional methods failed, and it correctly identified single-cluster settings ($K=1$) in 70% of runs, a common failure point for other metrics.
Conclusion and Future Work
PACBO represents a significant step forward in online unsupervised learning, providing a theoretically grounded and computationally viable solution for dynamic clustering. While the algorithm demonstrates strong empirical performance, future research may focus on establishing explicit convergence rates for the MCMC process and testing the framework on massive, real-world high-frequency datasets such as financial ticks or sensor networks.
For practitioners, the authors have released the algorithm as an R package called PACBO, available on CRAN.
Summary updated