1. Home
  2. Explore
  3. Mathematics
  4. Discrete-Time Random Walks

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Discrete-Time Random Walks

Random Walks on Graphs: Dynamics, Spectra, PageRank, Sampling, and Continuous Time

A random walk on a graph describes a process in which a walker occupies one node at a time and repeatedly chooses where to move next. Random walks are useful because they connect graph structure to dynamics: instead of examining only how many links a node has, one can study how probability flows through the entire network.

This lesson develops four connected ideas:

  1. Discrete-time random walks and their Markov-chain representation
  2. Spectral analysis, stationarity, mixing, and graph bottlenecks
  3. PageRank as a random-walk-based centrality measure
  4. Random-walk sampling of hidden populations and its limitations
  5. Continuous-time random walks and their relationship to consensus dynamics

Discrete-Time Random Walks

The basic process

In a discrete-time random walk, all walkers move at synchronized time steps:

t=0,1,2,…t=0,1,2,\ldotst=0,1,2,…

At each step, a walker located at node iii selects one of its neighboring nodes and moves there. If node iii has degree kik_iki​, and all of its edges are equally likely to be chosen, then the probability of moving from iii to a particular neighbor jjj is

Tij=Aijki,T_{ij}=\frac{A_{ij}}{k_i},Tij​=ki​Aij​​,

where:

  • AijA_{ij}Aij​ is the adjacency matrix entry,
  • Aij=1A_{ij}=1Aij​=1 when nodes iii and jjj are connected,
  • Aij=0A_{ij}=0Aij​=0 otherwise,
  • kik_iki​ is the number of neighbors of node iii.

For example, if a node has three neighbors, the walker chooses each neighbor with probability

13.\frac{1}{3}.31​.

The probabilities of all possible moves from a node must add to one. This is the conservation of probability:

∑jTij=1.\sum_j T_{ij}=1.j∑​Tij​=1.

Indeed,

∑jTij=∑jAijki=kiki=1.\sum_j T_{ij} = \sum_j \frac{A_{ij}}{k_i} = \frac{k_i}{k_i} = 1.j∑​Tij​=j∑​ki​Aij​​=ki​ki​​=1.

This condition ensures that every walker goes somewhere after each step and that the total probability remains equal to one.

Probability distributions

Let the probability distribution of the walkers at time ttt be represented by the row vector

p(t)=(p1(t),p2(t),…,pn(t)),p(t)=\bigl(p_1(t),p_2(t),\ldots,p_n(t)\bigr),p(t)=(p1​(t),p2​(t),…,pn​(t)),

where pi(t)p_i(t)pi​(t) is the probability that a walker is located at node iii at time ttt.

The probability of being at node jjj at the next step is obtained by considering every node iii from which the walker could have arrived:

pj(t+1)=∑ipi(t)Tij.p_j(t+1)=\sum_i p_i(t)T_{ij}.pj​(t+1)=i∑​pi​(t)Tij​.

In vector notation,

p(t+1)=p(t)T.p(t+1)=p(t)T.p(t+1)=p(t)T.

Applying this relation repeatedly gives the formal solution

p(t)=p(0)Tt.p(t)=p(0)T^t.p(t)=p(0)Tt.

This equation separates the process into two ingredients:

  • p(0)p(0)p(0) describes where the walkers initially start.
  • TtT^tTt describes how the graph redistributes their probability after ttt steps.

The matrix TTT is called the transition matrix.


Random Walks as Markov Chains

A Markov chain is a stochastic process in which the probability of the next state depends only on the current state, not on the full history of earlier states.

A random walk on a graph is therefore a Markov chain:

  • graph nodes correspond to Markov-chain states,
  • graph links correspond to possible transitions,
  • transition probabilities are stored in TTT.

Even if the underlying graph is undirected, the transition matrix generally is not symmetric. The reason is that the probability of moving from iii to jjj is divided by the degree of the starting node:

Tij=Aijki.T_{ij}=\frac{A_{ij}}{k_i}.Tij​=ki​Aij​​.

For an undirected graph, Aij=AjiA_{ij}=A_{ji}Aij​=Aji​, but generally

Aijki≠Ajikj\frac{A_{ij}}{k_i} \neq \frac{A_{ji}}{k_j}ki​Aij​​=kj​Aji​​

whenever ki≠kjk_i\neq k_jki​=kj​.

Thus, the edge itself may be undirected while the transition probabilities are effectively directed. A walker is more likely to leave a low-degree node through any particular edge than to leave a high-degree node through that same edge.

Important types of states

Markov chains and random walks can contain several kinds of states.

Absorbing states

