Reasoning Over Virtual Knowledge Bases With Open Predicate Relations

Haitian Sun, Pat Verga, Bhuwan Dhingra, Ruslan Salakhutdinov, William W. Cohen

Abstract

We present the Open Predicate Query Language (OPQL); a method for constructing a virtual KB (VKB) trained entirely from text. Large Knowledge Bases (KBs) are indispensable for a wide-range of industry applications such as question answering and recommendation. Typically, KBs encode world knowledge in a structured, readily accessible form derived from laborious human annotation efforts. Unfortunately, while they are extremely high precision, KBs are inevitably highly incomplete and automated methods for enriching them are far too inaccurate. Instead, OPQL constructs a VKB by encoding and indexing a set of relation mentions in a way that naturally enables reasoning and can be trained without any structured supervision. We demonstrate that OPQL outperforms prior VKB methods on two different KB reasoning tasks and, additionally, can be used as an external memory integrated into a language model (OPQL-LM) leading to improvements on two open-domain question answering tasks.

1. Introduction

Traditional Knowledge Bases (KBs), such as Wikidata or Freebase, serve as the backbone for many modern AI applications. However, they face two critical challenges: they are perennially incomplete and prohibitively expensive to maintain through human annotation. To address these limitations, researchers have turned to "Virtual Knowledge Bases" (VKBs), which treat a text corpus as a structured database.

Previous VKB iterations, such as DrKIT, relied heavily on distant supervision—using existing structured KBs to teach models how to recognize relations in text. This dependency creates a bottleneck, making it difficult to build VKBs for specialized domains (e.g., technical or medical fields) where structured data is scarce. Furthermore, these models often struggle with "open" relations—nuanced or rare relationships that fall outside the scope of pre-defined schemas. OPQL addresses these issues by enabling reasoning over open predicate relations without requiring structured supervision.

2. Methodology

OPQL structures a VKB as a differentiable key-value memory, allowing for end-to-end training and complex multi-hop reasoning directly from raw text.

2.1 VKB Construction

Unlike traditional methods that extract triples into a fixed schema, OPQL encodes pairs of entities $(e_1, e_2)$ found in text. The memory is organized such that:

  • Key: A combination of a "topic entity" embedding and a "relation mention" embedding.
  • Value: The embedding of the corresponding "target entity."
Overview of the OPQL Memory structure, illustrating how relation and topic entity embeddings serve as keys to retrieve target entity values.

2.2 Relation Encoder and Reasoning

The core of OPQL is a relation encoder trained using a "matching the blanks" objective. By learning that different sentences mentioning the same entity pair likely describe similar relationships, the model can cluster relations (e.g., "authored by" and "written by") without explicit labels.

OPQL defines a "follow" operation for reasoning. For a query like "Who is the author of the book Charles Darwin wrote?", the model performs a differentiable jump from the entity "Charles Darwin" to "On the Origin of Species" and subsequently to the target author in a single pipeline. Additionally, the authors introduced OPQL-LM, which integrates this VKB into a standard Transformer Language Model as an external memory, utilizing a "null relation" mechanism to balance retrieved facts with internal model parameters.

3. Experimental Setup

The model was evaluated across several rigorous benchmarks to test its reasoning and question-answering capabilities:

  • MetaQA: A movie-domain dataset for 2-hop and 3-hop reasoning.
  • Multi-hop Slot Filling (MSF): A large-scale dataset derived from Wikidata containing over 800,000 entity pairs.
  • WebQuestionsSP & ComplexWebQuestions: Open-domain QA datasets used to evaluate the integrated OPQL-LM.
  • Wikipedia: Served as the primary text corpus for building the underlying Virtual Knowledge Base.

4. Results and Discussion

OPQL demonstrated state-of-the-art performance across multiple tasks. On the MSF 3-hop task, OPQL achieved a Hits@1 of 29.7, significantly outperforming DrKIT's 24.4. In open-domain QA, OPQL-LM scored 40.7 on ComplexWebQuestions, surpassing larger models like T5 (38.7) and specialized retrieval models like DPR-cascade (25.1).

4.1 Robustness to Novel Relations

A key insight from the research is OPQL's robustness to the "long tail" of relations. In "held-out" experiments where the model was tested on relations entirely absent during training, previous models like DrKIT saw performance drops of nearly 50%. In contrast, OPQL maintained consistent performance, proving its ability to handle open predicates that human annotators might overlook.

Comparison of Hits@1 scores on Multi-hop Slot Filling (MSF) tasks, highlighting OPQL's superior performance and robustness when dealing with held-out relations.

5. Conclusion

OPQL represents a significant step toward building functional, reasoning-capable knowledge bases from entity-linked text without the need for structured supervision. While the model excels at handling open predicates and novel relations, it remains dependent on the accuracy of initial entity linking. Future work may explore "memory condensation" techniques to manage the computational expense of indexing every entity-pair mention and methods for real-time VKB updates as new text becomes available.

Summary updated

BibTeX
@misc{sun2021reasoning,
  author = {Haitian Sun and Pat Verga and Bhuwan Dhingra and Ruslan Salakhutdinov and William W. Cohen},
  title = {{Reasoning Over Virtual Knowledge Bases With Open Predicate Relations}},
  year = {2021},
  eprint = {2102.07043},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.07043},
}
Figure