Evaluating Knowledge Graph Complexity via Semantic, Spectral, and Structural Metrics for Link Prediction

Haji Gul, Abul Ghani Naim, Ajaz Ahmad BhatarXiv 2025 · OpenReview

TL;DR

This paper critically re-evaluates the Cumulative Spectral Gradient (CSG) metric for knowledge graph (KG) complexity in link prediction tasks, finding it unreliable and poorly correlated with actual model performance. Instead, the authors demonstrate that semantic (e.g., relation entropy) and structural (e.g., average degree) metrics offer more robust and interpretable indicators of KG difficulty.

What Problem Does This Paper Address?

Knowledge graphs (KGs) are crucial for many AI applications, and link prediction is a key task for inferring missing information within them. However, the performance of link prediction models varies wildly across different KGs, and it's unclear whether this is due to model limitations or inherent dataset difficulty. To address this, researchers have proposed complexity metrics, with the Cumulative Spectral Gradient (CSG) being a prominent candidate. CSG, derived from spectral clustering, was claimed to be a classifier-agnostic metric that scales with class cardinality and predicts downstream performance. This paper investigates whether these claims hold true for the specific domain of multi-relational KG link prediction, where each head-relation pair can lead to a multi-class prediction task over thousands of potential tails.

Methods

The authors conducted a comprehensive evaluation of KG complexity metrics. They first examined the Cumulative Spectral Gradient (CSG) metric, analyzing its sensitivity to its key parameter (K) and its scalability with the number of relation classes. They then assessed its correlation with standard link prediction performance metrics like Mean Reciprocal Rank (MRR) and Hits@k.

Beyond CSG, they introduced and benchmarked a suite of semantic and structural KG complexity metrics. Semantic metrics included:

  • Relation Entropy: Measures the unpredictability of relation distribution.
  • Relation Type Cardinality: The number of unique relation types.
  • Node-level Maximum Relation Diversity: Quantifies local ambiguity for each entity.

Structural metrics focused on network topology:

  • Average Degree: The average number of connections per node.
  • Degree Entropy: Measures the distribution of node degrees.
  • PageRank and Eigenvector Centrality: Measures of node importance within the graph.

The predictive power of these metrics was evaluated by correlating them with link prediction performance.

Datasets

The study utilized five standard KG benchmarks:

  • FB15k-237: An updated version of FB15k with inverse triplets removed.
  • WN18RR: A subset of WN18 with reverse triplets removed.
  • CoDEx-S, CoDEx-M, CoDEx-L: A suite of multi-domain KGs sourced from Wikidata, varying in size and complexity.

The authors also used three classes of KGE models (translational, bilinear, and transformer-based) for evaluation.

Key Insights and Ideas

  • CSG is Fragile: The paper's most striking finding is that CSG is highly sensitive to its parameter K and does not reliably scale with the number of classes. This directly challenges prior claims about its robustness.
  • CSG Doesn't Predict Performance: Contrary to expectations, CSG showed a near-zero correlation with MRR and Hits@1 across various datasets and models, rendering it a poor predictor of link prediction difficulty.
  • Semantic Ambiguity = Harder Tasks: Higher semantic complexity (more diverse relations, higher entropy, more relation types) consistently correlated with lower MRR and Hits@1, indicating these factors make link prediction harder.
  • Structural Density = Easier Top-K Recall: Denser graphs (higher average degree, degree entropy) positively correlated with MRR and Hits@1, suggesting that well-connected structures aid prediction.
  • Global Centrality Aids Recall (Hit@10): Metrics like PageRank and Eigenvector Centrality, which capture global influence, aligned better with looser recall metrics like Hits@10, suggesting they help identify relevant candidates within a broader set.
  • A Precision-Recall Trade-off: The findings suggest a trade-off: high semantic diversity hurts top-rank precision, while structural density boosts it, and global centrality helps with broader recall.

Key Results

  • CSG values varied dramatically with the parameter K, showing no consistent trend across datasets.
  • The Pearson correlation between CSG and MRR was consistently low (around -0.644) across all datasets and models tested.
  • Semantic metrics like Relation Entropy, Node-level Maximum Relation Diversity, and Relation Type Cardinality showed strong inverse correlations with MRR and Hits@1. For example, higher relation entropy led to lower MRR.
  • Structural metrics like Average Degree and Degree Entropy showed positive correlations with MRR and Hits@1.
  • Centrality measures (Degree, Eigenvector, PageRank) correlated positively with Hits@10.

Limitations and Future Work

The paper acknowledges that its analysis is focused on link prediction. Future work could explore how these complexity metrics generalize to other KG tasks like entity prediction or question answering. The authors also suggest that their complexity framework can be used to anticipate generalization gaps and compare models on a complexity-aware basis, guiding future research in developing more stable, interpretable, and task-aligned complexity measures for knowledge-driven learning.

Summary updated

Abstract

Understanding dataset complexity is fundamental to evaluating and comparing link prediction models on knowledge graphs (KGs). While the Cumulative Spectral Gradient (CSG) metric, derived from probabilistic divergence between classes within a spectral clustering framework, has been proposed as a classifier agnostic complexity metric purportedly scaling with class cardinality and correlating with downstream performance, it has not been evaluated in KG settings so far. In this work, we critically examine CSG in the context of multi relational link prediction, incorporating semantic representations via transformer derived embeddings. Contrary to prior claims, we find that CSG is highly sensitive to parametrisation and does not robustly scale with the number of classes. Moreover, it exhibits weak or inconsistent correlation with standard performance metrics such as Mean Reciprocal Rank (MRR) and Hit@1. To deepen the analysis, we introduce and benchmark a set of structural and semantic KG complexity metrics. Our findings reveal that global and local relational ambiguity captured via Relation Entropy, node level Maximum Relation Diversity, and Relation Type Cardinality exhibit strong inverse correlations with MRR and Hit@1, suggesting these as more faithful indicators of task difficulty. Conversely, graph connectivity measures such as Average Degree, Degree Entropy, PageRank, and Eigenvector Centrality correlate positively with Hit@10. Our results demonstrate that CSGs purported stability and generalization predictive power fail to hold in link prediction settings and underscore the need for more stable, interpretable, and task-aligned measures of dataset complexity in knowledge driven learning.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
FB15k-237Cumulative Spectral Gradient (CSG)CSG8366
Source quote
L226: CSG │ 8366 │ 10306 │ 3150 │ 636 │ 4776
CoDEx-LCumulative Spectral Gradient (CSG)CSG10306
Source quote
L226: CSG │ 8366 │ 10306 │ 3150 │ 636 │ 4776
CoDEx-MCumulative Spectral Gradient (CSG)CSG3150
Source quote
L226: CSG │ 8366 │ 10306 │ 3150 │ 636 │ 4776
CoDEx-SCumulative Spectral Gradient (CSG)CSG636
Source quote
L226: CSG │ 8366 │ 10306 │ 3150 │ 636 │ 4776
WN18RRCumulative Spectral Gradient (CSG)CSG4776
Source quote
L226: CSG │ 8366 │ 10306 │ 3150 │ 636 │ 4776
BibTeX
@misc{gul2025evaluating,
  author = {Haji Gul and Abul Ghani Naim and Ajaz Ahmad Bhat},
  title = {{Evaluating Knowledge Graph Complexity via Semantic, Spectral, and Structural Metrics for Link Prediction}},
  year = {2025},
  eprint = {2508.15291},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.15291},
}

Loading related content...

Figure