Algorithm Search⌘K

Proofs: HITS algorithm

These are the human proofs of HITS algorithm, at full length.

The HITS iterates converge to principal eigenvectors of A^T A and A A^T full

This proof shows: correctness, termination.

Let GG have nn nodes and adjacency matrix AA with non-negative entries, and let M=ATAM = A^{\mathsf T} A. Write ata_t and hth_t for the vectors aa and hh after round tt of HITS, and 1\mathbf{1} for the vector of all ones, so h0=1h_0 = \mathbf{1}. All norms are Euclidean.

Lemma 1 (the rounds are power iteration). If A≠0A \ne 0, then for each t≥1t \ge 1 that the algorithm reaches, at=Mt−1x0/∥Mt−1x0∥a_t = M^{t-1} x_0 / \lVert M^{t-1} x_0 \rVert with x0=AT1x_0 = A^{\mathsf T} \mathbf{1}, and ht=Aat/∥Aat∥h_t = A a_t / \lVert A a_t \rVert. Line L5 never returns, and line L6 never divides by zero.

Proof. Line L3 sets av′=∑(u,v)∈Ehua'_v = \sum_{(u,v) \in E} h_u, which is (ATh)v(A^{\mathsf T} h)_v, and line L4 sets hu′=∑(u,v)∈Eav′=(Aa′)uh'_u = \sum_{(u,v) \in E} a'_v = (A a')_u. By induction on tt, assume ht−1h_{t-1} is a positive multiple of AMt−2x0A M^{t-2} x_0 for t≥2t \ge 2, and h0=1h_0 = \mathbf{1}. Then a′a' in round tt is a positive multiple of AT1=x0A^{\mathsf T} \mathbf{1} = x_0 when t=1t = 1, and of ATAMt−2x0=Mt−1x0A^{\mathsf T} A M^{t-2} x_0 = M^{t-1} x_0 when t≥2t \ge 2. Lemma 2 below shows Mt−1x0≠0M^{t-1} x_0 \ne 0, so a′≠0a' \ne 0 and line L5 does not return. Then h′=Aa′h' = A a', and ht−1Th′=(ATht−1)Ta′=∥a′∥2>0h_{t-1}^{\mathsf T} h' = (A^{\mathsf T} h_{t-1})^{\mathsf T} a' = \lVert a' \rVert^2 > 0, so h′≠0h' \ne 0. Line L6 scales both by positive numbers, which gives the formulas of the claim and keeps the hypothesis for t+1t + 1, since hth_t is a positive multiple of $A a' $, a positive multiple of AMt−1x0A M^{t-1} x_0. □\square

Lemma 2 (the start vector sees the top eigenspace). MM is symmetric and positive semidefinite. Let λ1\lambda_1 be its largest eigenvalue and PP the orthogonal projection onto its eigenspace. If A≠0A \ne 0, then λ1>0\lambda_1 > 0 and Px0≠0P x_0 \ne 0.

Proof. MT=ATA=MM^{\mathsf T} = A^{\mathsf T} A = M, and yTMy=∥Ay∥2≥0y^{\mathsf T} M y = \lVert A y \rVert^2 \ge 0 for each yy. The trace of MM is ∑u,vAuv2>0\sum_{u,v} A_{uv}^2 > 0, so λ1>0\lambda_1 > 0. The matrix MM has non-negative entries. By the Perron-Frobenius theorem for non-negative matrices, its spectral radius, which is λ1\lambda_1 since all eigenvalues are non-negative, has an eigenvector ww with w≥0w \ge 0 and w≠0w \ne 0. Since w=AT(Aw)/λ1w = A^{\mathsf T}(A w) / \lambda_1, each entry wvw_v is a sum of non-negative terms Auv(Aw)u/λ1A_{uv} (Aw)_u / \lambda_1, so wv=0w_v = 0 at each node vv with no entering arc. At each node vv with wv>0w_v > 0, some Auv>0A_{uv} > 0, so (x0)v=∑uAuv>0(x_0)_v = \sum_u A_{uv} > 0. Hence x0Tw>0x_0^{\mathsf T} w > 0. As ww lies in the eigenspace, x0Tw=(Px0)Twx_0^{\mathsf T} w = (P x_0)^{\mathsf T} w, so Px0≠0P x_0 \ne 0. In particular Mtx0≠0M^{t} x_0 \ne 0 for every tt, since its projection is λ1tPx0≠0\lambda_1^{t} P x_0 \ne 0. □\square

