Current state-of-the-art approaches to text classification typically leverage BERT-style Transformer models with a softmax classifier, jointly fine-tuned to predict class labels of a target task. In this paper, we instead propose an alternative training objective in which we learn task-specific embeddings of text: our proposed objective learns embeddings such that all texts that share the same target class label should be close together in the embedding space, while all others should be far apart. This allows us to replace the softmax classifier with a more interpretable k-nearest-neighbor classification approach. In a series of experiments, we show that this yields a number of interesting benefits: (1) The resulting order induced by distances in the embedding space can be used to directly explain classification decisions. (2) This facilitates qualitative inspection of the training data, helping us to better understand the problem space and identify labelling quality issues. (3) The learned distances to some degree generalize to unseen classes, allowing us to incrementally add new classes without retraining the model. We present extensive experiments which show that the benefits of ante-hoc explainability and incremental learning come at no cost in overall classification accuracy, thus pointing to practical applicability of our proposed approach.
翻译:文本分类目前采用的最新方法通常会利用软式变压器来利用软式变压器的软式变压器模型,共同调整以预测目标任务等级标签。在本文件中,我们提议了一个替代培训目标,让我们学习具体任务内容的嵌入:我们拟议的目标学习嵌入式,这样所有共享目标类标签的文本都应在嵌入空间中紧紧相连,而所有其他文本应相距甚远。这使我们能够用一种更可解释的K-近邻分类法取代软式变压器。在一系列实验中,我们表明这产生了一些有趣的好处:(1) 嵌入空间的距离导致的顺序可以直接解释分类决定。(2) 这有助于对培训数据进行定性检查,帮助我们更好地理解问题空间并确定标签质量问题。(3) 学到到某种程度的一般到隐蔽类的距离,使我们能够在不再培训模型的情况下逐步增加新的类。我们提出的大量实验表明,在总体分类中,我们提出的可解释性和递增学习方法没有成本精确性。