Beruflich Dokumente
Kultur Dokumente
Pawan Goyal
CSE, IITKGP
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 1 / 43
Social Networks: underlying data
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 2 / 43
Social Networks: underlying data
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 2 / 43
Social Networks: underlying data
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 2 / 43
Social Networks: underlying data
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 2 / 43
Social Networks: underlying data
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 2 / 43
Social Networks: underlying data
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 2 / 43
Social Networks: underlying data
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 2 / 43
Social Networks: what we are looking for
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 3 / 43
Social Networks: what we are looking for
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 3 / 43
Social Networks: what we are looking for
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 3 / 43
Social Networks: what we are looking for
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 3 / 43
Social Networks: what we are looking for
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 3 / 43
Why Random Walks?
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 4 / 43
Why Random Walks?
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 4 / 43
Why Random Walks?
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 4 / 43
What is Random Walk?
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 5 / 43
What is Random Walk?
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 5 / 43
What is Random Walk?
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 5 / 43
Adjacency and Transition Matrix
n × n Adjacency matrix A
A(i, j): weight on edge from i to j
If the graph is undirected A(i, j) = A(j, i), i.e. A is symmetric
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 6 / 43
Adjacency and Transition Matrix
n × n Adjacency matrix A
A(i, j): weight on edge from i to j
If the graph is undirected A(i, j) = A(j, i), i.e. A is symmetric
n × n Transition matrix P
P is row stochastic
P(i, j) = probability of stepping on node j from node i
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 6 / 43
Adjacency and Transition Matrix
n × n Adjacency matrix A
A(i, j): weight on edge from i to j
If the graph is undirected A(i, j) = A(j, i), i.e. A is symmetric
n × n Transition matrix P
P is row stochastic
A(i,j)
P(i, j) = probability of stepping on node j from node i = Σj A(i,j)
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 6 / 43
Adjacency and Transition Matrix: Example
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 7 / 43
What is a random walk?
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 8 / 43
Probability Distributions
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 9 / 43
Probability Distributions
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 9 / 43
Probability Distributions
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 9 / 43
Probability Distributions
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 9 / 43
Probability Distributions
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 9 / 43
Probability Distributions
Stationary Distribution
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 9 / 43
Probability Distributions
Stationary Distribution
When the surfer keeps walking for a long time
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 9 / 43
Probability Distributions
Stationary Distribution
When the surfer keeps walking for a long time
When the distribution does not change anymore, i.e. xT+1 = xT
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 9 / 43
Probability Distributions
Stationary Distribution
When the surfer keeps walking for a long time
When the distribution does not change anymore, i.e. xT+1 = xT
For well-behaved graphs, this does not depend on the start distribution
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 9 / 43
What is a stationary distribution?
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 10 / 43
What is a stationary distribution?
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 10 / 43
What is a stationary distribution?
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 10 / 43
Interesting questions
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 11 / 43
Interesting questions
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 11 / 43
Well behaved graphs
Irreducible
There is a path from every node to every other node.
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 12 / 43
Well behaved graphs
Irreducible
There is a path from every node to every other node.
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 12 / 43
Well behaved graphs
Aperiodic
The GCD of all cycle lengths is 1. The GCD is also called period.
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 13 / 43
Well behaved graphs
Aperiodic
The GCD of all cycle lengths is 1. The GCD is also called period.
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 13 / 43
Perron Frobenius Theorem: Implications
Theorem Statement
Let A = (aij ) be an n × n positive matrix: aij > 0∀1 ≤ i, j ≤ n. Then
There is a positive real number r, such that r is an eigenvalue of A and
any other eigenvalue is strictly smaller than r in absolute value.
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 14 / 43
Perron Frobenius Theorem: Implications
Theorem Statement
Let A = (aij ) be an n × n positive matrix: aij > 0∀1 ≤ i, j ≤ n. Then
There is a positive real number r, such that r is an eigenvalue of A and
any other eigenvalue is strictly smaller than r in absolute value.
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 14 / 43
Perron Frobenius Theorem: Implications
Theorem Statement
Let A = (aij ) be an n × n positive matrix: aij > 0∀1 ≤ i, j ≤ n. Then
There is a positive real number r, such that r is an eigenvalue of A and
any other eigenvalue is strictly smaller than r in absolute value.
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 14 / 43
Perron Frobenius Theorem: Implications
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 15 / 43
Perron Frobenius Theorem: Implications
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 15 / 43
Perron Frobenius Theorem: Implications
n
xP = ∑ ai (ui P)
i=1
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 15 / 43
Perron Frobenius Theorem: Implications
n
xP = ∑ ai (ui P)
i=1
n
= ∑ ai (σi ui )
i=1
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 15 / 43
Perron Frobenius Theorem: Implications
n
xP = ∑ ai (ui P)
i=1
n
= ∑ ai (σi ui )
i=1
n
Similarly, xPk = ∑ ai (σi k ui )
i=1
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 15 / 43
Perron Frobenius Theorem: Implications
n
xP = ∑ ai (ui P)
i=1
n
= ∑ ai (σi ui )
i=1
n
Similarly, xPk = ∑ ai (σi k ui )
i=1
xPPP . . . P = xPk tends to v0 as k goes to infinity.
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 15 / 43
Perron Frobenius Theorem: Implications
k k
xPk = σ1 k {a1 u1 + a2 σ2
σ1 u2 + . . . + an σn
σ1 un }
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 16 / 43
Perron Frobenius Theorem: Implications
k k
xPk = σ1 k {a1 u1 + a2 σ2
σ1 u2 + . . . + an σn
σ1 un }
u1 = v0 , thus xPk
approaches to v0 as k goes to infinity with a speed in the
order of σ2 /σ1 exponentially.
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 16 / 43
Perron Frobenius Theorem: Implications
k k
xPk = σ1 k {a1 u1 + a2 σ2
σ1 u2 + . . . + an σn
σ1 un }
u1 = v0 , thus xPk
approaches to v0 as k goes to infinity with a speed in the
order of σ2 /σ1 exponentially.
Show that a1 = 1
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 16 / 43
Perron Frobenius Theorem: Implications
k k
xPk = σ1 k {a1 u1 + a2 σ2
σ1 u2 + . . . + an σn
σ1 un }
u1 = v0 , thus xPk
approaches to v0 as k goes to infinity with a speed in the
order of σ2 /σ1 exponentially.
Show that a1 = 1
1n×1 is the right eigenvector of P with eigenvalue 1, since P is stochastic,
i.e. P∗ 1n×1 = 1n×1
Hence, ui ∗ 1n×1 = 1 for i = 1, 0 otherwise (relation between left and right
eigen vectors)
Now, 1 = x∗ 1n×1 = a1 u1 ∗ 1n×1 = a1 (Why?)
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 16 / 43
Important Parameters of a random walk
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 17 / 43
Important Parameters of a random walk
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 17 / 43
Important Parameters of a random walk
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 17 / 43
Important Parameters of a random walk
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 17 / 43
Important Parameters of a random walk
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 17 / 43
Important Parameters of a random walk
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 17 / 43
Mixing Rate
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 18 / 43
Mixing Rate
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 18 / 43
PageRank (Page and Brin, 1998)
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 19 / 43
PageRank (Page and Brin, 1998)
Basic Intuition
A webpage is important if other important pages point to it
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 19 / 43
PageRank (Page and Brin, 1998)
Basic Intuition
A webpage is important if other important pages point to it
v(j)
v(i) = ∑ out
j→i deg (j)
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 19 / 43
PageRank (Page and Brin, 1998)
Basic Intuition
A webpage is important if other important pages point to it
v(j)
v(i) = ∑ out
j→i deg (j)
v is the stationary distribution of the Markov chain
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 19 / 43
Irreducibility and Aperiodicity
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 20 / 43
Irreducibility and Aperiodicity
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 20 / 43
Irreducibility and Aperiodicity
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 20 / 43
Irreducibility and Aperiodicity
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 20 / 43
Irreducibility and Aperiodicity
1
Uij = ∀i, j
n
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 20 / 43
Computing PageRank: The Power Method
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 21 / 43
PageRank: Example
v = (1 − c)vP + cr
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 27 / 43
Personalized PageRank
v = (1 − c)vP + cr
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 27 / 43
Personalized PageRank
v = (1 − c)vP + cr
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 27 / 43
Personalized PageRank
v = (1 − c)vP + cr
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 27 / 43
Personalized PageRank
v = (1 − c)vP + cr
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 28 / 43
Personalized PageRank
v = (1 − c)vP + cr
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 28 / 43
Personalized PageRank
v = (1 − c)vP + cr
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 28 / 43
Topic Sensitive PageRank
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 29 / 43
Topic Sensitive PageRank
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 29 / 43
Topic Sensitive PageRank
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 29 / 43
Topic Sensitive PageRank
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 29 / 43
HITS - Hyperlink-Induced Topic Search
There are two different types of web-pages for searching a broad topic:
the authorities and the hubs
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 30 / 43
HITS - Hyperlink-Induced Topic Search
There are two different types of web-pages for searching a broad topic:
the authorities and the hubs
Authorities: pages which are good sources of information about a given
topic
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 30 / 43
HITS - Hyperlink-Induced Topic Search
There are two different types of web-pages for searching a broad topic:
the authorities and the hubs
Authorities: pages which are good sources of information about a given
topic
Hub: provides pointers to many authorities
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 30 / 43
HITS - Hyperlink-Induced Topic Search
There are two different types of web-pages for searching a broad topic:
the authorities and the hubs
Authorities: pages which are good sources of information about a given
topic
Hub: provides pointers to many authorities
Works on a subgraph - can consist of top k search results for the given
query from a standard text-based engine
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 30 / 43
Hubs and Authorities
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 31 / 43
Hubs and Authorities
h(i) ← ∑ a(j)
j:j∈O(i)
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 31 / 43
Hubs and Authorities
a = AT h, h = Aa
h = AAT h, a = AT Aa
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 32 / 43
Hubs and Authorities
a = AT h, h = Aa
h = AAT h, a = AT Aa
h converges to the principal eigenvector of AT A and a converges to the
principal eigenvector of AT A
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 32 / 43
Hubs and Authorities
a = AT h, h = Aa
h = AAT h, a = AT Aa
h converges to the principal eigenvector of AT A and a converges to the
principal eigenvector of AT A
AAT (i, j) = ∑k A(i, k)A(j, k): number of nodes both i and j point to,
bibliographic coupling
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 32 / 43
Hubs and Authorities
a = AT h, h = Aa
h = AAT h, a = AT Aa
h converges to the principal eigenvector of AT A and a converges to the
principal eigenvector of AT A
AAT (i, j) = ∑k A(i, k)A(j, k): number of nodes both i and j point to,
bibliographic coupling
AT A(i, j) = ∑k A(k, i)A(k, j): number of nodes which point to both i and j,
co-citation matrix
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 32 / 43
HITS: Example
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 40 / 43
Tightly Knit Communities Effect
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 40 / 43
SALSA: The Stochastic Approach for Link-Structure
Analysis
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 41 / 43
SALSA: The Stochastic Approach for Link-Structure
Analysis
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 41 / 43
SALSA: The Stochastic Approach for Link-Structure
Analysis
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 41 / 43
SALSA
Two distinct random walks
Each walk only visits nodes from one of the two sides of the graph
Traverses paths consisting of two G-edges in each step
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 42 / 43
SALSA
Two distinct random walks
Each walk only visits nodes from one of the two sides of the graph
Traverses paths consisting of two G-edges in each step
Hub matrix H̃ :
1 1
h̃ij = ∑ ·
{k|(ih ,ka ),(jh ,ka )∈G}
deg(ih ) deg(ka )
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 42 / 43
SALSA
Two distinct random walks
Each walk only visits nodes from one of the two sides of the graph
Traverses paths consisting of two G-edges in each step
Hub matrix H̃ :
1 1
h̃ij = ∑ ·
{k|(ih ,ka ),(jh ,ka )∈G}
deg(ih ) deg(ka )
1 1
ãij = ∑ ·
{k|(kh ,ia ),(kh ,ja )∈G}
deg(ia ) deg(kh )
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 42 / 43
SALSA
Two distinct random walks
Each walk only visits nodes from one of the two sides of the graph
Traverses paths consisting of two G-edges in each step
Hub matrix H̃ :
1 1
h̃ij = ∑ ·
{k|(ih ,ka ),(jh ,ka )∈G}
deg(ih ) deg(ka )
1 1
ãij = ∑ ·
{k|(kh ,ia ),(kh ,ja )∈G}
deg(ia ) deg(kh )
ãi,j > 0 implies that a certain page k links to both pages i and j, thus j is
reachable from i by two steps: retracting along k → i and following k → j
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 42 / 43
SALSA Vectors
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 43 / 43
SALSA Vectors
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 43 / 43
SALSA Vectors
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 43 / 43
SALSA Vectors
Pawan Goyal (IIT Kharagpur) Random Walks for Social Networks September 2-4, 2014 43 / 43