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., ID-like samples. To this end, we propose a novel OOD detection framework that discovers ID-like outliers using CLIP 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 ID-like 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 ID-like 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).
翻译:分布外(OOD)检测方法常利用辅助异常值训练模型识别OOD样本,尤其通过从辅助异常值数据集中发现具有挑战性的异常值来提升OOD检测性能。然而,这些方法在有效区分与分布内(ID)数据高度相似的最具挑战性OOD样本(即ID类样本)时仍存在局限。为此,我们提出一种新型OOD检测框架,利用CLIP从ID样本的邻域空间中发现ID类异常值,从而辅助识别这些最具挑战性的OOD样本。进一步提出提示学习框架,通过利用所识别的ID类异常值充分挖掘CLIP在OOD检测中的能力。得益于强大的CLIP模型,我们仅需少量ID样本即可学习模型提示,无需暴露其他辅助异常值数据集。通过聚焦最具挑战性的ID类OOD样本并巧妙利用CLIP能力,本方法在多种真实图像数据集上实现了优异的少样本学习性能(例如在ImageNet-1k数据集的4样本OOD检测任务中,相比现有最优方法,平均FPR95降低12.16%,平均AUROC提升2.76%)。