Scalable Feature Learning on Huge Knowledge Graphs for Downstream Machine Learning

Félix Lefebvre, Gaël Varoquaux

Abstract

Knowledge Graph Embedding (KGE) methods are often bottlenecked by massive graph sizes and an optimization focus on link prediction that does not always translate to downstream machine learning performance. We introduce SEPAL (Scalable Embedding Propagation ALgorithm), a framework that decouples the learning of relational patterns from the embedding of the entire graph. By training on a dense core and propagating features via message passing, SEPAL enables the processing of graphs with over 90 million entities on a single GPU. Our results demonstrate that SEPAL is up to 30x faster than traditional methods while providing superior features for real-world regression and classification tasks.

Introduction

Knowledge Graphs (KGs) like Wikidata and Freebase serve as foundational structures for human knowledge. However, integrating this relational data into machine learning pipelines remains a challenge. Existing KGE models face two primary hurdles: a "goal mismatch," where link prediction performance fails to correlate with downstream utility, and a "scalability wall," where the memory requirements for embedding millions of entities necessitate expensive distributed clusters.

SEPAL (Scalable Embedding Propagation ALgorithm) addresses these issues by prioritizing "queriability"—the effectiveness of embeddings as features for external ML models—while maintaining a small computational footprint suitable for commodity hardware.

The SEPAL Framework

SEPAL operates as a three-stage pipeline that can be applied to various underlying KGE architectures.

The SEPAL workflow: from input graph to core selection, embedding, and propagation.
  1. Core Selection: Instead of embedding the full graph simultaneously, SEPAL identifies a dense "core" subgraph (typically the top 5% of entities by degree or PageRank).
  2. Core Embedding: A standard KGE model is trained exclusively on this core subgraph. This step learns the fundamental relational operators and high-quality embeddings for the most connected entities.
  3. Embedding Propagation: The remaining 95% of the graph is embedded through a message-passing strategy. Using the learned relational operators, core embeddings are propagated outward. This stage avoids negative sampling and gradient descent, resulting in massive speed gains.

Compatibility and Scalability

A key strength of SEPAL is its flexibility. It acts as a wrapper for diverse KGE models by utilizing their specific relational operators ($\phi$) during the propagation phase.

Relational operators for various KGE models supported by the SEPAL framework.

To manage memory for extremely large graphs, the authors developed BLOCS (Balanced Local Overlapping Connected Subgraphs). This partitioning method breaks scale-free graphs into overlapping chunks that fit into a single GPU's memory. This ensures that global connectivity is preserved during the propagation step, allowing the model to capture structural patterns without requiring a multi-GPU setup.

Key Insights: Global Consistency

Traditional KGE models rely on local contrastive learning, attempting to distinguish real edges from "fake" ones. SEPAL shifts this focus toward "global consistency." By fixing core embeddings as "anchors," the propagation step aligns the rest of the graph with the dominant structural patterns. This approach suggests that for downstream tasks, the overall structural alignment is more valuable than fine-grained link prediction accuracy. Furthermore, once the core and relations are well-defined, simple propagation is enough to create highly "queriable" features without the need for negative sampling.

Experimental Results

The authors evaluated SEPAL on 7 large-scale KGs, including the 91-million-entity WikiKG90Mv2, across 46 downstream tasks.

  • Performance: SEPAL consistently outperformed established systems like PyTorch-BigGraph (PBG) and DGL-KE on downstream tasks across almost all datasets.
  • Efficiency: The algorithm achieved 20x to 30x speedups compared to training on full graphs. Notably, the WikiKG90Mv2 graph was embedded on a single 32GB V100 GPU.
  • Continual Learning: For dynamic graphs, SEPAL was 587x faster than retraining from scratch, making it highly practical for frequently updated datasets.

Conclusion

SEPAL demonstrates that high-quality knowledge graph embeddings do not require massive compute clusters. By focusing on core relational structures and efficient propagation, SEPAL bridges the gap between massive-scale relational data and practical machine learning applications. While it is less optimized for link prediction, its superior performance on downstream tasks and hardware efficiency make it a powerful tool for real-world data science.

Summary updated

BibTeX
@inproceedings{lefebvre2025scalable,
  author = {Félix Lefebvre and Gaël Varoquaux},
  title = {{Scalable Feature Learning on Huge Knowledge Graphs for Downstream Machine Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=PJrvX7Jz2c},
}
Figure