TL;DR
ULTRAQUERY is the first foundation model for zero-shot complex logical query answering that generalizes to any knowledge graph, even those with entirely new entities and relations. By decoupling reasoning from specific vocabularies, a single model trained on one dataset can outperform specialized baselines across 23 diverse benchmarks.
What Problem Does This Paper Address?
Reasoning over Knowledge Graphs (KGs) typically involves answering complex logical queries—questions that require multiple steps of traversal (projections) and logical operations like "AND" (intersection), "OR" (union), and "NOT" (negation).
The major bottleneck in current Complex Logical Query Answering (CLQA) is transductivity. Most models learn specific embeddings for every entity and relation in a graph. If you want to apply a model trained on a medical KG to a music KG, it fails because the "vocabulary" (the set of entities and relations) is completely different. Even "inductive" models often only handle new entities, still requiring a fixed set of relations.
This paper tackles the "hardest" inductive setup: performing zero-shot reasoning on graphs where both entities and relations are entirely new at inference time.
Methods
The authors introduce ULTRAQUERY, which achieves vocabulary independence through two key components:
- Inductive Relation Projection: Instead of learning fixed IDs for relations, ULTRAQUERY uses a meta-graph approach (based on the ULTRA model). It represents relations by how they interact structurally (e.g., "head-to-tail" or "tail-to-head" patterns). This allows the model to understand the role of a new relation based on its local graph structure without ever having seen it before.
- Non-parametric Logical Operators: Rather than learning neural network parameters for "AND" or "OR," the model uses fuzzy logic (specifically product t-norms and co-norms). These are fixed mathematical operations that work on scalar scores between 0 and 1, making them naturally generalizable to any graph.
A significant challenge identified is the multi-source propagation issue. In simple link prediction, you start from one node. In complex queries, intermediate steps might yield multiple "likely" nodes, causing uncertainty to snowball. The authors address this by fine-tuning the projection operator on complex queries to handle multiple starting points.
Datasets
The model was evaluated on a massive suite of 23 datasets:
- 3 Transductive datasets: Standard benchmarks like FB15k-237 and NELL995.
- 9 Inductive (entity) datasets: Where inference graphs have new entities but the same relations as training.
- 11 Inductive (entity & relation) datasets: A new suite curated by the authors called WikiTopics-CLQA, derived from Wikipedia topics (e.g., Art, Health, Sport) to test the hardest generalization setup.
Key Insights and Ideas
- Reasoning is Structural, Not Lexical: The core "aha moment" is that logical reasoning on graphs depends more on structural patterns than on the specific names of entities or relations. A model can learn "how to reason" independently of "what" it is reasoning about.
- Zero-Shot Foundation Power: A single ULTRAQUERY model trained only on the FB15k-237 dataset can generalize to 22 other graphs, often outperforming models specifically trained on those graphs.
- Multi-Source Shift: There is a significant distribution shift between simple link prediction (1-hop) and CLQA (multi-hop). Link predictors are "single-source" experts, but complex queries require "multi-source" expertise to manage the fuzzy sets of intermediate answers.
Key Results
- Superior Performance: Across 23 datasets, a single zero-shot ULTRAQUERY model outperformed the best available baselines by 50% relative MRR on standard logical queries (EPFO) and by 70% on queries involving negation.
- New State-of-the-Art: It set a new SOTA on 15 of the 23 datasets.
- Faithfulness: The model maintains high "faithfulness," meaning it reliably recovers "easy" answers (those reachable by simple graph traversal) even in the zero-shot setting.
- Scalability: Performance does not degrade as the inference graph grows larger (up to 550% more entities than the training graph).
Limitations and Future Work
- Multi-Source Propagation: While addressed, this remains a difficult area. Better pre-training strategies or thresholding mechanisms could further improve how uncertainty flows through long query chains.
- Scaling to Millions: While promising, the current GNN backbone might need to be replaced with more scalable architectures (like A*Net) to handle industrial-scale KGs with millions of nodes.
- Query Complexity: Future work could extend this to even more complex query types, such as those involving numerical literals, temporal constraints, or non-tree structures.
Summary updated