Prototype-Guided Pseudo Labeling for Semi-Supervised Text Classification

Weiyi Yang, Richong Zhang, Junfan Chen, Lihong Wang, Jaein Kim

Introduction

Semi-supervised text classification (SSTC) aims to leverage large amounts of unlabeled text alongside a small set of labeled data. A common technique is pseudo-labeling, where a model generates labels for unlabeled data to expand its training set. However, traditional pseudo-labeling often suffers from two critical issues: fuzzy decision boundaries and majority-class bias.

The Challenge: Blurry Boundaries and Class Bias

In low-data regimes, models often fail to learn distinct boundaries between classes. This leads to "fuzzy" decision regions where the model might assign high-confidence but incorrect pseudo-labels to samples near the boundary. Furthermore, if the unlabeled data is imbalanced, the model tends to favor majority classes, creating a feedback loop that marginalizes minority classes.

Comparison of standard pseudo-labeling (a) vs. PGPL (b). PGPL uses prototypes to anchor clusters and sharpen decision boundaries.

The PGPL Framework

To address these limitations, researchers introduced Prototype-Guided Pseudo Labeling (PGPL). This framework enhances a standard BERT-based classifier with two key components: Prototype-Anchored Contrasting (PAC) and Prototype-Guided Pseudo-Labeling (PGP).

The complete PGPL architecture, illustrating the flow from data encoding to prototype extraction and the calculation of contrastive and pseudo-labeling losses.

Prototype-Anchored Contrasting (PAC)

PAC utilizes class "prototypes"—defined as the mean vector of labeled instances for each class in the embedding space. By applying a contrastive loss, the model is incentivized to "pull" instances toward their respective prototypes and "push" them away from others. This process encourages the formation of high-density clusters and significantly sharpens decision boundaries, adhering to the low-density separation hypothesis.

Prototype-Guided Pseudo-Labeling (PGP)

The PGP module mitigates class imbalance by dynamically adjusting the pseudo-label selection process. Instead of a static confidence threshold, PGP monitors the training history of each class. If a class is under-represented, the model lowers the selection threshold for instances near that class's prototype. This ensures a more balanced representation of all classes during the iterative training process.

Experimental Results

The PGPL model was evaluated on four major benchmarks: AG News, DBpedia, Yahoo! Answers, and IMDB. The experiments focused on extreme low-resource settings, such as having only 10 labeled examples per class.

  • State-of-the-Art Performance: PGPL consistently outperformed strong baselines like UDA and MixText. On the IMDB dataset with 10 labels per class, PGPL achieved an accuracy of 88.9%, a 14.7% improvement over MixText.
  • Robustness in Low-Data Scenarios: On AG News and Yahoo! Answers, the model showed gains of 6.8% and 7.3%, respectively, in the 10-label setting.
  • Clustering Stability: Qualitative t-SNE visualizations confirmed that the PAC module successfully creates more distinct and well-separated clusters compared to standard self-training methods.

Conclusion and Future Directions

PGPL offers a robust solution for semi-supervised text classification by using prototypes as stable anchors for learning. While the model shows significant gains, future work may address its sensitivity to hyperparameters, such as the number of nearest neighbors ($k_c$), and explore more automated ways to filter reliable pseudo-labels. Despite these challenges, PGPL sets a new standard for efficiency and accuracy in low-resource text classification.

Summary updated

BibTeX
@inproceedings{yang2023prototype,
  author = {Weiyi Yang and Richong Zhang and Junfan Chen and Lihong Wang and Jaein Kim},
  title = {{Prototype-Guided Pseudo Labeling for Semi-Supervised Text Classification}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.904},
}
Figure