---
title: 'FINCH: A Parameter-Free Clustering Hierarchy'
url: https://www.emergentmind.com/topics/first-integer-neighbor-clustering-hierarchy-finch
type: topic
---

# FINCH: A Parameter-Free Clustering Hierarchy

The First Integer Neighbor Clustering Hierarchy (FINCH) is a parameter-free, hierarchical agglomerative clustering algorithm that constructs data partitions by leveraging first-neighbor relations among samples. FINCH defines clusters by connecting each data point to its nearest neighbor and iteratively merging these structures to create a hierarchy of increasingly coarser partitions. Unlike classical clustering techniques, FINCH avoids the specification of any hyperparameters, including thresholds or cluster counts, and achieves state-of-the-art results and scalability across a diverse range of datasets [1902.11266].

## 1. Mathematical Formulation and Clustering Equation

Let $S = \{x_1, \dots, x_N\} \subset \mathbb R^d$ denote a dataset of $N$ points. For each point $x_i$, let $\kappa_i^1$ denote the index of its nearest neighbor under a dissimilarity $d(x_i, x_j)$. FINCH constructs a sparse symmetric adjacency matrix $A \in \{0,1\}^{N \times N}$ defined by
\[
A(i, j) = \begin{cases}
1, & \text{if } j = \kappa_i^1 \;\lor\; \kappa_j^1 = i \;\lor\; \kappa_i^1 = \kappa_j^1, \\
0, & \text{otherwise.}
\end{cases}
\]
This scheme links: (1) each point to its nearest neighbor, (2) symmetrizes the adjacency by linking reciprocally, and (3) connects points that share the same first neighbor. FINCH then identifies the connected components of the undirected graph induced by $A$ and assigns unique cluster labels, yielding the first partition $\Gamma_1 = \{C_1, \dots, C_C\}$ [1902.11266].

## 2. Hierarchical Construction and Algorithmic Workflow

FINCH produces a hierarchy of partitions through recursive re-application of the clustering rule to cluster centroids:
- **Step 0**: Receive raw data $X \in \mathbb R^{N \times d}$.
- **Step 1**: Compute first-neighbor indices $\kappa^1$ for all points.
- **Step 2**: Build adjacency $A$, extract connected components for partition $\Gamma_1$.
- **Step 3**: For each next level, replace each cluster in $\Gamma_i$ by its centroid, forming $M \in \mathbb R^{C_{\Gamma_i} \times d}$ and apply Steps 1–2 to obtain $\Gamma_{i+1}$.
- **Termination**: Stop once all points merge or no new merges occur.

The partitions satisfy $\Gamma_1 \supseteq \Gamma_2 \supseteq \cdots \supseteq \Gamma_L$ for typically small $L$ (e.g., 4–10 for $N$ in millions) [1902.11266].

## 3. Complexity Analysis and Scalability

- **Computational Complexity**: Each pass requires a 1-NN search, $O(N\log N)$ (exact) or near-linear with approximate methods. Building and traversing $A$ is $O(N)$. Empirically, the overall complexity is $O(N\log N)$.
- **Memory Complexity**: Requires $O(Nd)$ for the data and $O(N)$ for neighbor indices; there is no requirement to store a full pairwise distance matrix.
- **Comparison with Alternatives**: Classical hierarchical agglomerative clustering (HAC) using standard linkage requires $O(N^2\log N)$ time and quadratic memory. By contrast, $k$-means requires $O(TNkd)$ for $T$ iterations. FINCH is parameter-free and memory efficient [1902.11266].

| Method                                  | Time Complexity        | Memory Complexity | Parameter Dependence         |
|------------------------------------------|-----------------------|-------------------|-----------------------------|
| FINCH                                   | $O(N\log N)$          | $O(Nd)$           | None                        |
| HAC (single/average/complete linkage)    | $O(N^2\log N)$        | $O(N^2)$          | Linkage function, stopping  |
| $k$-means                               | $O(T N k d)$          | $O(Nd + k d)$     | $k$: number of clusters     |

