A Comparative Study of Pre-training and Self-training
Yiheng Wang Jiayu Lin Zuoquan Lin

High resolution observations of ^12CO and ^13CO J = 3 → 2 toward the NGC 6334 extended filament
    S. Neupane 1
   F. Wyrowski 1 
   K. M. Menten1
   J. Urquhart2
   D. Colombo1,3
   L.-H. Lin1
   G. Garay4
   
    Received 2024; accepted 2024
===================================================================================================================




§ ABSTRACT 
Pre-training and self-training are two approaches to semi-supervised learning. The comparison between pre-training and self-training has been explored. However, the previous works led to confusing findings: self-training outperforms pre-training experienced on some tasks in computer vision, and contrarily, pre-training outperforms self-training experienced on some tasks in natural language processing, under certain conditions of incomparable settings. We propose, comparatively and exhaustively, an ensemble method to empirical study all feasible training paradigms combining pre-training, self-training, and fine-tuning within consistent foundational settings comparable to data augmentation. We conduct experiments on six datasets, four data augmentation, and imbalanced data for sentiment analysis and natural language inference tasks. Our findings confirm that the pre-training and fine-tuning paradigm yields the best overall performances. Moreover, self-training offers no additional benefits when combined with semi-supervised pre-training. 
[Our codes are available at https://github.com/PKUAI-LINGroup/PAS.]







§ INTRODUCTION


Semi-supervised learning (SSL) involves the utilization of both labeled and unlabeled data, typically relies on a constrained amount of labeled data, and improves learning performance through the incorporation of a larger set of unlabeled data (for surveys, see <cit.>). Pre-training and self-training are two approaches in SSL (for surveys, see <cit.>). While pre-training and self-training share similarities that leverage unlabeled data, their methodologies and applications also have distinct differences. 

In pre-training, a model is initially trained on a large amount of unlabeled data in a self-supervised way. This pre-trained model is then fine-tuned on smaller labeled data in a supervised way for the specific tasks. Fine-tuning is the supervised component of semi-supervised pre-training. The pre-training and fine-tuning paradigm involves training with unlabeled data and then labeled data, which can continue multiple times. Unsupervised pre-training or self-supervised pre-training refers to the pre-training conducted without subsequent fine-tuning. The pre-training and fine-tuning paradigm yields superior results for specific tasks than unsupervised pre-training. Continual pre-training refers to the pre-training and fine-tuning paradigm conducted as an additional step to continue pre-training on task-specific unlabeled data before fully supervised fine-tuning <cit.>. 

In self-training, on the other hand, the teacher model is initially trained on a small set of labeled data. The model then makes predictions on the unlabeled data, and the data points with high-confidence predictions are pseudo-labeled and added to the labeled data, resulting in the student model. The model is trained on this expanded labeled and pseudo-labeled data, and the process is iterated. The teacher and student paradigm involves training first with labeled data and then acquiring high-confidence pseudo-labels from additional unlabeled data. Self-training incorporates a form of label propagation through pseudo-labeling from unlabeled data, effectively extending the labeled data. Pre-training does not involve label propagation, instead, it centers on representation learning through patterns and structures inherent in unlabeled data. 

Due to the prominence of pre-trained large language models (LLMs), pre-training remains the best practice under scaling laws (for a survey, see <cit.>). While self-trained large models have yet to emerge, self-training and its interplay with pre-training have garnered increasing research interest. 

The comparison between pre-training and self-training has been explored. 
In <cit.> experienced in computer vision (CV), the finding was that self-training is stronger than pre-training in the following sense: Self-training performed effectively in the same setup where pre-training failed. In <cit.> experienced in natural language processing (NLP), the finding was that pre-training is stronger than self-training in the following sense: Continual pre-training performed better than various self-training methods. These findings led to confusion. The comparison between pre-training and self-training about these findings is somewhat unfair and lacks clarity, especially given the different settings and extra techniques involved (for detail see the <ref>). 

In this paper, we revisit the relationship between pre-training and self-training, while also rethinking the limitations that may prevent one from improving the performance of the other. To our knowledge, we are the first to propose an ensemble method to comparatively and exhaustively investigate all feasible training paradigms combining pre-training, self-training, and fine-tuning. In particular, we employ language models, or so-called foundation models (for a survey, see <cit.>)), as consistent foundational settings across all paradigms of ensemble training for downstream tasks. We employ data augmentation techniques to enhance the effectiveness of self-training. We undertake an empirical study to assess the effectiveness of the ensemble paradigms, specifically targeting six datasets, four data augmentation, and imbalanced data for sentiment analysis and natural language inference tasks in NLP. Our contributions are the findings summarized as follows: 

    
  (1) We find that semi-supervised pre-training consistently outperforms self-training and all the other training paradigms, exhibiting robust performance across varying intensities of data augmentation. 
    
  (2) We find that the combination of pre-training, fine-tuning, and self-training yields no benefit over the pre-training and fine-tuning paradigm. In other words, self-training offers no additional benefits when combined with semi-supervised pre-training.
    
  (3) We find a modest decline in pre-training performance in scenarios characterized by data imbalance; conversely, other training paradigms experienced a significant reduction in efficacy.





