Manuscript Offprint

arXiv:2611.24905

Batch-Dynamic Coreness and Applications with Logarithmic Work via Balanced Pressures

Quinten De Man, Laxman Dhulipala, Kishen N Gowda, Zhongqi Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract.

We give a parallel algorithm that maintains a one-sided (2+ε)(2+\varepsilon)-approximation of all core numbers under batches of edge insertions and deletions. For fixed ε>0\varepsilon>0, the expected amortized work is O(log⁡n)O(\log n) per edge update, and each batch has deterministic polylogarithmic depth. This improves on the previously known (4+ε)(4+\varepsilon)-approximation and O(log⁡2n)O(\log^{2}n) amortized work bounds. This approximation factor approaches the factor-two limit for polylogarithmic update and query time under the OMv conjecture.

Our algorithm is based on assigning each vertex a “pressure” and splits each edge’s unit load smoothly between its endpoints according to their pressures. After each batch of updates, our dynamic algorithm adjusts the pressures of vertices in parallel to restore balance between the pressures and loads. We show that by maintaining balanced pressures we can obtain good approximations of core numbers. Our construction also gives a (1+ε)(1+\varepsilon)-approximation of the densest-subgraph value with logarithmic expected amortized work and supports batch-dynamic maximal matching, clique counting, forest decomposition, and coloring in low-arboricity graphs with improved or matching work bounds.

We give a practical implementation of our batch-dynamic coreness algorithm and find that it is able to achieve smaller empirical error than the state-of-the-art parallel batch-dynamic implementation, while running faster. On six real-world graphs, it runs 32×32\times faster than that implementation in geometric mean and 4.1×4.1\times faster than a state-of-the-art heuristic baseline. On three graphs with up to 1.81.8 billion edges, it is 9.2×9.2\times faster than the heuristic baseline.

1. Introduction

The core number of a vertex measures how well it is connected within a cohesive part of a graph. Formally, the kk-core is the largest subgraph in which every vertex has degree at least kk, and the core number (or coreness) k(v)k(v) is the largest kk for which vv belongs to the kk-core. These nested subgraphs give a simple description of network structure (Seidman, 1983) and help identify influential spreaders (Kitsak et al., 2010), among many other practical applications (Alvarez-Hamelin et al., 2005; Sozio and Gionis, 2010; Bader and Hogue, 2003; Rousseau and Vazirgiannis, 2015).

The exact core numbers of every vertex can be computed in O(n+m)O(n+m) time by repeatedly peeling a vertex of minimum degree (Matula and Beck, 1983; Batagelj and Zaveršnik, 2003). However, maintaining coreness dynamically as the graph changes is much harder, as adding one edge to close a path into a cycle changes every core number from 11 to 22. Thus, an algorithm that explicitly maintains exact core numbers must sometimes update every vertex in response to one edge. Allowing for approximation in the core numbers allows algorithms to defer changes until they become significant, making it possible to achieve much lower work in theory and in practice.

In this paper, we study coreness in the fully dynamic setting, with both edge insertions and deletions, and allow updates to arrive in batches of any size. In particular, we are interested in the parallel batch-dynamic setting, where the goal is to process a batch with low work per edge update and low depth (i.e., the length of the longest chain of dependencies). This setting is a strict generalization of the classical dynamic setting, where we have a batch size of one.

Previous work. Sun et al. (Sun et al., 2020) gave the first algorithm for approximate core numbers with polylogarithmic update time. They provide a (4+ε)(4+\varepsilon)-approximation with O(log⁡2n)O(\log^{2}n) amortized update time for constant ε>0\varepsilon>0. Liu et al. (Liu et al., 2022) introduced the parallel level data structure (PLDS), obtaining the same approximation guarantee with O(log⁡2n)O(\log^{2}n) amortized work per update and polylogarithmic depth per batch. More recently, Ghaffari and Koo (Ghaffari and Koo, 2025) obtained polylogarithmic worst-case work per update, again with a (4+ε)(4+\varepsilon)-approximation guarantee. Table 1 compares the bounds. We state all approximation factors in the one-sided convention k(v)/c≤k^(v)≤k(v)k(v)/c\leq\widehat{k}(v)\leq k(v), where k(v)k(v) is the true core number and k^(v)\widehat{k}(v) is its estimate; Section 2 explains the conversion between conventions used in this paper and prior papers.

Table 1. Fully dynamic core-number bounds for constant ε>0\varepsilon>0. A factor cc means k(v)/c≤k^(v)≤k(v)k(v)/c\leq\widehat{k}(v)\leq k(v) after rescaling estimates and reparameterizing accuracy. Work is per edge update; depth is per batch. The work and depth bounds of PLDS and Ghaffari–Koo hold w.h.p.; our work bound is in expectation and our depth bound is deterministic. The two Ghaffari–Koo rows describe update types of the same fully dynamic algorithm.

