Manuscript Offprint
arXiv:2610.38708Curvature-Guided Sparsification for Graphs with Community Structure
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Graph sparsification in large-scale networks often requires balancing structural accuracy and computational efficiency. Curvature-based methods, particularly Ollivier-Ricci curvature (ORC), have shown strong performance in identifying inter-community bridges, but their computational cost limits scalability. In this work, we propose a two-stage curvature-guided pipeline for graph sparsification with the goal of preserving community structure. We first use the Lower Ricci Curvature, a combinatorial lower bound of the ORC, to perform efficient edge filtering, substantially reducing graph size before applying the computationally intensive optimal-transport-based ORC curvature and Ricci flow.
Results from empirical studies on synthetic and real-world datasets demonstrate that the combined LRC-ORC pipeline can achieve community-recovery accuracy comparable to ORC-only sparsification in terms of Adjusted Rand Index (ARI) and Normalized Mutual Information (NMI), while reducing runtime on most evaluated benchmarks. Our findings suggest that integrating combinatorial and geometric curvature notions provides a computationally efficient and structurally principled framework for graph sparsification in complex networks.
Keywords: Community detection, Ollivier-Ricci curvature, Lower Ricci curvature, Ricci flow, Network geometry
*Corresponding author.
1 Introduction
Many real-world structures, such as social [35], biological [4], or purchase networks [31], can be modeled as graphs: nodes represent users, genes, or purchases, and edges model interactions between them. As scientific and computational advances have allowed for the development and study of increasingly large graphs, graph sparsification has become an important tool for distilling large graphs into a more manageable representation. In contrast to graph coarsening, in which both nodes and edges are collapsed, graph sparsification refers to the process of removing edges from a graph while retaining the node set, often with the aim of preserving some graph property such as cut weight [2] or the spectrum of the graph Laplacian [33]. In this work, we focus on graphs that possess a node labeling scheme indicating membership to one or more classes, or communities, and explore graph sparsification methods that reveal community structure.
Graph community structure is closely related to graph topology: intra-community nodes are more likely to be linked by an edge than inter-community nodes. Researchers have observed that graph-based curvatures, derived from the classical notion of curvature on manifolds, capture this community structure well [36, 23, 30]. On manifolds, Ricci curvature measures the convergence behavior of geodesic paths: in negatively curved space, neighboring geodesics diverge, and in positive curved space, they converge. In the discrete setting, inter-community bridges have negative curvature and edges between highly-connected intra-community nodes have positive curvature. Several generalizations of manifold curvature to discrete spaces have been proposed, including Forman-Ricci curvature (FRC) [7] and Ollivier-Ricci curvature (ORC) [24]. These notions provide different approaches of characterizing local and global graph geometry. ORC captures geometric information through optimal transport between neighboring node distributions, while FRC determines curvature based on on local combinatorial structure.
The intimate relationship between curvature and community structure suggests that a curvature-based sparsification method which removes highly negatively-curved edges will retain graph communities well. We choose to focus on Ollivier-Ricci curvature since the ORC of a graph converges to the Ricci curvature of the underlying manifold in certain settings [38]. Although ORC has been shown to perform well in community detection tasks [36], it is computationally expensive because optimal-transport calculations must be performed across graph edges, with a computational complexity of , where is the maximum node degree and is the number of edges [5]. To address this computational challenge, Park and Li [25] introduced the lower Ricci curvature (LRC), which provides a fast combinatorial lower bound to ORC; the LRC of an edge can be computed using local combinatorial information in approximately time. However, because LRC is only an approximation of ORC, LRC-guided graph sparsification does not preserve communities as well as ORC-guided graph sparsification, as demonstrated in Appendix B.
To balance complexity and accuracy, we propose a two-stage sparsification framework which first prunes edges based on the computationally inexpensive
LRC, then computes the ORC with on the reduced graph and prunes the graph further based on these refined values. Following the work of [16], we additionally perform a Ricci flow step that introduces edge weights based on the discrete Ricci flow introduced in [23], which we use to refine ORC values before the final pruning step. We validate the proposed framework on synthetic and real-world benchmark networks and analyze its performance in both timing and accuracy tests under different graph structures. The remainder of this paper is organized as follows: Section 2 introduces the necessary background and notation. Section 3 describes the datasets. Section 4 presents the proposed methodology. Section 5 reports the experimental results. We conclude with Section 6.
2.1 Graph notation and basic operators
We consider an undirected graph with node set , edge set , and nonnegative edge weights . For an edge , we write . We denote the neighborhood of node as
and its weighted degree as
We denote the shortest-path distance between nodes and by , using hop distance for unweighted graphs and weighted shortest paths after Ricci flow.
2.2 Curvature in network geometry
Local graph connectivity can be characterized via graph curvature: edges within densely connected regions generally exhibit higher curvature, whereas edges connecting different communities tend to have lower curvature. Figure 1 illustrates a geometric interpretation of curvature on both manifolds and graphs. Several notions of discrete graph curvature have been introduced; we review the ones used in this paper below.
2.2.1 Ollivier-Ricci curvature (ORC)
Ollivier-Ricci curvature extends Ricci curvature on manifolds to metric measure spaces via optimal transport [24]. Intuitively, ORC measures the extent to which two random walks from different points converge (positive curvature) or diverge (negative curvature). In the graph setting, we follow [20] and adopt the -lazy random walk formulation to define the probability measure at node as

