Zero-Shot Question Generation from Knowledge Graphs for Unseen Predicates and Entity Types

Hady ElSahar, Christophe Gravier, Frédérique Laforest

Abstract

We present a neural model for question generation from knowledge base triples in a "Zero-Shot" setup, that is generating questions for triples containing predicates, subject types or object types that were not seen at training time. Our model leverages triples occurrences in the natural language corpus in an encoder-decoder architecture, paired with an original part-of-speech copy action mechanism to generate questions. Benchmark and human evaluation show that our model sets a new state-of-the-art for zero-shot QG.

Introduction

Knowledge Graphs (KGs) such as Freebase are foundational to modern information retrieval, containing millions of facts structured as (subject, predicate, object) triples. Question Generation (QG) from these triples is essential for building conversational agents and educational tools. However, current state-of-the-art models are limited by their reliance on supervised datasets like SimpleQuestions, which only cover a small fraction (approximately 24.4%) of available predicates.

When faced with "zero-shot" scenarios—predicates or entity types not present in the training data—standard models often fail, producing generic or nonsensical output. This paper addresses this gap by proposing a model capable of generalizing to the vast, unseen portions of large-scale KGs without requiring additional labeled data.

Methodology

The proposed model mimics human intuition: it identifies how a relationship is described in natural language and "reverses" that description into a question. This is achieved through a dual-encoding strategy and a novel copy mechanism.

Dual Encoding and Attention

The architecture utilizes an encoder-decoder framework with two primary inputs:

  1. Fact Encoder: Encodes the KB triple using pre-trained TransE embeddings to capture the underlying semantic relationship.
  2. Textual Context Encoders: The model incorporates "contexts"—sentences from Wikipedia where the subject and object of the triple co-occur, retrieved via distant supervision.

During the decoding phase, a dual attention mechanism allows the model to simultaneously focus on the structured KB triple and scan the unstructured textual contexts for relevant vocabulary.

The model architecture featuring a Fact Encoder for triples and Textual Encoders for Wikipedia contexts, integrated via dual attention mechanisms.

POS Copy Action Mechanism

A core innovation of this work is the Part-of-Speech (POS) copy action mechanism. Unlike standard copy mechanisms that rely on token position, this model learns to copy words based on their grammatical roles (e.g., "Copy the NOUN from Context 1"). This allows the model to handle out-of-vocabulary words by treating them as grammatical slots, ensuring that even rare predicates can be correctly lexicalized in the generated question.

Extracted figure from page 4 of Zero-Shot Question Generation from Knowledge Graphs for Unseen Predicates and Entity Types

Datasets and Experimental Setup

The model was trained on SimpleQuestions (100k question-triple pairs) and evaluated using FB5M and Wikipedia for context. To rigorously test zero-shot capabilities, the authors created 10 cross-validation folds where the test sets contained predicates and entity types entirely absent from training.

Key Results

  • Automatic Metrics: The inclusion of textual contexts provided a +2.04 BLEU-4 boost, while the POS copy mechanism added another +2.39. In the most challenging setup (unseen predicates), the model achieved a BLEU-4 of 31.1, significantly outperforming the standard Encoder-Decoder baseline of 28.7.
  • Human Evaluation: In zero-shot settings, humans identified the correct predicate in the generated questions 46% of the time, a substantial improvement over the 6% accuracy of traditional baselines.

Insights and Limitations

The study demonstrates that unstructured text (Wikipedia) can serve as a vital bridge for learning unseen predicates. By focusing on grammar over position, the POS copy mechanism ensures syntactic correctness even for unknown words.

However, the model faces a trade-off between accuracy and naturalness; the post-processing step of replacing POS tags can occasionally lead to clunky grammar or subject-verb disagreement. Furthermore, the model's performance is contingent on the availability of high-quality textual contexts where the subject and object co-occur. Future work will explore more sophisticated reformulation steps to improve the fluency of the generated questions.

Summary updated

BibTeX
@inproceedings{elsahar2018zero,
  author = {Hady ElSahar and Christophe Gravier and Frédérique Laforest},
  title = {{Zero-Shot Question Generation from Knowledge Graphs for Unseen Predicates and Entity Types}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2018},
  url = {https://openreview.net/forum?id=B1-IEQ-dWB},
}
Figure