Is Fine-tuning Needed? Pre-trained Language Models Are Near Perfect for Out-of-Domain Detection

要約

配布外 (OOD) の検出は、テキストに対する信頼性の高い予測を行うための重要なタスクです。
事前トレーニングされた言語モデルを使用した微調整は、配信中 (ID) データに関して OOD 検出器を導出する事実上の手順です。
一般的に使用されているにもかかわらず、微調整の役割と OOD 検出における微調整の必要性についてはほとんど解明されていません。
このペーパーでは、OOD 検出に微調整が必​​要か?という疑問を提起します。
ID データに対するモデルの微調整を行わずに、OOD 検出に事前トレーニング済みの言語モデルを直接活用することの有効性を調査した研究を紹介します。
私たちはこのアプローチをいくつかの競争力のある微調整目標と比較し、さまざまな種類の分布の変化の下で新たな洞察を提供します。
8 つの多様な ID-OOD データセット ペアに対する広範な評価により、ほぼ完璧な OOD 検出パフォーマンス (多くの場合、FPR95 が 0%) が実証され、微調整された対応物を大幅に上回ります。
距離ベースの検出方法を使用すると、分布の変化にドメインの変更が含まれる場合、事前トレーニングされた言語モデルがほぼ完璧な OOD 検出器であることを示します。
さらに、微調整が OOD 検出に及ぼす影響を研究し、ID 精度と OOD 検出パフォーマンスのバランスを取る方法を特定します。
私たちのコードは https://github.com/Uppaal/lm-ood で公開されています。

要約(オリジナル)

Out-of-distribution (OOD) detection is a critical task for reliable predictions over text. Fine-tuning 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 near-perfect OOD detection performance (with 0% FPR95 in many cases), strongly outperforming its fine-tuned counterparts. We show that using distance-based detection methods, pre-trained 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 at https://github.com/Uppaal/lm-ood.

arxiv情報

著者 Rheeya Uppaal,Junjie Hu,Yixuan Li
発行日 2023-05-22 17:42:44+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG パーマリンク