A Joint Model for Question Answering and Question Generation

Tong Wang, Xingdi Yuan, Adam TrischlerarXiv 2017

Abstract

We propose a generative machine comprehension model that learns jointly to ask and answer questions based on documents. The proposed model uses a sequence-to-sequence framework that encodes the document and generates a question (answer) given an answer (question). Significant improvement in model performance is observed empirically on the SQuAD corpus, confirming our hypothesis that the model benefits from jointly learning to perform both tasks. We believe the joint model's novelty offers a new perspective on machine comprehension beyond architectural engineering, and serves as a first step towards autonomous information seeking.

Introduction

In the field of Machine Comprehension (MC), most existing models treat Question Answering (QA) as an extractive "pointing" task. Given a document and a question, these models identify the start and end indices of the answer within the text. While effective, this approach lacks the flexibility to generate abstractive answers and ignores the cognitive benefits of "active reading"—the process of formulating questions to deepen understanding.

Researchers at Microsoft Maluuba address these limitations by proposing a generative framework that treats QA and Question Generation (QG) as dual tasks. By training a model to perform both simultaneously, they demonstrate that "learning to ask" significantly enhances the model's ability to "understand" and answer questions.

Methodology

The proposed model utilizes a sequence-to-sequence (seq2seq) framework equipped with an attention mechanism. Unlike traditional extractive models, this generative approach "writes" the output word by word.

Key Components

  • Encoder: A bidirectional LSTM (BiLSTM) processes word-level and character-level embeddings of the document and the conditioning input (either a question or an answer).
  • Pointer-Softmax Decoder: This mechanism allows the model to adaptively decide at each decoding step whether to copy a word directly from the source document (extractive) or generate a word from a fixed vocabulary (abstractive).
  • Joint Training: The model alternates mini-batches between QA and QG tasks, forcing the sharing of internal representations across both functions.
  • Switch Mechanism: A three-layer MLP computes a "switch scalar" to guide the model between pointing and generating based on distribution entropy.

Experimental Results

The model was evaluated on the Stanford Question Answering Dataset (SQuAD). Although SQuAD is primarily extractive, it served as a robust benchmark for testing the generative model's ability to produce both expected answers and new questions.

Performance comparison of QA and QG models on SQuAD. The JointQA model shows a significant improvement over the single-task A-gen baseline.

As shown in the results, joint training yielded a substantial performance boost. The JointQA model improved QA performance by approximately 10 percentage points in both F1 score and Exact Match (EM) compared to the A-gen model trained solely on answering.

Analysis and Insights

A key finding is the "Active Reading" hypothesis: generating questions primes the model's attention, making it more adept at identifying relevant information for answering. This synergy is particularly evident when analyzing performance across different answer types.

F1 scores across various answer types. The JointQA model consistently outperforms the A-gen baseline, with notable gains in categories where the baseline was previously weak.

The joint model outperformed the single-task baseline across all entity types, including dates, persons, and locations. Interestingly, the largest improvements were observed in categories where the baseline model was weakest, suggesting that joint training provides a more robust and generalized understanding of document structure.

Conclusion

While the joint model provides a significant internal boost over single-task baselines, its overall scores currently trail specialized extractive models like match-LSTM. This represents a trade-off between the simplicity of "pointing" and the complexity of "generating" language. Furthermore, a slight decrease in QG performance during joint training suggests the model may prioritize the more constrained QA task.

Despite these challenges, this research marks a significant step toward "autonomous information seeking," where models might one day actively ask questions to resolve their own knowledge gaps.

Summary updated

Abstract

We propose a generative machine comprehension model that learns jointly to ask and answer questions based on documents. The proposed model uses a sequence-to-sequence framework that encodes the document and generates a question (answer) given an answer (question). Significant improvement in model performance is observed empirically on the SQuAD corpus, confirming our hypothesis that the model benefits from jointly learning to perform both tasks. We believe the joint model's novelty offers a new perspective on machine comprehension beyond architectural engineering, and serves as a first step towards autonomous information seeking.
BibTeX
@misc{wang2017joint,
  author = {Tong Wang and Xingdi Yuan and Adam Trischler},
  title = {{A Joint Model for Question Answering and Question Generation}},
  year = {2017},
  eprint = {1706.01450},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1706.01450},
}
Figure