Abstract
Affinity Propagation (AP) is a robust clustering algorithm that identifies exemplars within a dataset without requiring a predefined number of clusters. However, its $O(N^2)$ computational complexity limits its applicability to large-scale datasets and real-time streams. This paper presents Weighted Affinity Propagation (WAP), an extension that incorporates data point weights into the message-passing framework. By leveraging WAP, we propose distributed and incremental architectures that significantly reduce computational overhead while maintaining high clustering quality.
1. Introduction
Affinity Propagation (AP) has emerged as a powerful alternative to K-means, particularly in domains where calculating a geometric mean is impractical (e.g., molecular sets). By identifying "exemplars"—actual data points that represent their respective clusters—AP preserves the integrity of the data space. Despite its advantages, the quadratic complexity of AP relative to the number of items ($N$) renders it unsuitable for "Big Data" applications. To address this, we introduce Weighted Affinity Propagation (WAP), which enables the merging of similar items into weighted representatives, facilitating both parallel processing and online learning.
2. Methodology
The core innovation of this work is the modification of the AP energy function to account for $n_i$, the weight or count of a specific item. This allows the algorithm to treat a single representative as a summary of multiple data points, effectively treating exemplars as sufficient statistics.
2.1 Distributed Affinity Propagation
In the distributed setting, the dataset is partitioned into $\sqrt{N}$ subsets. Each subset is clustered independently to identify "primary exemplars." These exemplars are then assigned weights based on the number of points they represent. Finally, WAP is applied to these weighted exemplars to derive a global clustering model. This prevents the second stage from treating a representative of 1,000 points as equal to a representative of 10.
2.2 Streaming Affinity Propagation (STRAP)
For real-time data streams, we introduce STRAP. This algorithm processes data in chunks and utilizes a reservoir for items that do not fit the current model. A Page-Hinkley change-point test is employed to detect shifts in the data distribution. When a drift is detected or the reservoir reaches capacity, WAP is triggered to rebuild the model using existing exemplars and reservoir items.
3. Experimental Evaluation
The proposed methods were validated using 13 benchmark datasets (images, video, text) and a large-scale real-world dataset from the EGEE Grid System, containing 237,087 job logs. The EGEE dataset is particularly challenging due to a high volume of duplicate entries (approx. 30%).
3.1 Key Results
- Efficiency: On large benchmarks, Distributed WAP achieved significant speedups (e.g., reducing execution time from 128 seconds to 3 seconds) with minimal impact on distortion.
- Scalability: The approach outperformed standard AP and K-centers on the EGEE dataset, scaling the computational complexity down to approximately one-third of the distortion cost of traditional methods.
- Streaming Performance: STRAP demonstrated superior speed compared to the distributed version (7 minutes vs. 10 minutes) and successfully adapted to data outliers by dynamically adjusting the number of exemplars as the stream complexity changed.
4. Discussion and Future Work
While WAP-based methods introduce a slight "distortion loss" compared to batch processing, this is a necessary trade-off for the massive gains in speed and scalability. Current limitations include a reliance on Euclidean assumptions for certain model rebuild steps in STRAP, which may affect performance in non-Euclidean spaces. Future research will explore extending these techniques to Soft-Constraint AP (SCAP) to better accommodate irregularly shaped clusters.
Summary updated