A node is an absorbing state if, once the walker reaches it, the walker cannot leave. Mathematically,

Tii=1T_{ii}=1Tii​=1

and

Tij=0for i≠j.T_{ij}=0 \qquad \text{for } i\neq j.Tij​=0for i=j.

All probability entering that state remains there permanently. The node acts like a trap.

Ergodic sets

An ergodic set is a group of states satisfying two conditions:

  1. Every state in the set can eventually reach every other state in the set.
  2. Once the walker enters the set, it cannot leave.

The first condition means the states communicate with one another. The second means the set is closed.

An absorbing state is a special case of an ergodic set containing only one node.

Transient states

A transient state is a state that does not belong to an ergodic set. Probability can eventually leak away from such a state into a closed region of the network.

If the process continues for a sufficiently long time, the probability of finding the walker at a transient node approaches zero:

pi(t)⟶0p_i(t)\longrightarrow 0pi​(t)⟶0

for a transient node iii.

The distinction matters because the long-term behavior of a random walk is determined by the closed or ergodic portions of the graph. Transient parts influence the early dynamics but do not retain probability forever.

An absorbing state is a one-node ergodic set, while a transient state eventually loses its probability to a closed part of the network.


Stationary Distributions

A stationary distribution is a probability distribution that does not change when the random walk advances one step. It is denoted by p⋆p^\starp⋆ and satisfies

p⋆=p⋆T.p^\star=p^\star T.p⋆=p⋆T.

Thus, p⋆p^\starp⋆ is a left eigenvector of TTT with eigenvalue 111.

The equation says that the probability flowing into each node exactly balances the probability flowing out of it. The distribution is not necessarily uniform, but it is dynamically stable.

Because TTT is stochastic,

T1=1,T\mathbf{1}=\mathbf{1},T1=1,

where 1\mathbf{1}1 is the vector of all ones. Therefore, 111 is a right eigenvalue of TTT. For a finite stochastic process, a corresponding stationary distribution exists, although it may not be unique unless the process has appropriate connectivity and ergodicity properties.

Stationarity on an undirected graph

For an unweighted, connected, undirected graph, the stationary probability of node iii is

pi⋆=ki2m,p_i^\star=\frac{k_i}{2m},pi⋆​=2mki​​,

where mmm is the number of edges.

The denominator is 2m2m2m because the sum of all node degrees equals twice the number of edges:

∑iki=2m.\sum_i k_i=2m.i∑​ki​=2m.

This result is intuitive. A high-degree node is encountered more often because it can be reached through more edges. The random walk does not visit all nodes equally; it visits nodes in proportion to their degree.

A useful way to verify this is through flow balance. For neighboring nodes iii and jjj,

pi⋆Tij=ki2mAijki=Aij2m,p_i^\star T_{ij} = \frac{k_i}{2m}\frac{A_{ij}}{k_i} = \frac{A_{ij}}{2m},pi⋆​Tij​=2mki​​ki​Aij​​=2mAij​​,

and similarly,

pj⋆Tji=Aij2m.p_j^\star T_{ji} = \frac{A_{ij}}{2m}.pj⋆​Tji​=2mAij​​.

The probability flow in either direction across an edge is balanced.

Think About It

If two nodes are connected but one has many more neighbors than the other, why should a random walker spend more time at the high-degree node? The answer lies in the number of opportunities for the walker to enter that node.


Spectral Analysis of Random Walks

The formula

p(t)=p(0)Ttp(t)=p(0)T^tp(t)=p(0)Tt

is exact, but it does not immediately reveal how different patterns in the probability distribution evolve. Eigenvectors provide a more informative description.

A symmetric matrix associated with the transition matrix

For an undirected graph, define the diagonal degree matrix

D=diag⁡(k1,k2,…,kn).D=\operatorname{diag}(k_1,k_2,\ldots,k_n).D=diag(k1​,k2​,…,kn​).

The transition matrix can be written as

T=D−1A.T=D^{-1}A.T=D−1A.

Although TTT is usually asymmetric, it is related to the symmetric matrix

A~=D−1/2AD−1/2.\widetilde A=D^{-1/2}AD^{-1/2}.A=D−1/2AD−1/2.

The relationship is

T=D−1/2A~D1/2.T=D^{-1/2}\widetilde A D^{1/2}.T=D−1/2AD1/2.

This is a similarity transformation, so TTT and A~\widetilde AA have the same eigenvalues.

Because A~\widetilde AA is symmetric:

  • all of its eigenvalues are real,
  • its eigenvectors can be chosen to be orthogonal,
  • its eigenvectors can be normalized to have length one.

Consequently, the eigenvalues of the transition matrix for an undirected graph are also real.

