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

Quickshift++: Provably Good Initializations for Sample-Based Mean Shift

Heinrich Jiang, Jennifer Jang, Samory Kpotufe

Introduction

Mode-seeking clustering algorithms, such as Mean Shift and Quick Shift, are foundational tools in computer vision and data science. They operate via "hill-climbing," iteratively moving data points toward local peaks (modes) in the underlying density of the dataset. However, these methods suffer from a significant practical flaw: over-segmentation. Because they seek single-point peaks, even minor fluctuations or noise in the data can create spurious modes, causing a single natural cluster to fracture into many tiny pieces.

To mitigate this, practitioners often over-smooth their density estimates, which risks blurring the actual structure of the data. Furthermore, these algorithms have historically lacked rigorous theoretical guarantees regarding their statistical consistency. Quickshift++ is an evolution of the Quick Shift algorithm that replaces unstable "point-modes" with robust "cluster-cores"—locally high-density regions of arbitrary shape. This shift provides the first statistical consistency guarantees for sample-based mean shift while significantly reducing over-segmentation in noisy datasets.

The Quickshift++ Approach

Quickshift++ addresses the fragility of point-based modes by operating in two main phases:

  1. Identifying Cluster-Cores: Instead of searching for a single peak point, the algorithm identifies "cluster-cores." These are connected regions where the density remains within a certain percentage (defined by a multiplicative parameter $\beta$) of the local maximum. This identification uses a modified version of the MCores algorithm, relying on a mutual $k$-nearest neighbor ($k$-NN) graph to estimate density.
  2. Hill-Climbing to Cores: For every point not already residing in a core, the algorithm performs a sample-based hill-climbing step, similar to the original Quick Shift. It moves each point to its nearest neighbor that possesses a higher empirical density. Crucially, this process terminates as soon as the path reaches a pre-identified cluster-core.
By defining clusters based on "attraction regions" of cores rather than single points, Quickshift++ becomes resilient to small density fluctuations.

By stopping at a "core" rather than a single "point," the algorithm naturally absorbs the small density fluctuations that typically cause over-segmentation. Furthermore, because Quickshift++ uses a multiplicative parameter $\beta$, it is scale-invariant. It can simultaneously identify clusters that exist at very high and very low densities within the same dataset—a scenario where algorithms like DBSCAN typically fail.

Experimental Results

The authors evaluated Quickshift++ across a diverse range of benchmarks, including toy datasets, real-world UCI/Statlog datasets, and complex image segmentation tasks.

Comparison of clustering algorithms on toy datasets. Quickshift++ successfully handles complex shapes and varying densities without over-segmenting.
  • Superior Accuracy: In comparisons across 9 real-world datasets (such as Seeds, Phonemes, Iris, and MNIST subsets), Quickshift++ consistently achieved the highest or second-highest scores in Adjusted Rand Index (ARI) and Adjusted Mutual Information (AMI) compared to K-Means, DBSCAN, Mean Shift, and the original Quick Shift.
  • Density Adaptivity: On toy tasks featuring clusters with varying peak densities, Quickshift++ successfully recovered all clusters, whereas DBSCAN failed due to its reliance on a global density threshold.
  • Image Segmentation: Qualitatively, Quickshift++ produced much cleaner segments in complex images. For instance, it correctly grouped homogeneous backgrounds as single segments while preserving intricate foreground details, whereas standard Quick Shift either over-segmented the background or blurred the subject.

A standout feature of Quickshift++ is its hyperparameter robustness. While most clustering algorithms are highly sensitive to their parameters, Quickshift++ maintains high performance across a wide range of $k$ values relative to the dataset size.

Limitations and Future Work

Despite its advantages, Quickshift++ has a few limitations. While the $k$-NN density estimation is efficient, the worst-case time to find the nearest higher-density neighbor for every point is $O(n^2)$ without specialized data structures. Although practical runtimes are often closer to $O(nk)$, further work is needed on high-dimensional indexing.

Additionally, while theoretical guarantees apply to points within "attraction regions," points lying exactly on "saddle points" (ridges between clusters) may still be difficult to assign deterministically. Finally, although more robust than its peers, the algorithm still requires choosing $k$ and $\beta$, presenting an opportunity for future research into automated parameter selection based on local data geometry.

Summary updated

BibTeX
@inproceedings{jiang2018quickshift,
  author = {Heinrich Jiang and Jennifer Jang and Samory Kpotufe},
  title = {{Quickshift++: Provably Good Initializations for Sample-Based Mean Shift}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
  url = {https://openreview.net/forum?id=S14yOsbuWS},
}
Figure