Lune

ACL2023Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Heterogeneous Customizable Personalized Federated Fine-Tuning Approach for Large Language Models cites Likelihood Ratios and Generative Classifiers for Unsupervised Out-of-Domain Detection in Task Oriented Dialog
  • Human Heterogeneity Invariant Stress Sensing cites Distributionally Robust Neural Networks
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Heterogeneous Customizable Personalized Federated Fine-Tuning Approach for Large Language Modelsxin tong, Baojiang cuiICML 2026 · 199 citations
  2. LLMLingua: Compressing Prompts for Accelerated Inference of Large Language ModelsHuiqiang Jiang, Qianhui Wu, Chin-Yew Lin, Yuqing Yang et al.EMNLP 2023 · 94 citations
  3. On the Noise Robustness of In-Context Learning for Text GenerationHongfu Gao, Feipeng Zhang, Wenyu Jiang, Jun Shu et al.NeurIPS 2024 · 20 citations
  4. 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
  5. Human Heterogeneity Invariant Stress SensingYi Xiao, Harshit Sharma, Sawinder Kaur, Dessa Bergen-Cico et al.UbiComp 2025 · 6 citations

Builds on10

  1. Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
  2. Distributionally Robust Neural NetworksShiori Sagawa, Pang Wei Koh, Tatsunori B. Hashimoto, Percy LiangICLR 2020 · 1,578 citations
  3. ELECTRA: Pre-training Text Encoders as Discriminators Rather Than GeneratorsKevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. ManningICLR 2020 · 541 citations
  4. Contrastive Out-of-Distribution Detection for Pretrained TransformersWenxuan Zhou, Fangyu Liu, Muhao ChenEMNLP 2021 · 63 citations
  5. 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

  1. Enhancing Out-of-Distribution Detection in Natural Language Understanding via Implicit Layer EnsembleHyunsoo Cho, Choonghyun Park, Jaewook Kang, Kang Min Yoo et al.EMNLP Findings 2022 · 6 citations
  2. Strengthen Out-of-Distribution Detection Capability with Progressive Self-Knowledge DistillationYang Yang, Haonan XuICML 2025
  3. Holistic Sentence Embeddings for Better Out-of-Distribution DetectionSishuo Chen, Xiaohan Bi, Rundong Gao, Xu SunEMNLP Findings 2022 · 9 citations
  4. Open-vocabulary Object Detection via Vision and Language Knowledge DistillationXiuye Gu, Tsung-Yi Lin, Weicheng Kuo, Yin CuiICLR 2022 · 1,274 citations
  5. AP-OOD: Attention Pooling for Out-of- Distribution DetectionClaus Hofmann, Christian Huber, Bernhard Lehner, Daniel Klotz et al.ICLR 2026 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines