arXiv:2608.30934cs.SIAug 2026

Manuscript Offprint

arXiv:2608.30934

Scaled Null-Adjusted Persistence: A Multiscale Bridge between Modularity and Persistence

Alessandro Avellone, Paolo Bartesaghi, Stefano Benati, Rosanna Grassi

Abstract

Community detection methods must balance two competing objectives: identifying small, cohesive groups while avoiding excessive fragmentation. Modularity, the most widely adopted optimization criterion, typically merges small communities in large networks due to its resolution limit. In contrast, a persistence-based criterion promotes more granular partitions. We introduce Scaled Null-Adjusted Persistence (Scaled-NAP), a parametric family of quality functions that incorporates both these criteria. The definition exploits the exact identity between a cluster's modularity contribution and its Null-Adjusted Persistence (NAP) multiplied by its relative volume. Raising this volume factor to a parameter α∈[0,1]\alpha \in [0,1] yields NAP at α=0\alpha = 0 and modularity at α=1\alpha = 1, while intermediate values control the scale of the detected partition. We derive conditions under which merging two communities improves the objective function and characterize the emergence of scale dependence, including resolution-limit behaviour on Caveman graphs. We develop the Milano algorithm, a multilevel Louvain-style heuristic for optimizing Scaled-NAP on large networks. Experiments on weighted and unweighted Lancichinetti-Fortunato-Radicchi benchmarks show that Scaled-NAP achieves the highest or tied-highest recovery wherever the ground truth structure is detectable, with its advantage increasing under community-size heterogeneity. Tests on three real networks with up to 1.1 million nodes confirm its capability to identify fine-grained ground-truth communities. The Milano algorithm also turned out to be the fastest method evaluated on large networks. These results show that Scaled-NAP provides an effective and scalable bridge between modularity-based and persistence-based community detection methodologies.

Keywords: Networks; Community detection; Modularity; Null-Adjusted Persistence; Scaled-NAP.

1 Introduction

One of the main issues in network theory is to discover the node community structure. It has important applications in many fields of operational research, such as pandemic contention [1, 8], warehouse management [21], terrorism investigation [25, 2], finance [26, 3], portfolio optimization [45], asset allocation [16], world trade [19, 9], voting alliances [27, 10], opinion surveys [11]. In a taxonomy proposed in [18], community detection methods can be constructive, such as variants of hierarchical clustering, they can rely on inferential statistics (assuming a data generative model), or simulate dynamic processes to reveal hidden structural information. Finally, one of the most important methodologies is to solve an optimization model, to find the communities as the outcome of an optimal partition problem. This method has a clear advantage over the others in its objectivity: given two partitions (corresponding to two community structures), one can establish which is the best by comparing their objective function. A crucial feature of optimization methods is identifying the most appropriate objective function to define a community in a given application.

The modularity function is a widely used statistic (and objective function) to find the optimal partitions [29]. The modularity compares the actual number of edges connecting node pairs within the same cluster with its expected value under a null hypothesis, called the configuration model. It is a widespread model, popularized through the Louvain algorithm available in the Python and R platforms, but is affected by the so-called resolution limit: small communities of a large network cannot be identified, as they are merged into larger groups owing to the mathematical properties of the modularity function [17, 6]. To overcome this issue, different solutions have been proposed. Some literature suggested correcting the modularity through the arc density, see [14], or through the difference with a reference calculated through the z-score, see [28]. Another possibility is to use different network statistics, such as the Map equation, see [37], or the persistence function, see [33].