§ RELATED WORKS



The relationship between pre-training and self-training has been examined from two perspectives: first, to evaluate the relative strengths of pre-training versus self-training; and second, to investigate how combining these two methods can mutually enhance their overall effectiveness.

Pre-training vs. self-training. 
As the first comparative study to challenge the prevailing paradigm of pre-training with self-training <cit.>, this research posited that self-training is stronger than pre-training experienced in CV. Specifically, the self-training demonstrated superior performance compared to the pre-training, particularly under conditions of enhanced data augmentation and increased availability of labeled data for image recognition tasks. Notably, these experiments employed unsupervised pre-training without subsequent fine-tuning. This result contrasts with the strong baseline established by pre-trained language models. It is widely acknowledged that smaller models utilized in these experiments lack the capacity for zero-shot or few-shot learning, a capability present in LLMs <cit.>. The substantial data and strong augmentation leveraged in the self-training are not adequately mirrored in unsupervised pre-training; thus, this comparative discrepancy renders the performance comparisons between pre-training and self-training somewhat inequitable. 

In <cit.>, the authors argued that pre-training is stronger than self-training experienced in NLP. Specifically, continual pre-training with or without prompt templates showed superior performance to several self-training methods for natural language understanding tasks. Compared to continual pre-training in a task-specific way, the self-training methods employed back-translation as data augmentation <cit.>. However, a comparison still needs to be made between unsupervised pre-training used in a task-agnostic manner and self-training.

Pre-training & self-training. 
Two complementary can be identified in combining pre-training and self-training. One involves utilizing pre-training to enhance self-training <cit.>. The effectiveness of self-training is heavily dependent on the quality of the pseudo labels, underscoring the importance of a high-performing initial teacher model. In this context, the teacher model of self-training is typically initialized using pre-trained language models <cit.>, such as BERT or RoBERTa, as demonstrated in <cit.>. This paradigm enhances model calibration and has gained traction for effectively combining self-training with pre-training, showcasing a strongly additive relationship between the two methods.

The other entails employing self-training to improve pre-training <cit.>. Self-training improved upon pre-training, demonstrating a strong additive effect <cit.>. Self-training with strong data augmentation offered complementary advantages to unsupervised and continual pre-trained language models <cit.>. Notably, most of these experiments did not conduct a comparison with the pre-training and fine-tuning paradigm. The complementary relationship between self-training and pre-training was further explored in <cit.>. In <cit.>, self-training was utilized in a task-specific manner as a form of unsupervised fine-tuning, aimed at improving the performance of zero-shot learning in pre-trained models. Almost all of these self-training methods rely on strong data augmentation. Therefore, it is necessary to consider the effect of data augmentation when comparing pre-training and self-training.

