Betweenness centrality
Betweenness centrality is a graph metric that measures how frequently a node lies on shortest paths between other nodes.
Graph Neural Networks in Action
A graph metric that quantifies how often a node lies on shortest paths between other nodes.
- How it is used
- Uses shortest-path importance as engineered node features for downstream graph machine-learning models.
- How deep it goes
- Explains shortest-path counting and influence interpretation, but stops short of formulas, algorithms, and implementation code.
- Examples
- Uses edge lists, node-ID dictionaries, and shortest paths between unique node pairs as concrete artifacts and examples.
- What you can do after
- Apply it via graph-processing workflows and store computed values as node features for PyTorch Geometric data.
Read how Graph Neural Networks in Action explains betweenness centrality →
Graph Algorithms for Data Science
A betweenness centrality algorithm computes how frequently each node lies on shortest paths between other nodes.
- How it is used
- Identifies influential bridges and analyzes information flow or community structure in follower, social, and road networks.
- How deep it goes
- Defines shortest-path ranking, illustrates bridge consequences, and demonstrates Neo4j projection and mutation without discussing algorithm internals.
- Examples
- Uses Twitter follower communities, Ganesh, Ljubica, Jack, and Marvel characters including Captain America and Beast.
- What you can do after
- Apply it via Neo4j Graph Data Science after projecting an in-memory graph and storing scores with mutate mode.
Read how Graph Algorithms for Data Science explains betweenness centrality →
Knowledge Graphs and LLMs in Action
Betweenness centrality is a graph metric based on how often a node lies on shortest paths between other nodes.
- How it is used
- Identifies bridge nodes that connect communities or potentially control information flow in intellectual and fraud networks.
- How deep it goes
- Defines shortest-path counting, gives the path-ratio formula, and implements normalized NetworkX scores without deriving the algorithm internally.
- Examples
- Uses researcher influence graphs, cyclotron-related networks, and a fraud graph containing high-, low-, and zero-scoring nodes.
- What you can do after
- Diagnose/debug with it: compute bridge scores, summarize their distribution, and flag nodes above the network average.
Read how Knowledge Graphs and LLMs in Action explains betweenness centrality →
What to know first
- shortest pathA shortest path is a path between two nodes or locations that minimizes total distance, length, or cost under a specified measure.
- signalA signal is an observable value, pattern, event, or attribute that conveys information about a condition, behavior, or phenomenon.
Related concepts
- closeness centralitycontrasts with · Closeness centrality is a graph metric based on the inverse of a node’s shortest-path distances to other reachable nodes.
- NetworkXused by · NetworkX is an open-source Python library for creating, manipulating, analyzing, and visualizing graphs and networks.
- shortest pathmeasures · A shortest path is a path between two nodes or locations that minimizes total distance, length, or cost under a specified measure.
- centralitykind of · Centrality is a family of graph measures that quantify a node’s structural importance or influence according to specified criteria.
- signalproduces · A signal is an observable value, pattern, event, or attribute that conveys information about a condition, behavior, or phenomenon.
- nodemeasures · A node is a discrete element of a graph, tree, linked structure, network, or computing system that can represent an entity, state, or component and may connect to other elements.
Questions about betweenness centrality
What is betweenness centrality?
Betweenness centrality is a graph metric that measures how frequently a node lies on shortest paths between other nodes.
Which Manning books explain betweenness centrality?
Graph Neural Networks in Action, Graph Algorithms for Data Science and Knowledge Graphs and LLMs in Action.
What should I know before learning betweenness centrality?
Manning books that teach betweenness centrality usually introduce shortest path and signal first.
What is the difference between betweenness centrality and closeness centrality?
Betweenness centrality is a graph metric that measures how frequently a node lies on shortest paths between other nodes. Closeness centrality is a graph metric based on the inverse of a node’s shortest-path distances to other reachable nodes.
What is betweenness centrality a kind of?
Betweenness centrality is a kind of centrality. Centrality is a family of graph measures that quantify a node’s structural importance or influence according to specified criteria.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


