# Post-Processing Partitions to Identify Domains of Modularity Optimization
## 1 Introduction  
Networks are a natural and powerful representation for relational data, providing access to a large repertoire of analytic tools that may be leveraged to better understand the underlying data in numerous applications. Among the many popular methods developed throughout social network analysis and network science, community detection provides a valuable vehicle for exploring, visualizing, and modeling network data. The identification and characterization of community structures also highlights subgraphs that may be of special interest, depending on the application. Many methods for community detection are available and have been employed meaningfully in applications (see, e.g., reviews [1; 2; 3; 4; 5; 6]). Some of the most heavily used computational heuristics for finding communities involve optimizing a quantity known as modularity, which was introduced by [PERSON] and [PERSON] [7] and measures the total weight of within-community edges relative to the expected weight in a corresponding \"null-model\" random graph. For (possibly weighted) undirected networks that are compared to the configuration null model, modularity is given by [7]  
\[Q(\gamma)=\frac{1}{2m}\sum_{i,j}\left(A_{ij}-\gamma\frac{k_{i}k_{j}}{2m}\right) \delta(c_{i},c_{j})\,, \tag{1}\]where \(A_{ij}\) are the elements of the adjacency matrix describing the presence (and possibly weights) of edges between nodes \(i\) and \(j\), \(k_{i}=\sum_{j}A_{ij}\) is the strength (weighted degree) of node \(i\), \(m=\frac{1}{2}\sum_{i}k_{i}\) is the total edge weight, \(c_{i}\) indexes the community to which node \(i\) has been assigned, \(\delta(c_{i},c_{j})=1\) if \(c_{i}=c_{j}\) and \(0\) otherwise, and \(\gamma\) is a resolution parameter introduced by [PERSON] and [PERSON] [8] to influence the number and sizes of communities obtained, whereas \(\gamma=1\) in the original formulation [7]. Tuning the resolution parameter \(\gamma\) can reveal community structures at multiple scales, which offers one strategy to overcome the \"resolution limit\" of modularity [9] wherein small communities in sufficiently large networks cannot be detected via Equation (1) given fixed \(\gamma\). See also [10; 11] for an alternative approach for resolving multiple scales. Formulae analogous to Equation (1) exist to define modularity for a variety of other network types, including directed [12], bipartite [13], signed [14; 15] and multilayer networks [16], with corresponding replacements for the \(\frac{k_{i}k_{j}}{2m}\) term to account for the expected weights under different null models. Motivating our present contribution, some of these models introduce additional parameters beyond the resolution parameter \(\gamma\). We emphasize that throughout this work we will use the term \"modularity\" in its broadest sense to include any of these generalizations as applied appropriately to a given data set. Such generalizations include the use of resolution parameter \(\gamma\), multiple resolution parameters for signed networks, and including one or more interlayer-coupling parameters for multilayer networks. Regardless of the network type, the primary goal in modularity maximization is to determine the community labels \(\{c_{i}\}\) that maximize \(Q\). Finding the partition with a guarantee of globally optimizing modularity is not computationally feasible except in the smallest networks [17], and there may be many nearly-optimal partitions [18]. It is worth noting that in initial exploration of a new data set, there is no _a priori_ notion of what constitutes a \"good\" value of \(Q\). Furthermore, real community structures may be more complex than those describable by a hard partition of nodes into communities, which fails to account for overlapping communities and insists on assigning every node to a community. Even with its problems, maximizing modularity remains a highly-used method for community detection, with many software packages available, some of which are computationally very efficient in practice.