Historically, self-training was first applied in NLP <cit.> (originally back <cit.>). In this work, we contend that a meaningful comparison between pre-training and self-training is achievable only when utilizing consistent foundational settings, particularly language models. This is especially relevant as both NLP and CV serve as downstream tasks that can be analogized to data augmentation. It is important to exclude additional training and techniques specifically developed in prior studies to prevent incomparable settings and potentially conflicting conclusions. We aim to establish a fair comparison between pre-training and self-training within the context of language models. Embracing the pre-training and fine-tuning paradigm is crucial, as it closely mirrors the teacher-student paradigm employed in self-training. Unlike previous studies, we confirm that the pre-training and fine-tuning paradigm achieves the best overall performance, with no additional benefits from combining it with self-training.




§ METHOD



We revisit the comparison and complementarity between pre-training and self-training, while also rethinking the limitations that may prevent one from improving the performance of the other. To this end, comparatively and exhaustively, we propose an ensemble method to study all feasible training paradigms combining pre-training and self-training within consistent foundational settings. 

Ensemble principles. 
When considering (unsupervised) pre-training and fine-tuning as separate processes, we identify three training components: pre-training, fine-tuning, and self-training. When combining pre-training and self-training, it is crucial to determine whether fine-tuning is included in the training protocol. It's important to recognize that not all combinations of these three components are feasible or effective for training. When designing the ensemble for these three training components, we consider the following principles: 


    
  * A training component cannot occur consecutively, as adjacent identical training components are considered the same.
    
  * Pre-training can only serve as the initial component of an ensemble. If the pre-trained model is initialized during training any prior training becomes irrelevant.
    
  * Self-training requires the unlabeled data in iterations and can only be performed once unless additional unlabeled data becomes available.


Paradigms and notations.
According to the ensemble principles, we list all feasible paradigms of ensemble training. For convenience, we use the abbreviation notations for various paradigms described in <ref>. 



We leave F along, i.e. supervised training, and P, i.e. unsupervised pre-training, as baselines that are not SSL.  
Most of the previous works <cit.> belong to PFS (see the <ref>).  In <cit.>, the student model was also initialized with the pre-trained model, which can be viewed as a variant of PFS (an analysis see <ref> in the <ref>). In <cit.>, an unsupervised classifier included self-training is similar to PS. 

SF, PSF, and PFSF have not been explored in prior research. We examine these paradigms for some considerations. One major challenge in self-training is semantic drift, where accumulating incorrect pseudo labels can misguide the training process over time. A potential solution to this problem is to fine-tune the final student model using labeled data. The complex PFSF is depicted in <ref> (for self-training strategy refer to the explanation below). To some extent, other paradigms can be regarded as special parts of PFSF. As we shall see later, the limitation of PFSF is that increasing training costs does not necessarily bring efficiency. 



Self-training. 
We use a competitive version of pseudo-labeling by using a self-paced curriculum strategy in the context of self-training <cit.>. Pseudo-labeling is trained incrementally by iteratively propagating labels from labeled data to unlabeled data using the model, re-labeling high-confidence predictions, and retraining with labeled and pseudo-labeled data. Instead of adding all pseudo-labeled data in each iteration in original pseudo-labeling <cit.>, self-pace pseudo-labeling carefully selects a subset of the most confident data to help guide the model towards harder samples in a controlled manner, improving performance. The algorithm is briefly described as follows:


    
  (1)  Train: The teacher model is first trained on the labeled data.
    
  (2) Predict: Pseudo-labels are assigned to the unlabeled data using the current model.
    
  (3) Select: A subset of pseudo-labeled data is selected based on their prediction scores and percentile thresholds.
    
  (4)  Re-train: The student model is trained from scratch using both labeled and selected pseudo-labeled data.
    
  (5) Repeat: Steps (2-4) are repeated until all data in the dataset have been used during training.


To alleviate concept drift and confirmation bias, the model parameters are reinitialized before each iteration. This ensures that previous erroneous predictions do not accumulate over time (for detail, refer to <cit.>).

Language models. 
We employ language models as consistent foundational settings across all paradigms of ensemble training for various downstream tasks. Specifically, we utilize the transformer-based BERT model as our initial backbone <cit.>. 

