Abstract
Automating the generation of question-answer pairs is a critical task for scaling educational assessment and improving reading comprehension systems. This paper introduces a novel two-stage framework that first identifies pivotal answer spans using Pointer Networks and then generates context-aware questions using a feature-rich sequence-to-sequence model. By incorporating linguistic features such as POS tags and dependency labels, the proposed model significantly outperforms existing baselines on the SQuAD dataset, achieving a BLEU-4 score of 13.85 and showing marked improvements in human-rated syntactic and semantic correctness.
Introduction
Generating high-quality questions from text is a complex task that requires both linguistic understanding and an awareness of the target information. Traditional systems relied on rigid, hand-crafted rules, which often lacked the flexibility to handle diverse natural language. While recent neural sequence-to-sequence (Seq2Seq) models have shown promise, they frequently suffer from "answer agnosticism"—generating questions without a specific target answer—and struggle to generalize to rare words or complex structures.
To address these challenges, we propose that question generation must be "pivoted" on a specific, relevant answer found within the text. This paper presents a two-stage pipeline designed to first select a pivotal answer and then generate a question tailored to that specific span.
Methodology
The proposed framework consists of two primary stages: Answer Selection and Question Generation.
Stage 1: Answer Selection
The system must first determine which parts of a sentence are worth querying. We explored three distinct methods for identifying these "pivotal answers":
- Named Entity Selection: An MLP ranks named entities (e.g., persons, locations) within the sentence.
- Answer Sequence Pointer Network: A model that points to a sequence of words to form an answer.
- Answer Boundary Pointer Network: A more constrained approach that identifies only the start and end indices of a continuous answer span.
As shown in the figure above, the Boundary Pointer Network effectively identifies the beginning and end of a phrase (e.g., "father patrick dillon") to serve as the anchor for the subsequent question generation.
Stage 2: Question Generation
Once an answer span is selected, a modified Seq2Seq model generates the question. This stage incorporates several key innovations:
- Rich Linguistic Features: To improve generalization, word embeddings are augmented with Part-of-Speech (POS) tags, Named Entity Recognition (NER) tags, and Dependency Labels. This allows the model to leverage grammatical roles even for rare vocabulary.
- Answer Encoding: The model uses BIO (Beginning, Inside, Outside) notation to tag words in the source sentence that belong to the chosen answer, ensuring the decoder maintains focus on the relevant context.
- Global Attention: A mechanism that enables the decoder to attend to specific parts of the source sentence during each step of the generation process.
Experimental Setup
The models were trained and evaluated on the Stanford Question Answering Dataset (SQuAD), which contains over 100,000 question-answer pairs derived from Wikipedia. The dataset was split into training (~70k), validation (~10k), and testing (~11k) sets.
Results and Analysis
The proposed framework (QG+F+GAE) was compared against the state-of-the-art baseline established by Du et al. (2017).
Automated Metrics
The best-performing model achieved a BLEU-4 score of 13.85, a substantial improvement over the baseline score of 9.64. This indicates that the combination of explicit answer selection and linguistic features significantly enhances the quality of generated questions.
Human Evaluation
Professional English experts evaluated the questions based on three criteria:
- Syntactic Correctness: Improved from 51.6% to 63%.
- Semantic Correctness: Improved from 48% to 61%.
- Relevance: The fully automated version reached 71.3% relevance, validating the effectiveness of the two-stage approach.
Conclusion
This work demonstrates that "teaching" a model grammar through explicit linguistic features and anchoring questions to specific answer spans are powerful strategies for automated reading comprehension. While the current model is constrained to sentence-level context, future work will focus on paragraph-level encoding to capture broader context and further improve the naturalness of generated questions.
Summary updated