In this contribution, we will focus our attention on the persistence function, see [33, 7, 6], as a viable alternative to modularity to detect network communities. Indeed, as discussed in [6], the persistence is defined by the probability (in a long term dynamic process) that a random walker moving randomly through the network will remain in the nodes of the same cluster. In [6], a variation of the persistence, called Null-Adjusted Persistence (NAP), has been proposed. Taking inspiration from modularity, the persistence function is corrected by a term representing its expected value under the configuration model. The configuration model, that is, the same node degree distribution but arcs randomly located, is assumed as the null hypothesis: a random graph in which no community structure is imposed. So, the difference between the actual and the theoretical persistence is a measure that can reveal the community structure of the network. Indeed, the optimal partition, i.e. the community detection, is calculated through the maximum of the NAP. There are some important differences between NAP and modularity. From a theoretical point of view, it has been established that, conversely to modularity, the NAP does not suffer from the resolution limit. This property is important: affected by the network size, the modularity tends to produce large communities, to the point that, in empirical applications, the small clusters are not recognized, but merged into the largest communities. Conversely, NAP is insensitive to both network and community size, allowing large and small communities to remain clearly distinguishable regardless of the overall network scale. Empirical tests confirmed the theoretical properties in the practical applications. Modularity, as affected by the resolution limit, tends to merge the true small communities into the largest ones, while NAP, not affected, tends to recognize the quality of the small communities. Broadly speaking, modularity yields a smaller number of communities than NAP.

However, having to choose between the two measures to detect communities, a researcher should consider both their quantitative properties and the qualitative properties that are assumed by the two measures. Actually, NAP and modularity are two quantitative measures that rely on two different qualitative assumptions about what is a community. Modularity emphasizes a static interpretation, that is, nodes within a community are characterized by strong bonds (represented by arcs) between them. NAP emphasizes a dynamic interpretation, as communities are formed by nodes in which the information flow tends to be more persistent. One may wonder what could be done when the choice between the two measures is not straightforward, or when modularity is the appropriate measure but the resolution limit has to be avoided. In this work, a new parametric family of network statistics, called Scaled Null-Adjusted Persistence (Scaled-NAP) is proposed as a bridge between NAP and modularity. Indeed, a parametric factor controls the resolution limit from the modularity to the persistence. The parametric factor corresponds to inflating the cluster volume, a measure defining the strength of the cluster. So, this parametric family depends on a real parameter α∈[0,1]\alpha \in [0,1] that provides NAP and modularity as special cases: the NAP corresponds to α=0\alpha = 0, while the modularity corresponds to α=1\alpha = 1.

In this contribution, we analyse the application of Scaled-NAP to community detection from a theoretical and practical perspective. From a theoretical point of view, we will analyse the role of α\alpha to avoid the resolution limit. Having the two extreme measures modularity and NAP—the former affected by the resolution limit, the latter not—one may wonder what are the values of α\alpha that cause the resolution limit to disappear. We will see that small perturbation of α\alpha around the modularity are enough to obtain a resolution-free Scaled-NAP measure in specific network structures while keeping very close to the actual modularity. From a practical point of view, we elaborated on previous NAP optimization, see [7, 6], to implement a heuristic procedure to find the optimal Scaled-NAP partitions. The specific purpose is to design a scalable procedure capable of calculating near-optimal partitions without exceeding memory and time limits, even for graphs with billions of arcs. Therefore, taking advantage of past computational experiences, we developed a variant of the Louvain algorithm for the optimal Scaled-NAP partition, an algorithm that is called Milano, following the tradition of naming community subroutines with the name of a city, see [12, 39, 4]. Next, we tested the reliability of the partitions calculated through Scaled-NAP optimization on many ground-truth simulated networks and we found that Scaled-NAP optimization can recover the hidden communities with remarkable precision, often improving the partitions calculated through alternative methods. We repeated the experiments on a set of real-world large networks with ground-truth, again showing the ability (and sometimes the weakness) of Scaled-NAP optimization compared to other methods.

The paper is organized as follows. Section 2 reviews Null-Adjusted Persistence and its relationship with modularity. Section 3 introduces the Scaled-NAP family and shows how NAP and modularity emerge as its two endpoint cases. Section 4 derives the conditions under which merging clusters improves the Scaled-NAP objective and investigates scale dependence and resolution-limit behaviour, with specific reference to caveman graphs. Section 5 addresses the resulting optimization problem and presents the multilevel Milano algorithm. Section 6 reports the computational experiments on weighted and unweighted synthetic benchmark networks, whereas Section 6.4 evaluates the proposed approach on large real-world networks with known community structure. Section 7 summarizes the main findings and outlines directions for future research. Finally, Appendix A presents an exact mixed-integer linear programming formulation of the problem, and Appendix B compares the external validation measures used in the computational analysis.

References (38)