If the eigenvalues are ordered from largest to smallest, they satisfy

1=λ1≥λ2≥⋯≥λn≥−1.1=\lambda_1\geq \lambda_2\geq\cdots\geq\lambda_n\geq -1.1=λ1​≥λ2​≥⋯≥λn​≥−1.

For a connected graph, λ1=1\lambda_1=1λ1​=1 is unique. Furthermore,

λn=−1\lambda_n=-1λn​=−1

if and only if the graph is bipartite.

A bipartite graph is a graph whose nodes can be divided into two groups so that every edge connects a node in one group to a node in the other group.

Eigenmodes and time evolution

The probability distribution can be decomposed into eigenvector directions. If uℓu_\elluℓ​ represents an eigenmode with eigenvalue λℓ\lambda_\ellλℓ​, then its amplitude evolves according to

aℓ(t)=λℓtaℓ(0).a_\ell(t)=\lambda_\ell^t a_\ell(0).aℓ​(t)=λℓt​aℓ​(0).

This is powerful because the original matrix recurrence becomes a set of independent scalar equations.

Each mode behaves differently:

  • If ∣λℓ∣\lvert\lambda_\ell\rvert∣λℓ​∣ is small, that mode disappears quickly.
  • If ∣λℓ∣\lvert\lambda_\ell\rvert∣λℓ​∣ is close to one, that mode persists for a long time.
  • The mode with λ1=1\lambda_1=1λ1​=1 does not decay and determines the stationary state.

The probability at a particular node is reconstructed by adding the contributions from all modes:

pi(t)=∑ℓ=1naℓ(t) uℓ,i.p_i(t)=\sum_{\ell=1}^n a_\ell(t)\,u_{\ell,i}.pi​(t)=ℓ=1∑n​aℓ​(t)uℓ,i​.

This is analogous to ordinary Fourier analysis, in which a signal is decomposed into waves of different frequencies. Here, the eigenvectors of the graph-based operator act as graph-specific spatial modes.

Graph Fourier transform

The transformation from node values to eigenmode amplitudes is called a Graph Fourier Transform. It changes the representation of a signal:

  • the original representation specifies values at graph nodes,
  • the transformed representation specifies amplitudes associated with graph eigenvectors.

This is useful because the eigenbasis is adapted to the structure of the graph. In the new basis, the dynamics are decoupled: each mode evolves independently by multiplication by λℓt\lambda_\ell^tλℓt​.

The analogy with the ordinary Fourier transform comes from the heat equation. In continuous space, Fourier modes simplify the action of the Laplacian. On a graph, eigenvectors of the transition matrix or graph Laplacian play a similar role.


Convergence and Bipartite Oscillations

Suppose the graph is connected and not bipartite. Then every eigenvalue other than λ1=1\lambda_1=1λ1​=1 has absolute value strictly less than one:

∣λℓ∣<1for ℓ≥2.\lvert\lambda_\ell\rvert<1 \qquad \text{for } \ell\geq 2.∣λℓ​∣<1for ℓ≥2.

Therefore,

λℓt⟶0as t⟶∞.\lambda_\ell^t\longrightarrow 0 \qquad \text{as } t\longrightarrow\infty.λℓt​⟶0as t⟶∞.

All nonstationary modes disappear, leaving only the stationary mode:

p(t)⟶p⋆.p(t)\longrightarrow p^\star.p(t)⟶p⋆.

A bipartite graph creates a special problem. A walker alternates between the two parts of the graph. If all probability starts in one part, it lies in the other part after one step, returns to the first part after two steps, and continues alternating.

This produces persistent oscillations. The process may have a stationary distribution, but the discrete-time distribution need not converge to it at every individual time step.

The eigenvalue λn=−1\lambda_n=-1λn​=−1 represents this alternating mode because

(−1)t(-1)^t(−1)t

changes sign at every step.


Spectral Gap and Mixing

When the graph is connected and non-bipartite, the second-largest eigenvalue, λ2\lambda_2λ2​, controls the slowest important decaying mode. The spectral gap is

1−λ2.1-\lambda_2.1−λ2​.

The convergence toward stationarity is approximately exponential, with the slowest decay governed by λ2t\lambda_2^tλ2t​.

  • A small spectral gap means λ2\lambda_2λ2​ is close to 111, so convergence is slow.
  • A large spectral gap means the nonstationary modes decay rapidly, so convergence is fast.

The time required for a random walk to become close to stationarity is related to its mixing time. A graph with a small spectral gap generally has a long mixing time.

Cheeger conductance

The spectral gap is linked to a structural graph quantity called conductance, or the Cheeger constant.