Figure 1: Geometric intuition behind curvature-based community detection. Edges connecting dense communities tend to have negative curvature and act as bottlenecks, while edges inside dense regions tend to have higher curvature. Image adapted from [9].
where denotes the Dirac measure at node and is the idleness parameter. This defines a lazy random walk where the walker stays at the current node with probability , and with probability , moves to one of the neighboring nodes at random. When , is simply the standard one-step random walk distribution. We use the Wasserstein distance to formalize the idea of distances between random walks:
Wasserstein-1 distance. Let denote the set of all couplings of and . The Wasserstein-1 distance with respect to the graph metric is defined as
Definition of ORC. The Ollivier-Ricci curvature of an edge is defined as
In the case of lazy random walks, the value of ranges from -2 to 1. Negative curvature indicates that neighborhoods are far in transport distance relative to , which often corresponds to inter-community edges and bottlenecks [30].
2.2.2 Discrete Ricci flow on graphs
Ricci flow, originally defined in the continuous setting, deforms a space according to curvature. The authors of [23] observed that the tendency of Ricci flow to separate space into regions of positive curvature is applicable to community detection in graphs, where intra-community edges often have positive Ollivier-Ricci curvature. This motivated their definition of discrete Ricci flow on graphs, which iteratively updates edge weights based on ORC values. At each step, edge weights are updated using the formula
where is the shortest-path distance under the current edge weights and is the Ollivier–Ricci curvature at iteration t. Edge weights are then normalized and the process is repeated until all neighboring curvatures are within a predetermined tolerance, or after a fixed number of steps. After several iterations, negatively curved edges tend to receive larger weights, while positively curved edges tend to receive smaller weights, aiding curvature-based sparsification [23].

