CLIPN for Zero-Shot OOD Detection: Teaching CLIP to Say No

要約

分布外 (OOD) 検出とは、分布内 (ID) データセットでモデルをトレーニングして、入力画像が未知のクラスからのものであるかどうかを分類することを指します。
畳み込みニューラル ネットワークまたはトランスフォーマーに基づくさまざまな OOD 検出方法の設計には、多大な労力が費やされてきました。
ただし、ID のクラス名のみを必要とする CLIP によるゼロショット OOD 検出方法は、あまり注目されていません。
この論文では、CLIP 内でノーと言うロジックを強化する新しい方法、つまり CLIP セイイング ノー (CLIPN) を紹介します。
私たちの主な動機は、ポジティブセマンティックプロンプトとネガティブセマンティックプロンプトを使用して OOD サンプルと ID サンプルを区別する機能を CLIP に装備することです。
具体的には、画像内の否定セマンティクスをキャプチャするための、新しい学習可能なプロンプトなしおよびテキストなしのエンコーダーを設計します。
続いて、画像とテキストのバイナリ反対の損失とテキストの意味論的な反対の損失という 2 つの損失関数を導入します。これらを使用して、プロンプトなしで画像を関連付けるよう CLIPN に学習させ、それによって未知のサンプルを識別できるようにします。
さらに、プロンプトなしとテキストエンコーダーからの否定セマンティクスを利用して OOD 検出を実行する 2 つのしきい値なしの推論アルゴリズムを提案します。
OOD 検出タスクの 9 つのベンチマーク データセット (3 つの ID データセットと 6 つの OOD データセット) の実験結果は、ViT-B-16 に基づく CLIPN が、よく使用されている 7 つのアルゴリズムよりも AUROC に関して少なくとも 2.34% および 11.64% 優れていることを示しています。
ImageNet-1K でのゼロショット OOD 検出用の FPR95。
当社の CLIPN は、下流の OOD タスクで CLIP を効果的に活用するための強固な基盤として機能します。
コードは https://github.com/xmed-lab/CLIPN で入手できます。

要約(オリジナル)

Out-of-distribution (OOD) detection refers to training the model on an in-distribution (ID) dataset to classify whether the input images come from unknown classes. Considerable effort has been invested in designing various OOD detection methods based on either convolutional neural networks or transformers. However, zero-shot OOD detection methods driven by CLIP, which only require class names for ID, have received less attention. This paper presents a novel method, namely CLIP saying no (CLIPN), which empowers the logic of saying no within CLIP. Our key motivation is to equip CLIP with the capability of distinguishing OOD and ID samples using positive-semantic prompts and negation-semantic prompts. Specifically, we design a novel learnable no prompt and a no text encoder to capture negation semantics within images. Subsequently, we introduce two loss functions: the image-text binary-opposite loss and the text semantic-opposite loss, which we use to teach CLIPN to associate images with no prompts, thereby enabling it to identify unknown samples. Furthermore, we propose two threshold-free inference algorithms to perform OOD detection by utilizing negation semantics from no prompts and the text encoder. Experimental results on 9 benchmark datasets (3 ID datasets and 6 OOD datasets) for the OOD detection task demonstrate that CLIPN, based on ViT-B-16, outperforms 7 well-used algorithms by at least 2.34% and 11.64% in terms of AUROC and FPR95 for zero-shot OOD detection on ImageNet-1K. Our CLIPN can serve as a solid foundation for effectively leveraging CLIP in downstream OOD tasks. The code is available on https://github.com/xmed-lab/CLIPN.

arxiv情報

著者 Hualiang Wang,Yi Li,Huifeng Yao,Xiaomeng Li
発行日 2023-08-24 00:48:47+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: 68T45, cs.AI, cs.CV, I.4.9 パーマリンク