
TL;DR
This paper explores how modularity-based community detection in bipartite networks is affected by projection, proposing a new modularity definition, algorithms, and heuristics for improved community identification.
Contribution
It introduces a bipartite-specific modularity measure, compares multiple algorithms, and proposes a heuristic for community detection in bipartite networks.
Findings
Different algorithms reveal diverse community structures.
Projection impacts community detection outcomes.
A simple heuristic improves bipartite community detection.
Abstract
This paper investigates community detection by modularity maximisation on bipartite networks. In particular we are interested in how the operation of projection, using one node set of the bipartite network to infer connections between nodes in the other set, interacts with community detection. We first define a notion of modularity appropriate for a projected bipartite network and outline an algorithm for maximising it in order to partition the network. Using both real and synthetic networks we compare the communities found by five different algorithms, where each algorithm maximises a different modularity function and sees different aspects of the bipartite structure. Based on these results we suggest a simple heuristic for finding communities in bipartite networks.
| Standard | Projected | Naive | BiLouvain | Dual Projection | |
| 0.152 | 0.152 | 0.089 | 0.070 | 0.152 | |
| H | Standard | Projected | Naive | BiLouvain | Dual Projection |
| Standard | 1.000 | 1.000 | 0.728 | 0.846 | 1.000 |
| Projected | 1.000 | 1.000 | 0.728 | 0.846 | 1.000 |
| Naive | 0.459 | 0.459 | 1.000 | 0.859 | 0.459 |
| BiLouvain | 0.429 | 0.429 | 0.690 | 1.000 | 0.429 |
| Dual Projection | 1.000 | 1.000 | 0.728 | 0.846 | 1.000 |
| V | Standard | Projected | Naive | BiLouvain | Dual Projection |
| Standard | 1.000 | 1.000 | 0.563 | 0.569 | 1.000 |
| Projected | 1.000 | 1.000 | 0.563 | 0.569 | 1.000 |
| Naive | 0.563 | 0.563 | 1.000 | 0.765 | 0.563 |
| BiLouvain | 0.569 | 0.569 | 0.765 | 1.000 | 0.569 |
| Dual Projection | 1.000 | 1.000 | 0.563 | 0.569 | 1.000 |
| Standard | Projected | Naive | BiLouvain | Dual Projection | |
| 0.152 | 0.152 | 0.089 | 0.070 | 0.152 | |
| H | Standard | Projected | Naive | BiLouvain | Dual Projection |
| Standard | 1.000 | 1.000 | 0.728 | 0.846 | 1.000 |
| Projected | 1.000 | 1.000 | 0.728 | 0.846 | 1.000 |
| Naive | 0.459 | 0.459 | 1.000 | 0.859 | 0.459 |
| BiLouvain | 0.429 | 0.429 | 0.690 | 1.000 | 0.429 |
| Dual Projection | 1.000 | 1.000 | 0.728 | 0.846 | 1.000 |
| V | Standard | Projected | Naive | BiLouvain | Dual Projection |
| Standard | 1.000 | 1.000 | 0.563 | 0.569 | 1.000 |
| Projected | 1.000 | 1.000 | 0.563 | 0.569 | 1.000 |
| Naive | 0.563 | 0.563 | 1.000 | 0.765 | 0.563 |
| BiLouvain | 0.569 | 0.569 | 0.765 | 1.000 | 0.569 |
| Dual Projection | 1.000 | 1.000 | 0.563 | 0.569 | 1.000 |
| Standard | Projected | Naive | BiLouvain | Dual Projection | |
| 0.887 | 0.902 | 0.857 | 0.851 | 0.879 | |
| H | Standard | Projected | Naive | BiLouvain | Dual Projection |
| Standard | 1.000 | 0.940 | 0.916 | 0.913 | 0.821 |
| Projected | 0.919 | 1.000 | 0.908 | 0.906 | 0.839 |
| Naive | 0.861 | 0.873 | 1.000 | 0.966 | 0.763 |
| BiLouvain | 0.840 | 0.852 | 0.946 | 1.000 | 0.729 |
| Dual Projection | 0.958 | 1.000 | 0.947 | 0.923 | 1.000 |
| V | Standard | Projected | Naive | BiLouvain | Dual Projection |
| Standard | 1.000 | 0.929 | 0.887 | 0.875 | 0.884 |
| Projected | 0.929 | 1.000 | 0.890 | 0.878 | 0.912 |
| Naive | 0.887 | 0.890 | 1.000 | 0.956 | 0.845 |
| BiLouvain | 0.875 | 0.878 | 0.956 | 1.000 | 0.815 |
| Dual Projection | 0.884 | 0.912 | 0.845 | 0.815 | 1.000 |
| Standard | Projected | Naive | BiLouvain | Dual Projection | |
| 0.877 | 0.883 | 0.857 | 0.860 | 0.848 | |
| H | Standard | Projected | Naive | BiLouvain | Dual Projection |
| Standard | 1.000 | 0.873 | 0.827 | 0.803 | 0.660 |
| Projected | 0.871 | 1.000 | 0.828 | 0.820 | 0.672 |
| Naive | 0.759 | 0.762 | 1.000 | 0.835 | 0.570 |
| BiLouvain | 0.750 | 0.768 | 0.850 | 1.000 | 0.572 |
| Dual Projection | 0.871 | 0.888 | 0.818 | 0.807 | 1.000 |
| V | Standard | Projected | Naive | BiLouvain | Dual Projection |
| Standard | 1.000 | 0.872 | 0.792 | 0.776 | 0.751 |
| Projected | 0.872 | 1.000 | 0.794 | 0.793 | 0.765 |
| Naive | 0.792 | 0.794 | 1.000 | 0.843 | 0.672 |
| BiLouvain | 0.776 | 0.793 | 0.843 | 1.000 | 0.670 |
| Dual Projection | 0.751 | 0.765 | 0.672 | 0.670 | 1.000 |
| Standard | Projected | Naive | BiLouvain | Dual Projection | |
| 0.940 | 0.948 | 0.890 | 0.906 | 0.918 | |
| H | Standard | Projected | Naive | BiLouvain | Dual Projection |
| Standard | 1.000 | 0.941 | 0.905 | 0.905 | 0.815 |
| Projected | 0.929 | 1.000 | 0.897 | 0.903 | 0.815 |
| Naive | 0.884 | 0.888 | 1.000 | 0.919 | 0.783 |
| BiLouvain | 0.887 | 0.898 | 0.923 | 1.000 | 0.791 |
| Dual Projection | 0.963 | 0.976 | 0.947 | 0.953 | 1.000 |
| V | Standard | Projected | Naive | BiLouvain | Dual Projection |
| Standard | 1.000 | 0.935 | 0.895 | 0.896 | 0.883 |
| Projected | 0.935 | 1.000 | 0.893 | 0.901 | 0.889 |
| Naive | 0.895 | 0.893 | 1.000 | 0.921 | 0.857 |
| BiLouvain | 0.896 | 0.901 | 0.921 | 1.000 | 0.865 |
| Dual Projection | 0.883 | 0.889 | 0.857 | 0.865 | 1.000 |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Modularity and Projection of Bipartite Networks
Rudy Arthur
Department of Computer Science, University of Exeter, North Park Road,Exeter,UK,EX4 4QF
Abstract
This paper investigates community detection by modularity maximisation on bipartite networks. In particular we are interested in how the operation of projection, using one node set of the bipartite network to infer connections between nodes in the other set, interacts with community detection. We first define a notion of modularity appropriate for a projected bipartite network and outline an algorithm for maximising it in order to partition the network. Using both real and synthetic networks we compare the communities found by five different algorithms, where each algorithm maximises a different modularity function and sees different aspects of the bipartite structure. Based on these results we suggest a simple heuristic for finding communities in bipartite networks.
keywords:
Networks, Community Detection, Bipartite, Modularity
††journal: Physica A: Statistical Mechanics and its Applications
1 Introduction
Bipartite graphs are ubiquitous in network theory. To cite a few of the better known examples; networks of movies and actors [1], papers and co-authors [2], words and documents [3], disorders and genes [4], consumers and purchases [5] can all be represented as bipartite networks. A bipartite network consists of two sets of nodes of different type e.g. actors in one set and movies in the other, and connections only between nodes in different sets. These conditions mean that many of the metrics and algorithms developed for unipartite/one-node-type networks do not work ‘out of the box’.
The two main approaches to dealing with bipartite structure have been
Modifying unipartite algorithms to account for the bipartite structure. 2. 2.
Projecting the bipartite graph onto one of its node sets.
We will be interested in the second approach for the particular problem of community detection. The first approach would seem to side-step many issues but it is still valuable to study the projection problem. Many useful unipartite metrics or algorithms cannot be extended to the bipartite case and often, even when they can, the implementation is only available in specialist software and not in general purpose network analysis tool-kits like Gephi[6] or NetworkX[7]. The idea of projection is also intuitively reasonable. The network of actors linked based on shared credits for example, has been a benchmark of network analysis since its early days, however the optimal way to weight each of these links is much debated [8, 9, 10]. Finally, we may not always have access to the bipartite network. Our network may be better described by a bipartite network but the bipartite structure may be hidden. For example, connections in an online social network can be made at parties, hobbies or at work but the person/event graph is not observable, we only observe its ‘projection’ through the friend/follower connection on the social network.
It is therefore important to know what kind of information is lost and what is preserved when projecting a bipartite network. Certainly there are different bipartite network motifs which lead to the same projected unipartite graph [11]. However analysis of network’s eigenvalue spectrum suggests that much of the information from the original graph is preserved, especially if both projections are available [12, 13].
In this work we address the problem of community detection and bipartite projection. The community detection problem [14, 15] asks for a partition of the nodes into disjoint sets (though see e.g. [16] where overlapping sets are allowed) such that nodes in the same set are more densely connected to each other than to nodes not in the set. Though many approaches to this problem exist e.g. the stochastic block model [17], betweenness centrality [8], spectral methods [18], the most popular approaches, and the ones we will focus on, are based on optimising modularity [19]. The questions we will try to answer in this work are the following. Does projecting destroy community structure that is present in the bipartite graph or induce spurious community structure that is not present in the unprojected graph? If so, what kinds of bipartite graphs suffer more or less from these problems? And crucially, what should one do in practice for detecting communities in a bipartite graph?
There are two parts to our work. The first part is formulating a definition of modularity that is appropriate for projections of bipartite networks and describing a community detection algorithm based on this definition. The second part is a comparison between the different modularity functions which can be used to detect communities in bipartite networks. The aim of this is to examine the interaction between projection and community detection. We will identify the conditions a network should satisfy so that communities detected after projection reflect the true structure of the network and are not distorted by the projection operation. Based on this we make suggestions for how to approach community detection on bipartite graphs in practice.
In section 2 we review the definition modularity, how it has been modified for bipartite graphs and introduce our own definition suitable for working with projected bipartite graphs. In section 3 we describe how to construct bipartite graphs with specified community structure and specified degree distributions, similar to the LFR benchmarks [20]. Section 4 outlines the algorithms we will use to detect community structure. Section 5 describes the metrics we use to measure partition similarity, we use three metrics which respond to different error modes, giving a richer picture of the quality of the partitions found by the community detection algorithms. In section 6 we attempt to address the questions posed above using the synthetic networks: namely when projection affects the community structure that can be detected by modularity based methods. In section 7 we see how the same approaches work on real bipartite networks before concluding in section 8 and suggesting some practical heuristics for community detection.
2 Modularity and Communities
Modularity makes formal our intuitive sense that a network’s communities should have more internal links than external ones. Consider a partition of the nodes, , mapping each node label, , to a community label. Modularity is the difference between the proportion of within community nodes in the original network and the proportion that would be expected using the same partition and re-wiring the network while keeping the degrees of all the nodes fixed.
[TABLE]
Here is the adjacency matrix of the network, is the degree of node and is twice the number of edges in the network. Different null models are possible and a more general modularity definition is
[TABLE]
where is the probability of nodes and being connected in the null model. is the so-called resolution parameter [21, 22] which we will set to 1 in the following, but which can be used to force the optimal modularity partition to contain more or fewer communities.
For a bipartite network, the constraint that no connections can exist between nodes of the same type has inspired several different definitions of modularity. The most common, and the one we will use in this paper, is due to Barber [23] who defined the modularity of a bipartite graph as
[TABLE]
where is the bipartite adjacency matrix, and and . Other well known bipartite modularities are due to Guimera et. al. [24] and Murata [25], though we will not consider them here.
2.1 Modularity for Projected Bipartite Networks
We will project the bipartite graph onto one of its node types using a simple weighted projection.
[TABLE]
defines the adjacency matrix of the bipartite network after projection onto the ‘bottom’ nodes. In what follows we will always refer to the nodes we have projected onto, e.g. actors, as bottom nodes and the nodes we have projected out, e.g. movies, as top nodes. The standard definition of modularity uses a null model based on the idea of rewiring connections while keeping the degrees of each node fixed. However when working with a projected bipartite graph we know that connections between nodes are induced by shared neighbours in the original graph. We propose a new definition of modularity that accounts for this fact.
As usual, we define modularity as the difference between two ratios. We measure the proportion of in-community edges in the projected graph using
[TABLE]
where is the projected adjacency matrix. Our new null model is to randomly rewire edges in the original bipartite graph and compute the projection. The probability of having a link between and in the projected, randomly rewired network is the probability of a link between and times the probability of having a link between and , summed over all
[TABLE]
where we used . We define projected modularity as
[TABLE]
We now have two ways to measure the modularity of communities on a projected bipartite graph: where the null model rewires the projected graph or where the null model rewires the original graph, then projects. This difference is crucial when dealing with high degree nodes. A node with edges in the bipartite graph induces edges in the projected graph, thus the degrees and can be quite different for large . Since the formation of cliques is one of the main ways projection hides network structure [11], using should help us, and our algorithms, to ‘see’ more of the network’s structure.
3 Synthetic Networks
There is an extensive literature on how the degree distribution of the top and bottom nodes affects the degree distribution of the projected network [26, 27, 28, 29]. Some exact results are available for e.g. exponential and Poisson distributions but for the most interesting, and important, case of power law distributions we have to rely on stochastic simulations. If both the top and bottom node’s degree distributions are power laws, and , with exponents , Vasques et. al. [29] show that when the bottom nodes have a heavier-tailed degree distribution, , the degree distribution of the projected graph follows the degree distribution of the bottom node set. In the alternative case, the degree distribution of the projected graph is power-law like (with exponent roughly ) but flattened, due to large cliques forming.
We generate synthetic bipartite networks with known degree distributions following [29]. For each of the top nodes and bottom nodes we assign a degree value from the chosen distributions to give us top and bottom degree sequences and . We check the equality and discard a random node from the set with the largest sum until it is satisfied. Finally we join the stubs at random. In the case where the average degrees in each node set are different we will end up with unbalanced graphs, i.e. , see [29] for details. To build in a target community structure we construct bipartite networks, with the same top and bottom distributions and starting and . We then cut a fraction of the links at random and join the stubs without regard to the community structure.
is the amount of noise in the network, similar to the LFR parameter [20]. For we have disconnected components while for we have no preference for the original communities. As increases the original community structure becomes undetectable [30, 31, 32]. At this point community detection algorithms will still work, in the sense of detecting sets of densely inter-connected nodes, but these communities will not correspond to the target structure. This can be a point of confusion, there are partitions of random graphs which have high modularity [24, 33] even though there is no ‘real’ community structure. In the following we will look at both modularity and agreement with the target structure as measures of success, remembering that these are not equivalent and can even be opposed.
4 Algorithms
We will detect communities using both the bipartite and projected networks. For the bipartite network we use the following 3 approaches
Naive. We run the Louvain algorithm [34] on the bipartite graph, ignoring the constraints imposed by the bipartite structure and optimising the standard modularity 1. 2. 2.
BiLouvain. We run the modified Louvain algorithm described in [35] on the bipartite graph optimising Barber Modularity 3. 3. 3.
Dual Projection. Following [13] we run the Louvain algorithm on the top and bottom projections separately, optimising , and then use agglomerative clustering [14] to join the top and bottom communities in order to maximise Barber modularity, .
The Dual Projection approach usually optimises at both stages. We have two choices for optimisation in the projection steps: or and two choices in the agglomerative clustering step or . We chose to optimise during the projection step and during the agglomeration step so that the algorithm can ‘see’ the bipartite structure as much as possible.
For the projected network we will use
Standard. We run the Louvain algorithm [34] on the projected graph optimising the standard modularity 1. 2. 5.
Projected. We run the Louvain algorithm [34] on the projected graph optimising the projected modularity 7.
For the projected network we will also compare the partitions found by the bipartite algorithms with the top nodes discarded.
The Louvain algorithm is a widely used and efficient method for producing near optimal community partitions. To implement the Louvain method using we need two results.
The formula for the gain in modularity from adding a node to a community. To compute this we rewrite modularity 7
[TABLE]
where and . The gain in modularity from adding a node that was in its own community into a new community is
[TABLE]
where . 2. 2.
The relationship between the original and induced graphs. A community assignment on the bottom nodes creates an induced bipartite graph
[TABLE]
this can then be projected
[TABLE]
The same community assignment creates an induced graph on the projected graph
[TABLE]
That is, the operations of creating the induced graph and projecting the bipartite graph commute.
We modified the implementation of Blondel111https://perso.uclouvain.be/vincent.blondel/research/louvain.html to compute partitions using this definition of modularity, as well as to implement the bi-Louvain method described in [35].
5 Similarity Metrics for Communities
The partitions found by clustering algorithms can be wrong in two main ways: they can detect spurious sub-structure in the target communities (splitting) or they can fail to distinguish distinct communities (joining). Commonly used similarity metrics like the Rand Index or Mutual Information do not tell us which kind of error is occurring.
To account for this we use the homogeneity, , and completeness, , scores of Rosenberg and Hirschberg [36]. Denoting the target communities as classes and the detected communities as clusters: a homogeneous clustering is one where all of the clusters contain only data points which are members of a single class. For example, the class labels are totally homogeneous, , with the cluster labels , as well as with . However, for the cluster labels we have since the 1 cluster contains a member of the 0 class. Completeness is somewhat orthogonal; a complete clustering is one where all the data points that are members of a given class are elements of the same cluster. The class labels are complete, , with respect to the cluster labels , as well as . The cluster labels give , since the members of the 1 class are split between the 0 and the 1 cluster.
If the community detection algorithms split one of the target partitions into multiple communities, this will reduce the completeness but not the homogeneity . is reduced whenever two nodes from the same target community are assigned by the algorithms to different communities.
The metrics and are related by
[TABLE]
where is the target or ground truth and is the partition to be compared. A symmetric linear combination, similar to the score for precision and recall, known as V-measure,
[TABLE]
can be used to measure the agreement between two label sets when the ground truth is not known. This measure is identical to the commonly used similarity metric ‘Normalised Mutual Information(NMI)’222https://scikit-learn.org/stable/modules/generated/sklearn.metrics.v_measure_score.html (Accessed April 2019).
It is possible for and to be very different, consider the case of assigning all nodes to the same community, this would give and . Figure 1 shows a simple example of how different partitions can have very different and scores but similar V-measure/NMI. Thus we shall examine both and as well as V-measure/NMI, so as to better understand the behaviour of these algorithms.
6 Results on Synthetic Graphs
In order to see how the modularity and structure of detected communities depends on the definition of modularity and the projection, we generate a number of synthetic graphs according to the procedure in section 3. We will first consider the case where both top and bottom nodes have a Poisson degree distribution, then the case which arises most in practice, where top and bottom nodes have power-law degree sequences. We will show how modularity, number of detected communities and the target similarity metrics change as a function of the amount of inter-community coupling. This will allow us to distinguish where the different algorithms and modularity functions perform best.
We set the target number of left and right nodes in each of the 4 communities to be 250. We generate 100 graph realisations for each set of parameters i.e. the mean degrees for Poisson distributions and the exponents, , for power distributions; as well as for every value of the mixing probability . When we project we always project onto the bottom node set, corresponding to the nodes with distributions parameterised by or . Each of the algorithms is run 10 times on each graph as the final partition found by the Louvain method is sensitive to the starting conditions, the highest modularity partition from each of the 10 runs is selected. Errors are 95% bootstrap confidence intervals, and are in most cases smaller than the size of the plot symbols.
6.1 Poisson over Poisson
We consider the case where the top and bottom nodes both have Poisson degree distributions with mean degree and . Figure 2 shows the bipartite graph, with the communities detected according algorithms 1, 2 and 3 for a low value of the mixing parameter . In this case all three methods reproduce the target community structure and agree with the community structure implied by the force directed layout.
Figure 3 shows the Barber modularity of the target partition and the maximum modularity partitions found by each of the 3 bipartite algorithms (1,2 and 3). The graph shows that the Naive and BiLouvain algorithms find partitions with essentially the same Barber modularity, where the dual projection approach finds partitions with significantly lower Barber modularity. The modularity of the target partition falls linearly with . This is a demonstration that high modularity should not be taken to imply a good community detection. The target partition, which we hope the modularity maximisation algorithms recover, actually has lower modularity than the detected ones.
Figure 4 shows the number of partitions found by each of the bipartite algorithms. The target is 4. Especially for the low degree graph the clustering algorithms detect sub-structure in the target communities resulting in a high number of detected communities. The Dual Projection approach produces the number of communities closest to the target.
Figure 5 shows that the communities detected by the Naive and BiLouvain methods tend to be more homogeneous than complete, . This indicates that these community detection algorithms tend to split large communities into numerous smaller communities. The Dual Projection approach produces partitions with lower and larger . This method detects fewer, larger communities which seems to improve the algorithms’ ability to resolve the target structure when the network is more densely connected (large ).
6.1.1 Projection
We now work with the projected graph. Figure 6, shows the projected modularity, , as a function of . Similarly to the unprojected case, despite the fact that algorithms 4 and 5 optimise two different modularity functions, the partitions found with both approaches are very similar. The value for the partitions found by algorithms 4 and 5 are virtually identical. In the case where we find communities on the bipartite graph and then project (methods 1, 2 and 3), the values are lower, as would be expected since these algorithms optimise a different objective function. The real measure of the partition quality is agreement with the target community structure.
This is measured in Figure 7, which shows the homogeneity and completeness scores as a function of . Once again we find that the detected partitions are more homogeneous than complete i.e. members of the same community are put in the same partition class, but large communities tend to get split up. The key comparison here is between the algorithms which work on the whole graph (Naive, BiLouvain and Dual Projection) compared to the two projected algorithms (Standard and Projected). The Standard and Projected algorithms are at a similar level of agreement with the target partition as the bipartite algorithms. This will be contrary to some expectations which hold that the projection step masks the true structure of the network. These results imply, for networks with Poisson degree, projection does not destroy community structure.
6.2 Power over Power
We now turn to the case which arises most frequently in practice, when the degree distributions of both top and bottom nodes follow a power law. Figure 8 shows the projected modularity as a function of . Like the Poisson case, as the disorder, , increases the modularity of the target partition decreases while the modularity of the detected partition remains high, regardless of the algorithm or modularity function that is optimised.
Figure 9 shows homogeneity and completeness as a function of . This figure is the key guide to determining a practical heuristic. First, as in the Poisson case, the detected partitions are more homogeneous than complete . Thus if two nodes are placed in the same community by the algorithm they are likely to really be in the same community, however the different communities may not really be distinct. The second key observation is that when the top node set (which is projected away) has a larger magnitude exponent than the bottom node set (), the Naive and BiLouvain methods perform much better (in terms of ) than the others. When the top nodes have an exponent that is similar or smaller in magnitude (), the Projected algorithm performs best in terms of homogeneity and the Dual Projection produces partitions with the highest completeness .
Figure 10 simplifies Figure 9. Here we combine homogeneity and completeness scores into the V-measure/NMI score, keeping in mind the information loss this entails. This figure shows that across the range of exponents considered here the Dual Projection algorithm performs best. Although it produces less homogeneous clustering, the higher completeness makes it the method which produces clustering most similar to the target. The V-measure/NMI considers homogeneity and completeness to be equally important. If one of these is more important to us than the other we might want to use a different algorithm. For example, if is important then, based on Figure 9 if the Naive or BiLouvain methods are best, if the Projected method gives largest and for the projected method seems better for and the Naive or BiLouvain better when .
7 Real Examples
We now examine these methods on four real data sets obtained from the KONECT database [37]. These are
Writers and Works from DBpedia [38]. 89356 + 46213 nodes (writers + works). 144340 edges. Projecting onto writers. 2. 2.
Scientific Collaborations from [2]. 16726 + 22015 vertices (authors + papers). 58595 edges. Projecting onto authors. 3. 3.
Crimes [39]. 829 + 551 vertices (people and crimes). 1476 edges. Projecting onto people. 4. 4.
The famous ‘Southern Women’ social graph (women and events) from [40]. 18 +14 vertices (women + events). 89 edges. Projecting onto women.
We first examine the degree distributions of each node set in Figure 11. Apart from the small Southern Women data set, a significant portion of the degree distributions can be reasonably modelled as a power law. It is not the aim of this paper to determine the best fit to the degree distribution (log-normals or other distributions could fit equally well). We simply note that the degree distribution for the Southern Women data doesn’t have any obvious simple pattern, while the other three datasets roughly map to: for Crime; for Collaborations and for Writers.
We perform community detection using all 5 different algorithms. Table 1 shows the homogeneity and completeness scores of every algorithm against every other algorithm (remembering that ). There is no ‘ground truth’ in this case so we use the (symmetric) V-measure to measure the similarity of the detected partitions.
Broadly, we can say the Standard and Projected methods give results with similar values of , with the Projected method giving the highest value (as it should since this is what it is attempting to maximise!). Next is the Dual Projection approach (except for the Collaboration network) and then the Naive and BiLouvain methods. In terms of the partition similarity, the Standard and Projected methods give the most similar partitions, the Naive and BiLouvain methods also have relatively high similarity. The Dual Projection approach gives the least similar partitions, especially for the Collaboration graph.
8 Conclusions
We have explored the problem of community detection on real and synthetic bipartite graphs. We have constructed a modularity metric which is more appropriate for community detection on projected bipartite graphs than the standard modularity. We then performed numerous experiments attempting to optimise different modularity functions.
Generally, when applying community detection algorithms in practice, the goal is not simply to find clusters of densely inter-connected nodes, but to recover some aspect of the generative process which produced the graph. We expect that nodes in the same communities will have some characteristic which results in higher intra-community connectivity and hence higher modularity e.g. acting in the same language or writing in the same genre. Modularity is a proxy measure and modularity maximisation simply finds communities with more internal than external connections than would be expected in the null model.
Our results on synthethic graphs show that modularity maximisation produces communities which are more homogeneous than complete with respect to the partitions defined by the generative process by which we created our networks. These algorithms tend to split potential communities more readily than joining them. The Dual Projection method seems to be best at balancing and and giving the largest NMI, while the other algorithms optimise . Tuning the resolution parameter, [21, 22], could also be an effective way to address this. Table 1 shows that while all algorithms find very high modularity partitions (), these high modularity partitions can still be quite dissimilar, again underlining the need for caution when using modularity to determine quality of the partitioning.
To answer our fundamental question - is community detection on the projected graph sufficient to recover the true community structure - the key results are figure 9 and 10. When the exponent of the nodes to be projected out is larger, , then the Naive and BiLouvain algorithms find the most homogeneous partitions. In this case the top node set will be dominated by a small number of high degree nodes. The projection will result in cliques which hide the real structure. When the Standard and Projected algorithms produce the the most homogeneous partitions. Here the high degree nodes are more likely to be in the bottom set, so cliques are not formed as readily when projecting and communities detected on the projected network agree with the target communities.
Ultimately, our advice for community detection on bipartite graphs is:
Use the Dual Projection approach.
- 2.
If this is not possible because the agglomeration step is too time consuming, the necessary software is not available or, if homogeneity is the most important consideration then:
- (a)
Measure degree distributions of the top and bottom node sets.
- (b)
If use the bipartite graph and optimise if possible, otherwise optimising will produce a similar partition.
- (c)
If project the network and optimise if possible, otherwise optimising will produce a similar partition.
If the top node set is not available then considerations about whether its degree distribution would be heavier or lighter tailed, or if it would have many more or fewer nodes will give some guidance on if the detected communities can be trusted. The observation that optimising gives partitions which are almost as good as the ones obtained by optimising and (in terms of similarity to the target and modularity) implies that even if the bipartite structure is unavailable we can still do a good job of detecting communities.
Finally it must always be acknowledged that simply finding a high modularity partition is not evidence of community structure. If there is underlying community structure, modularity maximisation is likely to detect only a certain aspect of it. Our results on homogeneity and completeness suggest nodes from the same target community are likely to be in the same partition, but detected partitions are also likely biased to be smaller and more numerous than the ‘real’ communities. One should compare the results of different community detection methods e.g. [17, 8, 18] as well as methods which look for other structural features of the network e.g. core-periphery structure [41]. Most important however, are sanity checks based on the nature of the nodes: if a community detection algorithm puts all Italian actors in one community and all French actors in another, it is probably working as intended, if not, one needs to take a serious look at the method.
Acknowledgements
I would like to thank Hywel Williams, Iain Weaver and Tristan Cann for inspiring me to think about this problem and for useful discussions.
References
- [1]
A.-L. Barabási, R. Albert, Emergence of scaling in random networks, Science 286 (5439) (1999) 509–512.
- [2]
M. E. J. Newman, The structure of scientific collaboration networks, Proceedings of the National Academy of Sciences 98 (2) (2001) 404–409.
- [3]
I. S. Dhillon, Co-clustering documents and words using bipartite spectral graph partitioning, in: Proceedings of the Seventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’01, ACM, New York, NY, USA, 2001, pp. 269–274.
URL http://doi.acm.org/10.1145/502512.502550
- [4]
K.-I. Goh, M. E. Cusick, D. Valle, B. Childs, M. Vidal, A.-L. Barabási, The human disease network, Proceedings of the National Academy of Sciences 104 (21) (2007) 8685–8690.
arXiv:http://www.pnas.org/content/104/21/8685.full.pdf, doi:10.1073/pnas.0701361104.
URL http://www.pnas.org/content/104/21/8685
- [5]
Y. Matsuo, H. Yamamoto, Community gravity: Measuring bidirectional effects by trust and rating on online social networks, in: WWW’09 - Proceedings of the 18th International World Wide Web Conference, 2009, pp. 751–760.
- [6]
M. Bastian, S. Heymann, M. Jacomy, Gephi: An open source software for exploring and manipulating networks, 2009.
URL http://www.aaai.org/ocs/index.php/ICWSM/09/paper/view/154
- [7]
D. A. S. Aric A. Hagberg, P. J. Swart, Exploring network structure, dynamics, and function using networkx, in: Proceedings of the 7th Python in Science Conference (SciPy2008), 2008, pp. 11–715.
- [8]
M. E. Newman, Scientific collaboration networks. ii. shortest paths, weighted networks, and centrality, Physical review E 64 (1) (2001) 016132.
- [9]
T. Zhou, J. Ren, M. c. v. Medo, Y.-C. Zhang, Bipartite network projection and personal recommendation, Phys. Rev. E 76 (2007) 046115.
doi:10.1103/PhysRevE.76.046115.
URL https://link.aps.org/doi/10.1103/PhysRevE.76.046115
- [10]
Y. Li, C. You, What is the difference of research collaboration network under different projections: Topological measurement and analysis, Physica A: Statistical Mechanics and its Applications 392 (15) (2013) 3248 – 3259.
doi:https://doi.org/10.1016/j.physa.2013.03.021.
URL http://www.sciencedirect.com/science/article/pii/S0378437113002380
- [11]
S. Lehmann, M. Schwartz, L. K. Hansen, Biclique communities, Phys. Rev. E 78 (2008) 016108.
doi:10.1103/PhysRevE.78.016108.
URL https://link.aps.org/doi/10.1103/PhysRevE.78.016108
- [12]
M. G. Everett, S. P. Borgatti, The dual-projection approach for two-mode networks, Social Networks 35 (2013) 204–210.
- [13]
D. Melamed, Community structures in bipartite networks: A dual-projection approach, PloS one 9 (5) (2014) e97823.
- [14]
M. Girvan, M. E. J. Newman, Community structure in social and biological networks, Proceedings of the National Academy of Sciences 99 (12) (2002) 7821–7826.
URL http://dx.doi.org/10.1073/pnas.122653799
- [15]
S. Fortunato, Community detection in graphs, Physics Reports 486 (3) (2010) 75 – 174.
doi:https://doi.org/10.1016/j.physrep.2009.11.002.
URL http://www.sciencedirect.com/science/article/pii/S0370157309002841
- [16]
G. Palla, I. Derényi, I. Farkas, T. Vicsek, Uncovering the overlapping community structure of complex networks in nature and society, Nature 435 (7043) (2005) 814–818.
URL http://dx.doi.org/10.1038/nature03607
- [17]
P. W. Holland, K. B. Laskey, S. Leinhardt, Stochastic blockmodels: First steps, Social networks 5 (2) (1983) 109–137.
- [18]
M. E. Newman, Spectral methods for community detection and graph partitioning, Physical Review E 88 (4) (2013) 042822.
- [19]
M. E. Newman, Fast algorithm for detecting community structure in networks, Physical review E 69 (6) (2004) 066133.
- [20]
A. Lancichinetti, S. Fortunato, F. Radicchi, Benchmark graphs for testing community detection algorithms, Physical review E 78 (4) (2008) 046110.
- [21]
S. Fortunato, M. Barthélemy, Resolution limit in community detection, Proceedings of the National Academy of Sciences 104 (1) (2007) 36–41.
arXiv:http://www.pnas.org/content/104/1/36.full.pdf, doi:10.1073/pnas.0605965104.
URL http://www.pnas.org/content/104/1/36
- [22]
R. Lambiotte, J.-C. Delvenne, M. Barahona, Laplacian dynamics and multiscale modular structure in networks, arXiv preprint arXiv:0812.1770.
- [23]
M. J. Barber, Modularity and community detection in bipartite networks, Physical Review E 76 (6) (2007) 066102.
- [24]
R. Guimera, M. Sales-Pardo, L. A. N. Amaral, Modularity from fluctuations in random graphs and complex networks, Physical Review E 70 (2) (2004) 025101.
- [25]
T. Murata, Detecting communities from bipartite networks based on bipartite modularities, in: Computational Science and Engineering, 2009. CSE’09. International Conference on, Vol. 4, IEEE, 2009, pp. 50–57.
- [26]
M. E. J. Newman, S. H. Strogatz, D. J. Watts, Random graphs with arbitrary degree distributions and their applications, Phys. Rev. E 64 (2001) 026118.
doi:10.1103/PhysRevE.64.026118.
URL https://link.aps.org/doi/10.1103/PhysRevE.64.026118
- [27]
J. Nacher, T. Akutsu, On the degree distribution of projected networks mapped from bipartite networks, Physica A: Statistical Mechanics and its Applications 390 (23) (2011) 4636 – 4651.
doi:https://doi.org/10.1016/j.physa.2011.06.073.
URL http://www.sciencedirect.com/science/article/pii/S0378437111005206
- [28]
A. Mukherjee, M. Choudhury, N. Ganguly, Understanding how both the partitions of a bipartite network affect its one-mode projection, Physica A: Statistical Mechanics and its Applications 390 (20) (2011) 3602 – 3607.
doi:https://doi.org/10.1016/j.physa.2011.05.007.
URL http://www.sciencedirect.com/science/article/pii/S0378437111003657
- [29]
D. Vasques Filho, D. R. O’Neale, Degree distributions of bipartite networks and their projections, Physical Review E 98 (2) (2018) 022307.
- [30]
J. Reichardt, M. Leone, (un)detectable cluster structure in sparse networks, Phys. Rev. Lett. 101 (2008) 078701.
doi:10.1103/PhysRevLett.101.078701.
URL https://link.aps.org/doi/10.1103/PhysRevLett.101.078701
- [31]
R. R. Nadakuditi, M. E. J. Newman, Graph spectra and the detectability of community structure in networks, Phys. Rev. Lett. 108 (2012) 188701.
doi:10.1103/PhysRevLett.108.188701.
URL https://link.aps.org/doi/10.1103/PhysRevLett.108.188701
- [32]
A. Decelle, F. Krzakala, C. Moore, L. Zdeborová, Inference and phase transitions in the detection of modules in sparse networks, Phys. Rev. Lett. 107 (2011) 065701.
doi:10.1103/PhysRevLett.107.065701.
URL https://link.aps.org/doi/10.1103/PhysRevLett.107.065701
- [33]
J. Reichardt, S. Bornholdt, Statistical mechanics of community detection, Physical Review E 74 (1) (2006) 016110.
- [34]
V. D. Blondel, J.-L. Guillaume, R. Lambiotte, E. Lefebvre, Fast unfolding of communities in large networks, Journal of statistical mechanics: theory and experiment 2008 (10) (2008) P10008.
- [35]
C. Zhou, L. Feng, Q. Zhao, A novel community detection method in bipartite networks, Physica A: Statistical Mechanics and its Applications 492 (2018) 1679–1693.
- [36]
A. Rosenberg, J. Hirschberg, V-measure: A conditional entropy-based external cluster evaluation measure, in: 2007 joint conference on empirical methods in natural language processing and computational natural language learning, EMNLP-CoNLL, 2007.
- [37]
J. Kunegis, KONECT – The Koblenz Network Collection, in: Proc. Int. Conf. on World Wide Web Companion, 2013, pp. 1343–1350.
- [38]
S. Auer, C. Bizer, G. Kobilarov, J. Lehmann, R. Cyganiak, Z. Ives, DBpedia: A nucleus for a web of open data, in: Proc. Int. Semantic Web Conf., 2008, pp. 722–735.
- [39]
Crime network dataset – KONECT (Sep. 2016).
URL http://konect.uni-koblenz.de/networks/moreno_crime
- [40]
A. Davis, B. B. Gardner, M. R. Gardner, Deep South; a Social Anthropological Study of Caste and Class, The University of Chicago Press, Chicago, 1941.
- [41]
S. Kojaku, N. Masuda, Finding multiple core-periphery pairs in networks, Physical Review E 96 (5) (2017) 052313.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] A.-L. Barabási, R. Albert, Emergence of scaling in random networks, Science 286 (5439) (1999) 509–512.
- 2[2] M. E. J. Newman, The structure of scientific collaboration networks, Proceedings of the National Academy of Sciences 98 (2) (2001) 404–409.
- 3[3] I. S. Dhillon, Co-clustering documents and words using bipartite spectral graph partitioning , in: Proceedings of the Seventh ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’01, ACM, New York, NY, USA, 2001, pp. 269–274. doi:10.1145/502512.502550 . URL http://doi.acm.org/10.1145/502512.502550 · doi ↗
- 4[4] K.-I. Goh, M. E. Cusick, D. Valle, B. Childs, M. Vidal, A.-L. Barabási, The human disease network , Proceedings of the National Academy of Sciences 104 (21) (2007) 8685–8690. ar Xiv:http://www.pnas.org/content/104/21/8685.full.pdf , doi:10.1073/pnas.0701361104 . URL http://www.pnas.org/content/104/21/8685 · doi ↗
- 5[5] Y. Matsuo, H. Yamamoto, Community gravity: Measuring bidirectional effects by trust and rating on online social networks, in: WWW’09 - Proceedings of the 18th International World Wide Web Conference, 2009, pp. 751–760. doi:10.1145/1526709.1526810 . · doi ↗
- 6[6] M. Bastian, S. Heymann, M. Jacomy, Gephi: An open source software for exploring and manipulating networks , 2009. URL http://www.aaai.org/ocs/index.php/ICWSM/09/paper/view/154
- 7[7] D. A. S. Aric A. Hagberg, P. J. Swart, Exploring network structure, dynamics, and function using networkx, in: Proceedings of the 7th Python in Science Conference (Sci Py 2008), 2008, pp. 11–715.
- 8[8] M. E. Newman, Scientific collaboration networks. ii. shortest paths, weighted networks, and centrality, Physical review E 64 (1) (2001) 016132.
