Algorithm Search⌘K

Proofs: SimRank

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)G = (V, E) is a directed graph with nn vertices, I(v)I(v) is the list of in-neighbours of vv (with repeats if arcs repeat), and 0<C<10 < C < 1. Let M\mathcal M be the set of real n×nn \times n matrices with the max norm ∥X∥=max⁡a,b∣Xab∣\|X\| = \max_{a, b} |X_{ab}|. Define the map F:M→MF : \mathcal M \to \mathcal M by

F(X)ab={1a=b,0a≠b and (I(a)=∅ or I(b)=∅),C∣I(a)∣ ∣I(b)∣∑i∈I(a)∑j∈I(b)Xijotherwise.F(X)_{ab} = \begin{cases} 1 & a = b, \\ 0 & a \ne b \text{ and } (I(a) = \emptyset \text{ or } I(b) = \emptyset), \\ \dfrac{C}{|I(a)|\,|I(b)|} \displaystyle\sum_{i \in I(a)} \sum_{j \in I(b)} X_{ij} & \text{otherwise.} \end{cases}

The SimRank matrix is a matrix SS with F(S)=SF(S) = S. Lines L3 to L6 compute R′=F(R)R' = F(R), so after line L1 and kk rounds of lines L2 to L7 the matrix is Rk=Fk(R0)R_k = F^k(R_0), where R0R_0 is the identity matrix.

Lemma 1 (contraction). For all X,Y∈MX, Y \in \mathcal M, ∥F(X)−F(Y)∥≤C ∥X−Y∥\|F(X) - F(Y)\| \le C\, \|X - Y\|.

Proof. In the first two cases F(X)ab−F(Y)ab=0F(X)_{ab} - F(Y)_{ab} = 0. In the third case,

∣F(X)ab−F(Y)ab∣≤C∣I(a)∣ ∣I(b)∣∑i∈I(a)∑j∈I(b)∣Xij−Yij∣≤C∣I(a)∣ ∣I(b)∣⋅∣I(a)∣ ∣I(b)∣ ∥X−Y∥=C ∥X−Y∥.□|F(X)_{ab} - F(Y)_{ab}| \le \frac{C}{|I(a)|\,|I(b)|} \sum_{i \in I(a)} \sum_{j \in I(b)} |X_{ij} - Y_{ij}| \le \frac{C}{|I(a)|\,|I(b)|} \cdot |I(a)|\,|I(b)|\, \|X - Y\| = C\, \|X - Y\|. \quad \square

Lemma 2 (existence and uniqueness). FF has exactly one fixed point SS, and Rk→SR_k \to S.

Proof. M\mathcal M with the max norm is a complete metric space, and FF is a contraction with factor C<1C < 1 by Lemma 1. By the Banach fixed-point theorem, FF has a unique fixed point SS, and Fk(X)→SF^k(X) \to S for every starting matrix XX, in particular for X=R0X = R_0. □\square

Lemma 3 (order). FF is monotone: if X≤YX \le Y entrywise then F(X)≤F(Y)F(X) \le F(Y). Moreover R0≤R1≤R2≤⋯≤SR_0 \le R_1 \le R_2 \le \cdots \le S, and 0≤Sab≤10 \le S_{ab} \le 1 with Sab≤CS_{ab} \le C for a≠ba \ne b.

Proof. Monotonicity is clear from the definition, since the coefficients C/(∣I(a)∣∣I(b)∣)C/(|I(a)||I(b)|) are positive. R1R_1 has ones on the diagonal, like R0R_0, and non-negative entries elsewhere, where R0R_0 has zeros, so R0≤R1R_0 \le R_1. Applying FkF^k and monotonicity gives Rk≤Rk+1R_k \le R_{k+1} for all kk. The limit of a non-decreasing sequence is above each term, so Rk≤SR_k \le S. Let JJ be the matrix with ones on the diagonal and CC elsewhere. Then F(J)≤JF(J) \le J, because each average of entries of JJ is at most 1, times CC. Since R0≤JR_0 \le J, induction with monotonicity gives Rk=Fk(R0)≤Fk(J)≤JR_k = F^k(R_0) \le F^k(J) \le J for all kk, and in the limit S≤JS \le J. Finally S≥R0≥0S \ge R_0 \ge 0. □\square

Lemma 4 (error bound). For every k≥0k \ge 0 and all a,ba, b: 0≤Sab−(Rk)ab≤Ck+10 \le S_{ab} - (R_k)_{ab} \le C^{k+1}.

Proof. The lower bound is Lemma 3. For the upper bound, ∥S−R0∥≤C\|S - R_0\| \le C, since the diagonals agree and 0≤Sab≤C0 \le S_{ab} \le C elsewhere by Lemma 3. By Lemma 1 and S=F(S)S = F(S), ∥S−Rk∥=∥Fk(S)−Fk(R0)∥≤Ck∥S−R0∥≤Ck+1\|S - R_k\| = \|F^k(S) - F^k(R_0)\| \le C^k \|S - R_0\| \le C^{k+1}. □\square

Theorem. SIMRANK(G,C,K)(G, C, K) stops after KK rounds and returns a symmetric matrix RKR_K with Sab−CK+1≤(RK)ab≤SabS_{ab} - C^{K+1} \le (R_K)_{ab} \le S_{ab} for all a,ba, b, where SS is the unique SimRank matrix. If K≥⌈log⁡ε/log⁡C⌉−1K \ge \lceil \log \varepsilon / \log C \rceil - 1, every entry is within ε\varepsilon of the exact score.

Proof. Termination: line L2 runs KK times, and each round runs over the n2n^2 pairs and, for each pair, over the finite lists I(a)I(a) and I(b)I(b). The bounds are Lemma 4. Symmetry: R0R_0 is symmetric, and if XX is symmetric then so is F(X)F(X), because swapping aa and bb swaps the two sums and Xij=XjiX_{ij} = X_{ji}; by induction every RkR_k is symmetric. For the last claim, K+1≥log⁡ε/log⁡CK + 1 \ge \log \varepsilon / \log C gives CK+1≤εC^{K+1} \le \varepsilon, since log⁡C<0\log C < 0. ■\blacksquare

Back to SimRank