Lecture 11 finding network clusters commuinty detection

Intro

Screenshot 2019-10-28 at 8.37.07 PM.png

Applications

Assume the graph fits in main memory (~< 200 Million nodes and 2B edges if 16GB memory), and too big for algorithms slower than linear.

Approximate Personalized PageRank for cluster discovery

Discovering clusters based on seed nodes: Algorithm:

Approx PPR Algo: $ApproxPageRank(S,\beta, \epsilon)$: Idea: Recall the residual PPR score: $q_u = p_u - r_u$, where $r$ is approx PageRank vector, $q$ is residual PageRank vector, and $p_u$ is the true PPR score. Start with trivial approx: $r=0, q=a$. Iteratively push PageRank from $q$ to $r$ until $q$ is small.

Runtime and Graph Cut Approximation Guarentees (4)

The $\epsilon$ will control how far out we push the PageRank comptuation before it decays. We don’t trust the latter part of the curve because there the error is too big (5, 6)

Screenshot 2019-10-28 at 8.57.55 PM.png

Modularity Maximization to find Clusters using the whole network

(Louvain Method)

Def: Communities: sets of tightly connected nodes Def: Modularity $Q$: The number of edges within each group - expected number of edges within each group, for some partition of $G$ into groups. Defined below.

So, the modularity is defined formally as: where $S$ are the groups the graph is partitioned into, $i,j$ are nodes, $k_i, k_j$ are the degrees of $i, j$, and $1/2m$ is a normalizing constant. (8)

Modularity is normalized to take values in range $[-1,1]$. Modularity is positive if the number of edges within groups exeeds the expected number. If modularity is around 0.3-0.7, significant community structure exists.

Our goal is to identify comunities by maximizing modularity over cuts $s$.

Louvain method:

Greedy community detection algotithm in O(n \log n) time. Supports weighted graphs. Provides hierarchical partitions. Widely used to study large networks, most popular community detection algorithm, because:

Louvain algorithm greedily maximizes modularity as follows:

Algo (Louvain Algorithm for Community Detection):

Each pass has two phases.

Since the loop runs until there is no more modularity gain, you will reach a local maximum. In reality, the value of the local maximum depends on the order in which you looped through the nodes $i$, but people have found that the order doesn’t matter so much and that the local maximum is good enough.

Screenshot 2019-10-29 at 10.04.56 PM.png

How to pick between the above two methods?

If you care more about the local neighborhood of a node and find the cluster around it, use the first method. It is faster, you only need to look into the neighborhood of that node. If you want to break the entire network into communities use the second method.

Notes:

(0) Since the degree of a full network with m edges is is 2m (1) Since the degree of a full network with m edges is is 2m (0), conductance is also written

(2) Proof that $p_{\beta}(a) = (1-\beta) a + \beta p_{\beta} (M \cdot a)$. The prob of a walk of length 0 is ($1-\beta$), where the walker ends where it started, with walker distribution $a$.

(3) - Algo: Push Operation: $Push(u,r,q)$

(4) Runtime: Pagerank-Nibble computes PPR in time $O(\frac{1}{\epsilon (1-\beta)})$. Better than Power method which would take time $O(\frac{log(n)}{\epsilon (1-\beta)})$. ApproxPageRank comes with a graph cut approximation guarentee: If there exists a cut of conductance $\phi$ and volume $k$ then the method finds a cut conductance at least $O(\sqrt{\phi / \log(k) }$ (very close to the optimal).

(5)

Screenshot 2019-10-28 at 8.54.21 PM.png

(6)

Screenshot 2019-10-28 at 8.56.52 PM.png

(7) This causes the expected number of edges in multigraph $G’$ to be =:

(8) Equivalently, modularity can be written as

(9) What is $\Delta Q$ if we move node $i$ to community $C$? Define where

When you compute the node, you only have to compute $k_{i,in}$. You already have $\Sigma_{in}, \Sigma_{tot}, k_i$. So the only thing you have to do is to get the number of edges between $i$ and $C$, and use the other values.

You also need to similarly derive $\Delta Q(D \rightarrow i)$ of taking node i out of community D. Then sum the two: $\Delta Q = \Delta Q(i \rightarrow C) + \Delta Q (D \rightarrow i)$. This is cheap to compute.

(10)

Screenshot 2019-10-28 at 8.37.49 PM.png