Task Transfer and Domain Adaptation for Zero-Shot Question Answering

Xiang Pan, Alex Sheng, David Shimshoni, Aditya Singhal, Sara Rosenthal, Avirup Sil

TL;DR

This paper introduces Task and Domain Adaptive Pretraining (T+DAPT), a novel method for zero-shot question answering (QA) in new domains. By combining domain adaptation with a related auxiliary task (Named Entity Recognition - NER), T+DAPT significantly improves performance compared to standard domain adaptation techniques, especially when labeled data for the target QA task is scarce.

What Problem Does This Paper Address?

Pretrained language models (PLMs) like BERT and RoBERTa have revolutionized NLP, but they often require substantial labeled data for downstream tasks. When applying these models to new domains (e.g., biomedical texts, legal documents) where labeled data is scarce or non-existent, performance can suffer. Traditional transfer learning struggles here because fine-tuning on a target task with no labeled data is impossible. This paper tackles the challenge of achieving good performance on domain-specific question answering tasks without any labeled data from that specific task and domain. The authors assume access to generic QA data (like SQuAD) and in-domain data for a different task (like NER). The goal is to leverage this readily available, albeit mismatched, data to adapt a PLM for the unseen domain-specific QA task.

Methods

The core contribution is the Task and Domain Adaptive Pretraining (T+DAPT) approach. It's a sequential training strategy designed to bridge the gap between a source domain's auxiliary task and a target domain's QA task. Here's how it works:

  1. Initialization: Start with a pretrained PLM (e.g., RoBERTa-Base).
  2. Domain Adaptation (Optional but beneficial): The paper discusses Domain-Adaptive Pretraining (DAPT) as a baseline, which involves unsupervised pretraining on in-domain text. This helps the model learn domain-specific vocabulary and patterns.
  3. Task Adaptation: Fine-tune the model on an auxiliary task within the source domain. The paper specifically uses Named Entity Recognition (NER) for this. NER is chosen because it shares functional similarities with QA (both involve identifying key tokens) and labeled NER data is often more readily available than labeled QA data.
  4. Generic Task Fine-tuning: After adapting to the auxiliary task, the model is fine-tuned on a generic, domain-agnostic QA dataset (like SQuAD). This step teaches the model the general mechanics of question answering.
  5. Zero-Shot Evaluation: The final model is evaluated on the domain-specific QA task without any further fine-tuning on that specific target data.

This T+DAPT method combines the benefits of domain adaptation (learning domain specifics) and task adaptation (learning the target task's format and objective) to achieve zero-shot performance.

Datasets

The paper evaluates T+DAPT on four domain-specific Machine Reading Comprehension (MRC) datasets:

  • MoviesQA: For the Movies domain.
  • NewsQA: For the News domain.
  • BioQA: For the Biomedical domain.
  • CovidQA: For the COVID-19 domain.

These datasets are described as having the same format as SQuAD. For the auxiliary task (NER), they use domain-specific NER datasets. For unsupervised domain adaptation (DAPT), they utilize text corpora from sources like IMDB, RealNews Corpus, Semantic Scholar Open Research Corpus, and the Covid-19 Corpus. The generic QA dataset used for fine-tuning is SQuADv1.

Key Insights and Ideas

  • NER as a powerful auxiliary task for QA: The paper strongly suggests that NER is a more effective auxiliary task for domain-specific QA adaptation than unsupervised language modeling (used in DAPT). This is because NER directly involves identifying and classifying key tokens, which are often the answers in QA tasks, leading to more transferable representations.
  • Domain adaptation is sensitive to corpus similarity: The performance gains from DAPT were less apparent in the News domain, potentially because the News domain's vocabulary had high overlap with the original RoBERTa pretraining corpus. This suggests that DAPT is most effective when there's a significant divergence between the pretraining corpus and the target domain.
  • Zero-shot QA is achievable with clever adaptation: T+DAPT demonstrates that it's possible to achieve respectable zero-shot performance on unseen domain-specific QA tasks by strategically combining domain adaptation with a related auxiliary task and generic task fine-tuning.
  • Catastrophic forgetting is a challenge: The paper acknowledges that unsupervised language modeling for DAPT might lead to catastrophic forgetting of general language understanding, which can be detrimental for downstream tasks like QA.

Key Results

The T+DAPT approach, using NER as the auxiliary task, showed strong performance across the evaluated domains:

  • Outperformed baselines in 3 out of 4 domains: T+DAPT achieved better F1 scores than the baseline RoBERTa model (fine-tuned only on SQuAD) in Movies, Biomedical, and COVID domains.
  • Outperformed DAPT in 3 out of 4 domains: T+DAPT also outperformed Domain-Adaptive Pretraining (DAPT) in Movies, News, and Biomedical domains.
  • Specific domain performance: For example, in the MoviesQA domain, T+DAPT achieved an F1 score of 68.0, compared to 60.7 for DAPT and 67.1 for the SQuAD-only baseline. In CovidQA, T+DAPT achieved 42.7, while DAPT achieved 47.2 (outperforming T+DAPT in this specific case, but still competitive).
  • Auxiliary task comparison: Experiments in the COVID domain showed that using Question Classification (QCLS) as an auxiliary task yielded better results than NER, suggesting that task similarity is crucial.

Limitations and Future Work

  • Limitations:
    • The paper notes that performance gains were less apparent in the News domain, possibly due to high overlap with the original pretraining corpus.
  • The authors acknowledge the risk of propagating misinformation if these systems are relied upon without expert consultation, especially in sensitive domains like medicine.
  • A combined approach of DAPT followed by T+DAPT underperformed compared to T+DAPT or DAPT alone in all four domains, suggesting that the order and combination of pretraining steps matter.
  • Future Work:
    • Explore methods to mitigate catastrophic forgetting and maximize knowledge transfer.
  • Investigate regularization techniques similar to those used in other works.
  • Implement multi-task learning and continual learning methods (e.g., AdapterNet).
  • Explore additional auxiliary tasks like Natural Language Inference (NLI) and sentiment analysis for improved feature transferability.
  • Investigate few-shot learning approaches.

Summary updated

BibTeX
@inproceedings{pan2022task,
  author = {Xiang Pan and Alex Sheng and David Shimshoni and Aditya Singhal and Sara Rosenthal and Avirup Sil},
  title = {{Task Transfer and Domain Adaptation for Zero-Shot Question Answering}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
}
Figure