CSS-LM: A Contrastive Framework for Semi-supervised Fine-tuning of Pre-trained Language Models

Yusheng Su, Xu Han, Yankai Lin, Zhengyan Zhang, Zhiyuan Liu +3 more
2/7/2021
cs.CLcs.LG
contrastive-ssl

Official code: thunlp/CSS-LM (11 stars, Python, last commit 2023-07-01).

Abstract

Fine-tuning pre-trained language models (PLMs) has demonstrated its effectiveness on various downstream NLP tasks recently. However, in many low-resource scenarios, the conventional fine-tuning strategies cannot sufficiently capture the important semantic features for downstream tasks.

Show full abstract

To address this issue, we introduce a novel framework (named "CSS-LM") to improve the fine-tuning phase of PLMs via contrastive semi-supervised learning. Specifically, given a specific task, we retrieve positive and negative instances from large-scale unlabeled corpora according to their domain-level and class-level semantic relatedness to the task. We then perform contrastive semi-supervised learning on both the retrieved unlabeled and original labeled instances to help PLMs capture crucial task-related semantic features. The experimental results show that CSS-LM achieves better results than the conventional fine-tuning strategy on a series of downstream tasks with few-shot settings, and outperforms the latest supervised contrastive fine-tuning strategies. Our datasets and source code will be available to provide more details.

View on arXivView PDF

Code Implementations(1)

thunlp/CSS-LMOfficial100%

CSS-LM: Contrastive Semi-supervised Fine-tuning of Pre-trained Language Models

114Python, ShellMar 1, 20213 years ago
contrastive-learningfew-shot-learningplmpretrained-modelsself-supervised-learning

Similar Papers

Cite this paper

@article{su2021csslm,
  title  = {CSS-LM: A Contrastive Framework for Semi-supervised Fine-tuning of Pre-trained Language Models},
  author = {Yusheng Su and Xu Han and Yankai Lin and Zhengyan Zhang and Zhiyuan Liu and Peng Li and Jie Zhou and Maosong Sun},
  year   = {2021},
  eprint = {2102.03752},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.03752}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2102.03752.svg)](https://codeofpaper.com/paper/2102.03752)

Discussion