We study the problem of building text classifiers with little or no training data, commonly known as zero and few-shot text classification. In recent years, an approach based on neural textual entailment models has been found to give strong results on a diverse range of tasks. In this work, we show that with proper pre-training, Siamese Networks that embed texts and labels offer a competitive alternative. These models allow for a large reduction in inference cost: constant in the number of labels rather than linear. Furthermore, we introduce label tuning, a simple and computationally efficient approach that allows to adapt the models in a few-shot setup by only changing the label embeddings. While giving lower performance than model fine-tuning, this approach has the architectural advantage that a single encoder can be shared by many different tasks.
翻译:我们研究的是建立文本分类系统的问题,其培训数据很少或没有,通常被称为零和少发文本分类。近年来,基于神经文字要求模型的一种方法发现在一系列不同任务上产生了强有力的效果。在这项工作中,我们表明,通过适当的培训前,嵌入文本和标签的暹罗网络提供了一种竞争性的替代方法。这些模型允许大幅降低推论成本:标签数量不变,而不是线性。此外,我们引入了标签调整,这是一种简单和计算效率高的方法,通过修改标签嵌入器来将模型改写成几幅图式的组合。在使用比模型微调低的性能的同时,这一方法具有建筑上的优势,即单个编码器可以被许多不同的任务共享。