Skip to main content
QUICK REVIEW

[Paper Review] Learning to Speed Up Query Planning in Graph Databases

Mohammad Hossein Namaki, F A Rezaur Rahman Chowdhury|arXiv (Cornell University)|Jan 21, 2018
Graph Theory and AlgorithmsComputer Science5 citations
TL;DR

This paper proposes a Learning to Plan (L2P) framework that accelerates query planning in graph databases by learning greedy search policies via imitation learning, significantly improving the speed of the STAR query reasoner with minimal accuracy loss across DBpedia, YAGO, and Freebase knowledge graphs.

ABSTRACT

Querying graph structured data is a fundamental operation that enables important applications including knowledge graph search, social network analysis, and cyber-network security. However, the growing size of real-world data graphs poses severe challenges for graph databases to meet the response-time requirements of the applications. Planning the computational steps of query processing - Query Planning - is central to address these challenges. In this paper, we study the problem of learning to speedup query planning in graph databases towards the goal of improving the computational-efficiency of query processing via training queries.We present a Learning to Plan (L2P) framework that is applicable to a large class of query reasoners that follow the Threshold Algorithm (TA) approach. First, we define a generic search space over candidate query plans, and identify target search trajectories (query plans) corresponding to the training queries by performing an expensive search. Subsequently, we learn greedy search control knowledge to imitate the search behavior of the target query plans. We provide a concrete instantiation of our L2P framework for STAR, a state-of-the-art graph query reasoner. Our experiments on benchmark knowledge graphs including DBpedia, YAGO, and Freebase show that using the query plans generated by the learned search control knowledge, we can significantly improve the speed of STAR with negligible loss in accuracy.

Motivation & Objective

  • Address the challenge of slow response times in large-scale graph database queries due to inefficient query planning.
  • Improve computational efficiency of query processing in graph databases by learning from training queries.
  • Tackle the limitations of the Threshold Algorithm (TA) framework, such as over-conservative upper bounds and static policies.
  • Develop a generalizable framework applicable to a wide class of TA-based query reasoners.
  • Achieve significant speedup in query processing while maintaining high accuracy through learned search control policies.

Proposed method

  • Define a generic search space over candidate query plans, treating TA-based plans as greedy search trajectories.
  • Perform an expensive heuristic-guided beam search to identify optimal target query plans for training queries.
  • Use imitation learning to train a greedy policy that mimics the behavior of these target trajectories.
  • Formulate the policy as a function mapping search states to actions using generalizable features.
  • Instantiate the L2P framework for STAR, a state-of-the-art graph query reasoner, to enable end-to-end learning and inference.
  • Evaluate the learned policy on unseen queries and data graphs to assess generalization and robustness.

Experimental results

Research questions

  • RQ1Can learning-based search control improve the computational efficiency of query planning in graph databases?
  • RQ2How well can a learned policy generalize across different knowledge graphs and query distributions?
  • RQ3What is the impact of data graph evolution on the stability and performance of the learned query planning policy?
  • RQ4To what extent can the learned policy maintain accuracy while achieving significant speedup over baseline TA-based planners?
  • RQ5Can the framework be effectively transferred to new data graphs without retraining from scratch?

Key findings

  • L2P-STAR achieved up to 55.84x speedup on Freebase with only a 0.96% accuracy drop compared to the original STAR.
  • On DBpedia, the speedup reached 47.71x with 96% accuracy, demonstrating strong performance on large-scale knowledge graphs.
  • Transfer learning showed that policies trained on one dataset generalized reasonably well to others, with the best accuracy when training and testing on the same dataset.
  • When trained on a combined dataset, the policy achieved the best performance on Freebase, indicating potential for cross-dataset knowledge transfer.
  • With 10% data graph changes (via Forest Fire sampling), L2P-STAR maintained over 93% accuracy and achieved increased speedup, showing robustness to data evolution.
  • Speedup improved with larger and denser graphs, confirming that the method is especially beneficial in large-scale, evolving data environments.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.