PTR: Prompt Tuning with Rules for Text Classification

PTR: Prompt Tuning with Rules for Text Classification
复制标题

DOI:
10.1016/j.aiopen.2022.11.003
复制
发表时间:
2022-01-01
期刊:
AI OPEN
影响因子:
--
通讯作者:
Sun, Maosong
Sun, Maosong
中科院分区:
其他
文献类型:
--
作者:
Han, Xu;Zhao, Weilin;Sun, Maosong

文献摘要

被引文献

相似文献

近年来,即时调优被广泛应用于激发预训练语言模型(PLM)中的丰富知识,为自然语言处理任务服务。尽管提示调优在情感分类、自然语言推理等少数几类分类任务中取得了良好的效果,但人工设计提示却十分繁琐。同时,自动生成提示也是困难和耗时的。因此,对于复杂的多类分类任务,获得有效的提示仍然是一个挑战。本文提出将分类任务的先验知识编码成规则,然后根据规则设计子提示,最后合并子提示来处理任务。我们称这种带规则的P-ropt-Tuning方法为“PTR”。与现有的基于提示的方法相比,PTR在构建提示的有效性和效率之间取得了很好的折衷。我们在三个多类分类任务上进行了实验,包括关系分类、实体分类和意图分类。结果表明,PTR的性能优于普通的和即时调优基线,表明了利用规则进行即时调优的有效性。Ptr的源代码可在https://github.com/thunlp/PTR.上找到
Recently, prompt tuning has been widely applied to stimulate the rich knowledge in pre -trained language models (PLMs) to serve NLP tasks. Although prompt tuning has achieved promising results on some fewclass classification tasks, such as sentiment classification and natural language inference, manually designing prompts is cumbersome. Meanwhile, generating prompts automatically is also difficult and time-consuming. Therefore, obtaining effective prompts for complex many -class classification tasks still remains a challenge. In this paper, we propose to encode the prior knowledge of a classification task into rules, then design subprompts according to the rules, and finally combine the sub -prompts to handle the task. We name this P rompt T uning method with R ules " PTR ". Compared with existing prompt -based methods, PTR achieves a good tradeoff between effectiveness and efficiency in building prompts. We conduct experiments on three many -class classification tasks, including relation classification, entity typing, and intent classification. The results show that PTR outperforms both vanilla and prompt tuning baselines, indicating the effectiveness of utilizing rules for prompt tuning. The source code of PTR is available at https://github.com/thunlp/PTR.