  Large complex networks are often organized into groups or communities. In
this paper, we introduce and investigate a generative model of network
evolution that reproduces all four pairwise community types that exist in
directed networks: assortative, core-periphery, disassortative, and the newly
introduced source-basin type. We fix the number of nodes and the community
membership of each node, allowing node connectivity to change through rewiring
mechanisms that depend on the community membership of the involved nodes. We
determine the dependence of the community relationship on the model parameters
using a mean-field solution. It reveals that a difference in the swap
probabilities of the two communities is a necessary condition to obtain a
core-periphery relationship and that a difference in the average in-degree of
the communities is a necessary condition for a source-basin relationship. More
generally, our analysis reveals multiple possible scenarios for the transition
between the different structure types, and sheds light on the mechanisms
underlying the observation of the different types of communities in network
data.
