Large language models have improved zero-shot text classification by allowing the transfer of semantic knowledge from the training data in order to classify among specific label sets in downstream tasks. We propose a simple way to further improve zero-shot accuracies with minimal effort. We curate small finetuning datasets intended to describe the labels for a task. Unlike typical finetuning data, which has texts annotated with labels, our data simply describes the labels in language, e.g., using a few related terms, dictionary/encyclopedia entries, and short templates. Across a range of topic and sentiment datasets, our method is more accurate than zero-shot by 15-17% absolute. It is also more robust to choices required for zero-shot classification, such as patterns for prompting the model to classify and mappings from labels to tokens in the model's vocabulary. Furthermore, since our data merely describes the labels but does not use input texts, finetuning on it yields a model that performs strongly on multiple text domains for a given label set, even improving over few-shot out-of-domain classification in multiple settings.
翻译:大型语言模型通过允许从训练数据中迁移语义知识,以在下游任务中对特定标签集进行分类,从而改进了零样本文本分类。我们提出一种简单方法,以最小努力进一步提升零样本准确率。我们精心构建了旨在描述任务标签的小规模微调数据集。与典型微调数据(文本带有标签注释)不同,我们的数据仅用语言描述标签,例如使用少量相关术语、词典/百科全书条目及简短模板。在一系列主题和情感数据集上,我们的方法在绝对准确率上比零样本高出15%-17%。它还对零样本分类所需的多种选择更具鲁棒性,例如提示模型进行分类的模式以及从标签到模型词汇表标记的映射。此外,由于我们的数据仅描述标签而不使用输入文本,在此基础上微调得到的模型能在给定标签集的多个文本领域表现强劲,甚至在多种设定下超越少样本跨领域分类。