TL;DR
This paper introduces a novel method, PEACE, for automatically determining the optimal threshold in agglomerative clustering, a long-standing challenge. By leveraging Extreme Value Theory (EVT) and the unique properties of deep features, PEACE significantly improves clustering performance across various challenging datasets, often outperforming state-of-the-art methods.
What Problem Does This Paper Address?
Clustering algorithms, particularly agglomerative hierarchical clustering (AHC), are powerful tools for grouping data. However, a critical hurdle has always been the need to manually specify parameters, such as the number of clusters or a distance threshold, to achieve optimal results. This manual tuning is time-consuming, subjective, and often requires domain expertise. While some algorithms like FINCH claim to be parameter-free, they still require users to select the best partition from multiple outputs, which is itself a form of parameter selection. The authors aim to bridge this gap by developing a theoretically grounded, fully automatic method for threshold selection that works well with modern deep features.
Methods
The core of the paper lies in the Extreme-Linkage Theorem, which posits that the distribution of nearest-neighbor distances (and thus, potential cluster linkages) in deep feature spaces follows a Weibull distribution. This theoretical insight is then translated into a practical algorithm called PEACE (Provable Extreme-value Agglomerative Clustering-threshold Estimation).
PEACE works by:
- Extracting Deep Features: Using pre-trained deep learning models to obtain rich feature representations of the data.
- Computing Approximate Nearest Neighbors (ANNs): Efficiently finding nearest neighbors to reduce computational complexity.
- Fitting a Weibull Distribution: Analyzing the distribution of ANN distances to estimate the parameters of a Weibull distribution.
- Determining the Threshold (τw): Using the fitted Weibull distribution and a desired confidence level (e.g., 99%) to calculate an optimal merge distance threshold.
- Robust Threshold Estimation (τr): To handle outliers, a robust version of the threshold is computed by considering the ratio of the median to the maximum distance of all pairwise distances.
- Agglomerative Clustering: Applying the computed threshold to guide the merging process in an agglomerative clustering framework.
When applied to classical AHC, the method is named PEACH, and when combined with the FINCH algorithm, it's called PET-FINCH.
Datasets
The authors evaluated their methods on a diverse set of datasets, including:
- Large-scale face datasets: IARPA Janus Benchmark B (IJB-B) and Labeled Faces in the Wild (LFW).
- ImageNet: Used for in-domain, out-of-domain, and mixed-distribution clustering tasks.
- Handwritten digits (MNIST): For deep clustering experiments.
They also introduced a novel clustering evaluation protocol using ImageNet to model more realistic scenarios with in-, out-, and mixed-distribution samples, reflecting situations where users don't know the number or types of clusters beforehand.
Key Insights and Ideas
- The "Unreasonable Clusterability" of Deep Features: The paper hypothesizes that deep features, due to their training on semantic tasks, create spaces where clustering is surprisingly easy and consistent, supporting automatic threshold selection.
- Weibull Distribution as a Universal Linkage Model: The theoretical proof that nearest-neighbor linkages in deep feature spaces follow a Weibull distribution is a significant theoretical contribution, providing a principled way to set clustering thresholds.
- Robustness to Outliers: The introduction of a robust threshold estimation method (τr) demonstrates an understanding of real-world data challenges and enhances the algorithm's practical applicability.
- Automatic Threshold Selection is Key: The core insight is that a well-chosen threshold, derived from theory and data properties, can unlock the full potential of agglomerative clustering without manual intervention.
Key Results
- State-of-the-Art Performance: PEACH consistently outperformed existing methods, including parameter-dependent algorithms (when given ground-truth parameters) and state-of-the-art parameter-free algorithms like FINCH, across various datasets and metrics (NMI, B³ F-score, ARI).
- Significant Improvements on Face Clustering: On the IJB-B dataset, PEACH achieved the best NMI and B³ performance compared to all other algorithms.
- Effective Out-of-Domain Clustering: PEACH demonstrated strong performance on out-of-domain tasks, such as clustering faces using features trained on ImageNet.
- Robustness to Threshold Variations: Ablation studies showed that PEACH's performance is stable even with moderate perturbations of the automatically determined threshold.
- Efficiency: While not the fastest, PEACH offers a good balance of performance and computational cost, with its overall complexity being O(N log N).
Limitations and Future Work
- Not Truly Parameter-Free: The authors acknowledge that PEACE is not entirely parameter-free, as fitting the Weibull distribution requires choices for data trimming, tail-size, and confidence levels. However, they argue these parameters are more intuitive and have better defaults than traditional clustering parameters.
- EVT Assumptions: The proof of the Extreme-Linkage Theorem relies on asymptotic assumptions of the Fisher-Tippet Theorem, which might not hold in all spaces, particularly those with measure-zero sets. The paper also notes that a second EVT theorem exists, leading to Generalized Pareto Distributions, and suggests exploring which EVT model is better for threshold selection in future work.
- Limited to Deep Features: The theoretical underpinnings and empirical success are largely demonstrated with deep features. The paper acknowledges that the assumptions may not hold for raw or hand-crafted features.
- Future Work: The authors encourage further exploration of different EVT models and testing PEACE on a wider range of vision problems. They also invite researchers to try their code and compare it with existing methods.
Summary updated