Let $d:\{0,1\}^k\times \{0,1\}^k \to \mathbb{R}$ be a function which we refer to as the similarity function. Examples of similarity function are cosine distance, $l_2$ norm, Hamming distance, Jaccard similarity, etc.
Consider $n$ binary vectors of length $k$: $\vec{v} \in (\{0,1\}^k)^n$.
Our goal is to group vectors which are similar. More formally, we want to compute a similarity graph where nodes are the vectors and edges represent vectors which are similar ($d(v,u) \leq \epsilon$).
$n$ and $k$ are very large numbers, and comparing two length $k$ vectors is expensive, we cannot do all brute-force $O(n^2)$ operations. We want to compute the similarity graph with significantly less operations.
Is this possible? If not can we compute an approximation to the graph which contains all edges in the similarity graph plus possibly at most $O(1)$ other edges?