论文标题

文本中分布式检测的多层次知识蒸馏

Multi-Level Knowledge Distillation for Out-of-Distribution Detection in Text

论文作者

Wu, Qianhui, Jiang, Huiqiang, Yin, Haonan, Karlsson, Börje F., Lin, Chin-Yew

论文摘要

事实证明,自我监督的表示学习被证明是分布(OOD)检测的有价值的组成部分,仅具有分布(ID)示例的文本。这些方法要么使用ID示例从头开始训练语言模型,要么对预训练的语言模型进行微调,然后将语言模型的困惑输出作为OOD分数。在本文中,我们分析了两种OOD检测方法的互补特征,并提出了一种多级知识蒸馏方法,该方法在缓解其局限性的同时整合了其优势。具体来说,我们使用微型模型作为老师,在ID示例上教随机初始化的学生模型。除了预测层蒸馏外,我们还提出了一种基于相似性的中间层蒸馏方法,以彻底探索教师模型的表示空间。通过这种方式,学识渊博的学生可以更好地表示ID数据歧管,同时获得更强的能力来映射ID数据歧管之外的OOD示例,并从预训练中继承的正则化。此外,学生模型仅在参数学习过程中看到ID示例,进一步促进了更多可区分的OOD检测功能。我们对多个基准数据集进行了广泛的实验,即Clinc150,SST,ROSTD,20个新闻组和AG News;表明所提出的方法会产生新的最新性能。我们还探索了其作为AIGC检测器的应用,以区分Chatgpt和人类专家产生的答案。据观察,我们的模型超过了人类Chatgpt比较语料库的成对专家任务中的人类评估者。

Self-supervised representation learning has proved to be a valuable component for out-of-distribution (OoD) detection with only the texts of in-distribution (ID) examples. These approaches either train a language model from scratch or fine-tune a pre-trained language model using ID examples, and then take the perplexity output by the language model as OoD scores. In this paper, we analyze the complementary characteristics of both OoD detection methods and propose a multi-level knowledge distillation approach that integrates their strengths while mitigating their limitations. Specifically, we use a fine-tuned model as the teacher to teach a randomly initialized student model on the ID examples. Besides the prediction layer distillation, we present a similarity-based intermediate layer distillation method to thoroughly explore the representation space of the teacher model. In this way, the learned student can better represent the ID data manifold while gaining a stronger ability to map OoD examples outside the ID data manifold with the regularization inherited from pre-training. Besides, the student model sees only ID examples during parameter learning, further promoting more distinguishable features for OoD detection. We conduct extensive experiments over multiple benchmark datasets, i.e., CLINC150, SST, ROSTD, 20 NewsGroups, and AG News; showing that the proposed method yields new state-of-the-art performance. We also explore its application as an AIGC detector to distinguish between answers generated by ChatGPT and human experts. It is observed that our model exceeds human evaluators in the pair-expert task on the Human ChatGPT Comparison Corpus.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源