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

A New Dynamic Algorithm for Densest Subhypergraphs

Suman K. Bera, Sayan Bhattacharya, Jayesh Choudhari, Prantar Ghosh

Abstract

Computing a dense subgraph is a fundamental problem in graph mining with applications ranging from community detection to spam discovery. In many modern contexts, data is best modeled as a weighted hypergraph that evolves over time. This paper presents a new dynamic algorithm for maintaining the densest subhypergraph under a sequence of edge insertions and deletions. Unlike previous state-of-the-art methods whose accuracy degraded with the rank of the hypergraph, our algorithm achieves a near-optimal $(1+\epsilon)$-approximation ratio independent of rank. Furthermore, it is the first such algorithm to handle weighted hypergraphs efficiently. Experimental results on large-scale real-world datasets demonstrate that our approach significantly outperforms existing methods in both accuracy and update efficiency.

Introduction: The Challenge of Dynamic Hyper-Relational Data

In the era of big data, relationships are rarely simple or static. A research paper with multiple authors or a set of tags on a social media post involves more than two entities, making hypergraphs a more natural representation than standard graphs. Moreover, these networks are constantly changing. Finding the "densest" region—where entities are most tightly connected—is crucial for identifying trending topics or malicious clusters.

Previous dynamic algorithms for the Densest Subhypergraph (DSH) problem faced a significant bottleneck: their approximation ratio was tied to the hypergraph's rank $r$ (the maximum number of vertices in a hyperedge). Specifically, the best existing algorithm provided a $(1+\epsilon)r^2$ approximation. For complex datasets with large hyperedges, this error becomes unacceptably high. Additionally, these methods often struggled with weighted edges or exhibited unpredictable performance spikes due to amortized time complexities.

Methodology: Scaling and Load Balancing

Our framework addresses these limitations through a two-step approach designed for both weighted and unweighted dynamic hypergraphs.

1. Random Weight Scaling

To handle weighted hypergraphs (WDSH) without the computational burden of processing each weight unit individually, we employ a randomized sampling technique. By scaling weights and sampling hyperedges, we create an unweighted "multi-hypergraph" that preserves the density properties of the original weighted version with high probability. This reduction allows us to apply efficient unweighted techniques to weighted problems.

2. Primal-Dual Load Balancing and the HOP Data Structure

We reframe the unweighted density problem as a load-balancing challenge. Each hyperedge is treated as a unit of "load" that must be assigned to one of its incident vertices (the "head"). The objective is to orient hyperedges to minimize the maximum load on any single vertex.

To maintain this orientation dynamically, we developed the HOP (Hypergraph Orientation Problem) data structure. When a hyperedge is inserted or deleted, the algorithm performs local "shifts"—moving the head of an edge from a heavily loaded vertex to a less loaded one. This local maintenance ensures a globally near-optimal density estimate with a worst-case update time guarantee, providing stability that amortized algorithms lack.

Experimental Evaluation

We evaluated our algorithm (UDSHP for unweighted, WDSHP for weighted) against the previous state-of-the-art (HWC) and exact Linear Programming (LP) solvers across diverse datasets, including publication records (DBLP, MAG Geology), tag networks (Stack Overflow), and public health data (DAWN).

Comparison of accuracy (average relative error) and efficiency (average update time) for UDSHP and WDSHP against state-of-the-art (HWC) and exact solvers.

Key Results

  • Superior Accuracy: As shown in the figures above, our algorithm consistently maintains a much lower relative error than HWC. On large datasets like DBLP and Coauth MAG Geology, UDSHP and WDSHP offer a 55% to 90% improvement in accuracy, staying within a few percentage points of the exact solution.
  • High Efficiency: Our dynamic approach is significantly faster than exact solvers, often by an order of magnitude (10x to 15x). While it maintains similar or better speeds than HWC, it avoids the "saw-tooth" performance spikes common in previous methods, thanks to its worst-case time complexity guarantees.
  • Rank Independence: The experiments confirm that our $(1+\epsilon)$ approximation remains robust even as hyperedge sizes vary, fulfilling the theoretical promise of rank independence.

Conclusion and Future Work

By combining random weight scaling with a primal-dual load-balancing framework, we have established a new benchmark for dynamic densest subhypergraph discovery. Our algorithm provides the first rank-independent approximation for this problem, handling weighted data with high efficiency and stability. Future research may focus on reducing the $O(r^2)$ dependency in update time for extremely high-rank hypergraphs and exploring deterministic alternatives to the randomized weight reduction.

Summary updated

BibTeX
@inproceedings{bera2022new,
  author = {Suman K. Bera and Sayan Bhattacharya and Jayesh Choudhari and Prantar Ghosh},
  title = {{A New Dynamic Algorithm for Densest Subhypergraphs}},
  booktitle = {The Web Conference},
  year = {2022},
  url = {https://openreview.net/forum?id=AJL7RCZSYV},
}
Figure