Out-of-distribution (OOD) detection aims to discern outliers from the intended data distribution, which is crucial to maintaining high reliability and a good user experience. Most recent studies in OOD detection utilize the information from a single representation that resides in the penultimate layer to determine whether the input is anomalous or not. Although such a method is straightforward, the potential of diverse information in the intermediate layers is overlooked. In this paper, we propose a novel framework based on contrastive learning that encourages intermediate features to learn layer-specialized representations and assembles them implicitly into a single representation to absorb rich information in the pre-trained language model. Extensive experiments in various intent classification and OOD datasets demonstrate that our approach is significantly more effective than other works.
翻译:分配外探测的目的是从预期的数据分配中找出出处,这是保持高度可靠性和良好的用户经验的关键,最近对OOD探测进行的大多数研究都利用倒数第二层的单一显示器提供的信息来确定输入是否异常。虽然这种方法简单明了,但中间层信息多样性的潜力被忽视了。在本文件中,我们提出了一个基于对比性学习的新框架,鼓励中间特征学习分层专业的表示器,并隐含地将其组合成一个单一表示器,以吸收预先培训的语言模型中的丰富信息。各种意图分类和OOOD数据集的广泛实验表明,我们的方法比其他工作要有效得多。