A Unified Query-based Generative Model for Question Generation and Question Answering

Linfeng Song, Zhiguo Wang, Wael HamzaarXiv 2017

Abstract

Traditionally, Question Generation (QG) and Question Answering (QA) have been treated as distinct tasks. This paper introduces a unified encoder-decoder framework that treats both as query-based generation problems. By matching a passage against a query—a target answer for QG or a question for QA—the model captures deep semantic interactions. Enhanced by multi-perspective matching and reinforcement learning, the approach achieves state-of-the-art results on SQuAD and MS-MARCO datasets.

Introduction

The relationship between a context passage and a specific query is central to both asking and answering questions. In QG, the query is the target answer; in QA, it is the question itself. Previous models often treated these tasks in isolation, frequently relying on extractive methods for QA or hard-coded answer positions for QG. This paper argues for a unified approach that models the deep interaction between passages and queries across multiple semantic angles.

Methodology

The proposed model utilizes a sophisticated Encoder-Decoder architecture designed to handle the nuances of natural language interaction.

The unified query-based generative architecture showing the interaction between the encoder, matching layer, and decoder.

Multi-Perspective Matching Encoder

The core innovation is the Multi-Perspective Matching layer. Instead of a standard encoding pass, the model compares the passage against the query using four distinct strategies to capture various levels of granularity:

The four specific matching strategies used to compare the passage against the query.
  1. Full-Matching: Compares passage vectors against the query's final state.
  2. Maxpooling-Matching: Identifies the highest similarity across all query words.
  3. Attentive-Matching: Employs a weighted sum of query words based on attention.
  4. Max-Attentive-Matching: Selects the single most similar query word for each passage word.

Decoder and Training

The LSTM-based decoder incorporates a copy mechanism to handle out-of-vocabulary words (like proper names) and a coverage mechanism to reduce redundancy. To bridge the gap between training and inference (exposure bias), the authors utilize the REINFORCE algorithm for fine-tuning, directly optimizing for evaluation metrics like BLEU and ROUGE.

Experiments and Results

The model was evaluated on the SQuAD dataset for QG and the MS-MARCO (description subset) for generative QA.

  • Question Generation: The model (MPQG+R) achieved a BLEU-4 score of 13.91 on SQuAD, significantly outperforming the previous state-of-the-art of 12.28.
  • Generative QA: On MS-MARCO, it reached a ROUGE-L score of 32.9, a massive improvement over the vanilla sequence-to-sequence baseline of 8.9.
  • Data Augmentation: Synthetic questions generated by the model were high-quality enough to improve an extractive QA system's F1 score by nearly 3 points in low-data scenarios (using only 10% of human labels).

Conclusion

By unifying QG and QA under a single query-based generative framework, this research demonstrates that deep interaction modeling is vital for both tasks. While the current model requires pre-selected target answers for QG, its ability to generate high-quality synthetic data and handle generative QA marks a significant advancement in the field of Natural Language Processing.

Summary updated

BibTeX
@misc{song2017unified,
  author = {Linfeng Song and Zhiguo Wang and Wael Hamza},
  title = {{A Unified Query-based Generative Model for Question Generation and Question Answering}},
  year = {2017},
  eprint = {1709.01058},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1709.01058},
}
Figure