Theorem (convergence). Assume A≠0A \ne 0. Let λ2′\lambda_2' be the largest eigenvalue of MM that is less than λ1\lambda_1, or 00 if there is none. Then at→a∗=Px0/∥Px0∥a_t \to a^* = P x_0 / \lVert P x_0 \rVert and ht→h∗=Aa∗/∥Aa∗∥h_t \to h^* = A a^* / \lVert A a^* \rVert, with ∥at−a∗∥≤2(λ2′/λ1)t−1∥x0∥/∥Px0∥\lVert a_t - a^* \rVert \le 2 (\lambda_2'/\lambda_1)^{t-1} \lVert x_0 \rVert / \lVert P x_0 \rVert. The vector a∗a^* is a non-negative eigenvector of MM for λ1\lambda_1, and h∗h^* is a non-negative eigenvector of AATA A^{\mathsf T} for λ1\lambda_1.

Proof. Take an orthonormal basis of eigenvectors of MM. Write x0=Px0+rx_0 = P x_0 + r, where rr lies in the span of the eigenvectors with eigenvalues below λ1\lambda_1. Then Mt−1x0=λ1t−1(Px0+rt)M^{t-1} x_0 = \lambda_1^{t-1} (P x_0 + r_t) with rt=Mt−1r/λ1t−1r_t = M^{t-1} r / \lambda_1^{t-1}, and since every eigenvalue in that span is in [0,λ2′][0, \lambda_2'], ∥rt∥≤(λ2′/λ1)t−1∥r∥≤(λ2′/λ1)t−1∥x0∥\lVert r_t \rVert \le (\lambda_2'/\lambda_1)^{t-1} \lVert r \rVert \le (\lambda_2'/\lambda_1)^{t-1} \lVert x_0 \rVert. For non-zero vectors pp and p+qp + q, ∥p+q∥p+q∥−p∥p∥∥≤2∥q∥∥p∥\big\lVert \frac{p + q}{\lVert p + q \rVert} - \frac{p}{\lVert p \rVert} \big\rVert \le \frac{2 \lVert q \rVert}{\lVert p \rVert}, by the triangle inequality and ∣∥p+q∥−∥p∥∣≤∥q∥\big| \lVert p + q \rVert - \lVert p \rVert \big| \le \lVert q \rVert. With Lemma 1 and p=Px0p = P x_0, q=rtq = r_t, this gives the bound, which tends to 0 because λ2′<λ1\lambda_2' < \lambda_1. The vector a∗a^* is in the eigenspace of λ1\lambda_1. It is non-negative because each ata_t is non-negative, as a scaled sum of non-negative terms, and the limit of non-negative vectors is non-negative. It is not zero, so Aa∗≠0A a^* \ne 0 because ∥Aa∗∥2=a∗TMa∗=λ1>0\lVert A a^* \rVert^2 = a^{*\mathsf T} M a^* = \lambda_1 > 0. The map y↦Ay/∥Ay∥y \mapsto A y / \lVert A y \rVert is continuous where Ay≠0A y \ne 0, so ht→h∗h_t \to h^* by Lemma 1. Finally AAT(Aa∗)=A(Ma∗)=λ1Aa∗A A^{\mathsf T} (A a^*) = A (M a^*) = \lambda_1 A a^*, so h∗h^* is an eigenvector of AATA A^{\mathsf T} for λ1\lambda_1. □\square

Termination. The loop of line L2 runs at most KK rounds, so the algorithm stops. If ε>0\varepsilon > 0, it may stop earlier at line L9: by the theorem, ata_t and hth_t converge, so ∥at−at−1∥+∥ht−ht−1∥→0\lVert a_t - a_{t-1} \rVert + \lVert h_t - h_{t-1} \rVert \to 0, and the test of line L9 holds after finitely many rounds. If A=0A = 0, line L3 gives a′=0a' = 0 in round 1 and line L5 returns two zero vectors, which is the stated output for a graph with no arcs.

Uniqueness. If λ1\lambda_1 is a simple eigenvalue, its eigenspace is a line, and a∗a^* is the unique eigenvector of norm 1 with non-negative entries on it; h∗h^* is then unique too. If λ1\lambda_1 is repeated, a∗a^* is the normalized projection of the in-degree vector x0x_0 onto the eigenspace, which is determined by the graph. ■\blacksquare

Back to HITS algorithm