Algorithm Search⌘K

Proofs: Markov clustering

These are the human proofs of Markov clustering, at full length.

Each MCL iterate is column stochastic and stays inside the components, the read-out is a partition that refines the components, and a fixed point of inflation has uniform columns sketch

This proof shows: correctness.

This page proves the facts that hold for every run of MCL. It does not prove that the loop of lines L3 to L8 converges: no such proof is known to this page, and the implementation stops after a fixed number of iterations if the change stays above ε\varepsilon. The status is a sketch for that reason; each lemma below is proved in full.

Let GG have vertices V={0,…,n−1}V = \{0, \ldots, n-1\} and weights Aij=Aji≥0A_{ij} = A_{ji} \ge 0, and let AA be the matrix of line L1, so Ajj≥1A_{jj} \ge 1 for every jj. Let e≥2e \ge 2 be an integer, r>1r > 1, and 0≤θ<1/n0 \le \theta < 1/n. Write V1,…,VcV_1, \ldots, V_c for the vertex sets of the connected components of GG, and say that a matrix XX respects the components if Xij=0X_{ij} = 0 whenever ii and jj lie in different components.

Lemma 1 (column stochastic). Every matrix MM that the algorithm holds after line L2 or line L7 is column stochastic.

Proof. After line L2, column jj of AA has the entry Ajj≥1>0A_{jj} \ge 1 > 0, so its sum is positive, and dividing by it gives a nonnegative column with sum 1.

Assume MM is column stochastic. Then MeM^e is column stochastic: for column-stochastic XX and YY, (XY)ij=∑kXikYkj≥0(XY)_{ij} = \sum_k X_{ik} Y_{kj} \ge 0 and ∑i(XY)ij=∑kYkj∑iXik=∑kYkj=1\sum_i (XY)_{ij} = \sum_k Y_{kj} \sum_i X_{ik} = \sum_k Y_{kj} = 1. Line L6 raises the entries of a column xx of MeM^e to the power rr; since xx sums to 1 and has nn entries, its largest entry is at least 1/n>01/n > 0, so the column of powers has a positive sum and the first division of line L7 gives a column yy with sum 1. The largest entry of yy is again at least 1/n>θ1/n > \theta, so pruning keeps it, the column still has a positive sum, and the second division gives a nonnegative column with sum 1. □\square

Lemma 2 (components). Every matrix MM that the algorithm holds respects the components.

Proof. Aij>0A_{ij} > 0 with i≠ji \ne j means that {i,j}\{i, j\} is an edge, so ii and jj lie in the same component; so AA respects the components, and so does MM after line L2, which only rescales columns. If XX and YY respect the components and i,ji, j lie in different components, then in (XY)ij=∑kXikYkj(XY)_{ij} = \sum_k X_{ik} Y_{kj} each kk differs in component from ii or from jj, so each term is 0. So MeM^e respects the components. Lines L6 and L7 map zero entries to zero entries (0r=00^r = 0, and a rescaled or pruned zero is zero), so they keep the property. □\square

Lemma 3 (the read-out). Lines L9 and L10 return a partition of VV, and each of its parts lies inside one component of GG.

Proof. The connected components of any graph on VV partition VV. By Lemma 2, every edge {i,j}\{i, j\} of HH has Mij>0M_{ij} > 0 or Mji>0M_{ji} > 0, so ii and jj lie in the same component of GG. A path in HH therefore stays inside one component of GG, and so does each component of HH. □\square

Lemma 4 (fixed points of inflation). Let xx be a probability vector with Γrx=x\Gamma_r x = x, that is xir/∑kxkr=xix_i^r / \sum_k x_k^r = x_i for all ii. Then all the nonzero entries of xx are equal, so xx is uniform on its support SS, with value 1/∣S∣1/|S|.

Proof. Let s=∑kxkr>0s = \sum_k x_k^r > 0. For xi>0x_i > 0, dividing xir=s xix_i^r = s\, x_i by xix_i gives xir−1=sx_i^{r-1} = s, and since r−1>0r - 1 > 0, xi=s1/(r−1)x_i = s^{1/(r-1)}, the same value for each ii in SS. The entries sum to 1, so the value is 1/∣S∣1/|S|. □\square

Lemma 5 (stopping). The loop of lines L3 to L8 ends.

Proof. Line L8 ends the loop when the change is at most ε\varepsilon or when the number of iterations reaches the fixed limit, and each iteration raises that number by 1. □\square

Theorem. MCL(GG, ee, rr, θ\theta, ε\varepsilon) stops and returns a partition of VV in which each cluster lies inside one connected component of GG. Every matrix it computes is column stochastic, and if it stops at a matrix whose columns are fixed by inflation, each column is uniform on its support.

Proof. Lemma 5 gives termination, Lemma 3 the partition and the components, Lemma 1 the stochasticity and Lemma 4 the shape of the columns. □\square

What is not proved here. That the loop reaches a change below ε\varepsilon for every input, and that the limit is doubly idempotent (M2=MM^2 = M and ΓrM=M\Gamma_r M = M). Van Dongen studies these limits in the SIAM paper cited on the node page: he describes their structure as attractor systems with the vertices that flow to them, and shows that the clustering they define is stable under small perturbations, so that the iteration, once close to such a limit, keeps its clustering.

∎

Back to Markov clustering