High Dimensional Clustering with r-nets

Georgia Avarikioti, Alain Ryser, Yuyi Wang, Roger Wattenhofer

Abstract: Clustering, a fundamental task in data science and machine learning, groups a set of objects in such a way that objects in the same cluster are closer to each other than to those in other clusters. In this paper, we consider a well-known structure, so-called $r$-nets, which rigorously captures the properties of clustering. We devise algorithms that improve the run-time of approximating $r$-nets in high-dimensional spaces with $\ell_1$ and $\ell_2$ metrics from $\tilde{O}(dn^{2-\Theta(\sqrt{\epsilon})})$ to $\tilde{O}(dn + n^{2-\alpha})$, where $\alpha = \Omega({\epsilon^{1/3}}/{\log(1/\epsilon)})$. These algorithms are also used to improve a framework that provides approximate solutions to other high dimensional distance problems. Using this framework, several important related problems can also be solved efficiently, e.g., $(1+\epsilon)$-approximate $k$th-nearest neighbor distance, $(4+\epsilon)$-approximate Min-Max clustering, $(4+\epsilon)$-approximate $k$-center clustering. In addition, we build an algorithm that $(1+\epsilon)$-approximates greedy permutations in time $\tilde{O}((dn + n^{2-\alpha}) \cdot \log{\Phi})$ where $\Phi$ is the spread of the input. This algorithm is used to $(2+\epsilon)$-approximate $k$-center with the same time complexity.

1. Introduction

Clustering is a cornerstone of data science, serving as a primary tool for exploratory data analysis and pattern recognition. One of the most mathematically rigorous ways to define a prototype-based clustering is through the construction of an $r$-net. Given a dataset in a metric space, an $r$-net is a subset of points that acts as a representative skeleton for the entire set.

Computing $r$-nets in high-dimensional spaces (where the number of dimensions $d$ is large) is notoriously difficult due to the "curse of dimensionality." Previous state-of-the-art algorithms for $(1+\epsilon)$-approximate $r$-nets scaled with a runtime of $\tilde{O}(dn^{2-\Theta(\sqrt{\epsilon})})$. This paper presents a significant theoretical advancement, reducing this runtime to a sub-quadratic form $\tilde{O}(dn + n^{2-\alpha})$, where $\alpha$ is a function of the approximation parameter $\epsilon$.

2. Defining the $r$-net

An $r$-net for a dataset $P$ is defined by two fundamental properties:

  1. Covering: Every point in $P$ must be within a distance $r$ of at least one point in the $r$-net.
  2. Packing: No two points within the $r$-net can be closer to each other than a distance $r$.

These properties ensure that the $r$-net is both a comprehensive representation of the data (covering) and efficiently sparse (packing). By approximating these properties, we can significantly accelerate downstream clustering tasks.

3. Methodology

The authors achieve their runtime improvements through a sophisticated pipeline of algorithmic reductions and the application of tools from circuit complexity.

3.1. Hamming Space and PTFs

The core of the innovation lies in Hamming space. The authors utilize Probabilistic Polynomial Threshold Functions (PTFs) to represent distance thresholds. By framing the question of whether two points are within a certain distance as a probabilistic polynomial evaluation, the problem is transformed into a task solvable by fast rectangular matrix multiplication. This allows the algorithm to identify close pairs of points without computing all $n^2$ pairwise distances.

3.2. Sparsification

To manage the computational load, the authors implement a sparsification step. A brute-force randomized approach is used to construct a partial $r$-net, which reduces the number of points that must be processed by the more complex PTF-based matrix multiplication step.

3.3. Dimensionality Reduction Pipeline

To extend the Hamming space solution to continuous metrics, the authors employ a chain of reductions:

  • $\ell_2$ to $\ell_1$: A variant of the Fast Johnson-Lindenstrauss Transform is used to map Euclidean distances into Manhattan distances.
  • $\ell_1$ to Hamming: Locality Sensitive Hashing (LSH) is then used to map the $\ell_1$ points into a high-dimensional Hamming hypercube.

4. The "Net & Prune" Framework

The improved $r$-net algorithm is integrated into the "Net & Prune" framework. This framework is designed to solve "nice distance problems" by using $r$-nets to prune the search space of potential solutions. By plugging in the faster $r$-net construction, the authors achieve sub-quadratic runtimes for several fundamental problems:

  • $k$th-nearest neighbor distance: Finding the $(1+\epsilon)$-approximate distance to the $k$th closest point.
  • Min-Max Clustering: A $(4+\epsilon)$-approximation for minimizing the maximum radius of clusters.
  • $k$-center Clustering: A $(4+\epsilon)$-approximation for the classic $k$-center problem.

Furthermore, by iteratively building $r$-nets with shrinking radii, the authors generate $(1+\epsilon)$-approximate greedy permutations. This leads to a tighter $(2+\epsilon)$-approximation for the $k$-center problem, albeit with a runtime dependency on the data's spread ($\Phi$).

5. Key Results

The primary contribution is the improved runtime for $(1+\epsilon)$-approximate $r$-nets in $\ell_1$ and $\ell_2$ spaces: $$\tilde{O}(dn + n^{2-\alpha}), \text{ where } \alpha = \Omega\left(\frac{\epsilon^{1/3}}{\log(1/\epsilon)}\right)$$ This represents a strict improvement over the previous $\sqrt{\epsilon}$ dependency in the exponent. The downstream applications in the Net & Prune framework inherit this improved complexity, making high-dimensional clustering significantly more efficient for large $n$.

6. Conclusion and Future Work

This work provides a faster theoretical foundation for high-dimensional metric space problems. While the results are primarily theoretical, they push the boundaries of what is possible in sub-quadratic time.

Future research may focus on two areas: establishing a theoretical lower bound for $r$-net construction to determine if further speedups are possible, and finding methods to eliminate the dependency on the data spread ($\log \Phi$) in the greedy permutation algorithm, which currently limits performance on datasets with extreme outliers.

Summary updated

BibTeX
@inproceedings{avarikioti2019high,
  author = {Georgia Avarikioti and Alain Ryser and Yuyi Wang and Roger Wattenhofer},
  title = {{High Dimensional Clustering with r-nets}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33013207},
}
Figure