A parameter-free affinity based clustering

Bhaskar Mukhoty, Ruchir Gupta, K. Lakshmanan, Mayank Kumar

Introduction

Clustering is a fundamental task in unsupervised learning, yet most established algorithms remain "parameter-heavy." For example, k-means requires a predefined number of clusters ($k$), while DBSCAN depends on a carefully tuned neighborhood radius ($\epsilon$) and minimum point density. In practice, researchers often iterate through dozens of parameter combinations, relying on internal evaluation indices like the Silhouette score to guess the optimal configuration—a process that is computationally expensive and often unreliable for high-dimensional or noisy data.

This paper introduces a novel, parameter-free clustering algorithm designed to mimic human cognition. By identifying "naturally" close groups through an automated affinity threshold and a specialized merging process, the method eliminates the need for manual tuning and achieves significantly higher accuracy in predicting cluster counts across diverse datasets.

Methodology

The proposed algorithm operates in three distinct stages to achieve its data-adaptive nature:

  1. Affinity Mapping: After normalizing the data using z-scores, the algorithm calculates a distance matrix and transforms these distances into "affinity" scores via a Gaussian function. The "spread" ($\sigma$) of this function is derived automatically from the standard deviation of the dataset's distances, ensuring the scale is appropriate for the specific data distribution.
  2. Automated Thresholding: The algorithm generates a 10-bin histogram of all affinity scores. It identifies an "elbow point" where the frequency of high-affinity pairs suddenly increases. This point serves as the threshold: any two points with affinity above this value are considered part of the same natural grouping.
Affinity score distribution used for automated thresholding.
  1. Initial Clustering & Merging:
    • findClusters: A sequential search groups points based on the threshold, flagging outliers that do not fit into any group.
  2. mergeClusters: To prevent over-segmentation, the algorithm employs a modified "Sum of Squares Within" (SSW) cost function. Unlike standard SSW, which monotonically increases as clusters are reduced, this version can decrease when merging "favorable" clusters, allowing the algorithm to converge on a natural number of groups.

Evaluation and Key Results

The authors evaluated the method on 27 datasets, including real-world benchmarks (Iris, Thyroid, Breast Cancer) and synthetic series (S-series and Dim-series) designed to test scaling and high dimensionality.

The algorithm's ability to predict the "ground truth" number of clusters was its most significant achievement. It correctly identified the number of clusters in 77.7% of the datasets (21 out of 27), whereas traditional indices like the Silhouette and Davies-Bouldin indices only achieved 26.9% accuracy.

Clustering results on S2 and R15 datasets before and after the merging phase.

Furthermore, the method demonstrated robust noise handling. In datasets containing 10% random noise (e.g., d8c8N), the algorithm successfully identified outliers without allowing them to distort the centroids of the actual clusters. It also remained stable as dimensionality increased to 1024, avoiding the common pitfalls of the "curse of dimensionality" that affect many density-based methods.

Discussion and Conclusion

The core innovation of this work lies in its human-centric logic: rather than asking which $k$ looks best, the algorithm asks what qualifies as "close" based on the specific distribution of the data. By prioritizing large clusters during the merging phase, it effectively ignores small, noisy groupings that often mislead other algorithms.

While highly effective for convex (spherical or elliptical) clusters, the authors acknowledge that the current reliance on centroid distances may limit performance on complex, non-convex shapes like interlocking spirals. Future work will focus on adapting this logic for shape-based datasets and reducing the $O(n^2)$ computational complexity to better accommodate large-scale "Big Data" applications.

Summary updated

BibTeX
@misc{mukhoty2015parameter,
  author = {Bhaskar Mukhoty and Ruchir Gupta and K. Lakshmanan and Mayank Kumar},
  title = {{A parameter-free affinity based clustering}},
  year = {2015},
  eprint = {1507.05409},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1507.05409},
}
Figure