A Bayesian framework for community detection in networks

Large-scale networks describing complex interactions between a multitude of objects have found application in a wide array of fields, from biology to social science to information technology [10, 3, 2]. In these applications one often wishes to model networks, suppressing the complexity of the full description while retaining relevant information about the structure of the interactions [12]. One such network model is a modular description in which nodes are grouped into communities, with a large number of interactions within communities and fewer interactions between communities. Many existing studies focus on defining measures of modularity and performing community detection [8, 6, 4, 7, 9, 1] but few infer model parameters, community assignments, and the number of communities within one framework. We present a Bayesian approach to network modularity which performs the above tasks and, in doing so, generalizes many previous studies on the subject. Specfically, we consider a generative model for modular networks in which each node is randomly assigned to a module and edges between nodes are drawn from two independent Erdős-Reýni distributions. Given the data (an adjacency matrix for a particular network), we evaluate the Bayesian evidence p(D|K) = ∫ dΘ p(D|Θ, K)p(Θ|K) where D are the data, Θ are the parameters and latent module assignments, and K is the number of modules, by integrating over all parameter and latent variable settings. In doing so, we both infer the posterior distribution p(Θ|D, K) over parameters and module assignments and use the evidence to perform complexity control, dermining the optimal number of modules. To calculate the exact evidence, we integrate over parameters analytically and exploit implicit symmetries to compute the remaining sum over module assignments orders of magnitude faster than complete enumeration, which requires K integrand evaluations for N nodes and K modules. While this method can, in principle, be used to evaluate the evidence for networks of arbitrary size, runtimes scale too quickly with N to be practically applicable for large-scale networks. To accomodate large-scale networks for which exact calculation of the evidence is computationally intractable, we use a variational Bayes [5] approach that results in an iterative algorithm which produces approximations to the posterior p(Θ|D, K) and the evidence p(D|K). This approximation can be analytically shown to be bounded by the true evidence and the iterative algorithm converges extremely quickly. See Fig. 1 for an illustration of the iterative algorithm and experimental validation of the technique on a small network for which the exact evidence can be calculated and compared to the variational approximation. We validate the method with synthetic data and apply it to various real-world social networks. Application of this technique to one such network, Zachary’s karate network [11], is shown in Fig. 1. In explicitly considering modular network models in a generative framework we have exploited Bayesian techniques to infer posterior distributions over model parameters and module assignments from the data, while simultaneously performing complexity control to automatically determine the number of modules a given network permits. For small networks, we have shown a means for calculating the exact evidence and posterior, while for large networks we used variational techniques to arrive at suitable approximations for the quantities of interest. The developed techniques are principled, interpretable, computationally efficient, and lend themselves to future generalizations (including model selection between non-nested network models).