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.
Introduction
Traditional Knowledge Bases (KBs) like Wikidata or Freebase are foundational for AI applications but suffer from significant incompleteness. They rely on manual annotation and often lack the "long-tail" relationships present in unstructured text. Previous "Virtual Knowledge Base" (VKB) approaches, such as DrKIT, attempted to treat text as a soft database but were limited by a circular dependency on existing structured KBs for distant supervision. This dependency hinders their ability to generalize to novel relations or specialized domains like medicine and law. OPQL addresses these limitations by enabling the construction of VKBs directly from raw text without structured supervision.
Methods
OPQL utilizes a Key-Value Memory structure derived from an entity-linked corpus. The system employs a neural Relation Encoder to represent the context between entity pairs as dense vectors, using special tokens ([R1], [R2]) to mark entities. This encoder is pre-trained with a "matching the blanks" objective, ensuring that similar relations between different entity pairs yield similar embeddings.
For every entity pair $(e_1, e_2)$ in the text, OPQL stores a key (combining the subject entity and relation vector) and a corresponding value (the object entity). Reasoning is performed differentiably: a natural language question is encoded into a query vector for a "soft" lookup in memory. For multi-hop reasoning, these lookups can be chained. Furthermore, OPQL can be integrated into a standard Language Model (OPQL-LM) as an external memory, where a learned mixing factor determines the reliance on retrieved information.
Key Insights
A primary innovation of OPQL is the removal of the need for structured KB supervision. By leveraging self-supervised pre-training, the model autonomously learns linguistic relation structures. This allows OPQL to handle "novel" relations—those not seen during training—far more effectively than previous models. Additionally, the introduction of a "null" relation entry prevents hallucinations by allowing the model to fall back on its internal parameters when the memory lacks a relevant fact.
Key Results
Evaluation on benchmarks like MetaQA, Multi-hop Slot Filling (MSF), and WebQuestionsSP demonstrates OPQL's superiority. On the MSF 3-hop task, OPQL achieved 29.7 Hits@1, significantly outperforming DrKIT (24.4). Notably, OPQL maintains performance even when a large percentage of relations are held out during training, showcasing its robustness.
When integrated as OPQL-LM, the system outperformed larger models like T5 and BART on open-domain QA tasks while remaining more parameter-efficient. The authors also demonstrated zero-shot knowledge injection, where 1 million new entity pairs were added to the memory at fine-tuning without retraining the encoders.
Limitations and Future Work
OPQL currently depends on an entity-linked corpus. Future work aims to develop an end-to-end system that integrates entity discovery and linking. Additionally, scaling the memory to store every Wikipedia entity pair mention is computationally intensive, necessitating more advanced compression techniques. Finally, addressing potential information leakage from topic entity names during query encoding remains an architectural challenge.
Summary updated