CLJan 30, 2023

Fine-Tuning Deteriorates General Textual Out-of-Distribution Detection by Distorting Task-Agnostic Features

arXiv:2301.12715v1271 citationsh-index: 13Has Code
Originality Incremental advance
AI Analysis

This work addresses a critical safety issue for deploying NLP models by identifying limitations in current OOD detection methods and offering a more robust solution, though it is incremental in improving existing approaches.

The paper tackles the problem of out-of-distribution (OOD) detection in NLP by evaluating existing methods on semantic and non-semantic shifts, finding that fine-tuning pre-trained language models deteriorates detection for non-semantic shifts due to distorted task-agnostic features. It proposes GNOME, a simple OOD score that integrates task-agnostic and task-specific representations, achieving significant improvements on cross-task benchmarks.

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.

Code Implementations2 repos
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes