Fine-Tuning Deteriorates General Textual Out-of-Distribution Detection by Distorting Task-Agnostic Features
Not on the map. Why?
Abstract (arXiv)
Detecting out-of-distribution (OOD) inputs is crucial for the safe deployment of natural language processing (NLP) models. Though existing methods, especially those based on the statistics in the feature space of fine-tuned pre-trained language models (PLMs), are claimed to be effective, their effectiveness on different types of distribution shifts remains underexplored. In this work, we take the first step to comprehensively evaluate the mainstream textual OOD detection methods for detecting semantic and non-semantic shifts. We find that: (1) no existing method behaves well in both settings; (2) fine-tuning PLMs on in-distribution data benefits detecting semantic shifts but severely deteriorates detecting non-semantic shifts, which can be attributed to the distortion of task-agnostic features. To alleviate the issue, we present a simple yet effective general OOD score named GNOME that integrates the confidence scores derived from the task-agnostic and task-specific representations. Experiments show that GNOME works well in both semantic and non-semantic shift scenarios, and further brings significant improvement on two cross-task benchmarks where both kinds of shifts simultaneously take place. Our code is available at https://github.com/lancopku/GNOME.
Key facts. Cited by 12 papers in the map (data through 7 Oct 2026). Builds on 40 of its 72 references that are in the map. First posted on arXiv 30 Jan 2023.
Builds on
40 of 72 references.
References · 40
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2015Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learningcited by 4,416
- 2016Simple and Scalable Predictive Uncertainty Estimation using Deep Ensemblescited by 3,888
- 2020Supervised Contrastive Learningcited by 2,803
- 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,362
- 2015A large annotated corpus for learning natural language inferencecited by 1,837
- 2016Concrete Problems in AI Safetycited by 1,582
- 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,472
28 more
- 2017Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networkscited by 1,325
- 2020Energy-based Out-of-distribution Detectioncited by 1,296
- 2021Generalized Out-of-Distribution Detection: A Surveycited by 796
- 2022Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distributioncited by 722
- 2022Out-of-Distribution Detection with Deep Nearest Neighborscited by 596
- 2020Pre-trained Models for Natural Language Processing: A Surveycited by 504
- 2018What you can cram into a single vector: Probing sentence embeddings for linguistic propertiescited by 452
- 2020Generalized ODIN: Detecting Out-of-distribution Image without Learning from Out-of-distribution Datacited by 408
- 2019An Evaluation Dataset for Intent Classification and Out-of-Scope Predictioncited by 378
- 2018SentEval: An Evaluation Toolkit for Universal Sentence Representationscited by 294
- 2020Pretrained Transformers Improve Out-of-Distribution Robustnesscited by 293
- 2021Exploring the Limits of Out-of-Distribution Detectioncited by 283
- 2018Large Scale Crowdsourcing and Characterization of Twitter Abusive Behaviorcited by 265
- 2021Whitening Sentence Representations for Better Semantics and Faster Retrievalcited by 198
- 2020Recall and Learn: Fine-tuning Deep Pretrained Language Models with Less Forgettingcited by 169
- 2020Likelihood Regret: An Out-of-Distribution Detection Score For Variational Auto-encodercited by 145
- 2021Types of Out-of-Distribution Texts and How to Detect Themcited by 80
- 2020SENTRY: Selective Entropy Optimization via Committee Consistency for Unsupervised Domain Adaptationcited by 78
- 2021Contrastive Out-of-Distribution Detection for Pretrained Transformerscited by 70
- 2021Revisiting Mahalanobis Distance for Transformer-Based Out-of-Domain Detectioncited by 67
- 2019Deep Unknown Intent Detection with Margin Losscited by 66
- 2019Detecting semantic anomaliescited by 50
- 2020Feature Space Singularity for Out-of-Distribution Detectioncited by 49
- 2019Likelihood Ratios and Generative Classifiers for Unsupervised Out-of-Domain Detection In Task Oriented Dialogcited by 33
- 2021Unsupervised Out-of-Domain Detection via Pre-trained Transformerscited by 31
- 2021Enhancing the Generalization for Intent Classification and Out-of-Domain Detection in SLUcited by 22
- 2021kFolden: k-Fold Ensemble for Out-Of-Distribution Detectioncited by 10
- 2022Holistic Sentence Embeddings for Better Out-of-Distribution Detectioncited by 6
Built on by
Citing papers per year: 2023: 4; 2024: 6; 2025: 2.
12 papers.
- 2023A Survey of Safety and Trustworthiness of Large Language Models through the Lens of Verification and Validationcited by 91
- 2024Characterizing LLM Abstention Behavior in Science QA with Context Perturbationscited by 26
- 2024BadActs: A Universal Backdoor Defense in the Activation Spacecited by 19
- 2025Training-Free Policy Violation Detection via Activation-Space Whitening in LLMscited by 6
- 2023Classical Out-of-Distribution Detection Methods Benchmark in Text Classification Taskscited by 5
- 2023FLatS: Principled Out-of-Distribution Detection with Feature-Based Likelihood Ratio Scorecited by 5
- 2024A new approach for fine-tuning sentence transformers for intent classification and out-of-scope detection taskscited by 4
- 2024Out-of-Distribution Detection through Soft Clustering with Non-Negative Kernel Regressioncited by 3
- 2024Counterfactuals As a Means for Evaluating Faithfulness of Attribution Methods in Autoregressive Language Modelscited by 3
- 2025Merging Smarter, Generalizing Better: Enhancing Model Merging on OOD Datacited by 3
- 2024Out-of-Distribution Detection with Attention Head Masking for Multimodal Document Classificationcited by 2
- 2023Estimating Semantic Similarity between In-Domain and Out-of-Domain Samplescited by 1
- 2025Training-Free Policy Violation Detection via Activation-Space Whitening in LLMs3 Dec 2025
- 2025Merging Smarter, Generalizing Better: Enhancing Model Merging on OOD Data10 Jun 2025
- 2024A new approach for fine-tuning sentence transformers for intent classification and out-of-scope detection tasks17 Oct 2024
- 2024Counterfactuals As a Means for Evaluating Faithfulness of Attribution Methods in Autoregressive Language Models21 Aug 2024
- 2024Out-of-Distribution Detection with Attention Head Masking for Multimodal Document Classification20 Aug 2024
- 2024Out-of-Distribution Detection through Soft Clustering with Non-Negative Kernel Regression18 Jul 2024
- 2024BadActs: A Universal Backdoor Defense in the Activation Space18 May 2024
- 2024Characterizing LLM Abstention Behavior in Science QA with Context Perturbations18 Apr 2024
- 2023FLatS: Principled Out-of-Distribution Detection with Feature-Based Likelihood Ratio Score8 Oct 2023
- 2023Classical Out-of-Distribution Detection Methods Benchmark in Text Classification Tasks13 Jul 2023
- 2023Estimating Semantic Similarity between In-Domain and Out-of-Domain Samples1 Jun 2023
- 2023A Survey of Safety and Trustworthiness of Large Language Models through the Lens of Verification and Validation19 May 2023