We value BERT's encoding representation capability, as we do not primarily consider the generation capability of language models. Moreover, we choose the basic BERT model by two key considerations: first, we aim to avoid using stronger pre-trained language models to maintain a level playing field for self-training; second, we know that utilizing pre-trained language models as the initial teacher model enhances the self-training process. The effectiveness of self-training is heavily dependent on the calibration of the teacher model, as inaccurate pseudo-labels generated by the initial teacher can misguide the training of the student model.

Data augmentation.
Data augmentation (DA) artificially increases the size of a training dataset by generating modified versions of existing data points, addressing the challenge of limited labeled data like SSL. Previous research has shown that experiments favoring self-training over pre-training often employed data augmentation to enhance the effectiveness of self-training. Consequently, we investigate the impact of four data augmentation strategies of varying intensities on different paradigms of ensemble training, including natural noise, conditional BERT, and back-translation.

Natural noise is a data augmentation technique in NLP that simulates common human errors, introducing character-level and word-level mistakes to enhance comprehension  <cit.>. Conditional BERT addresses data-label mismatch via masked language modeling, allowing it to generate sentences aligned with specific labels during fine-tuning <cit.>. Additionally, back-translation involves translating text to a target language and back to the source to create augmented data that retains the original meaning while varying its form <cit.>, facilitated by tools like Fairseq <cit.>.




§ EXPERIMENTS





 §.§ Datasets


We conduct experiments on two tasks in NLP: sentiment analysis (SA) and natural language inference (NLI). NA identifies the emotions and feelings expressed in text and is a text classification problem with two or more classes. We use four datasets: IMDB <cit.>, SST <cit.>, AG News <cit.> and Elec <cit.>. NLI judges whether the premise and the hypothesis match, and the result can be True, False, and Undetermined. We use two datasets: SNLI <cit.> and MultiNLI <cit.>. The statistics of the datasets are shown in <ref>.





 §.§ Implementations


We employ BERT to map input text into a feature space. We attach a linear layer as a classifier atop the BERT model for classification tasks. We utilize BERT in two configurations: BERT-medium, which comprises 8 layers with a hidden size of 512, 8 attention heads, and an intermediate size of 2048 <cit.>, and BERT-base, which comprises 12 layers with a hidden size of 768, 12 attention heads, and an intermediate size of 3072 <cit.>.

For the select step in self-training (refer to the <ref>), we retrieve the top R% (the multiples of 10 or 20) confident data with R improving as the number of iterations increases from all unlabeled data. As usual, we set the learning rate as 1e-5 and batch size as 64 and trained the model within 20 epochs and 40 epochs for BERT-medium and BERT-base respectively.



 §.§ Results


We conduct experiments for each paradigm of ensemble training on all the datasets to observe the performance. The results are shown in <ref>, from which we can find the following facts:


    
  * Self-training (S) is effective, surpassing the baselines (F and P).
    
  * The pre-training and fine-tuning paradigm (PF) demonstrates the best performance across all the datasets. This verifies the superiority of PF. 
    
  * The accuracy of S, PS, and PFS are close, which reveals the invalidity of the pre-trained teacher model with or without fine-tuning (see more discussions in the <ref>). 
    
  * Fine-tuning has either resulted in negligible improvement or a slight decline in the performance of S, PS, and PFS, which indicates that the information in labeled data has already been exploited sufficiently.     



 


 §.§ Data augmentation


We perform experiments to assess the effectiveness of varying intensities of data augmentation within ensemble paradigms. We create four data augmentation strategies by integrating natural noise, conditional BERT, and back-translation to ensure increased data augmentation. These strategies are designated as DA1, DA2, DA3, and DA4, as detailed in <ref>, where we write DA0 for no data augmentation for the sake of comparison.



