Label-template based Few-Shot Text Classification with Contrastive Learning

Guanghua Hou, Shuhui Cao, Deqiang Ouyang, Ning Wang
12/13/2024
cs.CLcs.AI

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

As an algorithmic framework for learning to learn, meta-learning provides a promising solution for few-shot text classification. However, most existing research fail to give enough attention to class labels. Traditional basic framework building meta-learner based on prototype networks heavily relies on inter-class variance, and it is easily influenced by noise. To address these limitations, we proposes a simple and effective few-shot text classification framework. In particular, the corresponding label templates are embed into input sentences to fully utilize the potential value of class labels, guiding the pre-trained model to generate more discriminative text representations through the semantic information conveyed by labels. With the continuous influence of label semantics, supervised contrastive learning is utilized to model the interaction information between support samples and query samples. Furthermore, the averaging mechanism is replaced with an attention mechanism to highlight vital semantic information. To verify the proposed scheme, four typical datasets are employed to assess the performance of different methods. Experimental results demonstrate that our method achieves substantial performance enhancements and outperforms existing state-of-the-art models on few-shot text classification tasks.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{hou2024labeltemplate,
  title  = {Label-template based Few-Shot Text Classification with Contrastive Learning},
  author = {Guanghua Hou and Shuhui Cao and Deqiang Ouyang and Ning Wang},
  year   = {2024},
  eprint = {2412.10110},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.10110v1}
}

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

Discussion