AlgorithmOne-sided factorWork per updateWork guaranteeDepth per batch
Sun–Chan–Sozio (Sun et al., 2020)4+ε4+\varepsilonO(log⁡2n)O(\log^{2}n)AmortizedSequential
Liu et al. (PLDS) (Liu et al., 2022)4+ε4+\varepsilonO(log⁡2n)O(\log^{2}n)AmortizedO(log⁡2nlog⁡log⁡n)O(\log^{2}n\log\log n)
Ghaffari–Koo (Ghaffari and Koo, 2025), insertions4+ε4+\varepsilonO(log⁡9n)O(\log^{9}n)Worst-caseO(log⁡7n)O(\log^{7}n)
Ghaffari–Koo (Ghaffari and Koo, 2025), deletions4+ε4+\varepsilonO(log⁡8n)O(\log^{8}n)Worst-caseO(log⁡6n)O(\log^{6}n)
This paper2+ε2+\varepsilonO(log⁡n)O(\log n)Expected amortizedO(log⁡4n)O(\log^{4}n)

Our result. We give a simple and practical batch-dynamic algorithm that improves both the approximation factor and the amortized work. For every 0<ε≤10<\varepsilon\leq 1 with 1/ε≤nO(1)1/\varepsilon\leq n^{O(1)}, it maintains estimates satisfying

k(v)2+ε ≤ k^(v) ≤ k(v)for every vertex v\frac{k(v)}{2+\varepsilon}\ \leq\ \widehat{k}(v)\ \leq\ k(v)\qquad\text{for every vertex }v

after every batch, using O(ε−5log⁡n)O(\varepsilon^{-5}\log n) expected amortized work per update and deterministic O(ε−3log⁡4n)O(\varepsilon^{-3}\log^{4}n) depth per batch. For constant ε\varepsilon, the space is O(m+n)O(m+n). Theorem 3.2 gives the full statement. Thus the algorithm reduces the work from two logarithms to one while improving the previously stated approximation factor from about four to about two. Equivalently, rescaling our estimates gives a two-sided 2+ε\sqrt{2+\varepsilon} approximation.

The factor of two is also a conditional limit on what a fast dynamic algorithm can achieve. Couto and Fernandes (Couto and Fernandes, 2025) show that, under the Online Matrix–Vector Multiplication (OMv) conjecture, no algorithm with polynomial preprocessing and polylogarithmic update and query time can achieve a one-sided (2−δ)(2-\delta) approximation for any fixed δ>0\delta>0. Our approximation approaches this threshold while using logarithmic expected amortized work.

Densest subgraph and other applications. Our data structure also gives a fully dynamic (1+ε)(1+\varepsilon)-approximation of the densest-subgraph value with O(log⁡n)O(\log n) amortized update time and constant query time, for fixed ε>0\varepsilon>0. To our knowledge, this is the first logarithmic update bound for this approximation guarantee, improving the O(log⁡2n)O(\log^{2}n) amortized bound of Chekuri and Quanrud (Chekuri and Quanrud, 2022). Their logarithmic-time variant allows an additive error; pure multiplicative approximations with polylogarithmic worst-case updates are also known (Chekuri et al., 2024; Ghaffari and Koo, 2025). The batch-dynamic algorithm achieves O(log⁡n)O(\log n) expected amortized work per update and polylogarithmic depth per batch. It also reports the vertices of a (1+ε)(1+\varepsilon)-approximate densest subgraph G[S]G[S] in O(∣S∣+log⁡2n)O(|S|+\log^{2}n) work and O(log⁡n)O(\log n) depth, with the same update bounds. Appendix C.1 gives the proof.

The data structure also improves or matches work bounds in the low-arboricity framework for orientations, maximal matching, clique counting, forest decompositions, and coloring. Appendix C gives the reductions and comparisons.

Experimental results. We implement the algorithm and compare it with PLDS and PLDSOpt on the six social and web graphs and the three largest graphs of (Liu et al., 2022), using insertion, deletion, and mixed batches of 10610^{6} updates on 60 threads (Section 5). The implementation uses smaller parameters and a simpler rule for restoring balance than Theorem 3.2. Its accuracy remains provable for every parameter setting, while its work is measured. With parameters that give a guaranteed two-sided error bound of at most 3.83.8, below the 4.24.2 guaranteed for PLDS, it is faster than both PLDS and PLDSOpt on every input. On the six social and web graphs, it is 32×32\times faster than PLDS and 4.1×4.1\times faster than PLDSOpt in geometric mean (from 1.9×1.9\times to 10.3×10.3\times), and its average error is lower than that of PLDSOpt on 14 of the 18 combinations of graph and update type. On three graphs with up to 1.81.8 billion edges, it is 9.2×9.2\times faster than PLDSOpt. Recomputing all core numbers from scratch after each batch is faster only when a batch changes a large part of the graph, about a fifth of the edges of livejournal.

References (21)