Take a partition of the nodes into a set SSS and its complement S‾\overline SS. Let the cut between them be the number of edges connecting SSS to S‾\overline SS:

∣∂S∣.|\partial S|.∣∂S∣.

The volume of a set is the sum of the degrees of its nodes:

vol⁡(S)=∑i∈Ski.\operatorname{vol}(S)=\sum_{i\in S}k_i.vol(S)=i∈S∑​ki​.

The conductance of the partition is

Φ(S)=∣∂S∣min⁡(vol⁡(S),vol⁡(S‾)).\Phi(S) = \frac{|\partial S|} {\min\left(\operatorname{vol}(S),\operatorname{vol}(\overline S)\right)}.Φ(S)=min(vol(S),vol(S))∣∂S∣​.

The graph’s conductance is the minimum of this ratio over suitable nontrivial partitions:

h=min⁡S∣∂S∣min⁡(vol⁡(S),vol⁡(S‾)).h = \min_S \frac{|\partial S|} {\min\left(\operatorname{vol}(S),\operatorname{vol}(\overline S)\right)}.h=Smin​min(vol(S),vol(S))∣∂S∣​.

The normalization by volume is important. Minimizing only the number of crossing edges could produce a trivial solution in which one very small group is separated from the rest. Conductance seeks a partition that has:

  • relatively few connections between the two groups,
  • while neither group is negligibly small in volume.

Cheeger inequalities establish bounds relating conductance and spectral gap. The central implication is

small conductance⟹small spectral gap.\text{small conductance} \quad\Longrightarrow\quad \text{small spectral gap}.small conductance⟹small spectral gap.

A graph with two densely connected regions joined by only a few edges contains a bottleneck. A random walker can move quickly within one region but may take a long time to cross to the other. Global stationarity is therefore reached slowly.

A graph bottleneck slows diffusion, and the same bottleneck appears spectrally as a small spectral gap.

Think About It

A random walker may appear well mixed inside one community while still having a very inaccurate global distribution. This happens when the walker has not yet crossed the sparse boundary separating that community from the rest of the graph.


PageRank: Centrality from Random Walks

A stationary random-walk distribution can be used as a centrality measure. PageRank applies this idea especially effectively to directed networks.

Random walks on directed graphs

In a directed graph, incoming and outgoing neighbors must be distinguished.

  • An in-neighbor has a directed edge pointing into a node.
  • An out-neighbor is reached by following an outgoing edge.

A walker at node iii chooses among its out-neighbors. If kioutk_i^{\text{out}}kiout​ is the out-degree of node iii, then

Tij=Aijkiout,T_{ij} = \frac{A_{ij}}{k_i^{\text{out}}},Tij​=kiout​Aij​​,

where AijA_{ij}Aij​ indicates whether the directed edge from iii to jjj exists.

The transition matrix is generally asymmetric, even more directly than in the undirected case.

PageRank as stationary density

Without modification, PageRank is defined as the stationary distribution of the directed random walk:

pj⋆=∑ipi⋆Aijkiout.p_j^\star = \sum_i p_i^\star \frac{A_{ij}}{k_i^{\text{out}}}.pj⋆​=i∑​pi⋆​kiout​Aij​​.

In vector form,

p⋆=p⋆T.p^\star=p^\star T.p⋆=p⋆T.

The PageRank of node jjj is its stationary probability pj⋆p_j^\starpj⋆​.

The interpretation is recursive:

  • A node receives importance from nodes pointing to it.
  • A link from an important node contributes more than a link from an unimportant node.
  • The contribution from a source node is divided among all of its outgoing links.

Thus, one important incoming link may be more valuable than many incoming links from unimportant nodes.

For example, being followed by a highly influential account that follows only one other account can contribute more PageRank than being followed by the same influential account when it follows millions of accounts. The source node’s importance is diluted across its out-neighbors.


Why Basic PageRank Can Fail

A directed graph need not be strongly connected. It may contain:

  • several strongly connected components,
  • absorbing states,
  • transient nodes,
  • regions from which probability cannot escape.

In such a graph, the limiting distribution can depend on the initial location of the walker. Probability may eventually become concentrated in one absorbing region, while transient nodes receive PageRank equal to zero.

This creates two problems:

  1. PageRank may not be unique.
  2. The resulting centrality may reflect the starting condition rather than the overall network structure.

To solve this, PageRank introduces random teleportation.


Teleportation and the Preference Vector

At each step, the modified walker behaves as follows:

  • With probability α\alphaα, it follows a directed edge.
  • With probability 1−α1-\alpha1−α, it teleports to a node independently of the outgoing links.

The destination of a teleportation is selected using a preference vector

