Proofs: Infomap
These are the human proofs of Infomap, at full length.
The two-level Infomap search lowers the map equation at every move, stops, and ends where no module gains by joining a neighbouring module full
This proof shows: correctness, termination.
The proof is for the search of the page: undirected graphs without self-loops, the two-level map equation, and local moves with aggregation. The fine-tuning and coarse-tuning steps, teleportation and the multilevel map equation are not covered.
Let be an undirected graph on with positive integer weights , no self-loops, and . For a partition of , let be the weight of the edges with exactly one end in the module , , and with .
Lemma 1 (the exact form). With , , and ,
Proof. First, is the exit rate: the walker is at with probability and takes the edge to with probability , so the rate of the steps from to is , and summing over these pairs gives . Now, for an integer , . Applying this to every term of the expanded map equation, the coefficients of are for , for , for and for , where and . They add up to 0.
So depends on only through the pairs , and is a ratio of products of integers ; comparing two values of exactly is comparing two such fractions, which is what the code does.
Lemma 2 (aggregation keeps L). Let be a graph built by the algorithm, whose vertex stands for a set , with self-loop weight and edge weights . Let . For a set of vertices of , let and . Then, with , and .
Proof. By induction over the levels, : the edges of inside are counted twice in , and those leaving once in , which is how they are counted in . Summing over gives the second claim. For the first, is the weight of the edges of from to the sets of the other vertices of , which cover .
By Lemma 1 and Lemma 2, define of a partition of the vertices of by the exact form with , and the constant of ; it equals of the matching partition of . This is the quantity that line L8 compares, with the cut of a vertex alone being .
Lemma 3 (each move lowers L). If lines L7 to L9 take from to , then of the partition of after the step is smaller than before it.
Proof. After line L7, every placement of is a partition of the vertices of , and line L8 compares their . It leaves only for a module with strictly smaller , since it keeps on ties. By Lemma 2, is of the matching partition of .
Lemma 4 (termination). The run makes finitely many moves and has at most levels.
Proof. By Lemma 3, every move strictly lowers of the current partition of , and line L13 does not change it (Lemma 2). So no partition of appears twice after a move, and there are finitely many partitions of . A sweep without a move ends a level. A level that reaches line L12 made a move; its partition of has smaller than the singletons of by Lemma 3, so it is not the partition into singletons, and the next has fewer vertices.
Theorem. INFOMAP() stops and returns a partition of such that of every partition reached before, including the singletons of , and such that no part of , moved as a whole into another part of that it has an edge to, lowers .
Proof. Termination is Lemma 4, and the first claim follows from Lemma 3 and Lemma 2. The algorithm returns at line L11 after a level in which nothing moved. In its last sweep, line L8 kept every vertex of in its own singleton module, so no module of a neighbour of gave a smaller . The vertices of are the parts of , a neighbour of in is a part with an edge to , and by Lemma 2 the values compared are the values of on .
∎