Link Graph Encyclopedia

Network structure

Community detection

Finding groups of nodes that link to each other much more than to the rest of the graph. Modularity, Louvain, Leiden, label propagation and Infomap are the standard tools; on the web they find topics, regions and link farms.

Link graphs are not uniformly tangled. Sites about the same topic, in the same language or run by the same owner link to each other far more than to outsiders. Community detection finds such groups automatically from the links alone. The problem has no single correct answer, since “community” has no single definition, but a few methods dominate practice because they are fast and usually sensible. On web graphs they find topical clusters and national webs, they produce the node orders that make graphs compress well, and they expose link farms, which are communities by construction.

Modularity

The most widely used quality measure, Newman and Girvan’s modularity, compares the links inside groups with what a random graph of the same degrees would put there:

Q=12m∑i,j(Aij−kikj2m)[ci=cj],Q = \frac{1}{2m} \sum_{i, j} \left( A_{ij} - \frac{k_i k_j}{2m} \right) [c_i = c_j],

where AA is the undirected adjacency matrix, kik_i the degree of node ii, mm the number of edges and cic_i the group of node ii. Each pair inside a group earns 1 if linked and loses its expected number of links, kikj/2mk_i k_j / 2m. QQ is 0 for a single group containing everything and rises as groups become denser than chance. Leicht and Newman gave a directed version.

Worked example

Treating the running example as undirected gives 9 edges (A ⇄ C counts once). Checking all 877 ways to partition the seven nodes, the best modularity is 0.142, for the split {A, B, C, G} and {D, E, F}:

Partition Modularity
{A, B, C, G}, {D, E, F} 0.142
{A, B, C, D, G}, {E, F} 0.123
{A, B, C}, {D, E, F}, {G} 0.093
everything together 0

The core and its satellite G form one community; the feeders D, E and F form the other. Exhaustive search is possible only for tiny graphs: the number of partitions grows faster than exponentially, and maximising modularity is NP-hard. Real methods are heuristics.

The main methods

Pitfalls

A link farm is a community designed to be one: many domains that link to each other and to a few targets, with few links from the rest of the web. In modularity terms it is a dense group with almost no external edges, which methods find easily. The suspicious pattern is the combination of high internal density, low external in-degree and a few external targets that receive the group’s links. The bump of about 39,000 domains with 19,000 to 29,000 in-links in Common Crawl’s 2026 degree distribution (see power laws) has the degree signature of such a group. Detection systems combine community structure with spam mass, TrustRank and content signals, since legitimate communities, such as a university’s departmental sites, can look structurally similar.

References

Edit this entry on GitHub