arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2205.01308cs.CLcs.AI
收藏

基于经验的Few-Shot语言学习者的对比学习

Contrastive Learning for Prompt-Based Few-Shot Language Learners

Dartmouth College(达特茅斯学院);Northwestern University(西北大学)

Yiren Jian, Chongyang Gao, Soroush Vosoughi

摘要:

GPT-3使用自然语言提示和上下文学习的令人印象深刻的性能激发了在这种范式下更好地微调中等规模模型的工作。遵循这一工作路线,我们提出了一个对比学习框架,该框架对来自同一类的输入进行聚类,以使仅使用有限示例训练的模型具有更好的通用性。具体来说,我们提出了一个监督的对比框架,聚类输入从同一类下不同的增强“视图”,并排斥从不同的类。我们通过添加不同的语言提示和上下文演示来创建示例的不同“视图”。结合对比损失与标准的掩蔽语言建模(MLM)的损失,在基于martit-based的Few-Shot学习者,实验结果表明,我们的方法可以提高在一组不同的15个语言任务的最先进的方法。我们的框架对任务或基本模型做了最小的假设,并且可以应用于许多最近的方法,只需很少的修改。该守则将在https://github.com/yiren-jian/LM-SupCon上提供。

英文摘要:

The impressive performance of GPT-3 using natural language prompts and in-context learning has inspired work on better fine-tuning of moderately-sized models under this paradigm. Following this line of work, we present a contrastive learning framework that clusters inputs from the same class for better generality of models trained with only limited examples. Specifically, we propose a supervised contrastive framework that clusters inputs from the same class under different augmented "views" and repel the ones from different classes. We create different "views" of an example by appending it with different language prompts and contextual demonstrations. Combining a contrastive loss with the standard masked language modeling (MLM) loss in prompt-based few-shot learners, the experimental results show that our method can improve over the state-of-the-art methods in a diverse set of 15 language tasks. Our framework makes minimal assumptions on the task or the base model, and can be applied to many recent methods with little modification. The code will be made available at: https://github.com/yiren-jian/LM-SupCon.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