English

Inconsistent Few-Shot Relation Classification via Cross-Attentional Prototype Networks with Contrastive Learning

Machine Learning 2021-10-19 v1 Computation and Language

Abstract

Standard few-shot relation classification (RC) is designed to learn a robust classifier with only few labeled data for each class. However, previous works rarely investigate the effects of a different number of classes (i.e., NN-way) and number of labeled data per class (i.e., KK-shot) during training vs. testing. In this work, we define a new task, \textit{inconsistent few-shot RC}, where the model needs to handle the inconsistency of NN and KK between training and testing. To address this new task, we propose Prototype Network-based cross-attention contrastive learning (ProtoCACL) to capture the rich mutual interactions between the support set and query set. Experimental results demonstrate that our ProtoCACL can outperform the state-of-the-art baseline model under both inconsistent KK and inconsistent NN settings, owing to its more robust and discriminate representations. Moreover, we identify that in the inconsistent few-shot learning setting, models can achieve better performance with \textit{less data} than the standard few-shot setting with carefully-selected NN and KK. In the end of the paper, we provide further analyses and suggestions to systematically guide the selection of NN and KK under different scenarios.

Keywords

Cite

@article{arxiv.2110.08254,
  title  = {Inconsistent Few-Shot Relation Classification via Cross-Attentional Prototype Networks with Contrastive Learning},
  author = {Hongru Wang and Zhijing Jin and Jiarun Cao and Gabriel Pui Cheong Fung and Kam-Fai Wong},
  journal= {arXiv preprint arXiv:2110.08254},
  year   = {2021}
}
R2 v1 2026-06-24T06:55:42.058Z