Is Fine-tuning Needed? Pre-trained Language Models Are Near Perfect for Out-of-Domain Detection
Rheeya Uppaal, Junjie Hu, Yixuan Li
摘要
Out-of-distribution (OOD) detection is a critical task for reliable predictions over text. Finetuning with pre-trained language models has been a de facto procedure to derive OOD detectors with respect to in-distribution (ID) data. Despite its common use, the understanding of the role of fine-tuning and its necessity for OOD detection is largely unexplored. In this paper, we raise the question: is fine-tuning necessary for OOD detection? We present a study investigating the efficacy of directly leveraging pre-trained language models for OOD detection, without any model fine-tuning on the ID data. We compare the approach with several competitive fine-tuning objectives, and offer new insights under various types of distributional shifts. Extensive evaluations on 8 diverse ID-OOD dataset pairs demonstrate nearperfect OOD detection performance (with 0% FPR95 in many cases), strongly outperforming its fine-tuned counterparts. We show that using distance-based detection methods, pretrained language models are near-perfect OOD detectors when the distribution shift involves a domain change. Furthermore, we study the effect of fine-tuning on OOD detection and identify how to balance ID accuracy with OOD detection performance. Our code is publically available 1 .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- How Does Unlabeled Data Provably Help Out-of-Distribution Detection? 引用了 Energy-based Out-of-distribution Detection
- How Does Unlabeled Data Provably Help Out-of-Distribution Detection? 引用了 Out-of-Distribution Detection with Deep Nearest Neighbors
- Out-of-Distribution Detection with Deep Nearest Neighbors 引用了 Energy-based Out-of-distribution Detection
- Out-of-Distribution Detection with Deep Nearest Neighbors 引用了 Supervised Contrastive Learning
- On Large Language Model Continual Unlearning 引用了 SimCSE: Simple Contrastive Learning of Sentence Embeddings
引用它的顶会 Paper8
- How Does Unlabeled Data Provably Help Out-of-Distribution Detection?Xuefeng Du, Zhen Fang, Ilias Diakonikolas, Yixuan LiICLR 2024 · 39 次引用
- DoRA: Enhancing Parameter-Efficient Fine-Tuning with Dynamic Rank DistributionYulong Mao, Kaiyu Huang, Changhao Guan, Ganglin Bao 等ACL 2024 · 15 次引用
- MoE-RBench: Towards Building Reliable Language Models with Sparse Mixture-of-ExpertsGuanjie Chen, Xinyu Zhao, Tianlong Chen, Yu ChengICML 2024 · 8 次引用
- Trust The TypicalDebargha Ganguly, Sreehari Sankar, Biyao Zhang, Vikash Singh 等ICLR 2026 · 3 次引用
- On Large Language Model Continual UnlearningChongyang Gao, Lixu Wang, Kaize Ding, Chenkai Weng 等ICLR 2025 · 1 次引用
它引用的 Paper22
- Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna 等NeurIPS 2020 · 7,049 次引用
- SimCSE: Simple Contrastive Learning of Sentence EmbeddingsTianyu Gao, Xingcheng Yao, Danqi ChenEMNLP 2021 · 2,496 次引用
- Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 次引用
- Fine-Tuning can Distort Pretrained Features and Underperform Out-of-DistributionAnanya Kumar, Aditi Raghunathan, Robbie Matthew Jones, Tengyu Ma 等ICLR 2022 · 911 次引用
- Out-of-Distribution Detection with Deep Nearest NeighborsYiyou Sun, Yifei Ming, Xiaojin Zhu, Yixuan LiICML 2022 · 789 次引用
相关 Paper
- Contrastive Out-of-Distribution Detection for Pretrained TransformersWenxuan Zhou, Fangyu Liu, Muhao ChenEMNLP 2021 · 63 次引用
- Holistic Sentence Embeddings for Better Out-of-Distribution DetectionSishuo Chen, Xiaohan Bi, Rundong Gao, Xu SunEMNLP Findings 2022 · 9 次引用
- BARLE: Background-Aware Representation Learning for Background Shift Out-of-Distribution DetectionHanyu Duan, Yi Yang, Ahmed Abbasi, Kar Yan TamEMNLP Findings 2022 · 2 次引用
- CED: Comparing Embedding Differences for Detecting Out-of-Distribution and Hallucinated TextHakyung Lee, Keon-Hee Park, Hoyoon Byun, Jeyoon Yeom 等EMNLP Findings 2024 · 1 次引用
- On Prefix-tuning for Lightweight Out-of-distribution DetectionYawen Ouyang, Yongchang Cao, Yuan Gao, Zhen Wu 等ACL 2023 · 1 次引用