u=(u1,u2,…,un),u=(u_1,u_2,\ldots,u_n),u=(u1​,u2​,…,un​),

where

ui>0,∑iui=1.u_i>0, \qquad \sum_i u_i=1.ui​>0,i∑​ui​=1.

The PageRank evolution is

p(t+1)=αp(t)T+(1−α)u.p(t+1) = \alpha p(t)T + (1-\alpha)u.p(t+1)=αp(t)T+(1−α)u.

At stationarity,

p⋆=αp⋆T+(1−α)u.p^\star = \alpha p^\star T + (1-\alpha)u.p⋆=αp⋆T+(1−α)u.

Rearranging gives

p⋆(I−αT)=(1−α)u,p^\star(I-\alpha T) = (1-\alpha)u,p⋆(I−αT)=(1−α)u,

so

p⋆=(1−α)u(I−αT)−1.p^\star = (1-\alpha)u(I-\alpha T)^{-1}.p⋆=(1−α)u(I−αT)−1.

When every uiu_iui​ is positive and

0≤α<1,0\leq \alpha<1,0≤α<1,

the process is ergodic regardless of the original directed graph. There is a unique stationary PageRank vector.

The teleportation mechanism prevents the walker from becoming permanently trapped and ensures that every node can remain reachable in the modified process.

Choosing α\alphaα

The parameter α\alphaα balances network-following behavior against teleportation.

  • If α\alphaα is too small, the walker teleports too often, so the topology of the graph contributes little.
  • If α\alphaα is too close to one, the process can converge slowly and may become numerically less stable.

A commonly used historical value is

α=0.85.\alpha=0.85.α=0.85.

This value was motivated by the idea that a web user follows several links and then begins a new browsing session at an unrelated page.

The most common unpersonalized preference vector is uniform:

ui=1n.u_i=\frac{1}{n}.ui​=n1​.

Personalized PageRank uses a nonuniform preference vector. A search system can assign larger teleportation probabilities to nodes related to a particular user’s interests, producing results tailored to that user.


PageRank and Walk Lengths

The inverse expression can be expanded as a geometric series:

(I−αT)−1=∑ℓ=0∞αℓTℓ.(I-\alpha T)^{-1} = \sum_{\ell=0}^{\infty}\alpha^\ell T^\ell.(I−αT)−1=ℓ=0∑∞​αℓTℓ.

Therefore,

p⋆=(1−α)u∑ℓ=0∞αℓTℓ.p^\star = (1-\alpha) u \sum_{\ell=0}^{\infty}\alpha^\ell T^\ell.p⋆=(1−α)uℓ=0∑∞​αℓTℓ.

This shows that PageRank combines contributions from walks of many different lengths.

The factor

αℓ\alpha^\ellαℓ

discounts longer walks. As α\alphaα increases, longer paths receive more weight. As α\alphaα decreases, PageRank relies more heavily on short paths and direct network structure.

This resembles Katz centrality, which also sums contributions from paths of different lengths. The distinction is that PageRank uses a stochastic transition matrix, whose rows conserve probability.


Special Cases

Regular directed graphs

If every node has the same in-degree and out-degree, the network is degree-regular. With a uniform preference vector, the nodes are structurally equivalent from the perspective of degree-based flow, and PageRank becomes uniform:

pi⋆=1n.p_i^\star=\frac{1}{n}.pi⋆​=n1​.

Undirected graphs

For an undirected connected graph without teleportation, the stationary random-walk distribution is

pi⋆=ki2m.p_i^\star=\frac{k_i}{2m}.pi⋆​=2mki​​.

Therefore, PageRank on an undirected graph reduces essentially to degree centrality. It does not reveal much beyond what is already known from node degrees.

PageRank is most informative for directed networks because direction creates distinctions that ordinary degree alone does not capture.

Dangling nodes

A dangling node is a node with incoming links but no outgoing links. At such a node, the ordinary transition rule cannot be applied because there is no outgoing edge to follow.

The standard remedy is to force teleportation whenever the walker reaches a dangling node. In effect, the walker uses the preference vector rather than attempting to follow a nonexistent outgoing link.

PageRank is a stationary flow-based centrality: a node is important when important probability repeatedly arrives there through the directed structure.

Think About It

Why does a link from an important node matter more than a link from an unimportant node? PageRank answers this recursively: importance is transferred through the network, but each source node must divide its available importance among its outgoing links.


Random Walks for Sampling Hidden Populations

Random walks can also be used to estimate properties of populations that cannot be fully enumerated or sampled directly.

