SMORE: Knowledge Graph Completion and Multi-hop Reasoning in Massive Knowledge Graphs

Hongyu Ren, Hanjun Dai, Bo Dai, Xinyun Chen, Denny Zhou, Jure Leskovec, Dale Schuurmans

TL;DR

SMORE is the first general framework capable of performing complex multi-hop logical reasoning on massive knowledge graphs (KGs) with millions of entities. By combining a novel bidirectional rejection sampling algorithm with a high-performance asynchronous system design, it scales to graphs 1,500× larger than previous methods while remaining faster and more memory-efficient.

What Problem Does This Paper Address?

Knowledge Graphs (KGs) like Freebase or Wikidata are the backbone of modern AI, storing facts as triples (e.g., Paris—CapitalOf—France). Most research focuses on single-hop completion (predicting a missing link). However, real-world questions are often multi-hop and involve logical operations, such as: "Who are the co-authors of Canadian Turing Award winners?"

Answering these queries requires traversing multiple paths and performing intersections or unions in the graph. Existing multi-hop reasoning frameworks are notoriously unscalable; they typically only handle graphs with around 60k entities. Real-world KGs have tens of millions. The bottleneck is two-fold:

  1. Algorithmic: Generating "negative" training examples (entities that are not answers) via graph traversal has exponential complexity relative to the number of query hops.
  2. Systemic: Massive embedding tables (vectors representing entities) cannot fit into GPU memory, and standard graph partitioning techniques break down when queries span multiple partitions.

Methods

The authors introduce SMORE (Scalable Multi-hOp REasoning), which uses a "system-algorithm co-optimization" approach:

1. Bidirectional Rejection Sampling

To train these models, the system needs to find entities that are not answers to a complex query. A naive search is too slow. SMORE uses Dynamic Programming to find an "optimal node cut" in the query's logical structure. It then performs a forward traversal from the starting entities and a backward verification from a candidate negative entity, meeting at the "cut." This reduces the worst-case complexity by a square root factor, making online data generation feasible for the first time on massive graphs.

2. Asynchronous System Design

To handle the memory bottleneck, SMORE stores the massive embedding table in shared CPU memory and only fetches the required rows to the GPU for computation. To prevent the CPU-GPU bottleneck from slowing down training, they designed an asynchronous pipeline:

  • Multi-thread Sampler: CPU threads generate queries and samples in the background.
  • Overlapped I/O: Embedding reads/writes are overlapped with GPU neural network computations.
  • Sparse Optimizer: Only the embeddings involved in the current batch are updated, reducing synchronization overhead.

Datasets

The authors evaluated SMORE on a mix of standard and massive benchmarks:

  • Small-scale: FB15k, FB15k-237, and NELL995 (standard for multi-hop research).
  • Large-scale: FB400k, ogbl-wikikg2, and the full Freebase (86M entities, 338M edges). The full Freebase is roughly 1,500× larger than the KGs previously used in multi-hop literature.

Key Insights and Ideas

  • The "Optimal Cut" Insight: You don't need to traverse the whole query path to verify a negative sample. By finding the most efficient point to "meet in the middle" (the node cut), you can drastically prune the search space.
  • Graph-Size Agnostic Memory: Because SMORE keeps the bulk of the data (embeddings) on the CPU and uses a sparse optimizer, its GPU memory requirement is almost independent of the graph size. It trained on the 86M-node Freebase using only 2GB of GPU memory.
  • Multi-hop as a Generalization: The authors show that a framework optimized for multi-hop reasoning can actually outperform specialized single-hop frameworks (like DGL-KE or PBG) on simple link prediction tasks because of its efficient sampling and I/O.

Key Results

  • Scalability: SMORE is the first framework to successfully run multi-hop reasoning on the full Freebase KG.
  • Speed: On smaller, standard datasets, SMORE is 2.2× faster than the previous state-of-the-art multi-hop framework (KGReasoning).
  • Efficiency: It achieves near-linear speedup when adding more GPUs, demonstrating excellent parallel efficiency.
  • Accuracy: The bidirectional sampler doesn't just provide speed; it allows the model to see more diverse negative samples, leading to higher accuracy (MRR) compared to random sampling.

Limitations and Future Work

  • Embedding-Centric: The paper focuses on embedding-based methods (GQE, Q2B, BetaE). It does not address scaling for "fuzzy-logic" or symbolic reasoning methods, which the authors leave for future work.
  • CPU-GPU Latency: While the asynchronous design hides much of the latency, the system still relies on high-speed RAM and PCIe bandwidth. On extremely sparse graphs or with very large embedding dimensions, the CPU-GPU transfer could eventually become a hard bottleneck.
  • Complex Queries: While it handles intersections, unions, and negations, extremely deep queries (many hops) might still challenge the bidirectional sampler's efficiency.

Summary updated

BibTeX
@inproceedings{ren2022smore,
  author = {Hongyu Ren and Hanjun Dai and Bo Dai and Xinyun Chen and Denny Zhou and Jure Leskovec and Dale Schuurmans},
  title = {{SMORE: Knowledge Graph Completion and Multi-hop Reasoning in Massive Knowledge Graphs}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2022},
  doi = {10.1145/3534678.3539405},
}
Figure