These are the human proofs of SimRank, at full length.
The SimRank iteration converges from below to the unique SimRank matrix full
This proof shows: correctness, termination.
We use the notation of the page. G=(V,E) is a directed graph with n vertices, I(v) is the list of in-neighbours of v (with repeats if arcs repeat), and 0<C<1. Let M be the set of real n×n matrices with the max norm ∥X∥=maxa,b∣Xab∣. Define the map F:M→M by
F(X)ab=⎩⎨⎧10∣I(a)∣∣I(b)∣Ci∈I(a)∑j∈I(b)∑Xija=b,a=b and (I(a)=∅ or I(b)=∅),otherwise.
The SimRank matrix is a matrix S with F(S)=S. Lines L3 to L6 compute R′=F(R), so after line L1 and k rounds of lines L2 to L7 the matrix is Rk=Fk(R0), where R0 is the identity matrix.
Lemma 1 (contraction). For all X,Y∈M, ∥F(X)−F(Y)∥≤C∥X−Y∥.
Proof. In the first two cases F(X)ab−F(Y)ab=0. In the third case,
Lemma 2 (existence and uniqueness).F has exactly one fixed point S, and Rk→S.
Proof.M with the max norm is a complete metric space, and F is a contraction with factor C<1 by Lemma 1. By the Banach fixed-point theorem, F has a unique fixed point S, and Fk(X)→S for every starting matrix X, in particular for X=R0. □
Lemma 3 (order).F is monotone: if X≤Y entrywise then F(X)≤F(Y). Moreover R0≤R1≤R2≤⋯≤S, and 0≤Sab≤1 with Sab≤C for a=b.
Proof. Monotonicity is clear from the definition, since the coefficients C/(∣I(a)∣∣I(b)∣) are positive. R1 has ones on the diagonal, like R0, and non-negative entries elsewhere, where R0 has zeros, so R0≤R1. Applying Fk and monotonicity gives Rk≤Rk+1 for all k. The limit of a non-decreasing sequence is above each term, so Rk≤S. Let J be the matrix with ones on the diagonal and C elsewhere. Then F(J)≤J, because each average of entries of J is at most 1, times C. Since R0≤J, induction with monotonicity gives Rk=Fk(R0)≤Fk(J)≤J for all k, and in the limit S≤J. Finally S≥R0≥0. □
Lemma 4 (error bound). For every k≥0 and all a,b: 0≤Sab−(Rk)ab≤Ck+1.
Proof. The lower bound is Lemma 3. For the upper bound, ∥S−R0∥≤C, since the diagonals agree and 0≤Sab≤C elsewhere by Lemma 3. By Lemma 1 and S=F(S), ∥S−Rk∥=∥Fk(S)−Fk(R0)∥≤Ck∥S−R0∥≤Ck+1. □
Theorem. SIMRANK(G,C,K) stops after K rounds and returns a symmetric matrix RK with Sab−CK+1≤(RK)ab≤Sab for all a,b, where S is the unique SimRank matrix. If K≥⌈logε/logC⌉−1, every entry is within ε of the exact score.
Proof. Termination: line L2 runs K times, and each round runs over the n2 pairs and, for each pair, over the finite lists I(a) and I(b). The bounds are Lemma 4. Symmetry: R0 is symmetric, and if X is symmetric then so is F(X), because swapping a and b swaps the two sums and Xij=Xji; by induction every Rk is symmetric. For the last claim, K+1≥logε/logC gives CK+1≤ε, since logC<0. ■