Introduction
PageRank is an algorithm that measures the importance of each node within the graph based on the number of incoming relationships and the importance of the corresponding source nodes. The algorithm was originally developed by Google’s founders Larry Page and Sergey Brin during their time at Stanford University.Algorithm Overview
PageRank works by counting the number and quality of relationships to a node to determine a rough estimate of how important that node is. The underlying assumption is that more important nodes are likely to receive more connections from other nodes. The algorithm assigns each node a score, where higher scores indicate greater importance. The score for a node is derived recursively from the scores of the nodes that link to it, with a damping factor typically applied to prevent rank sinks. For example, in a network of academic papers, a paper cited by many other highly cited papers will receive a high PageRank score, reflecting its influence in the field.Syntax
The PageRank procedure has the following call signature:Parameters
Yield
Examples
Unweighted PageRank
First, let’s create a sample graph representing a citation network between scientific papers:
Usage Notes
Interpreting scores:- PageRank scores are relative, not absolute measures
- The sum of all scores in a graph equals 1.0
- Scores typically follow a power-law distribution
Frequently Asked Questions
What is the syntax for running PageRank in FalkorDB?
What is the syntax for running PageRank in FalkorDB?
Use
CALL algo.pageRank(label, relationship_type) YIELD node, score. Both parameters are optional — pass null to include all nodes or all relationship types.How do I interpret PageRank scores?
How do I interpret PageRank scores?
Scores are relative values that sum to 1.0 across all nodes. Higher scores indicate greater importance based on incoming link structure. Scores follow a power-law distribution.
Can I run PageRank on a subset of nodes?
Can I run PageRank on a subset of nodes?
Yes. Pass a node label as the first argument, e.g.
CALL algo.pageRank('Paper', 'CITES') to only compute scores for nodes with that label.When should I use PageRank vs Betweenness Centrality?
When should I use PageRank vs Betweenness Centrality?
Use PageRank to measure overall influence based on incoming connections. Use Betweenness Centrality to find bridge nodes that connect different parts of the graph.
Does PageRank consider edge direction?
Does PageRank consider edge direction?
Yes. PageRank is designed for directed graphs and scores are based on incoming relationships. Nodes with many high-scoring inbound connections receive higher scores.