Introduction
Real-world Knowledge Bases (KBs) like Freebase or Wikidata are notoriously incomplete. To answer complex logical queries over missing data, researchers often rely on Query Embedding (QE) techniques. These models represent entities and queries in a joint vector space to "guess" plausible answers, effectively filling in the gaps of incomplete KBs.
However, existing QE systems (such as Query2Box) suffer from a glaring flaw: they are not logically faithful. Because they rely purely on geometric operations—like intersecting vectors or boxes—to generalize, they lack the capacity to memorize explicitly stored facts. If asked a complex query where the answer can be found through pure deductive logic over existing KB facts, they often fail. Consequently, previous QE methods have struggled to serve as reliable, differentiable reasoning modules inside larger downstream systems, such as natural language Knowledge Base Question Answering (KBQA).
The Faithfulness Crisis
Prior state-of-the-art QE models possess a massive blind spot. When tested purely on entailment—queries where the answer is explicitly deducible from the training data—previous models fail spectacularly. Generalization should not come at the cost of basic memorization. Pure embedding models simply lack the capacity to memorize all explicit KB facts, creating a need for a system that balances "fuzzy" reasoning with hard factual recall.
EmQL: Bridging Generalization and Deduction
To bridge the gap between generalization and exact logical deduction, this paper introduces EmQL (Embedding Query Language). Instead of representing a set of entities purely geometrically, EmQL uses a dual centroid-sketch representation:
- Centroid (Dense): A standard dense vector representing the weighted center of the entities. This captures the "soft type" or general neighborhood of the set (e.g., "US mid-size cities"), allowing the model to generalize.
- Count-Min Sketch (Sparse): A highly efficient, randomized data structure that acts as a non-parametric memory. It precisely tracks the weights of specific entities in the set, ensuring the model doesn't "forget" explicit facts.
EmQL supports logical operations like intersection, union, relation following, and relational filtering. Instead of performing math purely in the embedding space, EmQL's relation following uses neural retrieval (Maximum Inner Product Search, or MIPS) over a key-value memory of embedded KB triples. This retrieval is then filtered by the Count-Min sketch, making the reasoning process differentiable, scalable, and logically faithful.
Datasets and Evaluation
The authors evaluated EmQL across two primary domains:
- Query Generalization & Entailment: Evaluated on standard KB completion datasets FB15k, FB15k-237, and NELL995, using the complex query generation protocol introduced by the Query2Box paper.
- Knowledge Base Question Answering (KBQA): Evaluated on MetaQA (multi-hop movie questions) and WebQuestionsSP (complex questions generated from Freebase).
Key Results
- Entailment (Faithfulness): On FB15k-237, EmQL achieved an average Hits@3 of 94.2%, absolutely crushing the previous state-of-the-art Query2Box, which scored only 36.2%.
- Generalization: EmQL also improved on guessing missing facts for complex queries, scoring 35.8% Hits@3 on FB15k-237 compared to Query2Box's 26.8%.
- KBQA Integration: Because EmQL is both faithful and differentiable, it can replace traditional, rigid symbolic KB lookups inside a natural language QA system. When plugged in as the reasoning module, EmQL achieved state-of-the-art results: 99.1% Hits@1 on MetaQA3 (a 7.7% absolute improvement over prior work) and 75.5% Hits@1 on WebQuestionsSP (a 5.8% absolute improvement).
Limitations and Future Work
Despite its strong performance, EmQL has a few notable limitations:
- The "Kangaroo-Ashtray" Problem: EmQL's centroid-sketch representation assumes that sets contain somewhat similar entities. It struggles to represent unions of highly diverse entities (e.g., a set containing
{kangaroo, ashtray}) because the resulting geometric centroid becomes meaningless in the embedding space. - Logical Expressivity: EmQL does not support general logical negation and has very limited support for set difference.
- Pretraining: The system requires KB-specific pretraining to find suitable entity embeddings before it can be fine-tuned for a downstream QA task.
For future work, the authors suggest adding a normal-form disjunction operator (similar to how Query2Box handles unions) to support diverse sets by outputting a union of multiple centroid-sketch representations, rather than forcing them into a single representation.
Summary updated