Network analysis glossary

Communities and modularity

A community is a group of people who are more tied to each other than to the rest of the network. Community detection finds those groups from the ties alone. Modularity is the score it maximises: how many more ties fall inside the groups than chance would predict.

Updated · Netgraf

Worked example: Zachary's Karate ClubOpen the map's insights →
GroupMembers
Group 1 (12)Mr. Hi, Member 2, Member 3, Member 4, Member 8, Member 10, …
Group 2 (11)Member 9, Member 15, Member 16, Member 19, Member 21, Member 23, …
Group 3 (6)Member 24, Member 25, Member 26, Member 28, Member 29, Member 32
Group 4 (5)Member 5, Member 6, Member 7, Member 11, Member 17

4 communities found with the Louvain method, modularity 0.419. Computed live from the example map with the same code the Netgraf insights panel runs.

Modularity

Q = (1 / 2m) * sum over pairs i, j of [ A(i,j) - k(i) k(j) / 2m ] * same(i, j)
m is the number of ties, A(i,j) is 1 when i and j are tied, k is degree, and same(i, j) is 1 when both are in the same group. Q runs up to 1; above about 0.3 is usually taken as clear structure.

Mark Newman's modularity compares each group's internal ties with the number you would expect if the same people kept their degrees but were wired at random. Trying every possible split is impossible for all but tiny networks, so algorithms search for a good one. The Louvain method (Blondel and colleagues, 2008), which Netgraf uses, merges people and then groups greedily while modularity keeps rising.

Zachary's karate club

Wayne Zachary recorded the friendships among 34 members of a university karate club just before a dispute between the instructor (Mr. Hi) and a club officer (John A.) split it in two. The split followed the friendship network so closely that community detection run on the pre-split ties recovers almost exactly who left with whom. It is the standard test for every new algorithm. Louvain typically finds four groups rather than two: the two factions, each with a tighter core.

In Netgraf

The Insights panel lists Groups: "people who are more tied to each other than to anyone else", each named after its best-connected member. Choose Colour the map by group and every dot takes its community's colour while the lines go neutral.

Example map

Open one to explore it, then press Edit a copy to make it yours.

Questions

Why does community detection give different results each time?
Most algorithms, Louvain included, make choices that depend on the order people are visited, and several splits can score almost the same modularity. Small differences between runs are normal; large ones mean the network has no strong group structure.
Can a person belong to two communities?
Not in Louvain, which puts each person in exactly one group. Overlapping methods, such as the SLPA algorithm Kumu uses, allow it. Overlap is realistic but harder to read on a map.

References

  1. Newman, M. E. J. (2006). Modularity and community structure in networks. PNAS, 103(23), 8577-8582. Link
  2. Blondel, V. D., Guillaume, J.-L., Lambiotte, R., & Lefebvre, E. (2008). Fast unfolding of communities in large networks. Journal of Statistical Mechanics, P10008. Link
  3. Zachary, W. W. (1977). An information flow model for conflict and fission in small groups. Journal of Anthropological Research, 33(4), 452-473. Link

Draw your own

Free, no account, and private by default. Start blank, import a spreadsheet, or describe the network in words.