ContrastNet: A Contrastive Learning Framework for Few-Shot Text Classification

Junfan Chen, Richong Zhang, Yongyi Mao, Jie Xu
5/16/2023
cs.CL

No official code found. Best implementation: BDBC-KG-NLP/AAAI2022_ContrastNet (25 stars, last commit 2024-01-27).

Abstract

Few-shot text classification has recently been promoted by the meta-learning paradigm which aims to identify target classes with knowledge transferred from source classes with sets of small tasks named episodes. Despite their success, existing works building their meta-learner based on Prototypical Networks are unsatisfactory in learning discriminative text representations between similar classes, which may lead to contradictions during label prediction. In addition, the tasklevel and instance-level overfitting problems in few-shot text classification caused by a few training examples are not sufficiently tackled. In this work, we propose a contrastive learning framework named ContrastNet to tackle both discriminative representation and overfitting problems in few-shot text classification. ContrastNet learns to pull closer text representations belonging to the same class and push away text representations belonging to different classes, while simultaneously introducing unsupervised contrastive regularization at both task-level and instance-level to prevent overfitting. Experiments on 8 few-shot text classification datasets show that ContrastNet outperforms the current state-of-the-art models.

View on arXivView PDF

Code Implementations(1)

code and data for AAAI2022 paper "ContrastNet: A Contrastive Learning Framework for Few-Shot Text Classification"

251Mar 28, 20222 years ago

Similar Papers

Cite this paper

@article{chen2023contrastnet,
  title  = {ContrastNet: A Contrastive Learning Framework for Few-Shot Text Classification},
  author = {Junfan Chen and Richong Zhang and Yongyi Mao and Jie Xu},
  year   = {2023},
  eprint = {2305.09269},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.09269v1}
}

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/2305.09269.svg)](https://codeofpaper.com/paper/2305.09269)

Discussion