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.
翻译:摘要:少样本文本分类近年来因元学习范式的推动而取得进展,该范式旨在通过从源类别迁移知识来识别目标类别,其训练数据由称为"情景"的小任务集合构成。现有基于原型网络构建元学习器的工作虽取得了成功,但在学习相似类别间的判别性文本表示方面表现不佳,这可能导致标签预测中的矛盾。此外,少样本文本分类中因训练样本稀少引发的任务级与实例级过拟合问题尚未得到充分解决。本文提出名为ContrastNet的对比学习框架,旨在同时解决少样本文本分类中的判别性表示与过拟合问题。ContrastNet通过学习使同类文本表示相互靠近、异类文本表示相互远离,同时在任务级和实例级引入无监督对比正则化以防止过拟合。在8个少样本文本分类数据集上的实验表明,ContrastNet的性能优于当前最先进的模型。