Task-adaptive Pre-training and Self-training are Complementary for Natural Language Understanding

Shiyang Li, Semih Yavuz, Wenhu Chen, Xifeng Yan

Abstract

While large-scale pre-trained language models have significantly advanced natural language understanding (NLU), their performance often degrades in low-resource settings where labeled data is scarce. This paper explores the synergy between two prominent semi-supervised learning techniques: Task-adaptive Pre-training (TAPT) and Self-training (ST). We introduce the TFS protocol (TAPT $\rightarrow$ Finetuning $\rightarrow$ Self-training), which utilizes unlabeled data in a sequential manner to achieve additive performance gains. Our evaluation across six diverse NLU benchmarks demonstrates that TFS consistently outperforms individual methods, providing a robust solution for data-constrained scenarios.

Introduction

Modern NLP relies heavily on the "pre-train then finetune" paradigm. However, the finetuning stage remains data-hungry, posing challenges for specialized domains like medical analysis or dialogue systems where labeled data is expensive or restricted. To mitigate this, researchers leverage unlabeled data through two primary avenues:

  1. Task-adaptive Pre-training (TAPT): Continuing masked language modeling (MLM) on task-specific unlabeled text to adapt the model's internal representations to the target domain.
  2. Self-training (ST): An iterative process where a teacher model generates pseudo-labels for unlabeled data, which are then used to train a student model.

Prior to this work, it was unclear whether these methods were redundant or if they could be combined for superior performance. This research establishes that TAPT and ST are complementary, targeting different aspects of the learning process.

The TFS Protocol

The authors propose the TFS (TAPT $\rightarrow$ Finetuning $\rightarrow$ Self-training) protocol, which strategically sequences these techniques to maximize the utility of the same unlabeled corpus.

Overview of the TFS protocol combining TAPT and iterative self-training.

The protocol consists of three main stages:

  1. Stage 1: TAPT (Task-Agnostic Adaptation): A vanilla pre-trained model (e.g., BERT) undergoes further MLM training on the unlabeled task data. This step helps the model acquire domain-specific linguistic patterns and vocabulary.
  2. Stage 2: Finetuning: The TAPT-enhanced model is finetuned on the limited labeled dataset to create a high-quality "Teacher" model.
  3. Stage 3: Self-training (Task-Specific Mapping): The Teacher generates pseudo-labels for the unlabeled corpus. A "Student" model is then trained on the combined set of original labeled data and pseudo-labeled data. This process can be iterated, with the student becoming the teacher for the next round.

The core innovation lies in the sequential dependency: TAPT provides a superior initialization for the teacher, which subsequently produces more accurate pseudo-labels, reducing error propagation in the self-training phase.

Experimental Setup

The TFS protocol was evaluated on six diverse NLU benchmarks to ensure generalizability:

  • Sentiment Analysis: SST-2
  • Natural Language Inference: QNLI and MNLI
  • Paraphrase Identification: QQP
  • Named Entity Recognition (NER): CoNLL 2003
  • Dialogue Slot Classification: MultiWOZ 2.1

To simulate real-world data scarcity, experiments primarily focused on scenarios with as little as 1% labeled data, using the remaining 99% as the unlabeled pool.

Results and Analysis

The experimental results confirm that the gains from TAPT and ST are remarkably additive. Across all datasets and architectures (BERT-base and BERT-large), the TFS protocol consistently outperformed standard finetuning (FT), TAPT-only, and ST-only baselines.

Performance comparison of various methods across six NLU benchmarks.

Key findings include:

  • Significant Performance Boosts: On the QNLI dataset with BERT-base, TFS improved accuracy by 4.0% over standard finetuning. In comparison, TAPT alone added 2.9% and ST alone added 1.1%.
  • Success in Structured Tasks: For NER (CoNLL 2003) using BERT-large, TFS achieved a substantial 5.9% F1 score improvement over the baseline.
  • Complementary Nature: The authors argue that TAPT assists in understanding domain-specific language (task-agnostic), while ST assists in learning the mapping to specific labels (task-specific). This distinction explains why their benefits do not overlap but rather stack.

Discussion and Conclusion

The TFS protocol establishes a new strong baseline for semi-supervised NLU. By creating a "Better Teacher" through TAPT initialization, the subsequent self-training phase becomes more effective, leading to higher-quality pseudo-labels and better student performance.

While highly effective, the protocol does involve increased computational costs due to the iterative nature of self-training and the additional pre-training step. Future work could explore combining TFS with advanced data augmentation or consistency regularization to further enhance performance in low-resource settings. In conclusion, TAPT and ST are powerful, complementary tools that, when combined via the TFS protocol, significantly push the boundaries of what is possible with minimal labeled data.

Summary updated

BibTeX
@inproceedings{li2021task,
  author = {Shiyang Li and Semih Yavuz and Wenhu Chen and Xifeng Yan},
  title = {{Task-adaptive Pre-training and Self-training are Complementary for Natural Language Understanding}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  url = {https://openreview.net/forum?id=k5IhBUP5mF},
}
Figure