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.

Signature

cugraph_eigenvector_centrality(table_name [, src_col, dst_col [, weight_col [, options_json]]])

Quickstart

The call below expects a registered edge table or view target_edges with endpoint columns src and dst. Substitute your own registered relations.

SELECT * FROM cugraph_eigenvector_centrality('target_edges');

Inputs

table_name must be a registered edge table or view (the edges role); parenthesized subqueries are not accepted, and metadata validation resolves the same registered name.

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

Positional scalar arguments

src_col and dst_col name the edge endpoint columns; both are optional and default to src and dst.

ArgumentTypeRequiredDefaultNotes
weight_colUtf8|nullnoaccepted as an edge-column binding; native algorithm execution does not consume weights; semantic effect: none for this algorithm

JSON options

OptionTypeDefaultConstraintsDescription
epsilonFloat640.000001> 0Power-iteration convergence tolerance: iteration stops once the L1 norm of the score change between consecutive iterations drops below epsilon. Smaller values tighten convergence and may need more iterations.
max_iterationsUInt32200min 1Upper bound on power iterations. The call fails with a non-convergence error if the bound is reached before epsilon is met.

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; validate the 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 — the 1970s theory and databases canon:

SELECT p.title, p.year, ROUND(e.value, 3) AS eigenvector
FROM cugraph_eigenvector_centrality('citation_edges', 'src', 'dst') 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('citation_edges', 'src', 'dst')),
pr AS (
SELECT value, ROW_NUMBER() OVER (ORDER BY value DESC) AS rn
FROM cugraph_pagerank('citation_edges', 'src', 'dst'))
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.

Validate the call

Dry-run validation checks registered relation metadata, column presence, static dtypes, and options only; it does not scan edge data, construct a graph, or prove source-vertex existence:

SELECT * FROM gpu_validate_call(
'cugraph_eigenvector_centrality',
'{"schema_version":1,"relations":{"edges":{"table":"target_edges"}},"options":{"src_col":"src","dst_col":"dst"}}'
);

See GPU Function Catalog API for the full gpu_validate_call contract.