Fine-tuned pre-trained language models (LMs) have achieved enormous success in many natural language processing (NLP) tasks, but they still require excessive labeled data in the finetuning stage. We study the problem of finetuning pre-trained LMs using only weak supervision, without any labeled data. This problem is challenging because the high capacity of LMs makes them prone to overfitting the noisy labels generated by weak supervision. To address this problem, we develop a contrastive self-training framework, COSINE , to enable fine-tuning LMs with weak supervision. Underpinned by contrastive regularization and confidence-based reweighting, our framework gradually improves model fitting while effectively suppressing error propagation. Experiments on sequence, token, and sentence pair classification tasks show that our model outperforms the strongest baseline by large margins and achieves competitive performance with fully-supervised fine-tuning methods. Our implementation is available on https:// github.com/yueyu1030/COSINE . Language model (LM) pre-training and fine-tuning achieve state-of-the-art performance in various natural language processing tasks (Peters et al., 2018; Devlin et al., 2019; Liu et al., 2019; Raffel et al., 2019). Such approaches stack task-specific layers on top of pre-trained language models, e.g. , BERT (Devlin et al., 2019), then fine-tune the models with task-specific data. During fine-tuning, the semantic and syntactic knowledge in the pre-trained LMs is adapted for the target task. Despite their success, one bottleneck for fine-tuning LMs is the requirement of labeled data. When labeled data are scarce, the fine-tuned models often suffer from degraded performance, and the large number of parameters can cause severe overfitting (Xie et al., 2019). To relieve the label scarcity bottleneck, we fine-tune the pre-trained language models with only weak supervision. While collecting large amounts of clean labeled data is expensive for many NLP tasks, it is often cheap to obtain weakly labeled data from various weak supervision sources, such as semantic rules (Awasthi et al., 2020). For example, in sentiment analysis, we can use rules terrible'  Negative (a keyword rule) and * not recommend *'  Negative (a pattern rule) to generate large amounts of weak labels. Fine-tuning language models with weak supervision is nontrivial. Excessive label noise, e.g. , wrong labels, and limited label coverage are common and inevitable in weak supervision. Although existing fine-tuning approaches (Xu et al., 2020; Zhu et al., 2020; Jiang et al., 2020) improve LMs' generalization ability, they are not designed for noisy data and are still easy to overfit on the noise. Moreover, existing works on tackling label noise are flawed and are not designed for fine-tuning LMs. For example, Ratner et al. (2020); Varma and R (2018) use probabilistic models to aggregate multiple weak supervisions for denoising, but they generate weak-labels in a context-free manner, without using LMs to encode contextual information of the training samples (Aina et al., 2019). Other works (Luo et al., 2017; Wang et al., 2019b) focus on noise transitions without explicitly conducting instance-level denoising, and they require clean training samples. Although some recent studies (Awasthi et al., 2020; Ren et al., 2020) design labeling function-guided neural modules to denoise each sample, they require prior knowledge on weak supervision, which is often infeasible in real practice. Self-training (Rosenberg et al., 2005; Lee, 2013) is a proper tool for fine-tuning language models with weak supervision. It augments the training set with unlabeled data by generating pseudo-labels for them, which improves the models' generalization power. This resolves the limited coverage issue in weak supervision. However, one major challenge of self-training is that the algorithm still suffers from error propagationwrong pseudo-labels can cause model performance to gradually deteriorate. We propose a new algorithm COSINE 1 that fine-tunes pre-trained LMs with only weak supervision. COSINE leverages both weakly labeled and unlabeled data, as well as suppresses label noise via contrastive self-training. Weakly-supervised learning enriches data with potentially noisy labels, and our contrastive self-training scheme fulfills the denoising purpose. Specifically, contrastive self-training regularizes the feature space by pulling samples with the same pseudo-labels close while pushing samples with different pseudo-labels apart. Such regularization enforces representations of samples from different classes to be more distinguishable, such that the classifier can make better decisions. To suppress label noise propagation during contrastive self-training, we propose confidence-based sample reweighting and regularization methods. The reweighting strategy emphasizes samples with high prediction confidence, which are more likely to be correctly classified, in order to reduce the effect of wrong predictions. Confidence regularization encourages smoothness over model predictions, such that no prediction can be over-confident, and therefore reduces the influence of wrong pseudo-labels. Our model is flexible and can be naturally extended to semi-supervised learning, where a small set of clean labels is available. Moreover, since we do not make assumptions about the nature of the weak labels, COSINE can handle various types of label noise, including biased labels and randomly corrupted labels. Biased labels are usually generated by semantic rules, whereas corrupted labels are often produced by crowd-sourcing. Our main contributions are: (1) A contrastive-regularized self-training framework that fine-tunes pre-trained LMs with only weak supervision. (2) Confidence-based reweighting and regularization techniques that reduce error propagation and prevent over-confident predictions. (3) Extensive experiments on 6 NLP classification tasks using 7 public benchmarks verifying the efficacy of COSINE . We highlight that our model achieves competitive performance in comparison with fully-supervised models on some datasets, e.g. , on the 1 Short for Co ntrastive S elf-Training for F ine -Tuning Pretrained Language Model. Weak Supervision. Instead of using human-annotated data, we obtain labels from weak supervision sources, including keywords and semantic rules 2 . From weak supervision sources, each of the input samples x  X is given a label y  Y  {} , where Y is the label set and  denotes the sample is not matched by any rules. For samples that are given multiple labels, e.g. , matched by multiple rules, we determine their labels by majority voting. Problem Formulation. We focus on the weakly-supervised classification problems in natural language processing. We consider three types of tasks: sequence classification, token classification, and sentence pair classification. These tasks have a broad scope of applications in NLP, and some examples can be found in Table 1. Formally, the weakly-supervised classification problem is defined as the following: Given weakly-labeled samples X l = { ( x i , y i ) } Li =1 and unlabeled samples X u = { x j } Uj =1 , we seek to learn a classifier f ( x ;  ) : X  Y . Here X = X l  X u denotes all the samples and Y = { 1 , 2 ,    , C } is the label set, where C is the number of classes. Our classifier f = g  BERT consists of two parts: BERT is a pre-trained language model that outputs hidden representations of input samples, and g is a task-specific classification head that outputs a C -dimensional vector, where each dimension corresponds to the prediction confidence of a specific class. In this paper, we use RoBERTa (Liu et al., 2019) as the realization of BERT. The framework of COSINE is shown in Figure 1. First, COSINE initializes the LM with weak labels. In this step, the semantic and syntactic knowledge of the pre-trained LM are transferred to our model. Then, it uses contrastive self-training to suppress label noise propagation and continue training. The training procedure of COSINE is as follows. Initialization with Weakly-labeled Data. We fine-tune f (  ;  ) with weakly-labeled data X l by 2 Examples of weak supervisions are in Appendix A. Weak Supervision Unmatched Samples  ! |X | ( x i ,y i ) X l where CE (  ,  ) is the cross entropy loss. We adopt early stopping (Dodge et al., 2020) to prevent the model from overfitting to the label noise. However, early stopping causes underfitting, and we resolve this issue by contrastive self-training. Contrastive Self-training with All Data. The goal of contrastive self-training is to leverage all data, both labeled and unlabeled, for fine-tuning, as well as to reduce the error propagation of wrongly labelled data. We generate pseudo-labels for the unlabeled data and incorporate them into the training set. To reduce error propagation, we introduce contrastive representation learning (Sec. 3.2) and confidence-based sample reweighting and regularization (Sec. 3.3). We update the pseudo-labels (denoted by (cid:101) y ) and the model iteratively. The procedures are summarized in Algorithm 1. (cid:5) Update (cid:101) y with the current  . To generate the pseudo-label for each sample x  X , one straightforward way is to use hard labels (Lee, 2013) (cid:101) y hard = argmax j Y [ f ( x ;  )] j . (2) Notice that f ( x ;  )  RC is a probability vector and [ f ( x ;  )] j indicates the j -th entry of it. However, these hard pseudo-labels only keep the most likely class for each sample and result in the propagation of labeling mistakes. For example, if a sample is mistakenly classified to a wrong class, assigning a 0/1 label complicates model updating (Eq. 4), in that the model is fitted on erroneous labels. To alleviate this issue, for each sample x in a batch B , we generate soft pseudo-labels 3 (Xie et al., 2016, 2019; Meng et al., 2020; Liang et al., 2020) (cid:101) y  RC based on the current model as (cid:101) y j = [ f ( x ;  )] 2 j /f j (cid:80) j (cid:48) Y [ f ( x ;  )] 2 j (cid:48) /f j (cid:48) , (3) where f j = (cid:80) x (cid:48) B [ f ( x (cid:48) ;  )] 2 j is the sum over soft frequencies of class j . The non-binary soft pseudo-labels guarantee that, even if our prediction is inaccurate, the error propagated to the model update step will be smaller than using hard pseudo-labels. (cid:5) Update  with the current (cid:101) y . We update the model parameters  by minimizing L (  ; (cid:101) y ) = L c (  ; (cid:101) y ) + R 1 (  ; (cid:101) y ) +  R 2 (  ) , (4) where L c is the classification loss (Sec. 3.3), R 1 (  ; (cid:101) y ) is the contrastive regularizer (Sec. 3.2), R 2 (  ) is the confidence regularizer (Sec. 3.3), and  is the hyper-parameter for the regularization. 3.2 Contrastive Learning on Sample Pairs The key ingredient of our contrastive self-training method is to learn representations that encourage data within the same class to have similar representations and keep data in different classes separated. Specifically, we first select high-confidence samples (Sec. 3.3) C from X . Then for each pair x i , x j  C , we define their similarity as W ij = (cid:40) 1 , if argmax k Y [ (cid:101) y i ] k = argmax k Y [ (cid:101) y j ] k 0 , otherwise , (5) where (cid:101) y i , (cid:101) y j are the soft pseudo-labels (Eq. 3) for x i , x j , respectively. For each x  C , we calculate its representation v = BERT ( x )  R d , then we define the contrastive regularizer as R 1 (  ; (cid:101) y ) = (cid:88) ( x i ,x j ) CC (cid:96) ( v i , v j , W ij ) , (6) where (cid:96) = W ij d 2 ij + (1  W ij )[max(0 ,   d ij )] 2 . (7) Here, (cid:96) (  ,  ,  ) is the contrastive loss (Chopra et al., 2005; Taigman et al., 2014), d ij is the distance 4 between v i and v j , and  is a pre-defined margin. For samples from the same class, i.e. W ij = 1 , Eq. for samples from different classes, the contrastive loss is large if their distance is small. In this way, the regularizer enforces similar samples to be close, while keeping dissimilar samples apart by at least  . Figure 2 illustrates the contrastive representations. We can see that our method produces clear interclass boundaries and small intra-class distances, which eases the classification tasks. While contrastive representations yield better decision boundaries, they require samples with high-quality pseudo-labels. In this section, we introduce reweighting and regularization methods to suppress error propagation and refine pseudo-label qualities. Sample Reweighting. In the classification task, samples with high prediction confidence are more likely to be classified correctly than those with low confidence. Therefore, we further reduce label noise propagation by a confidence-based sample reweighting scheme. For each sample x with the soft pseudo-label (cid:101) y , we assign x with a weight  ( x ) defined by  = 1  H ( (cid:101) y ) log( C ) , H ( (cid:101) y ) =  C (cid:88) i =1 (cid:101) y i log (cid:101) y i , (8) where 0  H ( (cid:101) y )  log( C ) is the entropy of (cid:101) y . Notice that if the prediction confidence is low, then H ( (cid:101) y ) will be large, and the sample weight  ( x ) will be small, and vice versa. We use a pre-defined threshold  to select high confidence samples C from each batch B as C = { x  B |  ( x )   } . (9) Then we define the loss function as L c ( , (cid:101) y ) = 1 |C| (cid:88) x C  ( x ) DKL ( (cid:101) y (cid:107) f ( x ;  )) , (10) where DKL ( P (cid:107) Q ) = (cid:88) k p k log p k q k (11) is the KullbackLeibler (KL) divergence. Confidence regularization The sample reweighting approach promotes high confidence samples during contrastive self-training. However, this strategy relies on wrongly-labeled samples to have low confidence, which may not be true unless we prevent over-confident predictions. To this end, we propose a confidence-based regularizer that encourages smoothness over predictions, defined as R 2 (  ) = 1 |C| (cid:88) x C DKL ( u (cid:107) f ( x ;  )) , (12) where DKL is the KL-divergence and u i = 1 /C for i = 1 , 2 ,    , C . Such term constitutes a regularization to prevent over-confident predictions and leads to better generalization (Pereyra et al., 2017). Datasets and Tasks. We conduct experiments on 6 NLP classification tasks using 7 public benchmarks: AGNews (Zhang et al., 2015) is a Topic Classification task; IMDB (Maas et al., 2011) and Yelp (Meng et al., 2018) are Sentiment Analysis tasks; TREC (Voorhees and Tice, 1999) is a Question Classification task; MIT-R (Liu et al., 2013) is a Slot Filling task; Chemprot (Krallinger et al., 2017) is a Relation Classification task; and WiC (Pilehvar and Camacho-Collados, 2019) is a Word Sense Disambiguation (WSD) task. The dataset statistics are summarized in Table 2. More details on datasets and weak supervision sources are in Appendix A 5 . Baselines. We compare our model with different groups of baseline methods: (i) Exact Matching (ExMatch) : The test set is directly labeled by weak supervision sources. (ii) Fine-tuning Methods : The second group of baselines are fine-tuning methods for LMs: (cid:5) RoBERTa (Liu et al., 2019) uses the RoBERTa-base model with task-specific classification heads. (cid:5) Self-ensemble (Xu et al., 2020) uses self-ensemble and distillation to improve performances. (cid:5) FreeLB (Zhu et al., 2020) adopts adversarial training to enforce smooth outputs. (cid:5) Mixup (Zhang et al., 2018) creates virtual training samples by linear interpolations. (cid:5) SMART (Jiang et al., 2020) adds adversarial and smoothness constraints to fine-tune LMs and achieves state-of-the-art result for many NLP tasks. (iii) Weakly-supervised Models : The third group of baselines are weakly-supervised models 6 : (cid:5) Snorkel (Ratner et al., 2020) aggregates different labeling functions based on their correlations. (cid:5) WeSTClass (Meng et al., 2018) trains a classifier with generated pseudo-documents and use self-training to bootstrap over all samples. (cid:5) ImplyLoss (Awasthi et al., 2020) co-trains a rule-based classifier and a neural classifier to denoise. (cid:5) Denoise (Ren et al., 2020) uses attention network to estimate reliability of weak supervisions, and then reduces the noise by aggregating weak labels. (cid:5) UST (Mukherjee and Awadallah, 2020) is state-of-the-art for self-training with limited labels. It estimates uncertainties via MC-dropout (Gal and Ghahramani, 2015), and then select samples with low uncertainties for self-training. Evaluation Metrics. We use classification accuracy on the test set as the evaluation metric for all datasets except MIT-R. MIT-R contains a large number of tokens that are labeled as Others. We use the micro F 1 score from other classes for this dataset. 7 Auxiliary. We implement COSINE using PyTorch 8 , and we use RoBERTa-base as the pretrained LM. Datasets and weak supervision details are in Appendix A. Baseline settings are in Appendices B. Training details and setups are in Appendix C. Discussions on early-stopping are in Appendix D. Comparison of distance metrics and similarity measures are in Appendix E. 4.1 Learning From Weak Labels We summarize the weakly-supervised leaning results in Table 3. In all the datasets, COSINE outperforms all the baseline models. A special case is the WiC dataset, where we use WordNet 9 to generate weak labels. However, this enables Snorkel to access some labeled data in the development set, making it unfair to compete against other methods. We will discuss more about this dataset in Sec. 4.3. In comparison with directly fine-tuning the pretrained LMs with weakly-labeled data, our model employs an earlier stopping technique 10 so that it does not overfit on the label noise. As shown, indeed  Init  achieves better performance, and it serves as a good initialization for our framework. Other fine-tuning methods and weakly-supervised models either cannot harness the power of pretrained language models, e.g. , Snorkel, or rely on clean labels, e.g. , other baselines. We highlight that although UST, the state-of-the-art method to date, achieves strong performance under few-shot settings, their approach cannot estimate confidence well with noisy labels, and this yields inferior performance. Our model can gradually correct wrong pseudo-labels and mitigate error propagation via contrastive self-training. 7 The Chemprot dataset also contains Others type, but such instances are few, so we still use accuracy as the metric. 8 https://pytorch.org/ 9 https://wordnet.princeton.edu/ 10 We discuss this technique in Appendix D. Dataset Task Class # Train # Dev # Test Cover Accuracy AGNews Topic 4 96k 12k 12k 56.4 83.1 IMDB Sentiment 2 20k 2.5k 2.5k 87.5 74.5 Yelp Sentiment 2 30.4k 3.8k 3.8k 82.8 71.5 MIT-R Slot Filling 9 6.6k 1.0k 1.5k 13.5 80.7 TREC Question 6 4.8k 0.6k 0.6k 95.0 63.8 Chemprot Relation 10 12.6k 1.6k 1.6k 85.9 46.5 WiC WSD 2 5.4k 0.6k 1.4k 63.4 58.8 Table 2: Dataset statistics. AGNews, IMDB, Yelp, and WiC, our model achieves the same level of performance with models (RoBERTa-CL) trained with clean labels. This makes COSINE appealing in the scenario where only weak supervision is available. Our model is robust against excessive label noise. We corrupt certain percentage of labels by randomly changing each one of them to another class. This is a common scenario in crowd-sourcing, where we assume human annotators mis-label each sample with the same probability. Figure 3 summarizes experiment results on the TREC dataset. Com-Model Dev Test #Params Human Baseline 80.0 --BERT (Devlin et al., 2019) ---69.6 335M RoBERTa (Liu et al., 2019) 70.5 69.9 356M T5 (Raffel et al., 2019) ---76.9 11,000M Semi-Supervised Learning SenseBERT (Levine et al., 2020) ---72.1 370M RoBERTa-WL  (Liu et al., 2019) 72.3 70.2 125M w/ MT  (Tarvainen and Valpola, 2017) 73.5 70.9 125M w/ VAT  (Miyato et al., 2018) 74.2 71.2 125M w/ COSINE  76.0 73.2 125M Transductive Learning Snorkel  (Ratner et al., 2020) 80.5 ---1M RoBERTa-WL  (Liu et al., 2019) 81.3 76.8 125M w/ MT  (Tarvainen and Valpola, 2017) 82.1 77.1 125M w/ VAT  (Miyato et al., 2018) 84.9 79.5 125M w/ COSINE  89.5 85.3 125M Table 4: Semi-supervised Learning on WiC. pared with advanced fine-tuning and self-training methods ( e.g. SMART and UST) 11 , our model consistently outperforms the baselines. We can naturally extend our model to semi-supervised learning, where clean labels are avail-11 able for a portion of the data. We conduct experiments on the WiC dataset. As a part of the Su-perGLUE (Wang et al., 2019a) benchmark, this dataset proposes a challenging task: models need to determine whether the same word in different sentences has the same sense (meaning). Different from previous tasks where the labels in the training set are noisy, in this part, we utilize the clean labels provided by the WiC dataset. We further augment the original training data of WiC with unlabeled sentence pairs obtained from lexical databases ( e.g. , WordNet, Wictionary). Note that part of the unlabeled data can be weakly-labeled by rule matching. This essentially creates a semi-supervised task, where we have labeled data, weakly-labeled data and unlabeled data. Since the weak labels of WiC are generated by WordNet and partially reveal the true label information, Snorkel (Ratner et al., 2020) takes this unfair advantage by accessing the unlabeled sentences and weak labels of validation and test data. To make a fair comparison to Snorkel, we consider the transductive learning setting, where we are allowed access to the same information by integrating unlabeled validation and test data and their weak labels into the training set. As shown in Table 4, COSINE with transductive learning achieves better performance compared with Snorkel. Moreover, in comparison with semi-supervised baselines ( i.e. VAT and MT) and fine-tuning methods with extra resources ( i.e. , SenseBERT), COSINE achieves better performance in both semi-supervised and transductive learning settings. Error propagation mitigation and wrong-label correction. Figure 4 visualizes this process. Before training, the semantic rules make noisy predictions. After the initialization step, model predictions are less noisy but more biased, e.g. , many samples are mis-labeled as Amenity. These predictions are further refined by contrastive self-training. The rightmost figure demonstrates wrong-label correction . Samples are indicated by radii of the circle, and classification correctness is indicated by color, i.e. , blue means correct and orange means incorrect. From inner to outer tori specify classification accuracy after the initialization stage, and the iteration 1,2,3. We can see that many incorrect predictions are corrected within three iterations. To illustrate: the right black dashed line means the corresponding sample is classified correctly after the first iteration, and the left dashed line indicates the case where the sample is mis-classified after the second iteration but corrected after the third. These results demonstrate that our model can correct wrong predictions via contrastive self-training. Better data representations. We visualize sample embeddings in Fig. 7. By incorporating the contrastive regularizer R 1 , our model learns more compact representations for data in the same class, e.g. , the green class, and also extends the inter-class distances, e.g. , the purple class is more separable from other classes in Fig. 7(b) than in Fig. 7(a). Label efficiency. Figure 8 illustrates the number of clean labels needed for the supervised model to outperform COSINE . On both of the datasets, the supervised model requires a significant amount of clean labels (around 750 for Agnews and 120 for MIT-R) to reach the level of performance as ours, whereas our method assumes no clean sample. Higher Confidence Indicates Better Accuracy. Figure 6 demonstrates the relation between prediction confidence and prediction accuracy on IMDB. We can see that in general, samples with higher prediction confidence yield higher prediction accuracy. With our sample reweighting method, we gradually filter out low-confidence samples and assign higher weights for others, which effectively mitigates error propagation. Components of COSINE . We inspect the importance of various components, including the contrastive regularizer R 1 , the confidence regularizer R 2 , and the sample reweighting (SR) method, and the soft labels. Table 5 summarizes the results and Fig. 9 visualizes the learning curves. We remark that all the components jointly contribute to the model performance, and removing any of them hurts the classification accuracy. For example, sample reweighting is an effective tool to reduce error propagation, and removing it causes the model to eventually overfit to the label noise, e.g. , the red bottom line in Fig. 9 illustrates that the classification accuracy increases and then drops rapidly. On the other hand, replacing the soft pseudo-labels (Eq. 3) with the hard counterparts (Eq. 2) causes drops in performance. This is because hard pseudo-labels lose prediction confidence information. Hyper-parameters of COSINE . In Fig. 5, we examine the effects of different hyper-parameters, including the confidence threshold  (Eq. 9), the Init Iter 1 Iter 2 Iter 3 CorrectIncorrect Figure 4: Classification performance on MIT-R. stopping time T 1 in the initialization step, and the update period T 3 for pseudo-labels. From Fig. 5(a), we can see that setting the confidence threshold too big hurts model performance, which is because an over-conservative selection strategy can result in insufficient number of training data. The stopping time T 1 has drastic effects on the model. This is because fine-tuning COSINE with weak labels for excessive steps causes the model to unavoidably overfit to the label noise, such that the contrastive self-training procedure cannot correct the 0 500 1000 1500 2000 2500 Number of Iterations 0 . error. Also, with the increment of T 3 , the update period of pseudo-labels, model performance first increases and then decreases. This is because if we update pseudo-labels too frequently, the contrastive self-training procedure cannot fully suppress the label noise, and if the updates are too infrequent, the pseudo-labels cannot capture the updated information well. Fine-tuning Pre-trained Language Models. To improve the model's generalization power during fine-tuning stage, several methods are proposed (Peters et al., 2019; Dodge et al., 2020; Zhu et al., 2020; Jiang et al., 2020; Xu et al., 2020; Kong et al., 2020; Zhao et al., 2020; Gunel et al., 2021; Zhang et al., 2021; Aghajanyan et al., 2021; Wang et al., 2021), However, most of these methods focus on fully-supervised setting and rely heavily on large amounts of clean labels , which are not always available. To address this issue, we propose a contrastive self-training framework that fine-tunes pre-trained models with only weak labels. Compared with the existing fine-tuning approaches (Xu et al., 2020; Zhu et al., 2020; Jiang et al., 2020), our model effectively reduce the label noise, which achieves better performance on various NLP tasks with weak supervision. Learning From Weak Supervision. In weakly-supervised learning, the training data are usually noisy and incomplete. Existing methods aim to denoise the sample labels or the labeling functions by, for example, aggregating multiple weak supervisions (Ratner et al., 2020; Lison et al., 2020; Ren et al., 2020), using clean samples (Awasthi et al., 2020), and leveraging contextual information (Mekala and Shang, 2020). However, most of them can only use specific type of weak supervision on specific task, e.g. , keywords for text classification (Meng et al., 2020; Mekala and Shang, 2020), and they require prior knowledge on weak supervision sources (Awasthi et al., 2020; Lison et al., 2020; Ren et al., 2020), which somehow limits the scope of their applications. Our work is orthogonal to them since we do not denoise the labeling functions directly. Instead, we adopt contrastive self-training to leverage the power of pretrained language models for denoising, which is task-agnostic and applicable to various NLP tasks with minimal additional efforts. Adaptation of LMs to Different Domains. When fine-tuning LMs on data from different domains, we can first continue pre-training on in-domain text data for better adaptation (Gururangan et al., 2020). For some rare domains where BERT trained on general domains is not optimal, we can use LMs pretrained on those specific domains ( e.g. BioBERT (Lee et al., 2020), SciBERT (Beltagy et al., 2019)) to tackle this issue. Scalability of Weak Supervision. COSINE can be applied to tasks with a large number of classes. This is because rules can be automatically generated beyond hand-crafting. For example, we can use label names/descriptions as weak supervision signals (Meng et al., 2020). Such signals are easy to obtain and do not require hand-crafted rules. Once weak supervision is provided, we can create weak labels to further apply COSINE . Flexibility. COSINE can handle tasks and weak supervision sources beyond our conducted experiments. For example, other than semantic rules, crowd-sourcing can be another weak supervision source to generate pseudo-labels (Wang et al., 2013). Moreover, we only conduct experiments on several representative tasks, but our framework can be applied to other tasks as well, e.g., named-entity recognition (token classification) and reading comprehension (sentence pair classification). In this paper, we propose a contrastive regularized self-training framework, COSINE , for finetuning pre-trained language models with weak supervision. Our framework can learn better data representations to ease the classification task, and also efficiently reduce label noise propagation by confidence-based reweighting and regularization. We conduct experiments on various classification tasks, including sequence classification, token classification, and sentence pair classification, and the results demonstrate the efficacy of our model. label scarcity issue via combining neural nets with weak supervision . The weak supervision provides a simple but flexible language to encode the domain knowledge and capture the correlations between features and labels. When combined with unlabeled data, our framework can largely tackle the label scarcity bottleneck for training DNNs, enabling them to be applied for downstream NLP classification tasks in a label efficient manner. COSINE neither introduces any social/ethical bias to the model nor amplify any bias in the data. In all the experiments, we use publicly available data, and we build our algorithms using public code bases. We do not foresee any direct social consequences or ethical issues. We thank anonymous reviewers for their feedbacks. This work was supported in part by the National Science Foundation award III-2008334, Amazon Faculty Award, and Google Faculty Award.
abstain method abstain objective result result other abstain abstain abstain abstain abstain method abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain objective abstain objective abstain abstain objective abstain abstain objective abstain abstain objective abstain abstain result other abstain other abstain other method method other method other method method abstain abstain method abstain abstain abstain method abstain method abstain abstain abstain method method method abstain abstain abstain abstain abstain abstain abstain method method abstain abstain method method abstain method method abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain method method abstain method method abstain abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain result abstain abstain other result abstain abstain abstain abstain abstain other result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain abstain abstain abstain other other objective abstain other other other other method method abstain abstain method abstain abstain abstain method abstain method abstain abstain abstain method objective method objective abstain abstain method abstain method abstain other other