OptiRefine: Densest subgraphs and maximum cuts with k refinements

Sijing Tu, Aleksa Stankovic, Stefan Neumann, Aristides Gionis · DOI

Graph mining is often an iterative process where researchers seek to improve an existing solution without completely overhauling it. This paper introduces the OptiRefine framework to optimize graph partitions—specifically densest subgraphs and maximum cuts—by allowing exactly $k$ node changes. The authors provide strong theoretical guarantees via Semidefinite Programming (SDP) and Sum-of-Squares (SoS) algorithms, alongside highly scalable heuristics that perform well on real-world networks.

The Problem: Graph Partitioning with $k$ Refinements

Many classic graph optimization algorithms, such as finding the densest subgraph or the maximum cut, are designed to start from scratch. However, in real-world data analysis, a preliminary solution often already exists. For example, one might identify a social network community based on noisy metadata and wish to refine it by adding a few highly influential users and removing inactive ones. Alternatively, a researcher might want to maximize the diversity of news exposure in a network by flipping algorithmic recommendations for a small budget of $k$ users.

Running a standard optimization algorithm from scratch might return a mathematically optimal community that is completely unrelated to the initial set. The authors address this by introducing the Graph Partitioning with $k$ Refinements (GP-kR) problem. The goal is to take an initial subset of vertices $U$ and find a new subset $U'$ that differs from $U$ by exactly $k$ vertices, such that a specific objective (like subgraph density or cut size) is maximized.

Theoretical Framework and Methods

The authors apply the OptiRefine framework to two specific problems: Densest Subgraph with $k$ Refinements (DS-kR) and Max-Cut with $k$ Refinements (MAX-CUT-kR). They employ a mix of theoretical and practical approaches:

  • Black-Box Reductions: They prove that DS-kR and MAX-CUT-kR can be solved using existing solvers for the classic Densest $k$-Subgraph (DkS) and Max-Cut problems, incurring only a constant-factor loss in the approximation ratio.
  • SDP with Hyperplane Rounding: They formulate a Semidefinite Programming (SDP) relaxation that encodes the initial node statuses (inside or outside the subgraph) into the constraints.
  • Sum-of-Squares (SoS) Hierarchy: For MAX-CUT-kR, standard SDP rounding struggles to hit the $k$ cardinality constraint exactly. The authors deploy a degree-2 Lasserre (SoS) hierarchy to bound the variance of the rounded solution, ensuring the cardinality constraint is met almost perfectly.
  • Scalable Heuristics: To handle massive graphs where SDPs are too slow, they design greedy heuristics and adapt fast "peeling" algorithms.
Approximation ratios for k-DENSIFY and MAX-CUT-kR across different refinement budgets (k/n).

Key Insights and Empirical Results

Theoretical Guarantees

The paper highlights that refinement generalizes hard classic problems; DS-kR is a direct generalization of the notoriously difficult Densest $k$-Subgraph (DkS) problem. As shown in the figure above, the authors provide constant-factor approximation algorithms for both problems when the refinement budget $k$ is proportional to the graph size ($k = \Omega(n)$). Notably, the SoS algorithm for MAX-CUT-kR achieves an optimal ~0.858 approximation ratio, matching the state-of-the-art for cardinality-constrained max-cut.

Performance on Real-World Data

The scalable algorithms were evaluated on various datasets, including Wikipedia politician networks and SNAP networks (DBLP, Amazon, Youtube). Key findings include:

  • Density Boosts: On the SNAP-Youtube graph, the algorithms refined ground-truth communities, increasing their density by over 40%.
  • Scalability: The black-box peeling method ("B: Peel") processed a 1-million-node graph in just 100 seconds.
  • Robustness: When $k$ nodes were randomly removed from a perfect ground-truth community, the algorithms consistently found alternative node swaps that made the community even denser than the original.

Limitations and Future Directions

While OptiRefine offers strong guarantees, it has some limitations. The constant-factor approximation guarantees require $k = \Omega(n)$; for smaller budgets ($k = o(n)$), obtaining such guarantees for DS-kR is fundamentally hard under the Small Set Expansion Conjecture. Additionally, while the SDP and SoS algorithms are theoretically powerful, they remain computationally prohibitive for graphs with more than a few thousand nodes. Future work may explore automated methods for determining the optimal budget $k$ rather than treating it as a fixed user input.

Summary updated

BibTeX
@article{tu2025optirefine,
  author = {Sijing Tu and Aleksa Stankovic and Stefan Neumann and Aristides Gionis},
  title = {{OptiRefine: Densest subgraphs and maximum cuts with k refinements}},
  journal = {Data Min. Knowl. Discov.},
  year = {2025},
  doi = {10.1007/s10618-025-01142-2},
}
Figure