Figure 2: Illustration of discrete Ricci flow dynamics. Edge weights evolve according to curvature: negatively curved edges tend to receive larger weights, while positively curved edges decrease in relative weight, increasing structural contrast.
2.2.3 Lower Ricci curvature (LRC)
Following from the work of [15], the authors of [25] introduced the Lower Ricci Curvature (LRC) as computationally inexpensive lower bound on Ollivier–Ricci curvature based on local graph information. For an edge , we recall that denotes the set of neighbors of node i in the graph. Define
and let
denote the number of common neighbors of . The LRC of is defined as
The value of the LRC ranges from -2 to 2, with lower values indicating weaker local connections.
2.3 Community detection
Community detection refers to the process of recovering community membership from the underlying graph structure: intra-community nodes are more likely to be linked by an edge than inter-community nodes. Determining class membership from graph topology is a fundamental problem in network science with diverse applications [6, 10, 11]. Many classical community detection algorithms are based on graph clustering; more recently, methods based on diverse areas such as physics and computer science have been introduced [8]. Existing community detection methods include modularity-based algorithms such as the Louvain [3] and Leiden [37] methods; we refer the reader to [14] for a survey of other techniques.
Mathematically speaking, community detection partitions a set , in our case taken to be the nodes of a graph, into disjoint communities such that intra-community nodes are more likely to be connected by an edge than inter-community nodes. The notion of modularity captures this, measuring how many edges fall within communities compared with what would be expected in a random graph with the same degree distribution. In our pipeline, we compute the weighted modularity because we use Ricci flow to introduce edge weights (cf. Section 2.2.2) which strengthen intra-community connections.
Weighted modularity. For a graph with vertex set V, we define the total weight as the sum of the edge weights:
Letting be the community label of node , the weighted modularity is
We use the Louvain method [3], a modularity-based community detection method, to determine how well sparsified graphs retain their community structure. In short, the Louvain method operates by first assigning each node to its own community, then iteratively grouping nodes, accepting the new group assignments if the (weighted) modularity improves. The algorithm terminates if the modularity stops improving or a predetermined number of iterations has been reached. We fix node evaluation order across datasets using the same set of six seeds.
2.4 Structural network descriptors
To characterize the structural separability of our datasets, we report conductance and empirical within- and between-community edge densities. These quantities are used only for descriptive analysis and are not part of the proposed LRC-ORC pipeline.
Let be a community and its complement. Let denote the set of edges connecting and . The volume of is defined as
Following [18], the conductance of S is defined as
Lower conductance indicates stronger separation between a community and the rest of the network.
In a graph with vertices, the maximum number of possible edges is . We define the within-community edge density to be the ratio of the number of extant edges within a communities to the total possible number of intra-community edges:
where is the size of ground-truth community , and is the total number of edges between nodes within the same community. Similarly, letting be the number of edges between nodes in different communities, we define between-community edge density as
Larger separation between and indicates that nodes within communities are more likely to be connected to each other than to nodes in other communities.
2.5 External validation metrics: ARI and NMI
Because reference labels are available in each of our datasets (see Section 3), we quantify agreement between a detected partition and the ground-truth partition using the Adjusted Rand Index (ARI) and Normalized Mutual Information (NMI).
Adjusted Rand Index (ARI). The Rand index [28] measures agreement between two clusterings of data, with a value of 0 if the clustering do not agree on any point, and 1 if they are the same. The adjusted Rand index (ARI) adjusts this measurement to compensate for similarity expected by chance [13].
Specifically, let number of elements assigned to community and , . the number of elements assigned to , and, the number of elements assigned to . Letting be the total number of vertices in the graph, the ARI is defined as
Normalized Mutual Information (NMI). The concept of mutual information, introduced in [29], measures how much information can be gained about one random variable by observing another. Formally, let U and V be the random variables induced by partitions C and G. Define
The mutual information of U and V is defined as
and the entropies are
The normalized mutual information used in community detection is
which takes values in with larger values indicating stronger agreement.
3 Datasets
To evaluate the proposed curvature-guided framework, we consider five benchmark datasets spanning both synthetic and real-world networks. These datasets cover a wide range of structural properties, including social, collaboration, and product co-purchase networks, allowing us to investigate how graph structure influences the effectiveness of curvature-guided sparsification. Since several benchmarks contain overlapping communities, each node is assigned to its smallest ground-truth community for evaluation using ARI and NMI.
3.1 Synthetic Stochastic Block Model (SBM)
We generate synthetic benchmark graphs using the Stochastic Block Model (SBM), where nodes are partitioned into predefined communities with dense intra-community connections and sparse inter-community links. By controlling the intra-community probability and inter-community probability , SBM provides a controlled environment for evaluating community detection performance under different structural regimes. Ground-truth community assignments are known by construction.
3.2 SNAP Facebook Ego-Networks
The Facebook ego-network dataset from the Stanford Network Analysis Project (SNAP) [35, 19] represents friendship relations centered around individual users. Nodes correspond to Facebook users and undirected edges represent friendship links between them. The original graph contains 4,039 nodes and 88,234 edges. Although the original friendship circles allow overlapping community memberships, for evaluation we assign each node a single ground-truth label to obtain a non-overlapping partition compatible with the clustering metrics used in this study. For nodes belonging to multiple circles, we assign the node to its smallest ground-truth community.
3.3 SNAP Amazon Co-purchase Network
The Amazon co-purchase network from SNAP [31, 39] models relationships between products frequently purchased together. Nodes represent products, while edges connect products that are commonly co-purchased by customers. The original graph contains 334,863 nodes and 925,872 edges. Product categories provide overlapping ground-truth communities, making this dataset particularly suitable for evaluating community detection in dense product networks. For evaluation with ARI and NMI, each node is assigned to its smallest ground-truth community to obtain a non-overlapping reference partition.
3.4 SNAP DBLP Collaboration Network
The DBLP collaboration network from SNAP [32, 39] represents scientific collaborations between authors. Nodes correspond to authors and undirected edges indicate co-authorship relationships. The graph contains 317,080 nodes and 1,049,866 edges. Ground-truth communities are defined by publication venues, allowing authors to belong to multiple research communities simultaneously. For evaluation with ARI and NMI, each node is assigned to its smallest ground-truth community to obtain a non-overlapping reference partition.
3.5 SNAP YouTube Social Network
The YouTube social network from SNAP [34, 18] represents friendship relations between users of the YouTube platform. Nodes correspond to users and edges represent friendship links. The complete network contains 1,134,890 nodes and 2,987,624 edges. User-created groups serve as overlapping ground-truth communities, providing a challenging network with substantial community overlap and heterogeneous connectivity. For evaluation with ARI and NMI, each node is assigned to its smallest ground-truth community to obtain a non-overlapping reference partition.
4 Methodology
4.1 Computational environment
All experiments were conducted using Python 3.11 [27]. Graph manipulation and preprocessing were implemented using NetworkX [12]. Lower Ricci curvature computations were implemented using custom routines based on the formulation of Park and Li [25], using the number of common neighbors and the degrees of adjacent nodes. Ollivier-Ricci curvature and discrete Ricci flow were computed using the GraphRicciCurvature library [21]. Community detection was carried out primarily using the Louvain algorithm via the python-louvain package [1]. Experiments using the Leiden method were also performed; the complete Leiden results are available in the accompanying GitHub repository and are omitted from the main text for brevity. Evaluation metrics (ARI and NMI) were computed using scikit-learn [26]. All runtimes were measured as elapsed wall-clock time. For randomized community-detection runs, each method was evaluated using six seeds. Results are reported as mean ± standard deviation across these runs. The codebase was tested successfully on (i) a Pop!OS 24.04 LTS x86_64 workstation with 62.49 GB RAM, an Intel® Xeon® W-2235 CPU, and an AMD Radeon Pro WX 3200 GPU, and (ii) a MacBook Air running macOS Sonoma 14.8.5 with 8 GB RAM and an Apple M3 (10-core integrated GPU). In both cases, experiments were run locally using the Conda environment specified in environment.yml in the GitHub repository [17].
4.2 Graph representation and preprocessing
We model all benchmark networks as undirected, initially unweighted graphs . Self-loops are removed before dataset-specific benchmark construction. For the Facebook, DBLP, and YouTube datasets, we first select ground-truth communities of moderate size and conductance, construct the induced subgraph on the union of their nodes, and retain its giant connected component (GCC), when necessary, to obtain a connected benchmark.
For the Amazon dataset, we instead restrict the graph to nodes belonging to eligible ground-truth communities, evaluate the resulting connected components using size, label coverage, and overlap characteristics, and select one eligible connected component as the final benchmark.
4.3 Combined LRC-ORC pipeline
The proposed method integrates LRC and ORC with Ricci flow (ORC-RF) into a two-stage pipeline. LRC is used as a computationally inexpensive preprocessing step, while ORC and Ricci flow are applied only on the reduced graph. The resulting computation is more efficient than running ORC with Ricci flow on the entire graph, yet largely preserves structural information. The key novelty of the proposed framework is that LRC is not used as an alternative to ORC, but as an efficient graph reduction stage that limits the expensive ORC+Ricci flow computation to structurally informative edges.
The procedure works as follows: we first compute the LRC value of every edge, then remove the edges with the lowest LRC values. The proportion of removed edges, and hence the LRC threshold, depends on the structure of the dataset, which we discuss in more detail in Section 5. This results in a coarsely sparsified graph that preserves within-community connectivity while eliminating weak inter-community edges. Following the discrete Ollivier–Ricci flow framework of Ni et al. [22], Ollivier–Ricci curvature is computed on the reduced graph using the Sinkhorn distance as an approximation to the computationally expensive 1-Wasserstein distance on a one-step random walk distribution with idleness parameter . We perform Ricci-flow iterations for the real-world benchmarks and iterations for the synthetic SBM experiments as computationally tractable settings that limit repeated ORC calculations while allowing curvature-based refinement. After LRC pruning, ORC-RF refinement is applied to the largest connected component. The remaining components are retained without further ORC refinement.
Edge weights are normalized after each iteration, and persistently low-curvature edges are subsequently pruned. Since Ricci flow also modifies edge weights used by Louvain, differences in clustering accuracy may reflect both edge pruning and weight refinement. Algorithm 1 summarizes the proposed two-stage curvature pipeline.
Algorithm 1 Two-stage curvature-guided community detection (LRC ORC-RF)
Require: Graph , prune ratios , idleness , Ricci-flow steps
Ensure: Communities
1: LRC stage: compute LRC() for all
2:
3: ORC-RF stage: compute for all
4: for to do
5: update edge weights by Ricci flow using
6: normalize edge weights
7: recompute on updated weights
8: end for
9:
10:
11: return
5 Results
The following experiments compare the proposed LRC→ORC-RF pipeline with LRC-based and ORC-RF-based component baselines in terms of clustering accuracy, runtime, and graph reduction. Since the role of LRC-based preprocessing has been described in Section 4, the discussion below focuses on dataset-specific performance and structural behavior.
To examine the interaction between the two pruning stages, we performed a joint sensitivity analysis on the SBM benchmark. As shown in Figure 3, moderate pruning generally preserves clustering quality better than aggressive sparsification. The LRC-only and ORC-RF-only configurations are used as component baselines to isolate the contribution of each stage of the proposed pipeline. We additionally performed experiments using the ORC without Ricci flow, detailed in Appendix A. Removing Ricci flow substantially reduced runtime, but its effect on accuracy was dataset-dependent. Ricci flow improved community recovery on DBLP and Amazon, but reduced accuracy on Facebook and YouTube.
After pruning, community detection is performed using the Louvain algorithm. In some cases, a small number of nodes were isolated after pruning, which were removed before community detection. Ground-truth community assignments are available for all benchmark datasets and are used for external validation. We evaluate performance using the Adjusted Rand Index (ARI) and Normalized Mutual Information (NMI). Reported runtimes includes curvature computation (with Ricci flow where applicable), and pruning. For each benchmark, the reported conductance corresponds to the average conductance of the ground-truth communities.
5.1 Synthetic SBM Benchmark
We generated synthetic networks with 360 nodes divided into four equally sized communities, with approximately 4,000 edges per realization. The within-and between-community connection probabilities were and , respectively. We additionally introduced 10 dense inter-community bridge blocks of size to create challenging community structures.
Table 1 compares the three methods across 10 independent graph realizations. LRC-only was the fastest but had the lowest accuracy (ARI = 0.766, NMI = 0.761). ORC-RF-only achieved the highest accuracy (ARI = 0.836, NMI = 0.818). The combined LRC→ORC-RF approach achieved similar accuracy (ARI = 0.834, NMI = 0.816) while reducing runtime by approximately 8% relative to ORC-RF-only.
Table 1: Performance comparison of curvature-based methods on the synthetic SBM benchmark. Results are reported as mean ± standard deviation across 10 runs.
| Method | ARI | NMI | Time (s) |
|---|---|---|---|
| LRC-only | 0.766 ± 0.080 | 0.761 ± 0.058 | 0.07 ± 0.01 |
| ORC-RF-only | 0.836 ± 0.094 | 0.818 ± 0.068 | 9.01 ± 0.40 |
| LRC→ORC-RF | 0.834 ± 0.087 | 0.816 ± 0.066 | 8.36 ± 0.34 |
5.1.1 Pruning Sensitivity
We evaluated LRC and ORC-RF pruning levels of 0, 2, 5, 10, 20, and 30%, using and three Ricci flow iterations. Figure 3 shows the mean ARI and NMI across 10 graph realizations. Both metrics generally decreased under aggressive LRC pruning, while moderate ORC-RF pruning improved recovery.

