This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

A Parallel PageRank Algorithm For Undirected Graph

Qi Zhang Rongxia Tang Zhengan Yao Zan-Bo Zhang Department of Mathematics, Sun Yat-sen University, China School of Statistics and Mathematics, Guangdong University of Finance and Economics, China
Abstract

As a measure of vertex importance according to the graph structure, PageRank has been widely applied in various fields. While many PageRank algorithms have been proposed in the past decades, few of them take into account whether the graph under investigation is directed or not. Thus, some important properties of undirected graph—symmetry on edges, for example—is ignored. In this paper, we propose a parallel PageRank algorithm specifically designed for undirected graphs that can fully leverage their symmetry. Formally, our algorithm extends the Chebyshev Polynomial approximation from the field of real function to the field of matrix function. Essentially, it reflects the symmetry on edges of undirected graph and the density of diagonalizable matrix. Theoretical analysis indicates that our algorithm has a higher convergence rate and requires less computation than the Power method, with the convergence rate being up to 50% higher with a damping factor of c=0.85c=0.85. Experiments on six datasets illustrate that our algorithm with 38 parallelism can be up to 39 times faster than the Power method.

keywords:
PageRank, undirected graph, Chebyshev Polynomial, parallel
journal: Applied Mathematics and Computation

1 Introduction

PageRank[1] is used to measure the importance of vertices according to graph structure. Generally, a vertex has higher importance if it is linked by more vertices or the vertices linking to it have higher importance themselves. Despite originating from search engine, PageRank has been applied in many fields such as social network analysis, chemistry, molecular biology and so on[2, 3, 4].

In the past decades, plenty of PageRank algorithms had been proposed, among which Power method[5] and Monte Carlo(MC) method[6] were two main approaches. Existing algorithms[7, 8, 9, 10] have advantages respectively, however, most of them do not distinguish the graph under investigation is directed or not. For example, Power method treats any graph as directed, while undirected graph widely exists in applications such as power grids, traffic nets and so on. Compared with directed graph, the most significant property of undirected graph is the symmetry on edges. Hence, simply treating undirected graph as directed omitted this property. A few algorithms based on the MC method benefited from symmetry. For example, Sarma[11] accelerated MC method on undirected graph by borrowing ideas from distributed random walk[12], Luo[13, 14] proposed Radar Push on undirected graph and decreased the variance of result. Thus, taking advantage of symmetry is a feasible solution of designing PageRank algorithm for undirected graph.

PageRank vector can be obtained by computing (𝑰c𝑷)1𝒑(\bm{I}-c\bm{P})^{-1}\bm{p}, where 𝑰\bm{I} is identity matrix, 𝑷\bm{P} is the possibility transition matrix of the graph and 𝒑\bm{p} is the personalized vector. The state-of-the-art PageRank algorithm, i.e., Forward Push(FP)[15], approximates (𝑰c𝑷)1𝒑(\bm{I}-c\bm{P})^{-1}\bm{p} by i=0k(c𝑷)i𝒑\sum\limits_{i=0}^{k}(c\bm{P})^{i}\bm{p}. From the perspective of polynomial approximation, i=0k(cx)i\sum\limits_{i=0}^{k}(cx)^{i} might not be the optimal approximating polynomial of (1cx)1(1-cx)^{-1} as polynomial with higher degree is required to obtain an approximation with less error. Thus, constructing the optimal polynomial is a natural idea.

Chebyshev Polynomial[16] is a set of orthogonal polynomials with good properties, by which the optimal uniform approximating polynomial of any real, continuous and square integrable function can be constructed. Directly extending Chebyshev Polynomial approximation from the field of real function to the field of matrix function is always infeasible. However, if 𝒑\bm{p} can be linearly represented by 𝑷\bm{P}’s eigenvectors, then (𝑰c𝑷)1𝒑(\bm{I}-c\bm{P})^{-1}\bm{p} can be converted to the linear combination of 𝑷\bm{P}’s eigenvectors, where the coefficients are functions of the corresponding eigenvalues. By applying the Chebyshev Polynomial approximation in the coefficients, a new approach of computing PageRank can be obtained. To this end, two conditions required that (1)𝑷\bm{P} has enough linearly independent eigenvectors and (2)𝑷\bm{P}’s eigenvalues are all real. The first condition is sufficed by the density of diagonalisable matrix. For undirected graph, the second condition can be ensured by the symmetry. Motivated by this, a parallel PageRank algorithm specially for undirected graph is proposed in this paper. The contributions are as below.

  1. (1)

    We present a solution of computing PageRank via the Chebyshev Polynomial approximation. Based on the recursion relation of Chebyshev Polynomial, PageRank vector can be calculated iteratively.

  2. (2)

    We proposes a parallel PageRank algorithm, i.e., the Chebyshev Polynomial Approximation Algorithm(CPAA). Theoretically, CPAA has higher convergence rate and less computation amount compared with the Power method.

  3. (3)

    Experimental results on six data sets suggest that CPAA markedly outperforms the Power method, when damping factor c=0.85c=0.85, CPAA with 38 parallelism requires only 60% iteration rounds to get converged and can be at most 39 times faster.

The remaining of this paper are as follows. In section 2, PageRank and Chebyshev Polynomial are introduced briefly. In section 3, the method of computing PageRank via Chebyshev Polynomial approximation is elaborated. Section 4 proposes CPAA and the theoretical analysis as well. Experiments on six data sets are conducted in section 5. A summarization of this paper is presented in Section 6.

2 Preliminary

In this section, PageRank and Chebyshev Polynomial are introduced briefly.

2.1 PageRank

Given graph G=(V,E)G=(V,E), where V={v1,v2,,vn}V=\{v_{1},v_{2},\cdots,v_{n}\}, E={(vi,vj):i,j=1,2,,n}E=\{(v_{i},v_{j}):i,j=1,2,\cdots,n\} and |E|=m|E|=m. Let 𝑨=(aij)n×n\bm{A}=(a_{ij})_{n\times n} denote the adjacency matrix where aija_{ij} is 1 if (vj,vi)E(v_{j},v_{i})\in E and 0 else. Let 𝑷=(pij)n×n\bm{P}=(p_{ij})_{n\times n} denote the probability transition matrix where

