Rethinking Semi-supervised Learning with Language Models

Zhengxiang Shi, Francesco Tonolini, Nikolaos Aletras, Emine Yilmaz, Gabriella Kazai, Yunlong Jiao

Introduction

In Natural Language Processing (NLP), researchers are often faced with an abundance of unlabelled text but a severe shortage of high-quality labelled data. To bridge this gap, Semi-supervised Learning (SSL) has traditionally relied on complex "Self-training" (ST) pipelines involving teacher models and pseudo-labels. However, recent research published at ACL 2023 suggests that we might be overcomplicating things. This paper demonstrates that Task-Adaptive Pre-training (TAPT)—simply continuing unsupervised pre-training on task-specific data—is often a stronger and more robust semi-supervised learner than sophisticated, state-of-the-art ST methods.

The Two Paradigms of SSL

The core challenge in SSL is effectively utilizing a small set of labelled examples alongside a much larger pool of unlabelled data. Currently, two paradigms dominate:

  1. Self-training (ST): A "teacher" model predicts labels for unlabelled data, and a "student" model is trained on these "pseudo-labels." Modern frameworks like FixMatch and AdaMatch use advanced techniques like consistency regularization and dynamic confidence thresholds.
  2. Task-adaptive pre-training (TAPT): A pre-trained model (such as RoBERTa) continues its original training objective (e.g., Masked Language Modeling) on the task-specific unlabelled data before being fine-tuned on the available labels.

While TAPT is a known technique for supervised settings, its effectiveness as a standalone SSL strategy compared to modern ST algorithms had not been systematically explored until this study.

Comparative Performance Across Benchmarks

The authors conducted an extensive head-to-head evaluation across five diverse NLP benchmarks: IMDB, SST-2, Amazon Review, AG News, and Yahoo! Answers.

Performance of TAPT vs. ST methods across five NLP benchmarks. TAPT (red) consistently matches or outperforms sophisticated ST methods like AdaMatch and FlexMatch.

As shown in the figure above, TAPT frequently outperformed all five sophisticated ST methods. It was particularly dominant on the Amazon Review and Yahoo! Answers datasets. For instance, on Yahoo! Answers with 500 labels, TAPT achieved a Macro-F1 of 68.8%, beating the best ST method (68.0%) and the supervised baseline (65.4%).

Why TAPT Often Wins

The study identifies several key advantages that make TAPT a superior choice for many SSL scenarios.

Resilience to Confirmation Bias

Self-training methods are inherently fragile due to confirmation bias. If the teacher model makes a mistake and assigns an incorrect pseudo-label, the student model learns and reinforces that error, leading to a cycle of reinforced mistakes. This is especially problematic when the initial labelled set is very small. TAPT avoids this by using an unsupervised objective that does not rely on potentially noisy model predictions.

Efficiency and the "Small Data" Surprise

Conventional wisdom suggests that pre-training requires massive datasets. However, the researchers found that TAPT provides significant gains even with as few as 100 unlabelled samples. Furthermore, TAPT brings greater relative improvements in low-resource SSL settings than it does in fully supervised settings.

Macro-F1 improvement from TAPT relative to the ratio of labelled to unlabelled data. The benefit of TAPT is most pronounced when unlabelled data is abundant relative to labelled data.

Robustness Under Domain Shift

Perhaps the most significant finding is TAPT's resilience to domain shift. When labelled data comes from one domain (e.g., IMDB) and unlabelled data from another (e.g., SST-2), ST methods often collapse, sometimes performing no better than random guessing. In a domain shift experiment (IMDB $\rightarrow$ SST-2), ST methods dropped to ~33% F1, while TAPT maintained a robust ~89% F1. TAPT remains incredibly stable and can even benefit from the diversity of out-of-domain unlabelled data.

Conclusion

The findings offer a fresh perspective on SSL for text classification: before reaching for complex self-training architectures, practitioners should try the "simple" path of task-adaptive pre-training. TAPT is often more effective, easier to implement, and significantly more robust to the challenges of real-world data. Future work may explore whether these advantages extend to sequence labeling or generative tasks, and investigate unsupervised objectives beyond Masked Language Modeling.

Summary updated

BibTeX
@inproceedings{shi2023rethinking,
  author = {Zhengxiang Shi and Francesco Tonolini and Nikolaos Aletras and Emine Yilmaz and Gabriella Kazai and Yunlong Jiao},
  title = {{Rethinking Semi-supervised Learning with Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.347},
}
Figure