(a) Adjusted Rand Index (ARI)

(b) Normalized Mutual Information (NMI)
Figure 3: Joint sensitivity of (a) ARI and (b) NMI to LRC and ORC-RF pruning on the synthetic SBM benchmark. Results are averaged over 10 independent graph realizations.
Table 2: Sensitivity of the combined LRC–ORC-RF pipeline to selected pruning configurations and ORC idleness parameters on the synthetic SBM benchmark.
| (%) | (%) | ARI | NMI | Time (s) | |
|---|---|---|---|---|---|
| 0 | 10 | 0.50 | 0.838 | 0.816 | 9.060 |
| 10 | 30 | 0.25 | 0.788 | 0.765 | 5.104 |
| 20 | 25 | 0.75 | 0.751 | 0.735 | 5.370 |
| 25 | 30 | 0.75 | 0.710 | 0.709 | 4.682 |
| 30 | 20 | 0.50 | 0.718 | 0.707 | 3.619 |
Figure 3 shows that moderate pruning generally preserves high community-recovery accuracy, while aggressive pruning tends to reduce both ARI and NMI.
5.2 DBLP Collaboration Network
We first evaluate the proposed framework on the DBLP collaboration network, a real-world benchmark containing 4,508 nodes, 12,863 edges, and 25 ground-truth communities. This benchmark provides an opportunity to examine whether an inexpensive local-curvature preprocessing step can reduce the computational cost of Ollivier–Ricci curvature (ORC) refinement while maintaining community-recovery accuracy. Table 3 compares LRC-only, ORC-only, and the proposed LRC→ORC pipeline.
| Method | ARI | NMI | Runtime (s) | Graph Size |
|---|---|---|---|---|
| LRC-only | 4508V / 12219E | |||
| ORC-RF-only | 4500V / 12219E | |||
| LRC→ORC-RF | 4507V / 12266E |
Table 3: Community detection results on DBLP over six random seeds (mean ± standard deviation). LRC-only and ORC-RF-only use 5% edge pruning. The combined pipeline uses 2.5% LRC pruning followed by 2.5% ORC pruning. Graph size denotes the numbers of vertices (V) and edges (E) remaining after sparsification. Runtime follows the preprocessing-time measurement reported by the experimental pipeline.
On DBLP, ORC-only achieves the highest accuracy (ARI = 0.493, NMI = 0.767), while the combined LRC→ORC pipeline reduces runtime by approximately 17.8% (from 27.68 to 22.76 seconds), at the cost of lower ARI (0.395) and NMI (0.757). LRC-only is considerably faster (0.10 seconds) but achieves the lowest accuracy. These results suggest that early LRC pruning may remove structurally informative edges, reducing community-recovery accuracy. Thus, while the combined approach offers computational savings, ORC-only provides better accuracy on DBLP, highlighting the trade-off between efficiency and preserving important network structure.
5.3 Amazon Co-purchasing Network
We next consider the Amazon co-purchasing network, using a selected connected benchmark containing 298 nodes, 1,159 edges, and 9 ground-truth labels derived from overlapping product communities. The evaluation uses the benchmark's final ground-truth labeling.
Unlike DBLP, the Amazon benchmark allows us to investigate a setting in which the combined LRC→ORC-RF approach achieves accuracy comparable to the ORC-only method while reducing its computational cost.
As shown in Table 4, LRC→ORC achieves the same mean ARI (0.519) and NMI (0.751) as ORC-only, while reducing runtime by approximately 21.6% (from 1.71 to 1.34 seconds). Both methods retain a similar number of edges (1,105 and 1,101, respectively), suggesting that the combined approach reduces computational cost without sacrificing community-recovery accuracy.
| Method | ARI | NMI | Runtime (s) | Graph Size |
|---|---|---|---|---|
| LRC-only | 298V / 1101E | |||
| ORC-only | 298V / 1101E | |||
| LRC→ORC | 298V / 1105E |
Table 4: Community detection results on Amazon over six random seeds (mean ± standard deviation). LRC-only and ORC-RF-only use 5% edge pruning, while the combined pipeline applies 2.5% LRC pruning followed by 2.5% ORC pruning. Graph size reports the final numbers of vertices (V) and edges (E). Runtime follows the preprocessing-time measurement reported by the experimental pipeline.
Although LRC-only is considerably faster (0.03 seconds), it achieves lower ARI (0.440) and NMI (0.728), highlighting the benefit of ORC-based refinement on this network. Unlike DBLP, where preliminary LRC pruning reduces accuracy, the Amazon results show that the combined pipeline can preserve ORC-level performance at a lower computational cost.
5.4 Facebook Network
We further evaluate the framework on a benchmark derived from Facebook friendship circles. The largest connected component of the selected benchmark contains 1,771 nodes, 42,220 edges, and 39 ground-truth communities.
The Facebook benchmark exhibits heterogeneous community structure. The mean conductance of its final ground-truth communities is approximately 0.4944, indicating that many communities are not sharply separated from the surrounding network. This setting allows us to examine whether the more computationally expensive ORC refinement provides an advantage over local curvature-based sparsification.
| Method | ARI | NMI | Runtime (s) | Graph Size |
|---|---|---|---|---|
| LRC-only | 1771V / 40109E | |||
| ORC-only | 1771V / 40109E | |||
| LRC→ORC | 1770V / 40137E |
Table 5: Community detection results on Facebook over six random seeds (mean ± standard deviation). LRC-only and ORC-only prune 5% of edges. The combined method applies 2.5% LRC pruning followed by 2.5% ORC pruning. Graph size indicates the numbers of vertices (V) and edges (E) after sparsification. Runtime follows the preprocessing-time measurement reported by the experimental pipeline.
As shown in Table 5, LRC-only achieves the highest ARI (0.649) and NMI (0.769), while requiring only 0.44 seconds. ORC-only and LRC→ORC achieve lower ARI values of 0.585 and 0.586, respectively. Although the combined pipeline reduces runtime by approximately 6.1% compared with ORC-RF-only
(from 82.36 to 77.31 seconds), it does not improve clustering accuracy.
These results suggest that the local structural information captured by LRC is sufficient for effective community recovery on Facebook, and additional ORC refinement provides no further benefit under the evaluated settings. Unlike DBLP and Amazon, where ORC-based methods outperform LRC-only, Facebook illustrates that more computationally expensive curvature refinement does not necessarily lead to better community detection.
5.5 YouTube Network
Finally, we evaluate the framework on a YouTube social-network benchmark containing 1,760 nodes, 5,600 edges, and 23 ground-truth communities. This benchmark provides another opportunity to examine whether the additional computational cost of ORC refinement leads to improved community-recovery accuracy.
| Method | ARI | NMI | Runtime (s) | Graph Size |
|---|---|---|---|---|
| LRC-only | 0.676 ± 0.041 | 0.800 ± 0.009 | 0.05 ± 0.00 | 1760V / 5320E |
| ORC-only | 0.619 ± 0.016 | 0.742 ± 0.014 | 7.21 ± 0.00 | 1756V / 5320E |
| LRC→ORC | 0.622 ± 0.017 | 0.753 ± 0.006 | 7.36 ± 0.00 | 1759V / 5323E |
Table 6: Community detection results on YouTube over six random seeds (mean ± standard deviation). LRC-only and ORC-only use 5% edge pruning. The combined pipeline uses 2.5% LRC pruning followed by 2.5% ORC pruning. Graph size denotes the numbers of vertices (V) and edges (E) after sparsification. Runtime follows the preprocessing-time measurement reported by the experimental pipeline.
As shown in Table 6, LRC-only achieves the highest ARI (0.676) and NMI (0.800) among the three curvature-based methods, with a runtime of only 0.05 seconds. ORC-only and LRC→ORC achieve lower ARI values of 0.619 and 0.622, respectively, with corresponding NMI values of 0.742 and 0.753. The combined method is also slightly slower than ORC-only (7.36 versus 7.21 seconds).
These results suggest that local structural information is sufficient for effective community recovery on YouTube, while additional ORC refinement offers no improvement under the evaluated settings. However, the unpruned Leiden baseline achieves a higher ARI (0.705), indicating that LRC-only is the best of the three curvature-based methods, rather than the best overall approach. Figure 4 illustrates the changes in community structure before and after sparsification.
5.6 Structural Regimes of Curvature-Guided Community Detection
Our experiments show that no single curvature-guided sparsification method consistently outperforms the others across all benchmarks. To better understand

