NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Single-Pass Pivot Algorithm for Correlation Clustering. Keep it simple!

Konstantin Makarychev, Sayak Chakrabarty

Introduction

Correlation Clustering is a fundamental problem in machine learning and data science, frequently applied to tasks such as image segmentation, duplicate detection, and community discovery. Unlike traditional clustering methods like k-means, Correlation Clustering does not require the user to specify the number of clusters in advance. Instead, the algorithm is provided with a graph where edges are labeled as either "positive" (indicating similarity) or "negative" (indicating dissimilarity). The objective is to find a partition of the vertices that minimizes "disagreements"—instances where similar items are placed in different clusters or dissimilar items are grouped together.

As datasets scale to billions of edges, standard algorithms that require random access to the entire graph become impractical. This necessitates the use of the semi-streaming model, where an algorithm processes the data in a single pass and must operate within a memory footprint proportional to the number of vertices ($n$), rather than the number of edges ($n^2$). Previous streaming approaches for this problem often resulted in higher approximation factors (e.g., 5-approximation) or required larger memory overheads (e.g., $O(n \log n)$).

This paper introduces a simple, single-pass streaming algorithm that achieves a $(3 + \epsilon)$-approximation using only $O(n/\epsilon)$ memory, effectively bringing the performance of streaming Correlation Clustering close to the theoretical limits of offline combinatorial algorithms.

The Single-Pass Pivot Algorithm

The proposed method builds upon the classic PIVOT algorithm. In its offline form, PIVOT selects a random vertex to act as a "pivot," forms a cluster consisting of that pivot and all its positive neighbors, and then recurses on the remaining vertices. To adapt this logic to a single-pass stream, the authors implement a "top-$k$" strategy based on random rankings.

Methodology

  1. Initialization: Every vertex $u$ in the graph is assigned a unique random rank.
  2. Streaming Phase: As positive edges arrive in the stream, each vertex $u$ maintains a small priority queue, $A(u)$, containing its $k$ highest-ranked positive neighbors. If a new positive neighbor arrives with a higher rank than the lowest-ranked neighbor currently in the queue, it replaces it. This ensures that each vertex only stores a small, fixed amount of information.
  3. Clustering Phase: Once the stream is complete, vertices are processed in increasing order of their assigned ranks. For any vertex $u$, the algorithm examines its stored neighbors in $A(u)$ to identify the highest-ranked vertex that has already been designated as a pivot. If such a vertex exists, $u$ joins that pivot's cluster. If no such neighbor is found in the limited memory, $u$ becomes a new pivot.

Theoretical Insights

The core innovation of this work lies in the proof that storing only the $k$ highest-ranked neighbors is sufficient to mimic the behavior of the full PIVOT algorithm. The authors demonstrate that potential pivots—the vertices that would have claimed $u$ in an offline setting—are likely to be among the top-$k$ neighbors with high probability.

To establish the $(3 + \epsilon)$ approximation bound, the researchers utilized a potential function and demonstrated that it behaves like a submartingale. This mathematical framework allowed them to bound the expected number of "singleton" clusters—errors that occur when a vertex's intended pivot is missing from its limited memory queue.

Key Results and Efficiency

  • Approximation Factor: The algorithm achieves a $(3 + \epsilon)$-approximation. Given that 3 is the best-known factor for the standard combinatorial PIVOT algorithm, this result indicates that the streaming constraint imposes almost no penalty on the quality of the clustering.
  • Memory Footprint: The algorithm uses $O(n/\epsilon)$ words of memory. For a fixed error tolerance, this is $O(n)$, meeting the "gold standard" for semi-streaming efficiency.
  • Computational Speed: The algorithm is highly performant during the streaming phase, requiring only $O(\log k)$ time per edge to update the priority queues.

Limitations and Future Directions

While the algorithm is a significant advancement in streaming graph theory, it currently focuses on the complete graph setting, where every pair of vertices has a defined positive or negative relationship. Future work may explore "incomplete" graphs where many edge labels are missing, a common scenario in real-world social networks. Additionally, the current iteration primarily utilizes positive edges to make clustering decisions; incorporating negative edge information more directly during the streaming phase could potentially yield further refinements. Finally, as a randomized algorithm, its performance is analyzed in expectation; while robust, the impact of extreme "worst-case" random rankings remains a theoretical consideration.

Summary updated

BibTeX
@inproceedings{makarychev2023single,
  author = {Konstantin Makarychev and Sayak Chakrabarty},
  title = {{Single-Pass Pivot Algorithm for Correlation Clustering. Keep it simple!}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=lkEiOZlmPm},
}
Figure