Skip to main content

Eigenvector Centrality

SQL function: cugraph_eigenvector_centrality

Official cuGraph reference: C API

Score vertices by connections to other high-scoring vertices, using power iteration to find the dominant eigenvector.

Quickstart

The call below supplies edges from registered relation target_edges with canonical src and dst columns and may include weight. Substitute your own registered relations.

SELECT * FROM cugraph_eigenvector_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.

Endpoint columns accept numeric Int32, Int64 vertex IDs or logical string Utf8, LargeUtf8, Utf8View vertex IDs; string vertex-identity outputs are canonicalized to Utf8 (native mapping Int64) while scores, distances, counts, coordinates, and opaque labels stay numeric. The shared vertex-ID contract is summarized in Vertex ID support; the concrete call-specific schema comes from gpu_validate_call.

Logical string side-input limitations:

  • edge ID columns and edge-ID predicate side inputs are not supported for logical string graphs

Arguments and options

Relation arguments

ArgumentRequiredColumnsDescription
edgesyes
  • src, dst: Int32, Int64, Utf8, LargeUtf8, Utf8View
  • weight (optional): Float32, Float64
  • edge_id (optional): Int32, Int64
edge relation with canonical src and dst columns, plus optional weight and edge_id columns

Every edge_id column must have the integer type of src and dst; string-keyed graphs accept no edge IDs.

Named value arguments

OptionTypeDefaultConstraintsDescription
epsilonnumber0.000001> 0positive convergence tolerance
max_iterationsinteger200min 1; max 4294967295maximum iteration count, at least 1

Graph construction options

Graph construction follows the shared defaults (directed=true, renumbering, python_cugraph policy) documented in Graph Construction Options.

Output

ColumnTypeNullableDescription
vertexInt64|Utf8noVertex receiving the eigenvector centrality score.
valueFloat64noEigenvector centrality score for the vertex.

These are generic descriptor schemas; run gpu_validate_call to get the concrete, table-specific output schema.

Examples

These examples run on the citation network demo dataset.

The recursive core of the literature

Eigenvector centrality has no damping and no teleport: a paper scores highly only if the papers citing it score highly themselves. On 45.6M citation edges the fixed point concentrates all mass in the most self-reinforcing corner of the graph, matching the 1970s theory and databases canon:

SELECT p.title, p.year, ROUND(e.value, 3) AS eigenvector
FROM cugraph_eigenvector_centrality(edges => (SELECT src, dst FROM citation_edges)) e
JOIN papers p ON p.paper_id = e.vertex
ORDER BY e.value DESC
LIMIT 6;
titleyeareigenvector
A relational model of data for large shared data banks19700.351
The Design and Analysis of Computer Algorithms19740.244
The complexity of theorem-proving procedures19710.171
Further Normalization of the Data Base Relational Model19720.153
New Directions in Cryptography19760.146
Reducibility Among Combinatorial Problems20100.129

The relational data model, the classic algorithms textbook, the founding NP-completeness results, and the paper that introduced public-key cryptography (the 2010 year on the last row is a reprint edition in the corpus). Compare with the PageRank example, whose damping spreads importance much further out.

Quantify the winner-take-all behavior

Both functions return plain relations, so one statement can measure how much more concentrated eigenvector mass is than PageRank mass (here, the top 100 of 4.1M scored papers hold 10.7% of all eigenvector centrality but only 2.8% of all PageRank:

WITH eig AS (
SELECT value, ROW_NUMBER() OVER (ORDER BY value DESC) AS rn
FROM cugraph_eigenvector_centrality(edges => (SELECT src, dst FROM citation_edges))),
pr AS (
SELECT value, ROW_NUMBER() OVER (ORDER BY value DESC) AS rn
FROM cugraph_pagerank(edges => (SELECT src, dst FROM citation_edges)))
SELECT
ROUND(100.0 * (SELECT SUM(value) FROM eig WHERE rn <= 100)
/ (SELECT SUM(value) FROM eig), 1) AS eigenvector_top100_pct,
ROUND(100.0 * (SELECT SUM(value) FROM pr WHERE rn <= 100)
/ (SELECT SUM(value) FROM pr), 1) AS pagerank_top100_pct;
eigenvector_top100_pctpagerank_top100_pct
10.72.8

If a ranking should reward being cited by the canon, this concentration is the point; if it should surface important work across eras and fields, prefer PageRank or Katz.

Limits

No algorithm-specific limitations.

To dry-run validate relation metadata, column types, and options without execution, see gpu_validate_call.