Figure 4: Illustration of community structure before and after LRC-based sparsification on the YouTube benchmark. The visualization highlights changes in graph connectivity following edge removal; quantitative community-recovery performance is reported separately in Table 6.
these differences, we compare the results using two measures of community separation: mean conductance and the empirical ratio of within- to between-community edge probabilities, . Lower conductance generally indicates stronger community separation, while a higher probability ratio indicates denser connections within communities relative to those between communities.
| Dataset | Mean Conductance | Best Accuracy Method | |
|---|---|---|---|
| Synthetic | 0.410 | 4.35 | ORC-only |
| DBLP | 0.040 | 552.5 | ORC-only |
| Amazon | 0.449 | 25.8 | ORC-only / Combo |
| 0.494 | 44.9 | LRC-only | |
| YouTube | 0.243 | 25.5 | LRC-only |
Table 7: Structural characteristics and performance of curvature-guided methods across benchmarks. The best method is determined by mean ARI among LRC-only, ORC-RF-only, and LRC→ORC-RF.
As shown in Table 7, neither conductance nor alone explains which method performs best. DBLP has strongly separated communities but favors ORC-only, whereas Facebook, with weaker community separation, achieves higher accuracy using LRC-only. Similarly, Amazon and YouTube have nearly identical within-to-between community probability ratios (25.8 and 25.5), yet favor different approaches. These differences suggest that community separation alone does not capture the structural information needed to determine which edges can be safely removed.
The value of ORC refinement also varies across networks. On DBLP, ORC-only provides the highest accuracy, while on Amazon, the combined pipeline maintains comparable accuracy at a lower computational cost. In contrast, LRC-only performs best among the curvature-based methods on Facebook and YouTube, where additional ORC-RF refinement offers no improvement under the evaluated settings.
The experiments without Ricci flow, reported in Appendix A, further support this observation. Removing Ricci flow reduces runtime, but its effect on accuracy differs across datasets, indicating that iterative refinement is beneficial in some settings but unnecessary in others.
Overall, these findings highlight a trade-off between computational efficiency and preserving structurally informative edges. While the proposed LRC→ORC pipeline can reduce the cost of ORC-based processing without sacrificing accuracy on some networks, early pruning may reduce community recovery on others. The results therefore suggest that effective curvature-guided sparsification depends on finer network structure beyond global community-separation measures, rather than following a universally optimal strategy.
6 Conclusion and Future Work
This work introduced a two-stage curvature-guided sparsification framework that uses LRC-based pruning before ORC-RF refinement. The proposed pipeline can reduce the computational cost of Ollivier-Ricci curvature with Ricci flow on most evaluated benchmarks, while maintaining competitive community detection performance on selected networks. The results further show that the effectiveness of curvature-guided sparsification depends on network structure. Overall, the study demonstrates that combinatorial and geometric curvature can be used as complementary components of an efficient and structure-aware community detection framework.
One limitation is that the initial LRC-based sparsification step may result in the removal of all edges between two communities, limiting the effectiveness of our method in applications that require graph connectivity. Future work will investigate adaptive pruning strategies that account for graph connectivity and reduce the risk of removing too many cross-community edges. We additionally would like to explore the sparsification regimes delineated in several of the heatmaps in Appendix B. Coarse measurements of graph structure alone do not account for this behavior; it remains an open question as to which factors determine the presence of these accuracy drop-offs.
Appendix A The Effect of Ricci Flow
To assess the contribution of Ricci flow, we compare the combined LRC-ORC pipeline with and without iterative Ricci-flow refinement. Both configurations use 2.5% LRC pruning followed by 2.5% ORC pruning, allowing us to examine the effect of Ricci flow on community-recovery accuracy and computational cost.
| Dataset | Configuration | LRC (%) | ORC (%) | ARI | NMI | Time (s) |
|---|---|---|---|---|---|---|
| DBLP | With Flow | 2.5 | 2.5 | 22.76 | ||
| No Flow | 2.5 | 2.5 | 3.95 | |||
| Amazon | With Flow | 2.5 | 2.5 | 1.34 | ||
| No Flow | 2.5 | 2.5 | 0.292 | |||
| With Flow | 2.5 | 2.5 | 77.31 | |||
| No Flow | 2.5 | 2.5 | 13.31 | |||
| YouTube | With Flow | 2.5 | 2.5 | 7.36 | ||
| No Flow | 2.5 | 2.5 | 1.61 |
Table 8: Comparison of the combined LRC–ORC pipeline with and without Ricci flow across four real-world benchmarks. ARI and NMI are reported as mean ± standard deviation over six random seeds where available.
Removing Ricci flow substantially reduces runtime across all four benchmarks, but its effect on community-recovery accuracy varies by dataset. Ricci flow improves ARI and NMI on DBLP and Amazon, whereas the combined method without flow achieves higher scores on Facebook and YouTube. These results suggest that iterative Ricci-flow refinement is beneficial for some network structures but is not universally necessary. The findings further support the structure-dependent behavior discussed in Section 5.6.
Appendix B Additional Sensitivity Heatmaps
In this section, we provide heatmaps showing timing and accuracy results across different pruning parameters for each dataset. The Adjusted Rand Index (ARI) uses a scale from -0.5 to 1. The Normalized Mutual Information (NMI) uses a scale from 0 to 1.

