Introduction
Knowledge Graph (KG) embedding models, such as TransE, RotatE, and DistMult, are essential for tasks like link prediction and recommendation systems. However, their performance is notoriously sensitive to hyper-parameter (HP) configurations. Finding the optimal set of HPs is a significant computational challenge, especially as modern KGs scale to millions of entities and edges.
KGTuner is an efficient two-stage framework designed to address this "expensive search" problem. By pruning the search space and leveraging subgraphs for initial evaluation, KGTuner achieves a 9.1% average performance boost over state-of-the-art models on large-scale benchmarks within the same time budget.
The Challenge of Large-Scale KG Search
Standard HP search methods, such as Random Search or Sequential Model-Based Optimization (SMBO), typically evaluate configurations by training models on the full graph. For massive datasets like ogbl-wikikg2, a single evaluation can take hours or even days. While some existing methods attempt to train performance predictors on subgraphs, these predictors often fail to transfer accurately to the full graph's complex landscape.
The KGTuner Framework
KGTuner operates in two distinct stages, moving from efficient exploration on subgraphs to targeted fine-tuning on the full graph. This approach is based on the insight that while absolute performance values change between a subgraph and a full graph, the relative ranking of HP configurations remains remarkably consistent.
1. Search Space Pruning and Decoupling
Before searching, the authors categorized HPs into four groups to reduce the search space by over 700x:
- Reduced options: HPs where one choice is consistently superior. For instance, empirical analysis showed that the Adam optimizer almost always outperforms others like SGD or Adagrad.
- Shrunken range: HPs that only perform well in specific intervals (e.g., learning rate).
- Monotonously related: HPs where "bigger is usually better" but more expensive (e.g., batch size and embedding dimension). These are kept small initially to save time.
- No obvious patterns: HPs that require thorough searching (e.g., loss function types).
2. Stage One: Efficient Subgraph Exploration
In the first stage, KGTuner samples a 20% subgraph using a Multi-start Random Walk. It then employs a Random Forest (RF) surrogate model combined with BORE (Bayesian Optimization by Density-Ratio Estimation) to explore the pruned search space. The authors found that RF is superior to Gaussian Processes (GP) for KG landscapes because it better captures the "rugged" nature of local performance variations.
3. Stage Two: Full Graph Fine-tuning
The top 10 configurations identified on the subgraph are transferred to the full graph. In this stage, the "monotonous" HPs (batch size and dimension) are scaled up, and the model is fine-tuned to reach its peak performance. This "configuration transfer" is more robust than transferring a performance predictor model.
Evaluation and Key Results
KGTuner was evaluated on four major benchmarks, including the massive ogbl-wikikg2 (2.5M entities, 16M edges).
- Performance Gains: KGTuner consistently outperformed original reported results and standard baselines like Hyperopt and SMAC. It achieved a 9.1% average relative improvement across four different embedding models on the OGB leaderboard.
- Efficiency: Within a fixed 24-hour budget for WN18RR, KGTuner tested hundreds of configurations on subgraphs, whereas baselines only completed a few full-graph runs, leading to significantly better final HPs for KGTuner.
- SOTA Breakthroughs: On
ogbl-wikikg2, KGTuner improved the DistMult model's Mean Reciprocal Rank (MRR) by 29.7% compared to the original OGB results.
Conclusion and Future Work
KGTuner demonstrates that efficient HP search for large-scale KGs is possible by combining search space pruning with a two-stage subgraph-to-full-graph transfer strategy. While the current study focused on translational and tensor factorization models, future work aims to extend this logic to Graph Neural Networks (GNNs) and explore automated methods for scaling HPs during the transfer process.
Summary updated