Katz Centrality
UDTF: cugraph_katz_centrality
Official cuGraph reference: C API
Score vertices from the number of walks that reach them, attenuating longer walks and adding a baseline contribution.
Quickstart
The call below supplies edges from registered relation target_edges with canonical src and dst columns and may include weight.
SELECT *
FROM cugraph_katz_centrality(
edges => (SELECT src, dst FROM target_edges)
);
Inputs
Every relation is a named parenthesized SELECT subquery. The required edges role uses canonical src and dst columns. Every role, its canonical columns, and their accepted Arrow types are listed under Relation arguments. Metadata validation resolves registered tables named in its JSON request.
The vertex-ID types this UDTF accepts, the numeric types a per-call codebook maps to native ids, and its string-key limits are listed in Vertex ID support; the concrete call-specific schema comes from gpu_validate_call.
Arguments and options
Relation arguments
Every edge_id column must have the integer type of src and dst; string-keyed graphs accept no edge IDs.
Named value arguments
Graph construction options
Graph construction follows the shared defaults (directed=true, renumbering, python_cugraph policy) documented in Graph Construction Options.
Output
These are generic descriptor schemas. Run gpu_validate_call to get the concrete, table-specific output schema.
Examples
This example runs on the citation network demo dataset.
Which papers rise in rank when indirect citations count too?
Direct citation counts and citation walks can produce different rankings.
This query compares in-degree rank with Katz rank at alpha 0.05, where walks
beyond a paper's direct citations contribute to its score.
WITH katz AS (
SELECT vertex, ROW_NUMBER() OVER (ORDER BY value DESC) AS katz_rank
FROM cugraph_katz_centrality(
edges => (SELECT src, dst FROM citation_edges), alpha => 0.05)),
deg AS (
SELECT vertex, in_degree, ROW_NUMBER() OVER (ORDER BY in_degree DESC) AS degree_rank
FROM cugraph_in_degrees_all(edges => (SELECT src, dst FROM citation_edges)))
SELECT p.title, p.year, k.katz_rank, d.degree_rank, d.in_degree
FROM katz k
JOIN deg d ON d.vertex = k.vertex
JOIN papers p ON p.paper_id = k.vertex
WHERE k.katz_rank <= 8
ORDER BY k.katz_rank;
New Directions in Cryptography moves from in-degree rank #69 to Katz rank #5; the RSA paper moves from #50 to #8.