Suppose each person or object in a population corresponds to a graph node. Each node has an attribute YiY_iYi​, such as:

  • whether an individual has a disease,
  • age,
  • income,
  • demographic category,
  • another continuous or categorical characteristic.

The goal is to estimate a population quantity such as the mean of YYY or the fraction of the population belonging to a particular category.

Respondent-driven sampling

Respondent-driven sampling, abbreviated RDS, uses social relationships to explore a population.

A typical process works as follows:

  1. Begin with one or more initial individuals called seeds.
  2. Give each sampled individual a limited number of coupons.
  3. The individual recruits connected acquaintances.
  4. Recruited individuals report their attributes and recruit additional individuals.
  5. The process continues recursively.

If the sampling design involves only one available contact at each step and permits sampling with replacement, the sequence of sampled individuals behaves like a discrete-time random walk.

Sampling with replacement means that a person may be contacted more than once.

Why naive averaging is biased

A naive estimator of the population mean is

Y^naive=1∣S∣∑i∈SYi,\widehat Y_{\text{naive}} = \frac{1}{|S|} \sum_{i\in S}Y_i,Ynaive​=∣S∣1​i∈S∑​Yi​,

where SSS is the observed sample.

This estimator would be reasonable if every node had the same probability of being sampled. Random-walk sampling does not have that property.

At stationarity, an unweighted random walk visits node iii with probability proportional to its degree:

pi⋆∝ki.p_i^\star\propto k_i.pi⋆​∝ki​.

High-degree nodes are sampled more frequently because a walker has more opportunities to enter them. Therefore, the observed sample overrepresents highly connected individuals.

If the attribute YYY is correlated with degree, the bias can be substantial. For example, if highly connected individuals are more likely to be infected, a naive sample may overestimate disease prevalence.


The RDS2 Estimator

To compensate for degree-biased sampling, the RDS2 estimator weights each observed value inversely by the node’s degree:

Y^RDS2=∑i∈SYiki∑i∈S1ki.\widehat Y_{\text{RDS2}} = \frac{ \displaystyle\sum_{i\in S}\frac{Y_i}{k_i} }{ \displaystyle\sum_{i\in S}\frac{1}{k_i} }.YRDS2​=i∈S∑​ki​1​i∈S∑​ki​Yi​​​.

The logic is inverse-probability weighting:

  • high-degree nodes are visited too often,
  • so each observation from a high-degree node receives less weight,
  • low-degree nodes receive relatively more weight.

The estimator can be used for continuous variables and binary variables.

Estimating a category proportion

Suppose the population has categories such as AAA, BBB, CCC, and DDD. The estimated proportion belonging to category AAA is

P^(A)=∑i∈S∩A1ki∑i∈S1ki.\widehat P(A) = \frac{ \displaystyle\sum_{i\in S\cap A}\frac{1}{k_i} }{ \displaystyle\sum_{i\in S}\frac{1}{k_i} }.P(A)=i∈S∑​ki​1​i∈S∩A∑​ki​1​​.

The numerator includes only sampled individuals in category AAA, while the denominator includes all sampled individuals.

This type of estimation is useful in demographic and epidemiological studies when no complete population registry exists.


Limitations of Random-Walk Sampling

The correction formula depends on assumptions that may not hold perfectly.

Difficulty measuring degree

Participants must usually report their degree, meaning the number of relevant social contacts they have. This is difficult because the answer depends on how “contact” is defined.

A person might interpret degree as:

  • close friends,
  • people seen regularly,
  • online contacts,
  • people who could receive a coupon,
  • members of a particular social group.

Self-reported degree can therefore be inaccurate, introducing additional bias and variance.

Failure to reach stationarity

The estimator is motivated by stationary random-walk behavior, but real studies have finite duration. The walk may not have enough time to mix through the entire network.

Suppose the graph contains two communities connected by only a few edges. If the sample starts in one community and stops before the walker crosses the bottleneck, the observed sample will mostly represent that one community.

This is especially problematic if YYY differs between communities. The sample may then produce a biased estimate even after degree correction.

The issue is connected to:

  • mixing time,
  • spectral gap,
  • community bottlenecks,
  • the starting position of the sampling process.

Backtracking

Standard random walks allow immediate reversal. If the walker travels from node iii to node jjj, it can immediately return from jjj to iii.

In respondent-driven sampling, immediate recruitment reversal may not be realistic. A person who recruited another person might not be allowed to recruit that same person back, or the process may otherwise discourage repeated use of the same relationship.

A more realistic model may be a non-backtracking random walk.

In a non-backtracking walk, the walker remembers the node from which it just arrived and cannot immediately return there. If the walk moved from iii to jjj, then the next step may use an edge from jjj to a neighbor other than iii.

