Flow Divergence: Comparing Maps of Flows with Relative Entropy

Christopher Blöcker, Ingo ScholtesarXiv 2024 · DOI

Abstract

Comparing network partitions is a fundamental task in network science, yet traditional measures like the Jaccard index and Adjusted Mutual Information (AMI) are topology-blind, focusing solely on node set overlaps. This paper introduces Flow Divergence ($D_F$), an information-theoretic metric derived from the Map Equation framework. By modeling community partitions as compression schemes for random walks, Flow Divergence quantifies the additional information required to describe network flow when using one partition as a proxy for another. Our results on synthetic and real-world networks demonstrate that $D_F$ captures structural nuances missed by traditional methods, providing a more robust tool for evaluating community detection algorithms and understanding network dynamics.

Introduction

In network science, we often partition nodes into "communities"—groups that are more densely connected to each other than to the rest of the network. A common challenge is comparing two different partitions of the same network, such as comparing a detected community structure against a known ground truth. Traditionally, researchers have used measures like the Jaccard index or Adjusted Mutual Information (AMI). While useful, these measures have a major "blind spot": they are topology-blind. They only look at which nodes are grouped together as sets, completely ignoring the links (the "flow") that define the network's organization. Consequently, two partitions that look identical in terms of node overlaps might represent vastly different flow patterns, yet traditional measures would judge them as equally similar.

Methods

The authors introduce Flow Divergence ($D_F$), inspired by the Kullback-Leibler (KL) divergence and the Map Equation framework. The Map Equation treats community detection as a compression problem: a "good" partition is one that allows us to describe a random walk on the network using the fewest number of bits.

The Map Equation framework: (a) a random walk on a network, (b) partitioning into modules, and (c) the resulting hierarchical code tree used to compress the walk's description.

The authors derive a measure called mapsim(M, u, v), which quantifies the transition rate between nodes $u$ and $v$ given a specific partition $M$. Flow divergence $D_F(M_a || M_b)$ then calculates the expected additional number of bits required to describe a random walk on partition $M_a$ (the reference) using the coding scheme of partition $M_b$ (the estimate). Unlike standard set-based measures, flow divergence is non-symmetric and naturally handles hierarchical partitions where communities are nested within larger communities.

Key Results

The utility of Flow Divergence was evaluated using both synthetic and real-world datasets, including US college football teams and jazz musician collaboration networks. In synthetic tests on a 9-node toy network, the authors presented alternative partitions against a reference to showcase edge cases where traditional measures fail.

Comparison of four partitions on a synthetic 9-node network. While traditional measures may struggle to distinguish between them, Flow Divergence identifies the varying information costs associated with different flow patterns.

While Jaccard and AMI rated several distinct partitions as equally good, Flow Divergence successfully distinguished them, correctly identifying which partition better preserved the network's flow patterns. Furthermore, the measure proved effective at quantifying data loss in sparse networks and providing superior clustering of solution landscapes. When visualizing multiple runs of stochastic algorithms like Infomap, flow divergence revealed distinct clusters of partitions that traditional measures blurred together.

Conclusion and Future Work

Flow Divergence offers a more nuanced, topology-aware approach to network comparison. While it has a higher computational complexity ($O(n^2)$) than simple set-based measures, its ability to decompose divergence into per-node contributions provides valuable local insights. The authors suggest that flow divergence could be used as a new objective function for community detection or as a tool for "active learning" to identify which parts of a network require more data collection to reduce structural uncertainty.

Summary updated

Abstract

Networks represent how the entities of a system are connected and can be partitioned differently, prompting ways to compare partitions. Common approaches for comparing network partitions include information-theoretic measures based on mutual information and set-theoretic measures such as the Jaccard index. These measures are often based on computing the agreement in terms of overlap between different partitions of the same set. However, they ignore link patterns which are essential for the organisation of networks. We propose flow divergence, an information-theoretic divergence measure for comparing network partitions, inspired by the ideas behind the Kullback-Leibler divergence and the map equation for community detection. Similar to the Kullback-Leibler divergence, flow divergence adopts a coding perspective and compares two network partitions $\mathsf{M}_a$ and $\mathsf{M}_b$ by considering the expected extra number of bits required to describe a random walk on a network using $\mathsf{M}_b$ relative to reference partition $\mathsf{M}_a$. Because flow divergence is based on random walks, it can be used to compare partitions with arbitrary and different depths. We show that flow divergence distinguishes between partitions that traditional measures consider to be equally good when compared to a reference partition. Applied to real networks, we use flow divergence to estimate the cost of overfitting in incomplete networks and to visualise the solution landscape of network partitions.
BibTeX
@misc{blocker2024flow,
  author = {Christopher Blöcker and Ingo Scholtes},
  title = {{Flow Divergence: Comparing Maps of Flows with Relative Entropy}},
  year = {2024},
  eprint = {2401.09052},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.09052},
}
Figure