Out-of-distribution (OOD) detection methods often exploit auxiliary outliers to train model identifying OOD samples, especially discovering challenging outliers from auxiliary outliers dataset to improve OOD detection. However, they may still face limitations in effectively distinguishing between the most challenging OOD samples that are much like in-distribution (ID) data, i.e., \idlike samples. To this end, we propose a novel OOD detection framework that discovers \idlike outliers using CLIP \cite{DBLP:conf/icml/RadfordKHRGASAM21} from the vicinity space of the ID samples, thus helping to identify these most challenging OOD samples. Then a prompt learning framework is proposed that utilizes the identified \idlike outliers to further leverage the capabilities of CLIP for OOD detection. Benefiting from the powerful CLIP, we only need a small number of ID samples to learn the prompts of the model without exposing other auxiliary outlier datasets. By focusing on the most challenging \idlike OOD samples and elegantly exploiting the capabilities of CLIP, our method achieves superior few-shot learning performance on various real-world image datasets (e.g., in 4-shot OOD detection on the ImageNet-1k dataset, our method reduces the average FPR95 by 12.16\% and improves the average AUROC by 2.76\%, compared to state-of-the-art methods). Code is available at https://github.com/ycfate/ID-like.
翻译:分布外(OOD)检测方法常利用辅助异常样本来训练模型识别OOD样本,尤其通过从辅助异常数据集中发现高难度异常样本来提升检测性能。然而,这些方法在有效区分最接近类内(ID)数据的OOD样本(即类内相似样本)时仍存在局限。为此,我们提出一种新型OOD检测框架,从ID样本邻域空间中利用CLIP《引用》发现类内相似异常样本,从而辅助识别这些最具挑战性的OOD样本。进一步地,我们提出提示学习框架,利用已识别的类内相似异常样本充分挖掘CLIP在OOD检测中的能力。得益于CLIP的强大性能,我们仅需少量ID样本即可学习模型提示,无需暴露其他辅助异常数据集。通过聚焦最具挑战性的类内相似OOD样本并巧妙利用CLIP能力,本方法在多种真实图像数据集上实现了卓越的小样本学习性能(例如,在ImageNet-1k数据集的4样本OOD检测任务中,平均FPR95降低12.16%,平均AUROC提升2.76%,均优于现有最先进方法)。代码已开源:https://github.com/ycfate/ID-like。