For example, if node jjj has three neighbors and one of them is the node just visited, the walker chooses between the remaining two, each with probability

12.\frac{1}{2}.21​.

Non-backtracking dynamics can therefore provide a refined model for recruitment-based sampling.

Random-walk sampling corrects for degree bias only if the sampling process, degree measurements, replacement rules, and mixing assumptions are sufficiently accurate.

Think About It

If a highly connected person is sampled three times as often as a poorly connected person, why should the highly connected person’s observations count less in the final estimate? Inverse-degree weighting compensates for unequal inclusion probabilities.


Continuous-Time Random Walks

Discrete-time random walks force all walkers to move simultaneously at synchronized times. A continuous-time random walk removes this synchronization.

Each walker waits for a random amount of time, then moves. Different walkers have independent waiting times, so their movements occur at different moments.

A continuous-time model therefore requires two ingredients:

  1. A rule describing where the walker goes when it moves.
  2. A rule describing when the walker moves.

The destination rule can be the same neighbor-selection rule used in discrete time. The new element is the timing process.


Node-Centric Continuous-Time Random Walks

In a node-centric process, the waiting time is associated with the node occupied by the walker.

When a walker arrives at a node, it waits for a random time τ\tauτ. The waiting times are generated by an independent Poisson process. If the event rate is λ\lambdaλ, then the inter-event time is exponentially distributed. For simplicity, the rate can be set to

λ=1.\lambda=1.λ=1.

After the waiting period, the walker chooses one of the current node’s neighbors uniformly.

If the node has degree kik_iki​, the rate of moving along any particular outgoing edge is effectively divided among those kik_iki​ choices. A node with fewer neighbors gives a larger share of its departure rate to each edge; a node with more neighbors gives a smaller share to each edge.

The master equation is

ddtp(t)=p(t)(T−I),\frac{d}{dt}p(t)=p(t)(T-I),dtd​p(t)=p(t)(T−I),

where III is the identity matrix.

The term −I-I−I represents walkers leaving their current nodes. The term TTT represents their redistribution to neighboring nodes.

The continuous-time random-walk Laplacian is often defined as

Lrw=I−T.L_{\text{rw}}=I-T.Lrw​=I−T.

Therefore,

ddtp(t)=−p(t)Lrw.\frac{d}{dt}p(t)=-p(t)L_{\text{rw}}.dtd​p(t)=−p(t)Lrw​.

The random-walk Laplacian and the transition matrix have the same eigenvectors. Their eigenvalues are shifted:

μℓ=1−λℓ.\mu_\ell=1-\lambda_\ell.μℓ​=1−λℓ​.

Since the eigenvalues of TTT lie between −1-1−1 and 111, the eigenvalues of LrwL_{\text{rw}}Lrw​ lie between 000 and 222.

For a connected undirected graph, the stationary distribution remains

pi⋆=ki2m.p_i^\star=\frac{k_i}{2m}.pi⋆​=2mki​​.

The node-centric process therefore spends more time at high-degree nodes.


Edge-Centric Continuous-Time Random Walks

In an edge-centric process, the timing is associated with edges rather than nodes.

Each edge independently generates movement events at a specified rate, taken here to be one. A walker at a node with many incident edges has many independent opportunities to move, while a walker at a low-degree node has fewer.

Consequently:

  • the departure rate from node iii is proportional to kik_iki​,
  • high-degree nodes are left more quickly,
  • low-degree nodes are left more slowly.

The master equation becomes

ddtp(t)=p(t)(A−D),\frac{d}{dt}p(t)=p(t)(A-D),dtd​p(t)=p(t)(A−D),

where DDD is the diagonal degree matrix. Equivalently, using the combinatorial Laplacian

L=D−A,L=D-A,L=D−A,

the equation is

ddtp(t)=−p(t)L.\frac{d}{dt}p(t)=-p(t)L.dtd​p(t)=−p(t)L.

For an undirected graph, LLL is symmetric. Its stationary left eigenvector with eigenvalue zero is the uniform distribution:

pi⋆=1n.p_i^\star=\frac{1}{n}.pi⋆​=n1​.

Thus, the edge-centric process has a different stationary distribution from the node-centric process:

[ \begin{array}{c|c} \text{Process} & \text{Stationary probability} \ \hline \text{Node-centric} & \displaystyle \frac{k_i}{2m} \ \text{Edge-centric} & \displaystyle \frac{1}{n} \end{array} ]

The two processes agree on regular graphs because all degrees are equal. If every node has degree kkk, then

ki2m=knk=1n.\frac{k_i}{2m} = \frac{k}{nk} = \frac{1}{n}.2mki​​=nkk​=n1​.

