# Background¶

We present multimodbp, a belief propagation implementation of multilayer modularity for communtiy detectionOur tool is a C++ based implentation of the belief propagation algorithm (also called the sum-product or message passing algorithm) wrapped in Python for convenient access and execution.

## Multilayer Modularity¶

One of the strengths of modularity is that it has been extended in a principled way into a variety of network topologies in particular the multilayer context. The multilayer formulation [1] for modularity incorporates the interlayer connectivity of the network in the form of a second adjacency matrix $$C_{ij}$$

$$Q(\gamma)=\frac{1}{2m}\sum_{i,j}{\left( A_{ij}-\gamma \frac{k_ik_j}{2m} \ +\omega C_{ij}\right)\delta(c_i,c_j)}$$

Communities in this context group nodes within the layers and across the layers. The inclusion of the $$C_ij$$ boost the modularity for communites that include alot interlayer links. There is an additional parameter, $$\omega$$ that tunes how much weight these interlink ties contribute to the modularity.

### References¶

 [1] Peter J Mucha, Thomas Richardson, Kevin Macon, Mason A Porter, and Jukka-Pekka Onnela. Community structure in time-dependent, multiscale, and multiplex networks. Science, 328(5980):876–878, May 2010.