(a) ARI

(b) NMI
Figure 5: Sensitivity of Facebook community-detection performance to LRC and ORC-RF pruning parameters.

(a) ARI

(b) NMI
Figure 6: Sensitivity of Amazon community-detection performance to LRC and ORC-RF pruning parameters.

(a) ARI

(b) NMI
Figure 7: Sensitivity of DBLP community-detection performance to LRC and ORC-RF pruning parameters.

(a) ARI

(b) NMI
Figure 8: Sensitivity of YouTube community-detection performance to LRC and ORC-RF pruning parameters.
Code availability
Code and reproducible analysis notebooks for the experiments in this study are available in the GitHub repository [17] at https://github.com/Avin-Kolah dooz/curvature-guided-community-detection.
Acknowledgments
This work was supported in part by the National Cancer Institute of the National Institutes of Health under Award Number U54CA272167. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.
AI Usage Statement
The authors used OpenAI's ChatGPT and Microsoft's Copilot MAI-Code-1.1-Flash for language editing, LaTeX/source-file editing, theoretical discussion, and refinement of Python code used in the computational experiments. All mathematical claims, code, numerical results, figures, references, interpretations, and final text were independently reviewed and verified by the authors, who take full responsibility for the manuscript.
References
[1] Aynaud, T. (2009) python-louvain package. https://github.com/taynaud/python-louvain.
[2] Benczúr, A. A. & Karger, D. R. (1996) Approximating s-t Minimum Cuts in Time. In Proceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing, STOC '96, page 47–55, New York, NY, USA. Association for Computing Machinery.
[3] Blondel, V. D., Guillaume, J.-L., Lambiotte, R. & Lefebvre, E. (2008) Fast Unfolding of Communities in Large Networks. Journal of Statistical Mechanics: Theory and Experiment, 2008(10), P10008.
[4] Costanzo, M., Baryshnikova, A., Bellay, J., Kim, Y., Spear, E. D., Sevier, C. S., Ding, H., Koh, J. L., Toufighi, K., Mostafavi, S., Prinz, J., St. Onge, R. P., VanderSluis, B., Makhnevych, T., Vizeacoumar, F. J., Alizadeh, S., Bahr, S., Brost, R. L., Chen, Y., Cokol, M., Deshpande, R., Li, Z., Lin, Z.-Y., Liang, W., Marback, M., Paw, J., San Luis, B.-J., Shuteriqi, E., Tong, A. H. Y., van Dyk, N., Wallace, I. M., Whitney, J. A., Weirauch, M. T., Zhong, G., Zhu, H., Houry, W. A., Brudno, M., Ragibizadeh, S., Papp, B., Pál, C., Roth, F. P., Giaever, G., Nislow, C., Troyanskaya, O. G., Bussey, H., Bader, G. D., Gingras, A.-C., Morris, Q. D., Kim, P. M., Kaiser, C. A., Myers, C. L., Andrews, B. J. & Boone, C. (2010) The Genetic Landscape of a Cell. Science, 327(5964), 425–431.
[5] DasGupta, B., Grigorescu, E. & Mukherjee, T. (2023) On Computing Discretized Ricci Curvatures of Graphs: Local Algorithms and (Localized) Fine-Grained Reductions. Theoretical Computer Science, 975, 114127.
[6] Flake, G. W., Lawrence, S. & Giles, C. L. (2000) Efficient Identification of Web Communities. In Proceedings of the Sixth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD '00, page 150–160, New York, NY, USA. Association for Computing Machinery.
[7] Forman, R. (2003) Bochner's Method for Cell Complexes and Combinatorial Ricci Curvature. Discrete and Computational Geometry, 29(3), 323–374.
[8] Fortunato, S. (2010) Community Detection in Graphs. Physics Reports, 486(3), 75–174.
[9] Fu, X., Wang, J., Gao, Y., Sun, Q., Yuan, H., Li, J. & Li, X. (2025) Discrete curvature graph information bottleneck. In Proceedings of the Thirty-Ninth AAAI Conference on Artificial Intelligence and Thirty-Seventh Conference on Innovative Applications of Artificial Intelligence and Fifteenth Symposium on Educational Advances in Artificial Intelligence, AAAI'25/IAAI'25/EAAI'25. AAAI Press.
[10] Girvan, M. & Newman, M. E. J. (2002) Community Structure in Social and Biological Networks. Proceedings of the National Academy of Sciences, 99(12), 7821–7826.
[11] Guimerà, R. & Nunes Amaral, L. A. (2005) Functional Cartography of Complex Metabolic Networks. Nature, 433(7028), 895–900.
[12] Hagberg, A. A., Schult, D. A. & Swart, P. J. (2008) NetworkX: Network Analysis in Python. Proceedings of the 7th Python in Science Conference, pages 11–15.
[13] Hubert, L. & Arabie, P. (1985) Comparing Partitions. Journal of Classification, 2(1), 193–218.
[14] Javed, M. A., Younis, M. S., Latif, S., Qadir, J. & Baig, A. (2018) Community Detection in Networks: A Multidisciplinary Review. Journal of Network and Computer Applications, 108, 87–111.
[15] Jost, J. & Liu, S. (2013) Ollivier's Ricci Curvature, Local Clustering and Curvature-Dimension Inequalities on Graphs. Discrete & Computational Geometry, 51(2), 300–322.
[16] Karampour, E., Malek, M. R. & Eidi, M. (2025) Discrete Ricci Flow: A Powerful Method for Community Detection in Location-Based Social Networks. Computers and Electrical Engineering, 123, 110302.
[17] Kolahdooz, A. (2026) Curvature-Guided Community Detection (code and notebooks). https://github.com/Avin-Kolahdooz/curvature-guide-d-community-detection. GitHub repository. Accessed: 2026-10-06.
[18] Leskovec, J., Lang, K. J., Dasgupta, A. & Mahoney, M. W. (2009) Community Structure in Large Networks: Natural Cluster Sizes and the Absence of Large Well-Defined Clusters. Internet Mathematics, 6(1), 29–123.
[19] Leskovec, J. & McAuley, J. J. (2012) Learning to Discover Social Circles in Ego Networks. In Advances in Neural Information Processing Systems.
[20] Lin, Y., Lu, L. & Yau, S.-T. (2011) Ricci Curvature of Graphs. Tohoku Mathematical Journal, 63(4), 605 – 627.
[21] Ni, C., Lin, Y., Gao, J. & Gu, X. (2019a) GraphRicciCurvature: A Python Package for Discrete Ricci Curvature. GitHub repository.
[22] Ni, C.-C., Lin, Y.-Y., Gao, J. & Gu, X. (2018) Network Alignment by Discrete Ollivier-Ricci Flow. In Biedl, T. & Kerren, A., editors, Graph Drawing and Network Visualization, pages 447–462, Cham. Springer International Publishing.
[23] Ni, C.-C., Lin, Y.-Y., Luo, F. & Gao, J. (2019b) Community Detection on Networks with Ricci Flow. Scientific Reports, 9(1).
[24] Ollivier, Y. (2009) Ricci Curvature of Markov Chains on Metric Spaces. Journal of Functional Analysis, 256(3), 810–864.
[25] Park, Y. J. & Li, D. (2025) Lower Ricci Curvature for Efficient Community Detection. Transactions on Machine Learning Research.
[26] Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V. et al. (2011) Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research, 12, 2825–2830.
[27] Python Software Foundation (2021) Python 3.11. https://www.python.org/.
[28] Rand, W. M. (1971) Objective Criteria for the Evaluation of Clustering Methods. Journal of the American Statistical Association, 66(336), 846–850.
[29] Shannon, C. E. (1948) A Mathematical Theory of Communication. The Bell System Technical Journal, 27(4), 623–656.
[30] Sia, J., Jonckheere, E. & Bogdan, P. (2019) Ollivier-Ricci Curvature-Based Method to Community Detection in Complex Networks. Scientific Reports, 9(1).
[31] (SNAP), S. N. A. P. (2024a) Amazon Product Co-purchasing Network Metadata. https://snap.stanford.edu/data/com-Amazon.html. Accessed: 2026-07-03.
[32] (SNAP), S. N. A. P. (2024b) DBLP Collaboration Network Metadata. https://snap.stanford.edu/data/com-DBLP.html. Accessed: 2026-07-03.
[33] Spielman, D. A. & Teng, S.-H. (2004) Nearly-Linear Time Algorithms for Graph Partitioning, Graph Sparsification, and Solving Linear Systems. In Proceedings of the Thirty-Sixth Annual ACM Symposium on Theory of Computing, STOC '04, page 81–90, New York, NY, USA. Association for Computing Machinery.
[34] Stanford Network Analysis Project (2009) YouTube Social Network Dataset (SNAP). https://snap.stanford.edu/data/com-Youtube.html. Accessed 2025-12-19.
[35] Stanford Network Analysis Project (2012) Social circles: Facebook (SNAP dataset). https://snap.stanford.edu/data/egonets-Facebook.html. Accessed 2025-12-19.
[36] Tian, Y., Lubberts, Z. & Weber, M. (2025) Curvature-Based Clustering on Graphs. Journal of Machine Learning Research, 26(52), 1–67.
[37] Traag, V. A., Waltman, L. & van Eck, N. J. (2019) From Louvain to Leiden: Guaranteeing Well-Connected Communities. Scientific Reports, 9(1), 5233.
[38] van der Hoorn, P., Cunningham, W. J., Lippner, G., Trugenberger, C. & Krioukov, D. (2021) Ollivier-Ricci Curvature Convergence in Random Geometric Graphs. Phys. Rev. Res., 3, 013211.
[39] Yang, J. & Leskovec, J. (2012) Defining and Evaluating Network Communities Based on Ground-Truth. In Proceedings of the ACM SIGKDD Workshop on Mining Data Semantics, pages 1–8.