Skip to main content
QUICK REVIEW

[Paper Review] A Comparative Study of Transformer-Based Language Models on Extractive Question Answering

Kate Pearce, Tiffany Zhan|arXiv (Cornell University)|Oct 7, 2021
Topic ModelingComputer Science20 references22 citations
TL;DR

This study evaluates pre-trained transformer-based language models on extractive question answering across diverse datasets, comparing RoBERTa, BART, BERT, ALBERT, XLNet, and ConvBERT. It introduces a BERT-BiLSTM ensemble model that improves generalization, with RoBERTa and BART achieving the highest F1 scores, and the BERT-BiLSTM model outperforming BERT by at least 1% across all datasets.

ABSTRACT

Question Answering (QA) is a task in natural language processing that has seen considerable growth after the advent of transformers. There has been a surge in QA datasets that have been proposed to challenge natural language processing models to improve human and existing model performance. Many pre-trained language models have proven to be incredibly effective at the task of extractive question answering. However, generalizability remains as a challenge for the majority of these models. That is, some datasets require models to reason more than others. In this paper, we train various pre-trained language models and fine-tune them on multiple question answering datasets of varying levels of difficulty to determine which of the models are capable of generalizing the most comprehensively across different datasets. Further, we propose a new architecture, BERT-BiLSTM, and compare it with other language models to determine if adding more bidirectionality can improve model performance. Using the F1-score as our metric, we find that the RoBERTa and BART pre-trained models perform the best across all datasets and that our BERT-BiLSTM model outperforms the baseline BERT model.

Motivation & Objective

  • To evaluate the generalization performance of various pre-trained transformer models on extractive question answering across datasets of varying complexity.
  • To investigate whether adding bidirectional long short-term memory (BiLSTM) layers to BERT improves performance on extractive QA tasks.
  • To assess the impact of dataset difficulty—ranging from straightforward extractive answers (SQuAD) to complex, reasoning-intensive questions (QuAC, NewsQA, CovidQA)—on model generalization.
  • To determine the most effective model architecture for extractive QA by comparing F1 scores across multiple datasets and model variants.

Proposed method

  • Fine-tuned base versions of RoBERTa, BART, BERT, ALBERT, XLNet, and ConvBERT on four extractive QA datasets: SQuAD 2.0, QuAC, NewsQA, and CovidQA.
  • Constructed input sequences by concatenating context and question, tokenized with WordPiece and SentencePiece tokenizers, and truncated to a maximum length of 512 tokens.
  • Implemented a novel BERT-BiLSTM ensemble model by stacking a BiLSTM layer on top of the BERT base model’s contextual representations for improved sequence modeling.
  • Used the Adam optimizer with a fixed learning rate of 5e-5, batch size of 8, and trained for 3 epochs on an NVIDIA 2x Quadro RTX 8000 GPU.
  • Evaluated model performance using the F1-score, computed as the harmonic mean of precision and recall for predicted start and end token spans.
  • Standardized all inputs to lowercase and used uniform tokenization to ensure consistency across datasets and models.

Experimental results

Research questions

  • RQ1Which pre-trained transformer-based language model generalizes most effectively across extractive question answering datasets of varying difficulty?
  • RQ2How does the addition of a BiLSTM layer to the BERT architecture affect performance on extractive QA tasks?
  • RQ3To what extent do RoBERTa and BART outperform other models on diverse QA benchmarks, including those requiring reasoning?
  • RQ4Why do models perform poorly on long-context datasets like CovidQA, and how does context length affect model performance?

Key findings

  • RoBERTa and BART achieved the highest F1 scores across all four datasets, indicating superior generalization and robustness on extractive QA.
  • The BERT-BiLSTM model outperformed the base BERT model by at least 1% in F1-score on every dataset, demonstrating that additional bidirectional modeling improves performance.
  • Models performed best on SQuAD 2.0 due to its straightforward, extractive answers and shorter context lengths, while performance dropped significantly on QuAC due to its open-ended, reasoning-intensive questions.
  • Performance on NewsQA was strong, second only to SQuAD, showing that RoBERTa and BART can handle complex reasoning tasks effectively.
  • The CovidQA dataset, with longer contexts and limited training data, led to poor model performance, especially for models with fixed maximum sequence lengths of 512 tokens.
  • The absence of the next sentence prediction task in RoBERTa contributed to its strong performance, as it better aligns with the masked language modeling objective relevant to span prediction in QA.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.