pij={aij/i=1naij,ifi=1naij0,0,else.p_{ij}=\left\{\begin{array}[]{ll}a_{ij}/\sum\limits_{i=1}^{n}{a_{ij}},&if\quad\sum\limits_{i=1}^{n}{a_{ij}\neq 0},\\ 0,&else.\end{array}\right.

Let 𝒅=(d1,d2,,dn)T\bm{d}=(d_{1},d_{2},...,d_{n})^{T} where did_{i} is 1 if viv_{i} is dangling vertex and 0 else. Let 𝒑=(p1,p2,,pn)T\bm{p}=(p_{1},p_{2},\cdots,p_{n})^{T} denote the nn-dimensional probability distribution. Let 𝑷=𝑷+𝒑𝒅T\bm{P}^{{}^{\prime}}=\bm{P}+\bm{p}\bm{d}^{T} and 𝑷′′=c𝑷+(1c)𝒑𝒆T\bm{P}^{{}^{\prime\prime}}=c\bm{P}^{{}^{\prime}}+(1-c)\bm{p}\bm{e}^{T}, where c(0,1)c\in(0,1) is damping factor and 𝒆=(1,1,,1)T\bm{e}=(1,1,...,1)^{T}. Denote by 𝝅\bm{\pi} the PageRank vector. According to[17], let 𝒑=𝒆n\bm{p}=\frac{\bm{e}}{n}, one of PageRank’s definitions is

𝝅=𝑷′′𝝅,πi>0,i=1nπi=1.\small\bm{\pi}=\bm{P}^{{}^{\prime\prime}}\bm{\pi},\pi_{i}>0,\sum\limits_{i=1}^{n}\pi_{i}=1. (1)

Based on random walk model, a random walk starts at random vertex, with probability cc walks according to graph and with probability 1c1-c terminates, then 𝝅\bm{\pi} is the probability distribution of random walk terminating at each vertex.

If G(V,E)G(V,E) is undirected graph, then 𝒅=𝟎\bm{d}=\bm{0} and 𝑷=𝑷\bm{P}=\bm{P}^{{}^{\prime}}. Let 𝑫=diag{d1,d2,,dn}\bm{D}=diag\{d_{1},d_{2},\cdots,d_{n}\} where di=j=1naijd_{i}=\sum\limits_{j=1}^{n}{a_{ij}}, then di>0d_{i}>0 and 𝑷=𝑨𝑫1\bm{P}=\bm{A}\bm{D}^{-1}. From Formula (1), we have

(𝑰c𝑷)𝝅=(1c)𝒑(\bm{I}-c\bm{P})\bm{\pi}=(1-c)\bm{p}.

Since 𝑷2=1||\bm{P}||_{2}=1, 𝑰c𝑷\bm{I}-c\bm{P} is invertible, thus

𝝅=(1c)(𝑰c𝑷)1𝒑\bm{\pi}=(1-c)(\bm{I}-c\bm{P})^{-1}\bm{p}.

In fact, (1c)(𝑰c𝑷)1𝒑(1-c)(\bm{I}-c\bm{P})^{-1}\bm{p} is the algebraic form of Forward Push. With initial mass distribution 𝒑\bm{p}, each vertex reserves 1c1-c proportion of mass receiving from its source vertices and evenly pushes the remaining cc proportion to its target vertices, then 𝝅\bm{\pi} is the final mass distribution with

πi=𝒆iT(𝑰c𝑷)1𝒑𝒆T(𝑰c𝑷)1𝒑,\small\pi_{i}=\frac{\bm{e}^{T}_{i}(\bm{I}-c\bm{P})^{-1}\bm{p}}{\bm{e}^{T}(\bm{I}-c\bm{P})^{-1}\bm{p}}, (2)

where 𝒆i\bm{e}_{i} is nn-dimensional vector with the ithi_{th} element is 1 and 0 others.

2.2 Chebyshev Polynomial

Chebyshev Polynomial is a set of polynomials defined as

Tn(x)=cos(narccosx)T_{n}(x)=\cos{(n\arccos{x})}, n=0,1,2,n=0,1,2,\cdots.

Tn(x)T_{n}(x) satisfies:

  1. (1)(1)

    |Tn(x)|1|T_{n}(x)|\leq 1.

  2. (2)(2)

    2π11Tm(x)Tn(x)1x2𝑑x={2,ifm=n=0,δmn,else.\frac{2}{\pi}\int_{-1}^{1}\frac{T_{m}(x)T_{n}(x)}{\sqrt{1-x^{2}}}dx=\left\{\begin{array}[]{ll}2,&if\quad m=n=0,\\ \delta_{mn},&else.\end{array}\right.

  3. (3)(3)

    Tn+1(x)=2xTn(x)Tn1(x)T_{n+1}(x)=2xT_{n}(x)-T_{n-1}(x).

Chebyshev Polynomial is usually utilized in constructing the optimal uniform approximating polynomial. For any given function f(x)C(a,b)f(x)\in C(a,b) and abf2(x)𝑑x<\int_{a}^{b}f^{2}(x)dx<\infty, it follows that

f(x)=c02+k=1ckTk(x)f(x)=\frac{c_{0}}{2}+\sum\limits_{k=1}^{\infty}c_{k}T_{k}(x),

where ck=2baab11(2baxa+bba)2f(x)Tk(2baxa+bba)𝑑xc_{k}=\frac{2}{b-a}\int_{a}^{b}\frac{1}{\sqrt{1-(\frac{2}{b-a}x-\frac{a+b}{b-a})^{2}}}f(x)T_{k}(\frac{2}{b-a}x-\frac{a+b}{b-a})dx, c02+k=1nckTk(x)\frac{c_{0}}{2}+\sum\limits_{k=1}^{n}c_{k}T_{k}(x) is the optimal uniform approximating polynomial of f(x)f(x). For

f(x)=(1cx)1,x(1,1)f(x)=(1-cx)^{-1},x\in(-1,1),

where c(0,1)c\in(0,1) is constant, we have ck=2π0πcos(kt)1ccost𝑑tc_{k}=\frac{2}{\pi}\int_{0}^{\pi}\frac{\cos{(kt)}}{1-c\cos{t}}dt, {ck:k=0,1,2,}\{c_{k}:k=0,1,2,\cdots\} decreases monotonously to 0, and

limMk=Mck=limM2π0πk=Mcos(kt)1ccost𝑑t=0\lim\limits_{M\to\infty}\sum\limits_{k=M}^{\infty}c_{k}=\lim\limits_{M\to\infty}\frac{2}{\pi}\int_{0}^{\pi}\frac{\sum\limits_{k=M}^{\infty}\cos{(kt)}}{1-c\cos{t}}dt=0.

Thus, ϵ>0,M1+,s.t.\forall\epsilon>0,\exists M_{1}\in\mathbb{N}^{+},s.t., M>M1\forall M>M_{1},

maxx(1,1)|f(x)(c02+k=1MckTk(x))|<ϵ.\small\max\limits_{x\in(-1,1)}|f(x)-(\frac{c_{0}}{2}+\sum\limits_{k=1}^{M}c_{k}T_{k}(x))|<\epsilon. (3)

3 Computing PageRank by Chebyshev Polynomial approximation

In this section, Formula (3) is extended from the field of real function to the filed of matrix function. We mainly prove that, ϵ>0\forall\epsilon>0, M1+\exists M_{1}\in\mathbb{N}^{+}, s.t.s.t., M>M1\forall M>M_{1},

(𝑰c𝑷)1𝒑(c02𝒑+k=1MckTk(𝑷)𝒑)2<ϵ.\small||(\bm{I}-c\bm{P})^{-1}\bm{p}-(\frac{c_{0}}{2}\bm{p}+\sum\limits_{k=1}^{M}c_{k}T_{k}(\bm{P})\bm{p})||_{2}<\epsilon. (4)

To this end, we firstly give two lemmas as below.

Lemma 1.

[18] Diagonalizable matrices are Zariski dense.

Lemma 1 implies that, for any given matrix 𝑷n×n\bm{P}\in\mathbb{R}^{n\times n}, there exists diagonalizable matrix sequence {𝑷t:t=0,1,2,}\left\{\bm{P}_{t}:t=0,1,2,\cdots\right\}, where 𝑷tn×n\bm{P}_{t}\in\mathbb{R}^{n\times n} and 𝑷t2=1||\bm{P}_{t}||_{2}=1, s.t.s.t., 𝑷t𝑷\bm{P}_{t}\rightrightarrows\bm{P}. Thus, we have

limt𝑷t𝑷2=0\lim\limits_{t\to\infty}||\bm{P}_{t}-\bm{P}||_{2}=0.

Since both k=0(c𝑷t)k\sum\limits_{k=0}^{\infty}(c\bm{P}_{t})^{k} and k=1MckTk(𝑷t)\sum\limits_{k=1}^{M}c_{k}T_{k}(\bm{P}_{t}) are uniformly convergent with respect to tt, ϵ>0\forall\epsilon>0, N1+\exists N_{1}\in\mathbb{N}^{+}, s.t.s.t., t>N1\forall t>N_{1},

k=0(c𝑷)k𝒑k=0(c𝑷t)k𝒑2<ϵ||\sum\limits_{k=0}^{\infty}(c\bm{P})^{k}\bm{p}-\sum\limits_{k=0}^{\infty}(c\bm{P}_{t})^{k}\bm{p}||_{2}<\epsilon,

and

k=1MckTk(𝑷)𝒑k=1MckTk(𝑷t)𝒑2<ϵ||\sum\limits_{k=1}^{M}c_{k}T_{k}(\bm{P})\bm{p}-\sum\limits_{k=1}^{M}c_{k}T_{k}(\bm{P}_{t})\bm{p}||_{2}<\epsilon.

Since (𝑰c𝑷)1𝒑=k=0(c𝑷)k𝒑(\bm{I}-c\bm{P})^{-1}\bm{p}=\sum\limits_{k=0}^{\infty}(c\bm{P})^{k}\bm{p}, Formula (4) can be hold by proving

limtk=0(c𝑷t)k𝒑(c02𝒑+k=1MckTk(𝑷t)𝒑)2<ϵ.\small\lim\limits_{t\to\infty}||\sum\limits_{k=0}^{\infty}(c\bm{P}_{t})^{k}\bm{p}-(\frac{c_{0}}{2}\bm{p}+\sum\limits_{k=1}^{M}c_{k}T_{k}(\bm{P}_{t})\bm{p})||_{2}<\epsilon. (5)
Lemma 2.

The whole eigenvalues of 𝐏\bm{P} are real.

Proof.

We first prove that 𝑫c𝑨\bm{D}-c\bm{A} is positive definite matrix. 𝒙n\forall\bm{x}\in\mathbb{R}^{n} and 𝒙𝟎\bm{x}\neq\bm{0}, it follows that

𝒙T(𝑫c𝑨)𝒙=i=1ndixi2ci=1nj=1naijxixj=12i=1nj=1naij(xi2+xj22cxixj).\begin{aligned} \bm{x}^{T}(\bm{D}-c\bm{A})\bm{x}=&\sum\limits_{i=1}^{n}{d_{i}x_{i}^{2}}-c\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{n}{a_{ij}x_{i}x_{j}}\\ =&\frac{1}{2}\sum\limits_{i=1}^{n}\sum\limits_{j=1}^{n}{a_{ij}(x_{i}^{2}+x_{j}^{2}-2cx_{i}x_{j})}.\end{aligned}

Since xi2+xj22cxixj>0,i,j=1,2,,nx_{i}^{2}+x_{j}^{2}-2cx_{i}x_{j}>0,i,j=1,2,\cdots,n, 𝑫c𝑨\bm{D}-c\bm{A} is positive definite.

Let 𝑩=𝑫c𝑨\bm{B}=\bm{D}-c\bm{A}, then

(𝑩𝑷T)T=(𝑨c𝑨𝑫1𝑨)T=𝑨c𝑨𝑫1𝑨=𝑩𝑷T(\bm{B}\bm{P}^{T})^{T}=(\bm{A}-c\bm{A}\bm{D}^{-1}\bm{A})^{T}=\bm{A}-c\bm{A}\bm{D}^{-1}\bm{A}=\bm{B}\bm{P}^{T}.

𝒚n\forall\bm{y}\in\mathbb{C}^{n} and 𝒚𝟎\bm{y}\neq\bm{0}, assuming 𝒚=𝒚1+i𝒚2\bm{y}=\bm{y}_{1}+\mathrm{i}\bm{y}_{2}, where 𝒚1,𝒚2n\bm{y}_{1},\bm{y}_{2}\in\mathbb{R}^{n}, we have

𝒚𝑩𝒚=(𝒚1i𝒚2)T𝑩(𝒚1+i𝒚2)=𝒚1T𝑩𝒚1+𝒚2T𝑩𝒚2+i(𝒚1T𝑩𝒚2𝒚2T𝑩𝒚1)=𝒚1T𝑩𝒚1+𝒚2T𝑩𝒚2>0.\begin{aligned} \bm{y}^{*}\bm{B}\bm{y}&=(\bm{y}_{1}-\mathrm{i}\bm{y}_{2})^{T}\bm{B}(\bm{y}_{1}+\mathrm{i}\bm{y}_{2})\\ &=\bm{y}_{1}^{T}\bm{B}\bm{y}_{1}+\bm{y}_{2}^{T}\bm{B}\bm{y}_{2}+\mathrm{i}(\bm{y}_{1}^{T}\bm{B}\bm{y}_{2}-\bm{y}_{2}^{T}\bm{B}\bm{y}_{1})\\ &=\bm{y}_{1}^{T}\bm{B}\bm{y}_{1}+\bm{y}_{2}^{T}\bm{B}\bm{y}_{2}>0.\end{aligned}

Denote by λ\lambda the eigenvalue of 𝑷T\bm{P}^{T}, by 𝝌\bm{\chi} the corresponding eigenvector, then

λ𝝌𝑩𝝌=𝝌𝑩𝑷T𝝌=𝝌(𝑩𝑷T)T𝝌=(𝑷T𝝌¯)T𝑩𝝌=λ¯𝝌𝑩𝝌.\lambda\bm{\chi}^{*}\bm{B}\bm{\chi}=\bm{\chi}^{*}\bm{B}\bm{P}^{T}\bm{\chi}=\bm{\chi}^{*}(\bm{B}\bm{P}^{T})^{T}\bm{\chi}=(\bm{P}^{T}\overline{\bm{\chi}})^{T}\bm{B}\bm{\chi}=\overline{\lambda}\bm{\chi}^{*}\bm{B}\bm{\chi}.

Since 𝝌𝑩𝝌>0\bm{\chi}^{*}\bm{B}\bm{\chi}>0, we have λ¯=λ\overline{\lambda}=\lambda, i.e., λ\lambda is real. ∎

Since 𝑷t\bm{P}_{t} is diagonalizable, there exist nn linearly independent eigenvectors. Denote by 𝝌l(t)\bm{\chi}_{l}(t) the eigenvector of 𝑷t\bm{P}_{t}, by λl(t)=λl(1)(t)+iλl(2)(t)\lambda_{l}(t)=\lambda_{l}^{(1)}(t)+\mathrm{i}\lambda_{l}^{(2)}(t) the corresponding eigenvalue, where 𝝌l(t)2=1||\bm{\chi}_{l}(t)||_{2}=1, λl(1)(t),λl(2)(t)\lambda_{l}^{(1)}(t),\lambda_{l}^{(2)}(t)\in\mathbb{R} and l=1,2,,nl=1,2,\cdots,n, we have |λl(t)|1|\lambda_{l}(t)|\leq 1 and

𝑷𝝌l(t)λl(t)𝝌l(t)2=𝑷𝝌l(t)𝑷t𝝌l(t)2𝑷𝑷t2||\bm{P}\bm{\chi}_{l}(t)-\lambda_{l}(t)\bm{\chi}_{l}(t)||_{2}=||\bm{P}\bm{\chi}_{l}(t)-\bm{P}_{t}\bm{\chi}_{l}(t)||_{2}\leq||\bm{P}-\bm{P}_{t}||_{2}.

Given ll, since \mathbb{C} is complete and {λl(t)}\{\lambda_{l}(t)\} is bounded, there exists convergent subsequence {λl(tk)}{λl(t)}\{\lambda_{l}(t_{k})\}\subseteq\{\lambda_{l}(t)\}, let λl=limkλl(tk)\lambda_{l}=\lim\limits_{k\to\infty}\lambda_{l}(t_{k}). Similarly, since n\mathbb{R}^{n} is complete and {𝝌l(tk)}\{\bm{\chi}_{l}(t_{k})\} is bounded, there exists convergent subsequence {𝝌l(tks)}{𝝌l(tk)}\{\bm{\chi}_{l}(t_{k_{s}})\}\subseteq\{\bm{\chi}_{l}(t_{k})\}, let 𝝌l=lims𝝌l(tks)\bm{\chi}_{l}=\lim\limits_{s\to\infty}\bm{\chi}_{l}(t_{k_{s}}). For convenience, we still mark tkst_{k_{s}} as tt in the following. Since

limt𝑷𝝌l(t)λl(t)𝝌l(t)2limt𝑷𝑷t2=0\lim\limits_{t\to\infty}||\bm{P}\bm{\chi}_{l}(t)-\lambda_{l}(t)\bm{\chi}_{l}(t)||_{2}\leq\lim\limits_{t\to\infty}||\bm{P}-\bm{P}_{t}||_{2}=0,

it follows that

𝑷𝝌l=limt𝑷𝝌l(t)=limtλl(t)𝝌l(t)=λl𝝌l\bm{P}\bm{\chi}_{l}=\lim\limits_{t\to\infty}\bm{P}\bm{\chi}_{l}(t)=\lim\limits_{t\to\infty}\lambda_{l}(t)\bm{\chi}_{l}(t)=\lambda_{l}\bm{\chi}_{l},

i.e, λl\lambda_{l} is the eigenvalue of 𝑷\bm{P} and 𝝌l\bm{\chi}_{l} is the corresponding eigenvector. According to Lemma 2, λl\lambda_{l} is real, thus for arbitrary l=0,1,,nl=0,1,\cdots,n,

limtλl(2)(t)=0.\lim\limits_{t\to\infty}\lambda_{l}^{(2)}(t)=0. (6)

For any given tt, {𝝌l(t):l=1,2,,n}\{\bm{\chi}_{l}(t):l=1,2,\cdots,n\} is basis of n\mathbb{R}^{n}, by which 𝒑\bm{p} can be linearly represented. Assuming

𝒑=l=1nαl(t)𝝌l(t)\bm{p}=\sum\limits_{l=1}^{n}\alpha_{l}(t)\bm{\chi}_{l}(t),

where αl(t)\alpha_{l}(t)\in\mathbb{R} and |αl(t)|<1|\alpha_{l}(t)|<1, then

k=0(c𝑷t)k𝒑=k=0(c𝑷t)kl=1nαl(t)𝝌l(t)=l=1nαl(t)k=0(cλl(t))k𝝌l(t)\sum\limits_{k=0}^{\infty}(c\bm{P}_{t})^{k}\bm{p}=\sum\limits_{k=0}^{\infty}(c\bm{P}_{t})^{k}\sum\limits_{l=1}^{n}\alpha_{l}(t)\bm{\chi}_{l}(t)=\sum\limits_{l=1}^{n}\alpha_{l}(t)\sum\limits_{k=0}^{\infty}(c\lambda_{l}(t))^{k}\bm{\chi}_{l}(t).

Since both k=0(cλl(t))k\sum\limits_{k=0}^{\infty}(c\lambda_{l}(t))^{k} and k=0(cλl(1)(t))k\sum\limits_{k=0}^{\infty}(c\lambda_{l}^{(1)}(t))^{k} are uniformly convergent with respect to tt, we have

l=1nαl(t)k=0(cλl(t))k𝝌l(t)l=1nαl(t)k=0(cλl(1)(t))k𝝌l(t)2=|l=1nαl(t)(k=0(cλl(t))kk=0(cλl(1)(t))k)|𝝌l(t)2=|l=1nαl(t)(k=0(c(λl(1)(t)+iλl(2)(t)))kk=0(cλl(1)(t))k)|,\begin{aligned} &||\sum\limits_{l=1}^{n}\alpha_{l}(t)\sum\limits_{k=0}^{\infty}(c\lambda_{l}(t))^{k}\bm{\chi}_{l}(t)-\sum\limits_{l=1}^{n}\alpha_{l}(t)\sum\limits_{k=0}^{\infty}(c\lambda^{(1)}_{l}(t))^{k}\bm{\chi}_{l}(t)||_{2}\\ =&|\sum\limits_{l=1}^{n}\alpha_{l}(t)(\sum\limits_{k=0}^{\infty}(c\lambda_{l}(t))^{k}-\sum\limits_{k=0}^{\infty}(c\lambda^{(1)}_{l}(t))^{k})|\cdot||\bm{\chi}_{l}(t)||_{2}\\ =&|\sum\limits_{l=1}^{n}\alpha_{l}(t)(\sum\limits_{k=0}^{\infty}(c(\lambda^{(1)}_{l}(t)+\mathrm{i}\lambda^{(2)}_{l}(t)))^{k}-\sum\limits_{k=0}^{\infty}(c\lambda^{(1)}_{l}(t))^{k})|,\end{aligned}

from Formula (6), ϵ>0\forall\epsilon>0, N2+\exists N_{2}\in\mathbb{N}^{+}, s.ts.t, t>N2\forall t>N_{2},

l=1nαl(t)k=0(cλl(t))k𝝌l(t)l=1nαl(t)k=0(cλl(1)(t))k𝝌l(t)2<ϵ||\sum\limits_{l=1}^{n}\alpha_{l}(t)\sum\limits_{k=0}^{\infty}(c\lambda_{l}(t))^{k}\bm{\chi}_{l}(t)-\sum\limits_{l=1}^{n}\alpha_{l}(t)\sum\limits_{k=0}^{\infty}(c\lambda^{(1)}_{l}(t))^{k}\bm{\chi}_{l}(t)||_{2}<\epsilon,

i.e.,

k=0(c𝑷t)k𝒑l=1nαl(t)k=0(cλl(1)(t))k𝝌l(t)2<ϵ||\sum\limits_{k=0}^{\infty}(c\bm{P}_{t})^{k}\bm{p}-\sum\limits_{l=1}^{n}\alpha_{l}(t)\sum\limits_{k=0}^{\infty}(c\lambda^{(1)}_{l}(t))^{k}\bm{\chi}_{l}(t)||_{2}<\epsilon.

Since (1cλl(1)(t))1=k=0(cλl(1)(t))k(1-c\lambda^{(1)}_{l}(t))^{-1}=\sum\limits_{k=0}^{\infty}(c\lambda^{(1)}_{l}(t))^{k}, it follows that

k=0(c𝑷t)k𝒑l=1nαl(t)(1cλl(1)(t))1𝝌l(t)2<ϵ.\small||\sum\limits_{k=0}^{\infty}(c\bm{P}_{t})^{k}\bm{p}-\sum\limits_{l=1}^{n}\alpha_{l}(t)(1-c\lambda^{(1)}_{l}(t))^{-1}\bm{\chi}_{l}(t)||_{2}<\epsilon. (7)

Approximating f(λl(1)(t))=(1cλl(1)(t))1f(\lambda^{(1)}_{l}(t))=(1-c\lambda^{(1)}_{l}(t))^{-1} by Chebyshev Polynomial, from Formula (3), ϵ>0\forall\epsilon>0, M1+\exists M_{1}\in\mathbb{N}^{+}, s.t.s.t., M>M1\forall M>M_{1},

l=1nαl(t)(1cλl(1)(t))1𝝌l(t)l=1nαl(t)(c02+k=1MckTk(λl(1)(t)))𝝌l(t)2<ϵ||\sum\limits_{l=1}^{n}\alpha_{l}(t)(1-c\lambda_{l}^{(1)}(t))^{-1}\bm{\chi}_{l}(t)-\sum\limits_{l=1}^{n}\alpha_{l}(t)(\frac{c_{0}}{2}+\sum\limits_{k=1}^{M}c_{k}T_{k}(\lambda_{l}^{(1)}(t)))\bm{\chi}_{l}(t)||_{2}<\epsilon,

i.e.,

l=1nαl(t)(1cλl(1)(t))1𝝌l(t)(c02𝒑+k=1Mckl=1nTk(λl(1)(t))αl(t)𝝌l(t))2<ϵ||\sum\limits_{l=1}^{n}\alpha_{l}(t)(1-c\lambda_{l}^{(1)}(t))^{-1}\bm{\chi}_{l}(t)-(\frac{c_{0}}{2}\bm{p}+\sum\limits_{k=1}^{M}c_{k}\sum\limits_{l=1}^{n}T_{k}(\lambda_{l}^{(1)}(t))\alpha_{l}(t)\bm{\chi}_{l}(t))||_{2}<\epsilon.

Tk(x)T_{k}(x) is a polynomial of degree kk, assuming

Tk(x)=i=0kaixiT_{k}(x)=\sum\limits_{i=0}^{k}a_{i}x^{i},

where the coefficient aia_{i}\in\mathbb{R}, we have

Tk(𝑷t)𝒑=i=0kai𝑷ti𝒑=i=0kai𝑷til=1nαl(t)𝝌l(t)=l=1nαl(t)i=0kai𝑷ti𝝌l(t)=l=1nαl(t)i=0kai(λl(1)(t)+iλl(2)(t))i𝝌l(t).\begin{aligned} T_{k}(\bm{P}_{t})\bm{p}&=\sum\limits_{i=0}^{k}a_{i}\bm{P}^{i}_{t}\bm{p}\\ &=\sum\limits_{i=0}^{k}a_{i}\bm{P}^{i}_{t}\sum\limits_{l=1}^{n}\alpha_{l}(t)\bm{\chi}_{l}(t)\\ &=\sum\limits_{l=1}^{n}\alpha_{l}(t)\sum\limits_{i=0}^{k}a_{i}\bm{P}^{i}_{t}\bm{\chi}_{l}(t)\\ &=\sum\limits_{l=1}^{n}\alpha_{l}(t)\sum\limits_{i=0}^{k}a_{i}(\lambda^{(1)}_{l}(t)+\mathrm{i}\lambda^{(2)}_{l}(t))^{i}\bm{\chi}_{l}(t).\end{aligned}

From Formula (6), k\forall k and ϵ>0\forall\epsilon>0, N3+\exists N_{3}\in\mathbb{N}^{+}, s.t.s.t., t>N3\forall t>N_{3},

l=1nαl(t)i=0kai(λl(1)(t)+iλl(2)(t))i𝝌l(t)l=1nαl(t)i=0kai(λl(1)(t))i𝝌l(t)2<ϵ||\sum\limits_{l=1}^{n}\alpha_{l}(t)\sum\limits_{i=0}^{k}a_{i}(\lambda^{(1)}_{l}(t)+\mathrm{i}\lambda^{(2)}_{l}(t))^{i}\bm{\chi}_{l}(t)-\sum\limits_{l=1}^{n}\alpha_{l}(t)\sum\limits_{i=0}^{k}a_{i}(\lambda_{l}^{(1)}(t))^{i}\bm{\chi}_{l}(t)||_{2}<\epsilon,

i.e.,

Tk(𝑷t)𝒑l=1nTk(λl(1)(t))αl(t)𝝌l(t)2<ϵ||T_{k}(\bm{P}_{t})\bm{p}-\sum\limits_{l=1}^{n}T_{k}(\lambda_{l}^{(1)}(t))\alpha_{l}(t)\bm{\chi}_{l}(t)||_{2}<\epsilon.

Thus, M\forall M and ϵ>0\forall\epsilon>0, N4+\exists N_{4}\in\mathbb{N}^{+}, s.t.s.t., t>N4\forall t>N_{4},

l=1nαl(t)(1cλl(1)(t))1𝝌l(t)(c02𝒑+k=1MckTk(𝑷t)𝒑)2<ϵ||\sum\limits_{l=1}^{n}\alpha_{l}(t)(1-c\lambda_{l}^{(1)}(t))^{-1}\bm{\chi}_{l}(t)-(\frac{c_{0}}{2}\bm{p}+\sum\limits_{k=1}^{M}c_{k}T_{k}(\bm{P}_{t})\bm{p})||_{2}<\epsilon.

From Formula (7), ϵ>0\forall\epsilon>0, M1+\exists M_{1}\in\mathbb{N}^{+}, s.t.s.t., M>M1\forall M>M_{1}, N+\exists N\in\mathbb{N}^{+}, s.t.s.t., t>N\forall t>N,

k=0(c𝑷t)k𝒑(c02𝒑+k=1MckTk(𝑷t)𝒑)2<ϵ||\sum\limits_{k=0}^{\infty}(c\bm{P}_{t})^{k}\bm{p}-(\frac{c_{0}}{2}\bm{p}+\sum\limits_{k=1}^{M}c_{k}T_{k}(\bm{P}_{t})\bm{p})||_{2}<\epsilon,

i.e.,

limtk=0(c𝑷t)k𝒑(c02𝒑+k=1MckTk(𝑷t)𝒑)2=0\lim\limits_{t\to\infty}||\sum\limits_{k=0}^{\infty}(c\bm{P}_{t})^{k}\bm{p}-(\frac{c_{0}}{2}\bm{p}+\sum\limits_{k=1}^{M}c_{k}T_{k}(\bm{P}_{t})\bm{p})||_{2}=0.

Thus Formula (5) is hold, so as Formula (4).

It should be noted that, Formula (4) requires the whole eigenvalues of 𝑷\bm{P} are real, thus it might not be hold on some directed graphs. From the perspective of polynomial approximation, FP approximates f(x)=(1cx)1f(x)=(1-cx)^{-1} by taking {1,x,x2,}\{1,x,x^{2},\cdots\} as the basis, while Formula (4) approximates f(x)f(x) by taking Chebyshev Polynomial {Tk(x):k=1,2,}\{T_{k}(x):k=1,2,\cdots\} as basis. Since Chebyshev Polynomial are orthogonal, Formula (4) is more efficient.

4 Algorithm and analysis

In this section, a parallel PageRank algorithm for undirected graph is proposed and then the theoretical analysis is given.

4.1 Algorithm designing

From Formula (4), PageRank vector can be obtained by calculating {ckTk(𝑷)𝒑:k=0,1,2.}\{c_{k}T_{k}(\bm{P})\bm{p}:k=0,1,2.\cdots\}:

  1. (1)

    {ck:k=0,1,2,}\{c_{k}:k=0,1,2,\cdots\} relies on damping factor cc only, thus we can calculate and store them beforehand.

  2. (2)

    {Tk(𝑷)𝒑:k=0,1,2,}\{T_{k}(\bm{P})\bm{p}:k=0,1,2,\cdots\} can be calculated iteratively by

    Tk+1(𝑷)𝒑=2𝑷Tk(𝑷)𝒑Tk1(𝑷)𝒑T_{k+1}(\bm{P})\bm{p}=2\bm{P}T_{k}(\bm{P})\bm{p}-T_{k-1}(\bm{P})\bm{p},

    it is sufficed for each vertex reserving the (k1)th(k-1)_{th} and kthk_{th} iteration results to generate the (k+1)th(k+1)_{th} iteration result.

  3. (3)

    During the same iteration round, each vertex calculates independently, thus the computing can be done in parallel.

Restricted by the computing resource, assigning exclusive thread for each vertex is in feasible, we can invoke KK independent threads and assigning vertices to them. The Chebyshev Polynomial Approximation Algorithm(CPAA) is given as Algorithm 1.

Algorithm 1 Chebyshev Polynomial Approximation Algorithm
1:
2:KK: The parallelism.
3:MM: The upper bound of iteration rounds.
4:{c0,c1,,cM}\{c_{0},c_{1},\cdots,c_{M}\}: The coefficient of Chebyshev Polynomial approximation.
5:𝝅\bm{\pi}: PageRank vector.
6:Each vertex viv_{i} maintains Ti,Ti,Ti′′T_{i},T_{i}^{{}^{\prime}},T_{i}^{{}^{\prime\prime}} and π¯i\overline{\pi}_{i}.
7:Assign vertices to KK calculating threads, denote by SjS_{j} the set of vertices belonging to thread jj.
8:Initially set Ti=1T_{i}=1 and π¯i=c02Ti\overline{\pi}_{i}=\frac{c_{0}}{2}T_{i}.
9:
10:for k=1;kM;k++k=1;k\leq M;k++ do
11:    for all jj do \triangleright [Do in parallel.]
12:        if k=1k=1 then
13:           for uSju\in S_{j} do
14:               Tu=0T_{u}^{{}^{\prime}}=0;
15:               for viN(u)v_{i}\in N(u) do\triangleright [N(u)N(u) is the set of uu’s adjacency vertices.]
16:                  Tu=Tu+Tideg(vi)T_{u}^{{}^{\prime}}=T_{u}^{{}^{\prime}}+\frac{T_{i}}{deg(v_{i})};
17:               end for
18:               π¯u=π¯u+c1Tu\overline{\pi}_{u}=\overline{\pi}_{u}+c_{1}*T_{u}^{{}^{\prime}};
19:           end for
20:        else
21:           for uSju\in S_{j} do
22:               Tu′′=0T^{{}^{\prime\prime}}_{u}=0;
23:               for viN(u)v_{i}\in N(u) do
24:                  Tu′′=Tu′′+Tideg(vi)T_{u}^{{}^{\prime\prime}}=T_{u}^{{}^{\prime\prime}}+\frac{T_{i}^{{}^{\prime}}}{deg(v_{i})};
25:               end for
26:               Tu′′=2Tu′′TuT_{u}^{{}^{\prime\prime}}=2T_{u}^{{}^{\prime\prime}}-T_{u};
27:               π¯i=π¯i+ckTu′′\overline{\pi}_{i}=\overline{\pi}_{i}+c_{k}*T_{u}^{{}^{\prime\prime}};
28:           end for
29:        end if
30:    end for
31:    for all jj do \triangleright [Do in parallel.]
32:        for uSju\in S_{j} do
33:           Tu=TuT_{u}=T_{u}^{{}^{\prime}};
34:           Tu=Tu′′T_{u}^{{}^{\prime}}=T_{u}^{{}^{\prime\prime}};
35:        end for
36:    end for
37:end for
38:Calculate PageRank vector 𝝅\bm{\pi} by πi=π¯ii=1nπ¯i\pi_{i}=\frac{\overline{\pi}_{i}}{\sum\limits_{i=1}^{n}\overline{\pi}_{i}}.

From the perspective of vertex, CPAA is a loop of two stages, i.e., mass generating and mass accumulating. Initially, each vertex holds 1 mass and 0 accumulating mass. During the kthk_{th} iteration, at generating stage, each vertex generates the (k+1)th(k+1)_{th} iteration mass by reading the kthk_{th} iteration mass from its adjacency vertices and subtracting its own (k1)th(k-1)_{th} iteration mass; at accumulating stage, each vertex adds the (k+1)th(k+1)_{th} iteration mass weighted by ck+1c_{k+1} to the accumulating mass. In the end, the proportion of accumulating mass of one vertex is its PageRank value. Although the mass each vertex holding may change at each iteration, the total mass of the graph is constant at nn.

From the whole, the total accumulating mass SS of the graph is constant and falls into two parts, i.e., the accumulated and unaccumulated. CPAA is a process that converting the unaccumulated mass to the accumulated mass. Initially, the accumulated mass is 0 and the unaccumulated mass is SS. While CPAA running, the accumulated mass increases and the unaccumulated mass decreases, specifically, at the kthk_{th} iteration, the accumulated mass increases by cknc_{k}n and the unaccumulated mass decreases by the same amount. When the accumulated mass is SS and the unaccumulated mass is 0, CPAA gets converged. The distribution of accumulated mass is the PageRank vector.

It should be noted that, the dependency between the kthk_{th} iteration and (k+1)th(k+1)_{th} iteration can not be eliminated, paralleling only exists in the same iteration round.

4.2 Algorithm analysis

We analysis CPAA from three aspects, convergence rate, error and computation amount.

4.2.1 Convergence rate

Convergence rate reflects the rapidity of unaccumulated mass decreasing to 0. Let

Sk={nc02,ifk=0,nc02+ni=1kci,else.S_{k}=\left\{\begin{array}[]{ll}n\frac{c_{0}}{2},&if\quad k=0,\\ n\frac{c_{0}}{2}+n\sum\limits_{i=1}^{k}c_{i},&else.\end{array}\right.

SkS_{k} is accumulated mass at the end of the kthk_{th} iteration, and S=limkSkS=\lim\limits_{k\to\infty}S_{k}. Let

σk=SSkSSk1,k=1,2,3,\sigma_{k}=\frac{S-S_{k}}{S-S_{k-1}},k=1,2,3,\cdots.

Then 1σk1-\sigma_{k} is the ratio of unaccumulated mass decreasing at the kthk_{th} iteration.

Proposition 1.

σk=c2(2c)(11c2)c2c(11c2)\sigma_{k}=\frac{c^{2}-(2-c)(1-\sqrt{1-c^{2}})}{c^{2}-c(1-\sqrt{1-c^{2}})}, c(0,1)c\in(0,1), k=1,2,3,k=1,2,3,\cdots.

Proof.

Firstly, let Bk=i=kckB_{k}=\sum\limits_{i=k}^{\infty}c_{k}, then BkB_{k} is absolutely convergent, and

1σk=ckBk1-\sigma_{k}=\frac{c_{k}}{B_{k}}.

since ck=2π0πcoskt1ccost𝑑tc_{k}=\frac{2}{\pi}\int_{0}^{\pi}\frac{\cos{kt}}{1-c\cos{t}}dt, it follows the recurrence relation

ck1+ck+1=2π0π2cosktcost1ccost𝑑t=2cckc_{k-1}+c_{k+1}=\frac{2}{\pi}\int_{0}^{\pi}\frac{2\cos{kt}\cos{t}}{1-c\cos{t}}dt=\frac{2}{c}c_{k}.

According to

ck1+ck+1=2cck,ck+ck+2=2cck+1,,\begin{aligned} &c_{k-1}+c_{k+1}=\frac{2}{c}c_{k},\\ &c_{k}+c_{k+2}=\frac{2}{c}c_{k+1},\\ &\cdots,\end{aligned}

we have

Bk+ck1+Bkck=2cBkB_{k}+c_{k-1}+B_{k}-c_{k}=\frac{2}{c}B_{k},

thus Bk=ck1ck2c2B_{k}=\frac{c_{k-1}-c_{k}}{\frac{2}{c}-2} and ckBk=2c2ck1ck1\frac{c_{k}}{B_{k}}=\frac{\frac{2}{c}-2}{\frac{c_{k-1}}{c_{k}}-1}.

Since c0=21c2c_{0}=\frac{2}{\sqrt{1-c^{2}}}, c1=2c(11c21c2)c_{1}=\frac{2}{c}(\frac{1-\sqrt{1-c^{2}}}{\sqrt{1-c^{2}}}), c2=2c22(11c2)c21c2c_{2}=\frac{2}{c^{2}}\frac{2(1-\sqrt{1-c^{2}})-c^{2}}{\sqrt{1-c^{2}}}, it follows that

c0c1=c1c2=c11c2\frac{c_{0}}{c_{1}}=\frac{c_{1}}{c_{2}}=\frac{c}{1-\sqrt{1-c^{2}}}.

According to c0c1+c2c1=2c\frac{c_{0}}{c_{1}}+\frac{c_{2}}{c_{1}}=\frac{2}{c}, we have

c0c1=c1c2==ck1ck=c11c2\frac{c_{0}}{c_{1}}=\frac{c_{1}}{c_{2}}=\cdots=\frac{c_{k-1}}{c_{k}}=\frac{c}{1-\sqrt{1-c^{2}}}.

Thus, σk=c2(2c)(11c2)c2c(11c2)\sigma_{k}=\frac{c^{2}-(2-c)(1-\sqrt{1-c^{2}})}{c^{2}-c(1-\sqrt{1-c^{2}})}. ∎

Proposition(1) shows that σk\sigma_{k} relates with cc only. For any given cc, σk\sigma_{k} is a constant. For convenience, we mark σk\sigma_{k} as σc\sigma_{c} in the following. While CPAA running, the unaccumulated mass decreases by 1σc1-\sigma_{c} proportion per iteration. Referring to the Power method, σc\sigma_{c} indicates the convergence rate of CPAA. Since

σcc=c(2c1)(11c2)c2c(11c2)<1\frac{\sigma_{c}}{c}=\frac{c-(\frac{2}{c}-1)(1-\sqrt{1-c^{2}})}{c^{2}-c(1-\sqrt{1-c^{2}})}<1, c(0,1)c\in(0,1),

CPAA has higher convergence rate compared with the Power method. Figure 1 shows the relation between σc\sigma_{c} and cc. When c=0.85c=0.85, σc=0.5567\sigma_{c}=0.5567, which implies that CPAA only takes 65% iteration rounds of Power method to get converged.

Refer to caption
Figure 1: Convergence rate

4.2.2 Error

It is hard to estimate the error of each vertex, we discuss the relation between the relative error and the upper bound of iteration rounds from the whole. Denote by

ERRM=1SMSERR_{M}=1-\frac{S_{M}}{S}

the relative error, then we have

SM=c02+k=1Mck=c02+1βM1ββc0S_{M}=\frac{c_{0}}{2}+\sum\limits_{k=1}^{M}c_{k}=\frac{c_{0}}{2}+\frac{1-\beta^{M}}{1-\beta}\beta c_{0},

thus,

ERRM=1SMS=2βM+11+β,\small ERR_{M}=1-\frac{S_{M}}{S}=\frac{2\beta^{M+1}}{1+\beta}, (8)

where β=11c2c\beta=\frac{1-\sqrt{1-c^{2}}}{c}. Figure 2 shows that ERRMERR_{M} decreases exponentially with respect to MM, when c=0.85c=0.85, ERRMERR_{M} can be less than 10410^{-4} within 20 iteration rounds. It should be noted that the error estimation above mentioned is very rough as taking no graph structure into consideration.

Refer to caption
Figure 2: Relative error

4.2.3 Computation amount

While CPAA running, for vertex vv, there are deg(v)deg(v) multiplications and deg(v)deg(v) additions at generating stage, and 11 addition at accumulating stage. Therefore, the computation consists of mm multiplications and m+2nm+2n additions per iteration. The total computation are MmMm multiplications and M(m+2n)M(m+2n) additions.

5 Experiments

In this section, we experimentally demonstrate CPAA. Firstly, the hardware and measurements are introduced briefly. Then, the convergence of CPAA is illustrated. At last, the comparison of CPAA with other algorithms is elaborated.

5.1 Experimental setting

All algorithms in this experiment are implemented with C++ on serves with Intel(R) Xeon(R) Silver 4210R CPU 2.40GHz 40 processors and 190GB memory. The operation system is Ubuntu 18.04.5 LTS. Six data sets are illustrated in table 1, where nn, mm and deg=mndeg=\frac{m}{n} represent the number of vertices, the number of edges and the average degree respectively. The CPU time consumption TT, iteration rounds kk and max relative error ERR=maxviV|π¯iπi|πiERR=\max\limits_{v_{i}\in V}\frac{|\overline{\pi}_{i}-\pi_{i}|}{\pi_{i}} are taken to estimate the algorithms, where the true PageRank value πi\pi_{i} is obtained by Power method at the 210th210_{th} iteration. The damping factor c=0.85c=0.85.

Data sets nn mm degdeg
NACA0015 1039183 6229636 5.99
delaunay-n21 2097152 12582816 6.0
M6 3501776 21003872 6.0
NLR 4163763 24975952 6.0
CHANNEL 4802000 85362744 17.78
kmer-V2 55042369 117217600 2.13
Table 1: Data sets

5.2 Convergence

The relation of ERRERR, TT and kk on six data sets is illustrated in Figure 3.

  1. (1)

    The blue lines show that ERRERR has a negative exponential relation with kk, which is in consistent with Formula (8). With the increasing of iteration rounds, the result gets closer to the true value. The max relative error can be less than 10410^{-4} within 20 iterations.

  2. (2)

    The red lines show that TT has a positive linear relation with kk, thus, It also implies that the computation of each iteration is constant. On kmer-V2, the max relative error is lower than 10210^{-2} within 15 seconds.

  3. (3)

    The blue lines almost stay horizontal after 50 iteration rounds, which seems CPAA has limitation in precision. We believe it is not a algorithm flaw, but caused by the insufficiency of C++’s DOUBLE data type, whose significant digit number is 15. The computer considers 11 is equal to 1+10161+10^{-16}, so that, ckc_{k} with k>50k>50 can not change the result.

Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Figure 3: kk versus ERRERR and TT

5.3 Comparison with other algorithms

We compare CPAA with Power method (SPI) [1, 19], parallel Power method (MPI) [20] and an improvement of FP, i.e., IFP1 [21]. Both MPI, IFP1 and CPAA execute with 38 parallelism. The relation of ERRERR and TT are illustrated in Figures 4. Table 2 shows iteration rounds and CPU time consumption when ERR<103ERR<10^{-3}.

  1. (1)

    The green, cyan and magenta lines are lower than the blue lines, which indicates that both MPI, IFP1 and CPAA are much faster than SPI. For example, on kmer-V2, it takes near 900 seconds for SPI to get ERR<103ERR<10^{-3}, while the remaining algorithms cost less than 90 seconds. It implies that parallelization is an effective solution to accelerate PageRank computing.

  2. (2)

    The magenta lines are lower than the green and cyan lines, which implies that CPAA outperforms MPI and IFP1. For example, on kmer-V2, it takes about 67 seconds for MPI to get ERR<103ERR<10^{-3}, while CPAA costs less than 24 seconds. Since the whole algorithms are executed with the same parallelism, we believe the advantages are owe to the higher convergence rate of CPAA.

  3. (3)

    On almost all six data sets, Power method takes 20 iterations to get ERR<103ERR<10^{-3}, while CPAA only takes 12 iterations, and can be at most 39 times faster than SPI. It implies that CPAA takes 60% iterations of Power method to get converged, which is consistent with the theoretical analysis.

Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Figure 4: TT versus ERRERR
Data sets SPI MPI ITA CPAA
kk TT kk TT kk TT kk TT
NACA0015 20 13.541 20 0.887 - 1.390 12 0.604
delaunay-n21 20 20.175 20 1.854 - 2.921 12 1.111
M6 20 46.771 20 3.130 - 5.097 12 1.999
NLR 20 57.876 20 3.467 - 5.983 12 2.379
CHANNEL 20 102.828 20 6.819 - 9.689 12 5.845
kmer-V2 40 899.406 40 67.068 - 70.346 15 23.597
Table 2: Iterations rounds and CPU time consumption when ERR<103ERR<10^{-3}

6 Conclusion

How to compute PageRank more efficiently is an attractive problem. In this paper, a parallel PageRank algorithm specially for undirected graph called CPAA is proposed via Chebyshev Polynomial approximation. Both the theoretical analysis and experimental results indicate that CPAA has higher convergence rate and less computation amount compared with the Power method. Moreover, CPAA implies a more profound connotation, i.e., the symmetry of undirected graph and the density of diagonalizable matrix. Based on the latter, the problem of computing PageRank is converted to the problem of approximating f(x)=(1cx)1f(x)=(1-cx)^{-1}. This is a innovative approach for PageRank computing. In the future, some other orthogonal polynomials—Laguerre polynomial, for example—can be taken into consideration.

References

  • [1] S. Brin, L. Page, Reprint of: The anatomy of a large-scale hypertextual web search engine, Computer networks 56 (18) (2012) 3825–3833.
  • [2] D. F. Gleich, Pagerank beyond the web, Siam Review 57 (3) (2015) 321–363.
  • [3] S. Brown, A pagerank model for player performance assessment in basketball, soccer and hockey, arXiv preprint arXiv:1704.00583 (2017).
  • [4] Ying, Hou, Zhou, Dou, Wang, Shao, The changes of central cultural cities based on the analysis of the agglomeration of literati’s footprints in tang and song dynasties, Journal of Geo-information Science 22 (5) (2020) 945–953.
  • [5] T. Haveliwala, S. Kamvar, D. Klein, C. Manning, G. Golub, Computing pagerank using power extrapolation, Tech. rep., Stanford (2003).
  • [6] K. Avrachenkov, N. Litvak, D. Nemirovsky, N. Osipova, Monte carlo methods in pagerank computation: When one iteration is sufficient, SIAM Journal on Numerical Analysis 45 (2) (2007) 890–904.
  • [7] S. Kamvar, T. Haveliwala, G. Golub, Adaptive methods for the computation of pagerank, Linear Algebra and its Applications 386 (2004) 51–65.
  • [8] S. D. Kamvar, T. H. Haveliwala, C. D. Manning, G. H. Golub, Extrapolation methods for accelerating pagerank computations, in: Proceedings of the 12th international conference on World Wide Web, 2003, pp. 261–270.
  • [9] G. Wu, Y. Wei, A power-arnoldi algorithm for computing pagerank, Numerical Linear Algebra with Applications 14 (7) (2007) 521–546.
  • [10] Y. Zhu, S. Ye, X. Li, Distributed pagerank computation based on iterative aggregation-disaggregation methods, in: Proceedings of the 14th ACM international conference on Information and knowledge management, 2005, pp. 578–585.
  • [11] A. D. Sarma, A. R. Molla, G. Pandurangan, E. Upfal, Fast distributed pagerank computation, in: International Conference on Distributed Computing and Networking, Springer, 2013, pp. 11–26.
  • [12] A. Das Sarma, D. Nanongkai, G. Pandurangan, P. Tetali, Distributed random walks, Journal of the ACM (JACM) 60 (1) (2013) 1–31.
  • [13] S. Luo, Distributed pagerank computation: An improved theoretical study, Proceedings of the AAAI Conference on Artificial Intelligence 33 (2019) 4496–4503.
  • [14] S. Luo, Improved communication cost in distributed pagerank computation–a theoretical study, in: International Conference on Machine Learning, PMLR, 2020, pp. 6459–6467.
  • [15] R. Andersen, F. R. K. Chung, K. J. Lang, Local graph partitioning using pagerank vectors, in: 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2006), 21-24 October 2006, Berkeley, California, USA, Proceedings, 2006.
  • [16] D. I. Shuman, P. Vandergheynst, P. Frossard, Chebyshev polynomial approximation for distributed signal processing, in: Distributed Computing in Sensor Systems, 7th IEEE International Conference and Workshops, DCOSS 2011, Barcelona, Spain, 27-29 June, 2011, Proceedings, 2011.
  • [17] Berkhin, Pavel, A survey on pagerank computing, Internet Mathematics 2 (1) (2005) 73–120.
  • [18] R. J. de la Cruz, P. Saltenberger, Density of diagonalizable matrices in sets of structured matrices defined from indefinite scalar products, arXiv preprint arXiv:2007.00269 (2020).
  • [19] L. Page, S. Brin, R. Motwani, T. Winograd, The pagerank citation ranking: Bringing order to the web., Tech. rep., Stanford InfoLab (1999).
  • [20] N. T. Duong, Q. A. P. Nguyen, A. T. Nguyen, H.-D. Nguyen, Parallel pagerank computation using gpus, in: Proceedings of the Third Symposium on Information and Communication Technology, 2012, pp. 223–230.
  • [21] Q. Zhang, R. Tang, Z. Yao, J. Liang, Two parallel pagerank algorithms via improving forward push, arXiv preprint arXiv:2302.03245 (2023).