Recently, prompt learning has become a new paradigm to utilize pre-trained language models (PLMs) and achieves promising results in downstream tasks with a negligible increase of parameters. The current usage of discrete and continuous prompts assumes that the prompt is fixed for a specific task and all samples in the task share the same prompt. However, a task may contain quite diverse samples in which some are easy and others are difficult, and diverse prompts are desirable. In this paper, we propose an instance-aware prompt learning method that learns a different prompt for each instance. Specifically, we suppose that each learnable prompt token has a different contribution to different instances, and we learn the contribution by calculating the relevance score between an instance and each prompt token. The contribution weighted prompt would be instance aware. We apply our method to both unidirectional and bidirectional PLMs on both language understanding and generation tasks. Extensive experiments demonstrate that our method obtains considerable improvements compared to strong baselines. Especially, our method achieves the state-of-the-art on the SuperGLUE few-shot learning benchmark.
翻译:最近,迅速学习已成为一个新的范例,可以使用经过培训的语言模式,在下游任务中取得令人乐观的成果,参数略有增加。目前使用离散和连续的提示假设,某一具体任务的时间是固定的,任务中的所有样本都具有同样的迅速性。然而,任务可能包含多种多样的样本,其中有些容易,另一些则困难,不同的提示是可取的。在本文件中,我们建议一种有实例觉悟的快速学习方法,在每个实例中学习不同的提示。具体地说,我们认为,每个可学习的快速符号对不同实例都有不同的贡献,我们通过计算实例和每个快速符号之间的关联分数来学习。加权提示将了解实例。我们在语言理解和生成任务上都应用了我们的方法。广泛的实验表明,我们的方法比强的基线都得到了相当大的改进。特别是,我们的方法在超级GLUE的微小学习基准上达到了最先进的标准。