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

使用自然语言推理构建高效通用分类器

Building Efficient Universal Classifiers with Natural Language Inference

Vrije Universiteit Amsterdam(阿姆斯特丹自由大学);Hugging Face;University of London, Royal Holloway(伦敦大学皇家霍洛威学院)

Moritz Laurer, Wouter van Atteveldt, Andreu Casas, Kasper Welbers

AI总结:

本文提出使用自然语言推理(NLI)作为通用分类任务,通过分步指南构建高效类BERT通用分类器,在33个数据集上训练实现零样本分类性能提升9.4%,效率显著优于生成式LLM。

摘要:

生成式大型语言模型(LLM)得益于文本生成的普适性,已成为少样本和零样本学习的主流选择。然而,许多用户在仅希望自动化分类任务时,并不需要生成式LLM的广泛能力。较小的类BERT模型也能学习通用任务,使其无需微调即可执行任意文本分类任务(零样本分类),或仅需少量样本即可学习新任务(少样本),同时效率显著高于生成式LLM。本文(1)解释了如何将自然语言推理(NLI)用作通用分类任务,其遵循与生成式LLM指令微调相似的原理,(2)提供了分步指南及可复用的Jupyter notebook用于构建通用分类器,(3)分享了在33个数据集和389个多样化类别上训练得到的通用分类器。我们分享的部分代码曾用于训练早期的零样本分类器,截至2023年12月,该分类器在Hugging Face Hub上的下载量已超过5500万次。我们的新分类器将零样本性能提升了9.4%。

英文摘要:

Generative Large Language Models (LLMs) have become the mainstream choice for fewshot and zeroshot learning thanks to the universality of text generation. Many users, however, do not need the broad capabilities of generative LLMs when they only want to automate a classification task. Smaller BERT-like models can also learn universal tasks, which allow them to do any text classification task without requiring fine-tuning (zeroshot classification) or to learn new tasks with only a few examples (fewshot), while being significantly more efficient than generative LLMs. This paper (1) explains how Natural Language Inference (NLI) can be used as a universal classification task that follows similar principles as instruction fine-tuning of generative LLMs, (2) provides a step-by-step guide with reusable Jupyter notebooks for building a universal classifier, and (3) shares the resulting universal classifier that is trained on 33 datasets with 389 diverse classes. Parts of the code we share has been used to train our older zeroshot classifiers that have been downloaded more than 55 million times via the Hugging Face Hub as of December 2023. Our new classifier improves zeroshot performance by 9.4%.

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

↑