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 →
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.
- shortest pathmeasures · A shortest path is a path between two nodes or locations that minimizes total distance, length, or cost under a specified measure.
- NetworkXused by · NetworkX is an open-source Python library for creating, manipulating, analyzing, and visualizing graphs and networks.
- signalproduces · A signal is an observable value, event, or pattern that conveys information about a condition, state, or phenomenon.
- nodemeasures · A node is a discrete element in a structured system, such as a graph, tree, network, or distributed system, representing an entity, state, component, or computational unit and potentially connected to other elements.
- normalizationconfigured by · Normalization is the process of transforming a value, representation, or data structure to satisfy a specified standard, scale, or structural constraint.
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.


