Towards Robust Few-Shot Text Classification Using Transformer Architectures and Dual Loss Strategies

Xu Han, Yumeng Sun, Weiqiang Huang, Hongye Zheng, Junliang Du
5/9/2025
cs.CLcs.LG

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

Abstract

Few-shot text classification has important application value in low-resource environments. This paper proposes a strategy that combines adaptive fine-tuning, contrastive learning, and regularization optimization to improve the classification performance of Transformer-based models. Experiments on the FewRel 2.0 dataset show that T5-small, DeBERTa-v3, and RoBERTa-base perform well in few-shot tasks, especially in the 5-shot setting, which can more effectively capture text features and improve classification accuracy. The experiment also found that there are significant differences in the classification difficulty of different relationship categories. Some categories have fuzzy semantic boundaries or complex feature distributions, making it difficult for the standard cross entropy loss to learn the discriminative information required to distinguish categories. By introducing contrastive loss and regularization loss, the generalization ability of the model is enhanced, effectively alleviating the overfitting problem in few-shot environments. In addition, the research results show that the use of Transformer models or generative architectures with stronger self-attention mechanisms can help improve the stability and accuracy of few-shot classification.

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. 4 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{han2025towards,
  title  = {Towards Robust Few-Shot Text Classification Using Transformer Architectures and Dual Loss Strategies},
  author = {Xu Han and Yumeng Sun and Weiqiang Huang and Hongye Zheng and Junliang Du},
  year   = {2025},
  eprint = {2505.06145},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.06145v1}
}

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

Discussion