On irregular graphs, however, the two timing assumptions produce genuinely different dynamics.


Random Walks and Consensus Dynamics

Random walks and consensus dynamics are dual descriptions of graph-based processes.

A random walk evolves a probability distribution over nodes. Consensus dynamics evolves values assigned to nodes, with neighboring values influencing one another.

For example, a consensus process can be written in the form

ddtx(t)=−L⋆x(t),\frac{d}{dt}x(t)=-L^\star x(t),dtd​x(t)=−L⋆x(t),

where L⋆L^\starL⋆ is the appropriate graph Laplacian.

The corresponding random-walk equation is obtained by applying the same operator to a probability vector, with the multiplication orientation determining whether the process is represented as a forward flow of probabilities or as a dual evolution of node states.

For the combinatorial Laplacian,

L=D−A,L=D-A,L=D−A,

the consensus equation tends toward equal values across connected nodes. Its stationary state is proportional to the all-ones vector:

x⋆∝1.x^\star\propto \mathbf{1}.x⋆∝1.

The dual edge-centric random walk has a uniform stationary probability distribution. This is why the two processes are closely connected even though their interpretations differ:

  • consensus asks how node values become equal,
  • random walks ask how probability spreads through the graph.

The node-centric random walk instead uses the random-walk Laplacian

Lrw=I−D−1A,L_{\text{rw}}=I-D^{-1}A,Lrw​=I−D−1A,

whose stationary distribution is degree-weighted.

Think About It

The same graph can support different dynamics depending on whether time is attached to nodes or edges. A graph does not determine a process by itself; the timing and transition rules are part of the model.


Comprehensive Review

A discrete-time random walk moves synchronously across a graph, with transition probabilities stored in a stochastic matrix TTT. Each row of TTT sums to one because probability must be conserved. The process is a Markov chain because the next position depends only on the current position.

States can be absorbing, ergodic, or transient. A stationary distribution satisfies

p⋆=p⋆T.p^\star=p^\star T.p⋆=p⋆T.

For an unweighted connected undirected graph, the stationary distribution is degree-weighted:

pi⋆=ki2m.p_i^\star=\frac{k_i}{2m}.pi⋆​=2mki​​.

Although the transition matrix is generally asymmetric, it is similar to a symmetric normalized adjacency matrix. This allows the process to be analyzed through real eigenvalues and orthogonal eigenvectors. Each eigenmode evolves independently according to

aℓ(t)=λℓtaℓ(0).a_\ell(t)=\lambda_\ell^t a_\ell(0).aℓ​(t)=λℓt​aℓ​(0).

The eigenvalue 111 represents stationarity. A bipartite graph has eigenvalue −1-1−1, producing alternating behavior. In a connected non-bipartite graph, the spectral gap

1−λ21-\lambda_21−λ2​

controls the rate of convergence. A small spectral gap corresponds to slow mixing and often reflects a graph bottleneck, which is also detected by low conductance.

PageRank applies stationary random-walk ideas to directed networks. A node receives importance from incoming links, but the contribution of each source is divided among that source’s outgoing links. Teleportation prevents trapping and guarantees a unique stationary distribution:

p⋆=αp⋆T+(1−α)u.p^\star = \alpha p^\star T+(1-\alpha)u.p⋆=αp⋆T+(1−α)u.

The parameter α\alphaα controls the balance between following network links and jumping according to a preference vector. Uniform preferences produce ordinary PageRank, while nonuniform preferences produce personalized PageRank. Dangling nodes are handled by forcing teleportation.

Random walks can also sample hidden populations, but stationary sampling overrepresents high-degree individuals. Inverse-degree weighting produces the RDS2 estimator:

Y^RDS2=∑i∈SYiki∑i∈S1ki.\widehat Y_{\text{RDS2}} = \frac{ \displaystyle\sum_{i\in S}\frac{Y_i}{k_i} }{ \displaystyle\sum_{i\in S}\frac{1}{k_i} }.YRDS2​=i∈S∑​ki​1​i∈S∑​ki​Yi​​​.

This correction is limited by inaccurate degree reports, incomplete mixing, community bottlenecks, finite sample duration, and immediate backtracking. Non-backtracking random walks can model recruitment processes more realistically.

Finally, continuous-time random walks allow walkers to move at independent random times. In node-centric dynamics, waiting is attached to nodes and the stationary distribution is degree-weighted. In edge-centric dynamics, movement opportunities are attached to edges and the stationary distribution is uniform on an undirected graph. These processes connect naturally to random-walk Laplacians, combinatorial Laplacians, and the duality between diffusion and consensus.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent