Efficient Parameter-free Clustering Using First Neighbor Relations

M. Saquib Sarfraz, Vivek Sharma, Rainer Stiefelhagen

Introduction

Clustering is a foundational task in data science, yet it faces a persistent "Goldilocks" problem: most algorithms require precise hyper-parameter settings to function correctly. K-means requires the number of clusters ($k$), DBSCAN needs a distance radius ($\epsilon$), and Spectral clustering demands a specific similarity graph construction. These parameters are often subjective, requiring expert knowledge or exhaustive trial-and-error. If the underlying data distribution changes, these settings often fail.

This paper introduces FINCH (First Neighbor Clustering Hierarchy), a clustering algorithm that requires zero hyper-parameters. By utilizing only the most basic local information—the "first neighbor" of every data point—FINCH discovers natural groupings and scales to massive datasets significantly faster than traditional methods.

Methodology

The core of FINCH is a simple yet powerful "clustering equation." The authors posit that the first neighbor of a point is a sufficient statistic to discover the chains that form clusters.

For any two points $i$ and $j$, FINCH creates a link ($A(i,j)=1$) if any of these three conditions are met:

  1. $j$ is the first neighbor of $i$.
  2. $i$ is the first neighbor of $j$ (symmetry).
  3. $i$ and $j$ both share the same first neighbor.
Figure 1: (a) Example data points (planets) and their first neighbors. (b) The resulting adjacency matrix based on the three linking rules. (c) The discovered graph structure showing natural clusters.

2. The Hierarchy

Once links are established, the algorithm identifies connected components to form the first level of the hierarchy. To find subsequent levels, the algorithm calculates the mean vector for each discovered cluster and treats these means as new data points, repeating the first-neighbor linking process. This recursion continues until only one cluster remains. Because it merges groups rapidly, the algorithm typically converges in 4–10 steps, even for millions of points.

Experimental Evaluation

The authors evaluated FINCH across diverse domains, including biological data (Mice Protein), text (REUTERS), computer vision (MNIST, STL-10), and video (face identification).

Performance and Accuracy

On the MNIST-70k dataset, FINCH achieved a Normalized Mutual Information (NMI) of 98.84, significantly outperforming K-means (81.02) and complex methods like RCC (86.59). Visual evaluations on 2D datasets demonstrate FINCH's ability to recover complex, non-convex structures that traditional methods like K-means or Spectral clustering often fail to capture correctly.

Figure 5: Visual comparison of clustering algorithms on complex 2D datasets. FINCH consistently achieves higher accuracy (98% and 85%) compared to standard baselines.

Key Insights

  • The Power of the First Neighbor: The most striking insight is that a full "top-K" neighbor list is unnecessary. The very first neighbor is sufficient to initiate the chaining behavior required to recover global structure.
  • Computational Efficiency: By utilizing fast approximate nearest neighbor searches, FINCH achieves a complexity of $O(N \log N)$. It successfully clustered 8.1 million samples in under 20 minutes on a standard workstation—a task that exceeds the memory or time limits of most other algorithms.
  • Deep Learning Synergy: FINCH can generate high-quality "pseudo-labels" for unsupervised deep learning. Using FINCH clusters to train a neural network yielded 95.24% accuracy on STL-10, outperforming many specialized deep clustering methods.

Conclusion

FINCH represents a significant step forward in making clustering more accessible and scalable. By removing the need for hyper-parameter tuning, it provides a robust, "plug-and-play" solution for discovering structure in massive, high-dimensional datasets. While it currently cannot discover single-sample clusters and relies on the quality of initial features, its empirical performance and speed make it a powerful tool for modern data science.

Summary updated

BibTeX
@inproceedings{sarfraz2019efficient,
  author = {M. Saquib Sarfraz and Vivek Sharma and Rainer Stiefelhagen},
  title = {{Efficient Parameter-free Clustering Using First Neighbor Relations}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2019},
  doi = {10.1109/cvpr.2019.00914},
}
Figure