Optimizing Generalized PageRank Methods for Seed-Expansion Community Detection
Pan Li, Eli Chien, Olgica Milenkovic
Introduction
PageRank (PR), an algorithm originally proposed by Page et al. for ranking web-pages has found many successful applications, including community detection , link prediction and recommender system design . The PR algorithm involves computing the stationary distribution of a Markov process by starting from a seed vertex and then performing either a one-step of random walk (RW) to the neighbors of the current seed or jumping to another vertex according to a predetermined probability distribution. The RW aids in capturing topological information about the graph, while the jump probabilities incorporate modeling preferences . A proper selection of the RW probabilities ensures that the stationary distribution induces an ordering of the vertices that may be used to determine the “relevance” of vertices or the structure of their neighborhoods.
Despite the wide utility of PR , recent work in the field has shifted towards investigating various generalizations of PR. Generalized PR (GPR) values enable more accurate characterizations of vertex distances and similarities, and hence lead to improved performance of various graph learning techniques . GPR methods make use of arbitrarily weighted linear combinations of landing probabilities (LP) of RWs of different length, defined as follows. Given a seed vertex and another arbitrary vertex in the graph, the -step LP of , , equals the probability that a RW starting from the seed lands at after steps; the GPR value for vertex is defined as for some weight sequence . Certain GPR representations, such as personalized PR (PPR) or heat-kernel PR (HPR), are associated with weight sequences chosen in a heuristic manner: PPR uses traditional PR weights, for some and a seed set that captures locality constraints. On the other hand, HPR uses weights of the form for some . A question that naturally arises is what are the provably near-optimal or optimal weights for a particular graph-based learning task.
Clearly, there is no universal approach for addressing this issue, and prior work has mostly reported comparative analytic or empirical studies for selected GPRs. As an example, for community detection based on seed-expansion (SE) where the goal is to identify a densely linked component of the graph that contains a set of a priori defined seed vertices, Chung proved that the HPR method produces communities with better conductance values than PPR . Kloster and Gleich confirmed this finding via extensive experiments over real world networks. Avron and Horesh leveraged time-dependent PRs, a convolutional form of HPR and PPR , and showed that this new PR can outperform HPR on a number of real network datasets. Another line of work considered adaptively learning the GPR weights given access to sufficiently many both within-community and out-of-community vertex labels . Related studies were also conducted in other application domains such as web-ranking and recommender system design .
Recently, Kloumann et al. took a fresh look at the GPR-based seed-expansion community detection problem. They viewed LPs of different steps as features relevant to membership in the community of interest, and the GPRs as scores produced by a linear classifier that digests these features. A key observation in this setting is that the GPR weights have to be chosen with respect to the informativeness of these features. Based on the characterization of the mean-field values of the LPs over a modified stochastic block model (SBM) , Kloumann et al. determined that PPR with a proper choice of the parameter corresponds to the optimal classifier if only the first-order moments are available. Unfortunately, as the variance of the LPs was ignored, the performance of the PPR was shown to be sub-optimal even for synthetic graphs obeying the generative modeling assumptions used in .
We report substantial improvements of the described line of work by characterizing the non-asymptotic behavior of the LPs over random graphs. More precisely, we derive non-asymptotic conditions for the LPs to converge to their mean-field values. Our findings indicate that in the non-asymptotic setting, the discriminative power of -step LPs does not necessarily deteriorate as increases; this follows since our bounds on the variance decay even faster than the distance between the means of LPs within the same and across two different communities. We leverage this finding and propose new weights that suitably increase with the length of RWs for small values of . This choice differs significantly from the geometrically decaying weights used in PPR, as suggested by .
The reported results may also provide useful means for improving graph neural networks (GNN) and their variants for vertex classification tasks. Currently, the typical numbers of layers in graph neural networks is , as such a choice offers the best empirical performance . More layers may over-smooth vertex features and thus provide worse results. However, in this setting, long paths in the graphs may not be properly utilized, as our work demonstrates that these paths may have strong discriminative power for community detection. Hence a natural research direction of research regarding GNNs is to investigate how to leverage long paths over graphs without over-smoothing the vertex features. Concurrent to this work, several empirical studies were performed to address the same problem. The work in used a decoupling non-linear transformation of features and PR propagation over graphs, while used GNNs over graphs that are transformed based on GPRs.
Our contributions are multifold. We derive the first non-asymptotic bound of the distance between LP vectors to their mean-field values over random graphs. This bound allows us to better our understanding of a class of GPR-based community detection approaches. For example, it explains why PPR with a parameter often achieves good community detection performance and why HPR statistically outperforms PPR for community detection, which matches the combinatorial demonstration proposed previously . Second, we describe the first non-asymptotic characterization of GPRs with respect to their mean-field values over edge-independent random graphs. The obtained results improve the previous analysis of standard PR methods as one needs fewer modeling assumptions and arrives at more general conclusions. Third, we introduce a new PR-type classifier for SE community detection, termed inverse PR (IPR). IPR carefully selects the weights for the first several steps of the RW by taking into account the variance of the LPs, and offers significantly improved SE community detection performance compared to canonical PR diffusions (such as HPR and PPR) over SBMs. Fourth, we present extensive experiments for detecting seeded communities in real large-scale networks using IPR. Although real world networks do not share the properties of SBMs used in our analysis, IPR still significantly outperforms both HPR and PPR for networks with non-overlapping communities and offers performance improvement over two examined networks with overlapping community structures.
Preliminaries
We start by formally introducing LPs, GPR methods, random graphs and other relevant notions.
Some of our subsequent discussion focuses on two-block SBMs. In this setting, we let , denote the two blocks, such that and . For any pair of vertices from the same block , we set for some , . Note that we allow self loops, i.e. we allow , which makes for simpler notation without changing our conclusions. For pairs such that and , we set for some . A two-block SBM in this setting is parameterized by .
Mean-field Convergence Analysis of LPs and GPRs
Let . Suppose that . Then, with high probability, and for some constants that do not depend on or , one has
Moreover, let . Then,
1) If and , then for any sequence , ; 2) If and for some and such that where are constants, then for any and sequence that satisfies , we have
1) If and for some then for any weight sequence such that , one has 2) If for some constant for some and , then for any one has 3) If and for some constant , then for any one has
The following lemma uses the same proof techniques as Lemma 3.2 to provide an upper bound on the distance between the DNLPs and , which we find useful in what follows. The result essentially removes the dependence on the degrees in the first term of the right hand side of (1).
Suppose that the conditions of Lemma 3.2 are satisfied. Then, one has
GPR-Based SE Community Detection
One important application of PRs is in SE community detection: For each vertex , the LPs may be viewed as features and the GPR as a score used to predict the community membership of by comparing it with some threshold . Kloumann et al. investigated mean-field LPs, i.e., , and showed that under certain symmetry conditions, PPR with corresponds to an optimal classifier for one block in an SBM, given only the first-order moment information. However, accompanying simulations revealed that PPR underperforms with respect to classification accuracy. As a result, Fisher’s linear discriminant was used instead by empirically leveraging information about the second-order moments of the LPs, and was showed to have a performance almost matching that of belief propagation, a statistically optimal method for SBMs .
In what follows, we rigorously derive an explicit formula for a variant of Fisher’s linear discriminant by taking into account the individual variances of the features while neglecting their correlations. This explicit formula provides new insight into the behavior of GPR methods for SE community detection in SBMs and will be later generalized to handle real world networks (see Section 5).
Suppose that the mean vectors and covariance matrices of the features from two classes are equal to and , respectively. For simplicity, assume that the covariance matrices are identical, i.e., . The Fisher’s linear discriminant depends on the first two moments (mean and variance) of the features , and may be written as . The label of a data point is determined by comparing with a threshold.
Neglecting the differences in the second order moments by assuming that , Fisher’s linear discriminant reduces to , which induces a decision boundary that is orthogonal to the difference between the means of the two classes; is optimal under the assumptions that only the first-order moments and are available.
The two linear discriminants have different practical advantages and disadvantages in practice. On the one hand, can differ significantly from in which case performs much worse than . On the other hand, estimating the covariance matrix is nontrivial, and hence may not be available in a closed form. One possible choice to mitigate the above drawbacks is to use what we call the pseudo Fisher’s linear discriminant,
where is the diagonal matrix of ; preserves the information about variances, but neglects the correlations between the terms in . This discriminant essentially allows each feature to contribute equally to the final score. More precisely, given a feature of a vertex say its corresponding weight according to equals where denotes the variance of the feature (i.e., the -th component in the diagonal of ). Note that this weight may be rewritten as ; the first term is a frequently-used metric for characterizing the predictiveness of a feature, called the effect size , while the second term is a normalization term that positions all features on the same scale.
Next, we derive an expression for pertinent to SE community detection, following the setting proposed for Fisher’s linear discriminant in . To model the community to be detected with seeds and the out-of-community portion of a graph respectively, we focus on two-block SBMs with parameters , and characterize both the means , and the variances . Note that for notational simplicity, we first work with DNLPs as the features of choice, as they can remove degree-induced noise; the results for LPs are only stated briefly.
2 SF(⋅)𝑆𝐹⋅SF(\cdot) Weights and the Inverse PageRank
Choosing the initial seed set to lie within one single community, e.g. , and using some algebraic manipulations (see Section C of the Supplement), we obtain
Recall that stands for the second largest eigenvalue of the mean-field random walk matrix . The result in (4) shows that the distance between the means of the DNLPs of the two classes decays with at a rate . This result is similar to its counterpart in for LPs but the results in additionally requires for vertices and belonging to different blocks. By only using the difference without the variance, the authors of proposed to use the discriminant , which corresponds to PPR with .
Combining the characterizations of the means and variances, we arrive at the following conclusions.
Inverse PR. As already observed, for finite and with high probability, only slightly exceeds . Moreover, for SBMs with unknown parameters or for real world networks, may not be well-defined, or it may be hard to compute numerically. Hence, in practice, one may need to use the heuristic value where is a parameter to be tuned. In this case, with degree normalization is associated with the weights , while without degree normalization is associated with the weights . When is small, roughly increases as ; we term a PR with this choice of weights as the Inverse PR (IPR). Note that IPR with degree normalization may not converge in practice, and LP information may be estimated only for a limited number of steps. Our experiments on real world networks reveal that a good choice for the maximum value of is times the maximal length of the shortest paths from all unlabeled vertices to the set of seeds.
Other insights. Note that IPR resembles HPR when is small and increases, as it dampens the contributions of the first several steps of the RW. This result also agrees with the combinatorial analysis in that advocates the use of HPR for community detection. Note that IPR with degree normalization has monotonically increasing weights, which reflects the fact that community information is preserved even for large-step LPs. To some extent, this result can be viewed as a theoretical justification for the empirical fact that PPR is often used with to achieve good community detection performance .
Experiments
We evaluate the performance of the IPR method over synthetic and large-scale real world networks.
Datasets. The network data used for evaluation may be classified into three categories. The first category contains networks sampled from two-block SBMs that satisfy the assumptions used to derive our theoretical results. The second category includes three real world networks, Citeseer , Cora and PubMed , all frequently used to evaluate community detection algorithms . These networks comprise several non-overlapping communities, and may be roughly modeled as SBMs. The third category includes the Amazon (product) network and the DBLP (collaboration) network from the Stanford Network Analysis Project . These networks contain thousands of overlapping communities, and their topologies differ significantly from SBMs (see Table 1 in the Supplement for more details). For synthetic graphs, we use single-vertex seed-sets; for real world graphs, we select seeds uniformly at random from the community of interest.
Comparison of the methods. We compare the proposed IPRs with PPR and HPR methods, both widely used for SE community detection . Methods that rely on training the weights were not considered as they require outside-community vertex labels. For all three approaches, the default choice is degree-normalization, indicated by the suffix “-d”. For synthetic networks, the parameter in IPR is set to following the recommendations of Section 4.2. For real world networks, we avoid computing exactly and set . The parameters of the PPR and HPR are chosen to satisfy and and to offer the best performance, as suggested in . The results for all PRs are obtained by accumulating the values over the first steps; the choice for is specified for each network individually.
Evaluation metric. We adopt a metric similar to the one used in . There, one is given a graph, a hidden community to detect, and a vertex budget . For a potential ordering of the vertices, obtained via some GPR method, the top- set of vertices represents the predicted community . The evaluation metric used is . By default, if not specified otherwise. Other metrics, such as the Normalized Mutual Information and the F-score may be used instead, but since they require additional parameters to determine the GPR classification threshold, the results may not allow for simple and fair comparisons. For SBMs, we independently generated networks for every set of parameters. For each network, the results are summarized based on independently chosen seed sets for each community-network pair and then averaged over over all communities.
Synthetic graphs. In synthetic networks, all three PRs with degree normalization perform significantly better than their unnormalized degree counterparts. Thus, we only present results for the first class of methods in Figure 2 (Left). As predicted in Section 4.2, IPR-d offers substantially better detection performance than either PPR-d and HPR-d, and is close in quality to belief propagation (BP). Note that the recall of IPR-d keeps increasing with the number of steps. This means that even for large values of , the landing probabilities remain predictive of the community structures, and decreasing the weights with as in HPR and PPR is not appropriate for these synthetic graphs. The classifier , i.e., a PPR with parameters suggested by , has worse performance than the PPR method with parameter and is hence not depicted.
Citeseer, Cora and PubMed. Here as well, PRs with degree normalization perform better than PRs without degree normalization. Hence, we only display the results obtained with degree normalization. The first line of Figure 2 (Right) shows that IPR-d significantly outperforms both PPR-d and HPR-d for all three networks. Moreover, the performance of IPR-d improves with increasing once again establishing that LPs for large are still predictive. The results for IPR-d and a related discussion are postponed to Section A.1 in the Supplement.
The second line of Figure 2 (Right) illustrates the rankings of vertices within the predicted community given the first steps of the RW. Note that only for the Citeseer network does PPR provide a better ranking of vertices in the community for small ; for the other two networks, IPR outperforms PPR and HPR on the whole ranking of vertices.
Amazon, DBLP. We first preprocess these networks by following a standard approach described in Section A.2 of the Supplement. As opposed to the networks in the previous two categories, the information in the vertex degrees is extremely predictive of the community membership for this category. Figure 5.1 shows the predictiveness based on one-step LPs and DNLPs for these two networks. As may be seen, degree normalization may actually hurt the predictive performance of LPs for these two networks. This observation coincides with the finding in . Hence, for this case, we do not perform degree normalization. As recommended in Section 4.2, the weights are chosen as where are parameters to be tuned. The value of typically depends on how informative the degree of a vertex is. Here, we simply set which makes achieve its maximal value for . We also find that for both networks, is a good choice for PPR while for HPR, and are adequate for the Amazon and the DBLP network, respectively.
Further results are listed in Table 5.1, indicating that HPR outperforms other PR methods when ; HPR is used with parameter , and the weights for the first steps in HPR increase. This yet again confirms our findings regarding the predictiveness of large-step LPs. For larger , IPR matches the performance of HPR and even outperforms HPR on the DBLP network. Vertex rankings within the communities are available in Section A.2 of the Supplement.
Discussion and Future Directions
There are many directions that may be pursued in future studies, including: (1) Our non-asymptotic analysis works for relatively dense graphs for which the minimum degree equals . A relevant problem is to investigate the behavior of GPR over sparse graphs. (2) The derived weights ignore the correlations between LPs corresponding to different step-lengths. Characterizing the correlations is a particularly challenging and interesting problem. (3) Recently, research for network analysis has focused on networks with higher-order structures. PPR and HPR-based methods have been generalized to the higher-order setting . Analysis has shown that these higher-order GPR methods may be used to detect communities of networks that approximates higher-order network (motif/hypergraph) conductance . Related works also showed that PR-based approaches are powerful for practical community detection with higher-order structures . Hence, generalizing our analysis to higher-order structure clustering is another topic for future consideration. A follow-up work on the mean-field analysis of higher-order GPR methods may be found in . (4) Our work provides new insights regarding SE community detection. Re-deriving the non-asymptotic results for other GPR-based applications, including recommender system design and link prediction, is another class of problems of interest. For example, GRP/RW-based approaches are frequently used on commodities-user bipartite graphs of recommender systems. There, one may model the network as a random graph with independent edges that correspond to one-time purchases governed by preference scores of the users. Similarities of vertices can also be characterized by GPRs and used to predict emerging links in networks . In this setting, it is reasonable to assume that the graph is edge-independent but with different edge probabilities. Analyzing how the GPR weights influence the similarity scores to infer edge probabilities may improve the performance of current link prediction methods.
Acknowledgement
This work was supported by the NSF STC Center for Science of Information at Purdue University. The authors also gratefully acknowledge useful discussions with Prof. David Gleich from Purdue University.
References
Appendix A Supplementary Information for Experiments
Table 1 describes the properties of the datasets used in our evaluations in more detail.
For all real world networks, we first extract the largest connected component of each network in the preprocessing step. For Citeseer and Cora, we arrive at a networks with and vertices, respectively. Other networks considered are connected and thus used in their original form.
Figure 3 (Left) demonstrates that for these three networks, PRs with degree normalization perform better than their unnormalized counterparts. Figure 3 (Right) compares IPR-d with different parameters and demonstrates that the performance in the first few steps offered by IPR with equal to and is significantly better than that of IPR with parameter , but that it afterwards remains the same or even degrades with increasing . To better understand this phenomenon, we computed the value of these three networks, which equal to , and , respectively. As predicted in Section 4.2, setting is helpful for obtaining a stable IPR, while more steps are required to “saturate” the performance. In practice, computing for massive networks is time consuming, so we suggest to conservatively select a large and only focus on the first several steps of the random walk. Note that according to our experiments, the averaged maximal lengths of all shortest paths between unlabeled vertices and the seed sets are as follows: Citeseer, ; Cora, ; PubMed: . Therefore, the recommended choices for are and , respectively.
A.2 Additional Observations for the Amazon and DBLP Network Evaluations
Note that the evaluation metric we adopt is adequate for communities of similar sizes, which is not the case for the Amazon and DBLP communities. We hence further restrict our choice of community structures to analyze for these two networks. We perform a preprocessing method used in : We select communities closest in size to , where is the size of the largest community. This leads to communities with sizes in $10110k40k4315-20$ steps of the RW is appropriate. Using the obtained sub-networks, we evaluated different GPR approaches.
Figure 4 further illustrates the rankings of vertices within the predicted communities after accumulating the results of the first LPs. Note that for the Amazon network, all three PRs give similar ranking results while for the DBLP network, IPR with parameter outperforms the other two PRs. Again, according to the results for the DBLP network, PPR performs well when ranking vertices with small budgets .
Appendix B Proofs of the Results in Section 3
Moreover, as , using Bernstein’s inequality once again, we conclude that
Therefore, with probability at least , it holds that
where follows from plugging in (5) and (6) into the underlying expression, is a consequence of the fact that and follows from . As , the above probability converges to as .
B.2 Proof of Lemma 3.2 and Lemma 3.5
Before proving Lemma 3.2 and Lemma 3.5 we introduce some useful notation. For a graph with adjacency matrix and degree matrix , the Randić matrix is defined as . Denote its mean-field value by . It is straightforward to see that the eigenvalues of the RW matrix of an undirected graph are the same as those of . Furthermore, let be the normalized degree vector of , i.e., , and let be the normalized diagonal degree matrix, i.e., . The spectral norm of a matrix is denoted by . Throughout the Supplement, we also use to indicate that the upper bound ignores multiplicative constants.
For any edge-independent random graph, if there exist a constant and such that
Based on the Bernstein’s inequality, we have
Note that . By dividing both sides by and using the union bound, we have
Moreover, choosing and observing that for all , , we have This proves the claimed result. ∎
For any edge-independent random graph model, if , then
Let . Then,
We separately establish bounds on the two terms of the sum. First,
where follows from Bernstein’s inequality and from Cauchy’s inequality. Second,
, where is a consequence of Lemma B.1. Combining the two above results establishes the claim. ∎
Let be the vector obtained by taking the square root of the elements in the vector . If , then
where follows from . To bound , let . Then,
We establish bounds for the two terms as:
where is a consequence of Bernstein’s inequality while only includes the dominant term, and
where is again a consequence of Bernstein’s inequality while only includes the dominant term. Hence, we have , as claimed. ∎
The next result can be obtained by invoking Theorem 2 of .
If , then there exists some constant such that
Moreover, recall that and let . Using Weyl’s Theorem , one has
Now, let us turn our attention to proving Lemma 3.2. First, let and . It is easy to check that . Moreover, as , we have
Let be the vector obtained by taking the square root of the elements in the vector and define . Then, . Note that essentially equals the Randić matrix with its first principle component removed. Then,
where is a consequence of the triangle inequality, is based on inequality (8) and Lemma B.1 that guarantees and , and follows from Lemma B.1, Lemma B.3 and Lemma B.4. To prove the first inequality, we observe that
where is a consequence of (7) and follows based on Lemma B.2 and the inequality (9). This proves the first inequality in Lemma 3.2. Since we have the bound for may be derived by using an analysis similar to the one applied to .
Lemma 3.5 may be established in a similar manner. However, due to degree normalization, one can remove the dependence on . Recall once again the definition of the DNLPs and the normalized degree matrix , which allow us to write . The LHS of the result in Lemma 3.5 may be rewritten as
where follows from (7), is a consequence of Lemma B.1 and c) is based on the same arguments used to establish (9).
B.3 Proof of Theorem 3.3
First, we note that . Based on Lemma 3.2, it is easy to see that if , , one has
If , and , then for large enough ,
In this case, we also have
B.4 Proof of Theorem 3.4
The result in 1) is a consequence of Lemma 3.2,
Suppose that for large enough . Then,
As , we have . Hence,
Lemma 3.2 ensures that the result in 2) is met. The result in 3) is again a consequence of Lemma 3.2 because
and for large enough ,
Appendix C Derivation of the Means
For notational simplicity, we let and . Furthermore, we use , to denote the sum of -step LPs within the block . Due to the symmetry, may be obtained from the following recursion, with initial conditions :
Consequently, and . It is straightforward to show that the matrix has eigenvalues and and that equals of the mean-field random walk matrix . Combining , and , we arrive at the result of equation (4).