Multi-Level Knowledge Distillation for Out-of-Distribution Detection in Text
Qianhui Wu, Huiqiang Jiang, Haonan Yin, Börje Karlsson, Chin-Yew Lin
Abstract
Self-supervised representation learning has proved to be a valuable component for outof-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 1 . 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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d997f6b4-6223-4606-bcb5-9125bf938c08Cited by top-tier papers5
- Heterogeneous Customizable Personalized Federated Fine-Tuning Approach for Large Language Modelsxin tong, Baojiang cuiICML 2026 · 199 citations
- LLMLingua: Compressing Prompts for Accelerated Inference of Large Language ModelsHuiqiang Jiang, Qianhui Wu, Chin-Yew Lin, Yuqing Yang et al.EMNLP 2023 · 94 citations
- On the Noise Robustness of In-Context Learning for Text GenerationHongfu Gao, Feipeng Zhang, Wenyu Jiang, Jun Shu et al.NeurIPS 2024 · 20 citations
- GEM: Gaussian Embedding Modeling for Out-of-Distribution Detection in GUI AgentsZheng Wu, Pengzhou Cheng, Zongru Wu, Lingzhong Dong et al.AAAI 2026 · 7 citations
- Human Heterogeneity Invariant Stress SensingYi Xiao, Harshit Sharma, Sawinder Kaur, Dessa Bergen-Cico et al.UbiComp 2025 · 6 citations
Builds on10
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Distributionally Robust Neural NetworksShiori Sagawa, Pang Wei Koh, Tatsunori B. Hashimoto, Percy LiangICLR 2020 · 1,578 citations
- ELECTRA: Pre-training Text Encoders as Discriminators Rather Than GeneratorsKevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. ManningICLR 2020 · 541 citations
- Contrastive Out-of-Distribution Detection for Pretrained TransformersWenxuan Zhou, Fangyu Liu, Muhao ChenEMNLP 2021 · 63 citations
- Likelihood Ratios and Generative Classifiers for Unsupervised Out-of-Domain Detection in Task Oriented DialogVarun Gangal, Abhinav Arora, Arash Einolghozati, Sonal GuptaAAAI 2020 · 59 citations
Related papers
- Strengthen Out-of-Distribution Detection Capability with Progressive Self-Knowledge DistillationYang Yang, Haonan XuICML 2025
- AP-OOD: Attention Pooling for Out-of- Distribution DetectionClaus Hofmann, Christian Huber, Bernhard Lehner, Daniel Klotz et al.ICLR 2026 · 2 citations
- Mysteries of the Deep: Role of Intermediate Representations in Out of Distribution DetectionIgnacio Meza De La Jara, Cristian Rodriguez Opazo, Damien Teney, Damith Ranasinghe et al.NeurIPS 2025 · 8 citations
- Scene-adaptive and Region-aware Multi-modal Prompt for Open Vocabulary Object DetectionXiaowei Zhao, Xianglong Liu, Duorui Wang, Yajun Gao et al.CVPR 2024 · 8 citations
- Open-vocabulary Object Detection via Vision and Language Knowledge DistillationXiuye Gu, Tsung-Yi Lin, Weicheng Kuo, Yin CuiICLR 2022 · 1,274 citations
