Directed PageRank

Machine Learning
Introduced by
Brin, S. & Page, L.
Year
1998
Type
Iterative authority-scoring algorithm
Family
Network science

What does it do?

Directed PageRank is a link-based authority scoring algorithm that assigns importance scores to nodes in a directed graph by iteratively redistributing rank through outgoing edges.

Brin and Page introduced it in 1998 as the ranking component of Google Search. It measures not only how many in-links a node has but also how authoritative the nodes pointing to it are.

The intuition behind the method

Imagine prestige flowing through a network: a node becomes important when important nodes link to it. PageRank formalises this by treating each directed edge as a vote, weighted by the sender's own score divided among all its outgoing links. A damping factor models the probability that a random surfer follows a link rather than jumping to a random node. Running this recursion to convergence produces a stable ranking that reflects the global structure of the graph, not just local degree counts.

History

Brin and Page developed PageRank and published it in 1998 as the ranking algorithm underlying the Google search engine. Its central idea was to treat web authority as the stationary distribution of a random walk on a directed link graph, with a teleportation term added to the recursion. Langville and Meyer (2006) provide a book-length treatment of the algorithm's mathematics and its use in search. Directed formulations have since been applied in citation analysis and other network settings, as listed under applications.

When to use it

Choose Directed PageRank when you need to rank nodes in a directed network by global, recursive authority and the direction of influence is meaningful, as in citation graphs, web hyperlink graphs, or follow and endorsement networks with asymmetric ties. Do not use it when the network is undirected or when edge direction has no interpretable meaning; eigenvector centrality is the more natural choice there. Avoid it for very sparse directed graphs with few in-links, where the teleportation term pulls scores toward a common baseline and the differences between nodes carry little information. It is also a poor fit when only local properties, such as direct in-degree counts, are of interest.

Limitations and considerations

  • Sensitive to the choice of damping factor d; the canonical 0.85 may not suit all network types.
  • Ignores edge weights by default; weighted variants require additional normalisation steps.
  • Convergence should be checked against the L1 change in the rank vector rather than assumed after a fixed number of iterations, because the number needed depends on the damping factor and the chosen tolerance.
  • Does not distinguish between different types or meanings of directed edges without domain-specific pre-processing.
  • Because the teleportation term adds a common baseline, nodes with few in-links receive scores close to one another, so the ordering among weakly connected nodes is driven largely by the baseline rather than by link structure.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Scores reflect the quality of a node's in-links as well as their number, because each incoming contribution is weighted by the sender's own current score.
  • The teleportation term gives every node a positive baseline: in the normalized form each score is at least (1-d)/n, so no node's score falls to zero. The term does not by itself handle dangling nodes, which must still be replaced with a uniform vector so that rank is conserved.
  • Sparse power iteration keeps the cost of each step tied to the number of edges, which makes large graphs tractable.
  • Under the random-surfer reading, the converged vector is a stationary distribution, which gives the scores a probabilistic interpretation.

Applications

  • Ranking academic papers and authors in directed citation graphs.
  • Identifying influential accounts in asymmetric follow or endorsement networks.
  • Detecting authoritative pages within a crawled hyperlink graph.
  • Prioritising nodes in directed biological networks such as gene regulatory or metabolic pathways.

How it works

How it works

1

Represent the network as a directed graph G = (V, E) where each edge (j, i) means node j links to node i. Compile the adjacency list and compute each node's out-degree. The direction of edges is essential: only outgoing links from j contribute to the rank of i.

2

Build the column-stochastic transition matrix M. Entry M_{ij} equals 1 divided by the out-degree of node j when j links to i, and zero otherwise. Each column therefore sums to 1, representing the probability of following one of j's outgoing links uniformly at random.

Formula
M_{ij} = 1/k^{out}_j \text{ if } j \to i \text{ else } 0
3

Handle dangling nodes — nodes with no outgoing edges — to preserve the stochastic property of M. A common fix replaces each dangling column with a uniform vector (1/n in every entry), so that the rank held by a dangling node is redistributed across the graph rather than leaking out of the system and lowering the sum of scores below 1.

4

Apply power iteration: multiply the current rank vector r by the damping factor d (typically 0.85) times M, then add (1-d)/n to every entry as a teleportation term. This reflects the random-surfer model: with probability d the surfer follows a link, and with probability 1-d jumps to any node at random. This page uses the normalized form, in which the teleportation term is (1-d)/n and the scores sum to 1. Some texts write the teleportation term as 1-d, which gives each node at least 1-d and scales every score by n.

Formula
\mathbf{r}^{(t+1)} = d\,M\,\mathbf{r}^{(t)} + \tfrac{1-d}{n}\mathbf{1}
5

Repeat the power-iteration step until the L1 norm of the change in the rank vector falls below a small tolerance epsilon (e.g. 1e-6). The converged vector r gives the final PageRank score for every node, which can be sorted to produce a ranking.

Formula
\|\mathbf{r}^{(t+1)} - \mathbf{r}^{(t)}\|_1 < \varepsilon

Common pitfalls

  • Using undirected edges in a directed-PageRank computation, which changes the underlying stationary distribution and can produce misleading rankings.
  • Forgetting to handle dangling nodes, causing rank to leak and the sum of scores to drift below 1.
  • Treating PageRank scores as absolute importance measures rather than relative rankings within the given graph.
  • Comparing PageRank scores across graphs of different sizes without normalisation.
  • Selecting the damping factor arbitrarily without sensitivity analysis or domain justification.

Frequently asked questions

What is the damping factor and how should I choose it?

The damping factor d (default 0.85) is the probability that a random surfer follows an outgoing link rather than teleporting. Higher values give more weight to link structure; lower values spread scores more uniformly. Sensitivity analysis across a range of d values is recommended for non-web networks.

How is Directed PageRank different from eigenvector centrality?

Eigenvector centrality is the principal eigenvector of the adjacency matrix and works naturally on undirected graphs. Directed PageRank adds a teleportation term, handles dangling nodes, and explicitly incorporates link direction, making it better suited to asymmetric directed networks.

Does Directed PageRank handle weighted edges?

The standard formulation uses unweighted edges. Weighted PageRank exists as an extension where M_{ij} is proportional to the weight of edge (j,i) divided by the total outgoing weight of j, preserving the column-stochastic property.

How many iterations does convergence typically require?

The number of iterations depends on the damping factor and your tolerance, so do not assume a fixed count. Monitor the L1 change in the rank vector against your tolerance (for example 1e-6) and stop once it falls below it.

Can I use PageRank on an undirected network?

You can replace each undirected edge with two directed edges and apply the algorithm, but the scores are not in general identical to eigenvector centrality, because damping and teleportation change the stationary distribution. For undirected networks, eigenvector centrality is the more standard choice and avoids this extra layer of tuning.

Related methods

Sources

  1. Brin, S. & Page, L. (1998). The anatomy of a large-scale hypertextual Web search engine. Proceedings of the 7th International Conference on World Wide Web (WWW7), 107–117. Elsevier.

    Open publication reference
  2. Langville, A. N. & Meyer, C. D. (2006). Google's PageRank and Beyond: The Science of Search Engine Rankings. Princeton University Press.

    ISBN: 978-0-691-12202-1
  3. 2009_Book_TheElementsOfStatisticalLearni, p. 577