[Paper Review] Inductive Logical Query Answering in Knowledge Graphs
This paper proposes two inductive query answering methods—NodePiece-QE and GNN-QE—for knowledge graphs that generalize to unseen entities without retraining. By leveraging inductive node and relational structure representations via graph neural networks, the models achieve strong zero-shot generalization, answering complex logical queries over graphs up to 500% larger than training graphs, with GNN-QE showing higher accuracy and NodePiece-QE enabling scalable inference on million-node graphs.
Formulating and answering logical queries is a standard communication interface for knowledge graphs (KGs). Alleviating the notorious incompleteness of real-world KGs, neural methods achieved impressive results in link prediction and complex query answering tasks by learning representations of entities, relations, and queries. Still, most existing query answering methods rely on transductive entity embeddings and cannot generalize to KGs containing new entities without retraining the entity embeddings. In this work, we study the inductive query answering task where inference is performed on a graph containing new entities with queries over both seen and unseen entities. To this end, we devise two mechanisms leveraging inductive node and relational structure representations powered by graph neural networks (GNNs). Experimentally, we show that inductive models are able to perform logical reasoning at inference time over unseen nodes generalizing to graphs up to 500% larger than training ones. Exploring the efficiency--effectiveness trade-off, we find the inductive relational structure representation method generally achieves higher performance, while the inductive node representation method is able to answer complex queries in the inference-only regime without any training on queries and scales to graphs of millions of nodes. Code is available at https://github.com/DeepGraphLearning/InductiveQE.
Motivation & Objective
- To address the limitation of transductive query embedding models that cannot generalize to unseen entities in updated or new knowledge graphs.
- To develop inductive methods that learn representations for entities and relations without requiring retraining when new nodes are added.
- To enable logical reasoning over complex queries (e.g., conjunctions, negations, existentials) in graphs that are significantly larger than the training graphs.
- To evaluate the efficiency–effectiveness trade-off between inductive node-based and relational-structure-based approaches in query answering.
Proposed method
- NodePiece-QE extends the NodePiece model to inductive query answering by representing entities as functions of fixed-size token vocabularies, enabling inference without entity embeddings.
- It uses a non-parametric logical query executor to perform operations like intersection, union, and negation in the latent space, supporting inference-only mode.
- GNN-QE learns inductive relational structure representations using a GNN that operates directly on the graph structure without entity embeddings, capturing path-based relations.
- The model uses a GNN with PNA aggregation and DistMult composition to encode relational patterns, trained end-to-end on complex queries.
- Both methods use differentiable t-norms (e.g., product + sigmoid) to combine scores during query execution, with loss optimized via BCE and negative sampling.
- The approach is evaluated on a novel benchmark of 10 datasets, including CQD-Beam and WikiKG-QE, with ablation on scalability and generalization.
Experimental results
Research questions
- RQ1Can inductive query embedding models generalize to knowledge graphs that are significantly larger (up to 500%) than the training graphs?
- RQ2How do inductive node representations compare to inductive relational structure representations in terms of performance and scalability?
- RQ3Can models answer complex logical queries over entirely unseen entities without any fine-tuning or retraining?
- RQ4To what extent can inductive models discover new correct answers when new nodes and edges are added to a knowledge graph?
- RQ5How does the efficiency–effectiveness trade-off manifest between NodePiece-QE (scalable) and GNN-QE (higher accuracy) in the inductive setting?
Key findings
- Both NodePiece-QE and GNN-QE demonstrate non-trivial performance in answering complex logical queries over unseen entities, confirming the feasibility of inductive query answering.
- The models generalize to graphs up to 500% larger than the training graphs, showing strong out-of-distribution generalization capabilities.
- When new nodes (e.g., Feynman, Princeton) are added to the graph, inductive models successfully identify new correct answers to previously seen queries, mimicking updatable databases.
- NodePiece-QE scales to graphs with 2 million nodes and 500,000 unseen nodes, enabling inference-only query answering without any query-specific training.
- GNN-QE achieves higher performance than NodePiece-QE due to its end-to-end training on complex queries, though it faces scalability challenges on very large graphs.
- The Edge-type Heuristic baseline, while simple, provides a strong baseline by filtering entities based on relation types, highlighting the importance of structural inductive bias.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.