Enhancing Pre-trained Models with Text Structure Knowledge for Question Generation

Zichen Wu, Xin Jia, Fanyi Qu, Yunfang Wu

TL;DR

This paper enhances pre-trained language models for question generation (QG) by explicitly incorporating text structure, specifically answer position and syntactic dependencies. They introduce "answer localness modeling" and "syntactic mask attention" to guide models towards better question generation, achieving competitive results on the SQuAD dataset.

What Problem Does This Paper Address?

Question generation (QG) is a valuable task with applications ranging from creating educational assessments to improving chatbot interactions. While pre-trained language models (PLMs) have significantly advanced QG, they often treat input passages as flat sequences, ignoring crucial structural information like the position of the answer and the grammatical relationships between words. This lack of structural awareness can limit the quality and relevance of the generated questions, especially for answer-aware QG tasks where the generated question should be directly answerable by a specific span in the passage. Existing methods that do incorporate structure often rely on standard neural networks rather than leveraging the power of modern PLMs.

Methods

The authors build upon the ProphetNet pre-trained model and introduce two novel modules to integrate text structure:

  • Answer Localness Modeling: This module aims to make the model focus more on the context surrounding the answer. It achieves this by introducing a "Gaussian bias" into the attention mechanism. This bias is a learned distribution centered around the answer's position, effectively giving higher attention weights to tokens closer to the answer. The window size of this focus is dynamically adjusted based on the token's position, allowing for flexible attention.
  • Syntactic Mask Attention: This module explicitly incorporates syntactic dependency information. First, it extracts key dependency relations (e.g., subject-verb, verb-object) from sentences containing the answer. Then, it constructs a "syntactic mask" that selectively blinds tokens outside of these identified dependency triples. This forces the model to attend to syntactically related tokens, effectively creating a "syntactic context vector." This vector is then combined with the original context vector to form a "syntactic-aware representation."

These modules are designed to be easily integrated into the self-attention mechanism of existing Transformer-based PLMs with minimal increase in parameter count.

Datasets

The primary dataset used for training and evaluation is SQuAD (Stanford Question Answering Dataset). The authors use two splits of SQuAD:

  • Du split (Du et al., 2017): A standard split of SQuAD 1.1.
  • Zhao split (Zhao et al., 2018): A reversed dev-test setup.

Key Insights and Ideas

  • Structure Matters for QG: The core insight is that explicitly modeling text structure (answer position and syntax) significantly improves the quality of generated questions, even when using powerful pre-trained models.
  • Localness and Syntax are Complementary: The "answer localness modeling" and "syntactic mask attention" address different aspects of text structure and, when combined, provide a synergistic improvement over using either module alone.
  • Minimal Overhead for Significant Gains: The proposed modules are designed as modifications to the self-attention mechanism, requiring minimal additional parameters and computation, making them highly practical for integration with existing PLMs.
  • Syntactic Relations are Key: The ablation study highlights that not all dependency relations are equally beneficial. Focusing on "core arguments" (a subset of relations) yields the best results, suggesting that a targeted approach to syntactic information is more effective than incorporating all available relations.

Key Results

  • The proposed methods, when applied to the ProphetNet baseline, achieve competitive state-of-the-art results on the SQuAD dataset.
  • Specifically, the combined "Syntactic Mask + Localness" model shows improvements over the baseline ProphetNet, achieving a 0.56 BLEU-4 increase on the Du split and 0.59 on the Zhao split.
  • The model achieves state-of-the-art results on the Zhao split and is very close to the best performance on the Du split.
  • Human evaluation indicates that the model produces questions that are more relevant and answerable compared to the baseline.
  • Qualitative examples show that the model can generate more accurate and direct questions by better capturing sentence structure and relationships.

Limitations and Future Work

  • Syntactic Parsing Cost: The paper notes that extracting syntactic relations can be time-consuming, leading them to parse only key sentences rather than the entire passage. They suggest future work could explore more efficient parsing strategies.
  • Future Work: The authors plan to:
  • Validate and expand their method to other NLP tasks like summarization, dialog generation, and machine reading comprehension.
  • Explore more sophisticated methods for capturing syntactic structure.

Summary updated

BibTeX
@inproceedings{wu2022enhancing,
  author = {Zichen Wu and Xin Jia and Fanyi Qu and Yunfang Wu},
  title = {{Enhancing Pre-trained Models with Text Structure Knowledge for Question Generation}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2022},
}
Figure