We perform experiments using two datasets: IMDB and SST. We begin by sampling 1,000 instances evenly from each class as labeled data while leaving the unlabeled data unchanged. We then augment the labeled data to a total of 10,000 instances. The objective is to investigate the effects of pre-training intensity and the degree of data augmentation. The findings are detailed in <ref>, <ref>, <ref>, and <ref>.  

 

 





We've omitted the accuracy of P in these tables due to its trivial nature. The number in the bracket indicates the change magnitude relative to DA0. We find two trends regarding accuracy as the magnitude of data augmentation increases:


    
  * Accuracy initially rises and then declines as the extent of the data augmentation strategy grows.
    
  * Accuracy increases initially and then stabilizes, indicating that moderate data augmentation enhances performance, whereas excessive augmentation is ineffective and may even hinder results.


Additionally, the pre-training and fine-tuning paradigm demonstrates greater stability than other paradigms. It shows resistance to variations in data augmentation magnitude and does not depend on sufficient labeled data.

Our observations reveal that when using pre-trained weights, stronger pre-training knowledge (BERT-base) outperforms weaker pre-training knowledge (BERT-medium) in scenarios with no data augmentation and moderate data augmentation. While most paradigms that utilize pre-training knowledge, apart from PF, struggle with strong pre-training under excessive data augmentation, PF shows improvement. Specifically, PS, PFS, PSF, and PFSF exhibit poorer performance or only marginal increases compared to PF. Employing a stronger pre-training model results in a wider performance gap between PF and the other paradigms.



 §.§ Imbalanced data


Data imbalance is a prevalent issue that hinders model performance, prompting us to examine the effectiveness of the paradigms in this context. To create imbalanced training data, we sample from the original datasets and conduct experiments on two datasets: IMDB for binary classification and AG News for four-category classification. The data ratio for IMDB is set at 1:5, while for AG News, the ratio is 1:1:1:7. The results of these experiments are demonstrated in <ref>. The number in the bracket indicates the change magnitude relative to balanced data.



In binary classification, the performance of the paradigms does not experience a significant decline. However, the four-category classification shows a marked drop in performance across the paradigms. Notably, PS and PSF demonstrate greater resilience to the adverse effects of data imbalance compared to PFS and PFSF, while PFS and PFSF maintain more stability than S and SF. Although most other paradigms face substantial decreases, PF maintains consistent performance with a few value changes.




§ DISCUSSIONS



We discuss the reasons behind the failure of PFS in the experiments. Unlike previous studies, we find that self-training and pre-training do not function as complementarity. Notably, there are instances where PFS performs worse than S. To delve deeper into this issue, we analyze the evaluation accuracy for each iteration in PFS. 

As illustrated in <ref> (a)(b) for PFS with random initialization (written as PFS Random-init), i.e. regular self-training described in the <ref>, there is a significant drop in performance during the first iteration, followed by gradual improvements in subsequent iterations, but converges to poor performance. This pattern indicates that the student model in the initial iteration struggles to retain the collective knowledge gained during pre-training. We hypothesize that this may result from inefficient knowledge transfer from the pre-trained teacher model to the student model through pseudo-labels in the process of PFS. 

We consider the PFS with a student model with sufficient pre-training knowledge to test our hypothesis. To inject pre-trained knowledge into a student model, the student model is initialized with pre-trained parameters and then fine-tuned by labeled and pseudo-labeled data in each iteration (written as PFS Pre-init). We find that the PFS outperforms both PF and S, as depicted in <ref> (c)(d). 
This observation illustrates that the PFS with sufficient pre-training knowledge succeeds in improving upon PF and provides evidence to support our hypothesis.






§ CONCLUSIONS


We proposed an ensemble method to empirically explore all feasible training paradigms that combine pre-training, self-training, and fine-tuning with language models. Our study revisited the relationship between pre-training and self-training, while critically examining the limitations that may hinder improvements in either approach.

Our findings indicated that the pre-training and fine-tuning paradigm is the most effective among the various training paradigms. While this is not a discovery, it clarifies existing research on self-training and its interaction with pre-training. This analysis provides valuable insights for future design considerations and assists in selecting the most appropriate learning strategies.











plain


