OriginChainDB
Graph

Find influential neighbors

← Graph examples

The language tabs use earlier client interfaces. Check SDK versions and connection setup before running them.

Eigenvector centrality scores a node higher when it connects to other high-scoring nodes. It runs over the self-referencing relationship’s table.

Before you run it: This scale differs from PageRank. The endpoint does not accept a custom node universe.

First load the five-person social graph. It creates the exact social.users table and follows relation used below.

An iteration is one repeated score update. Tolerance is the amount of change small enough to stop. Read the ranking within this graph; the score is not a probability.

Score a node through its connected neighborsThis is a relative graph score, not a probability or the PageRank node-set query.
  1. Load the self-relationUse the table's records and links.
  2. Repeat neighbor score updatesStop at the tolerance or iteration limit.
  3. Compare the resulting scoresInspect which nodes connect to other strongly scored nodes.

Follow the example

  1. Prepare the relationship.
  2. Set iteration and tolerance limits.
  3. Run the calculation.
  4. Compare scores within the result.

Set up the relationship

The relation must be declared in the schema's [[relations]] block and must target the table it is declared on. See schemas/reference#relations.

Run the request

rel is required. max_iter (default 50) bounds the power iteration and tol (default 1e-6) is the convergence threshold. max_iter=0 is refused with a 400.

curl -G "https://$OC_HOST/v1/tenants/$OC_TENANT/graph/social.users/eigenvector_centrality" \
  --data-urlencode "rel=follows" \
  --data-urlencode "max_iter=50" \
  --data-urlencode "tol=1e-6" \
  -H "Authorization: Bearer $OC_TOKEN"

Check the result

Each result includes its primary key and eigenvector score.

[
  { "pk": ["dave"],    "eigenvector": 0.51 },
  { "pk": ["carol"],   "eigenvector": 0.44 },
  { "pk": ["bob"],     "eigenvector": 0.36 },
  { "pk": ["alice"],   "eigenvector": 0.29 },
  { "pk": ["mallory"], "eigenvector": 0.0 }
]

One row per node, sorted by score descending. pk is the primary-key array and the score field is named eigenvector. The score field name differs on every centrality endpoint - betweenness returns betweenness and pagerank returns score - so a shared parser has to know which endpoint produced the body it is holding.

Understand the behavior

  • Power iteration: start from a uniform vector, multiply repeatedly by the adjacency matrix, renormalise, and stop when the change falls below tol or after max_iter rounds.
  • The iteration runs on the adjacency matrix plus the identity rather than the adjacency matrix alone. That shift is what stops a bipartite graph oscillating between two states and never converging.
  • Scores are relative, not absolute. Only the ordering and the ratios between scores carry meaning.
  • No node universe is required, which is the practical difference from pagerank: pagerank makes you name the subgraph up front, this endpoint scores the table as it stands.

Important limits and checks

  • Expecting pagerank's numbers. Eigenvector centrality has no damping factor and no random-restart term, so it concentrates far more weight on the densest region of the graph. The two rankings will differ and neither is wrong.
  • Reading a zero as a bug. A node with no inbound edges receives no weight. Isolated rows legitimately score zero.
  • Reusing a betweenness parser. The score field is called eigenvector here, and reading row.betweenness gives you nothing.

Continue

Continue to rank a chosen set of linked records.

© 2026 Silicoyn Technologies Pvt Ltd

On this page