## 4. Empirical Results and Hierarchy Interpretation

FINCH exhibits strong empirical performance across a variety of domains and problem scales:
- **Small/Medium Datasets ($N \leq 70\,$K):** On benchmark sets such as MNIST-10K, STL-10, and Reuters-10K, FINCH discovers the ground-truth cluster numbers as one of its hierarchy levels and achieves state-of-the-art normalized mutual information (NMI). For instance, on MNIST-70K, NMI = 98.84% (vs. 98.77% for spectral clustering).
- **Large-Scale Datasets ($N > 200\,$K):** FINCH clusters the 8.1M-sample MNIST-8M in $\sim$$18$ minutes with NMI = 99.54%. Competing methods such as $k$-means and spectral clustering either face out-of-memory errors or deliver substantially lower accuracy on these scales.
- **Convergence:** Hierarchies typically collapse in 4–10 levels, e.g., MNIST-10K yields cluster counts $\{1699, 310, 65, 17, 10, 1\}$ with clustering accuracy persistently above 99% down to the 10-cluster solution [1902.11266].

## 5. Extensions, Variants, and Practical Adaptations

Several adaptations of FINCH have been developed to accommodate specialized domains or additional constraints:
- **Temporally-Weighted FINCH (TW-FINCH):** For unsupervised action segmentation in video, the adjacency is weighted by both feature similarity and temporal distance per frame, $W(i, j) = (1 - \langle x_i, x_j \rangle)\cdot|t_i - t_j|/N$. This modification enables the extraction of temporally and semantically consistent clusters and improves action segmentation scores on multiple video datasets [2103.11264].
- **Threshold-based FINCH (as in OCCAM):** For class-agnostic object counting, the strict parameter-free linkage is relaxed by imposing a distance threshold $t_k$ at each iteration, linking only clusters whose centroids are sufficiently close. The sequence of thresholds (empirically set) allows finer control over merging, supports singletons, and halts the recursion when no new merges occur, producing robust instance counts [2601.13871].
- **Generalizations to $k$-NN Graphs:** Alternative formulations apply connected component extraction to $k$-nearest neighbor graphs, yielding a dendrogram as $k$ increases, which can also be constructed in near-linear time under well-behaved distributions [2203.08027].

## 6. Illustrative Examples and Interpretative Significance

- **Toy Example:** Applied to a solar system dataset (9 objects, 15 attributes), FINCH’s adjacency builds connected components corresponding to “rocky planets,” “gas giants,” and “ice giants,” directly revealing semantic groupings [1902.11266].
- **2D Synthetic Datasets:** On challenging cluster shapes (e.g., Aggregation, Gestalt), FINCH produces more accurate and natural partitions than $k$-means, HAC, spectral, or sparse subspace clustering [1902.11266].

## 7. Relation to Other Hierarchical and Nearest-Neighbor Clustering Schemes

FINCH differs from classical HAC in that merges are not performed greedily by pairwise cluster distances but induced by first-neighbor connectivity, removing the dependence on linkage criteria. Repetition of the single adjacency rule on updated representatives recursively produces the hierarchy. Extensions employing $k$-NN graphs retain this parameter-free property for “bottom-up” or “top-down” traversals, yielding unique, intrinsic data-driven hierarchies [2203.08027].

## References

- Sarfraz, F., Arora, D., & Khan, F. S. "Efficient Parameter-free Clustering Using First Neighbor Relations." arXiv:1902.11266
- Gokcesu, K., & Gokcesu, A. "Natural Hierarchical Cluster Analysis by Nearest Neighbors with Near-Linear Time Complexity." arXiv:2203.08027
- Spanakis, M. et al. "OCCAM: Class-Agnostic, Training-Free, Prior-Free and Multi-Class Object Counting." arXiv:2601.13871
- Sarfraz, F. et al. "Temporally-Weighted Hierarchical Clustering for Unsupervised Action Segmentation." arXiv:2103.11264

Source: https://www.emergentmind.com/topics/first-integer-neighbor-clustering-hierarchy-finch