Skip to main content
QUICK REVIEW

[论文解读] LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt Learning

Atsuyuki Miyai, Qing Yu|arXiv (Cornell University)|Jun 2, 2023
Domain Adaptation and Few-Shot LearningComputer Science被引用 12
一句话总结

LoCoOp 引入局部正则化上下文优化,通过使用 CLIP 提示进行少-shot OOD 检测,在训练期间将 CLIP 的局部特征视为 OOD 提示,从而改善 OOD 分离。它在基于 ImageNet 的基准测试中,即使每类只有一个样本,也超越了零-shot、完全监督和先前的提示学习方法。

ABSTRACT

We present a novel vision-language prompt learning approach for few-shot out-of-distribution (OOD) detection. Few-shot OOD detection aims to detect OOD images from classes that are unseen during training using only a few labeled in-distribution (ID) images. While prompt learning methods such as CoOp have shown effectiveness and efficiency in few-shot ID classification, they still face limitations in OOD detection due to the potential presence of ID-irrelevant information in text embeddings. To address this issue, we introduce a new approach called Local regularized Context Optimization (LoCoOp), which performs OOD regularization that utilizes the portions of CLIP local features as OOD features during training. CLIP's local features have a lot of ID-irrelevant nuisances (e.g., backgrounds), and by learning to push them away from the ID class text embeddings, we can remove the nuisances in the ID class text embeddings and enhance the separation between ID and OOD. Experiments on the large-scale ImageNet OOD detection benchmarks demonstrate the superiority of our LoCoOp over zero-shot, fully supervised detection methods and prompt learning methods. Notably, even in a one-shot setting -- just one label per class, LoCoOp outperforms existing zero-shot and fully supervised detection methods. The code will be available via https://github.com/AtsuMiyai/LoCoOp.

研究动机与目标

  • 在少-shot 条件下动机并解决现有零-shot 与完全监督 OOD 检测方法的局限性。
  • 利用 CLIP 的局部特征在提示学习过程中识别并正则化与 ID 无关的区域。
  • 开发一个简单高效的 OOD 正则化技术,与 CoOp 风格的提示兼容,以提升 ID/OOD 的分离。
  • 在大规模 ImageNet OOD 基准测试的各种 shot 设置中展示强劲的性能提升。

提出的方法

  • 采用 LoCal 正则化上下文优化(LoCoOp)来对 OOD 进行正则化,使用 CLIP 局部特征作为 OOD cues。
  • 通过评估局部 CLIP 特征与 ID 类文本嵌入之间的区域对齐(基于排名的前 K 选择)来识别 ID 无关(背景)区域。
  • 对预测的区域分数应用熵最大化作为 OOD 正则化损失,将 ID 无关区域推离 ID 文本嵌入。
  • 将对整图的标准 CoOp 损失与 OOD 正则化项结合起来(L = L_CoOp + lambda * L_OOD)。
  • 在测试阶段,使用 MCM 和 GL-MCM 分数(全局和局部特征)用于最终的 OOD 检测。

实验结果

研究问题

  • RQ1LoCoOp 能否通过对局部特征进行 ID 无关区域正则化来提高基于 CLIP 的少-shot OOD 检测?
  • RQ2基于排名的 ID 无关区域识别相较于其他阈值策略对 OOD 判别有何影响?
  • RQ3超参数 K(前 K 区域)和 lambda(OOD 损失权重)对 OOD 性能有何影响?
  • RQ4LoCoOp 相对于零-shot、完全监督和其他提示学习基线在基于 ImageNet 的 OOD 基准上有何表现?

主要发现

  • LoCoOp 结合 GL-MCM 获得卓越的 OOD 检测性能,在 ImageNet OOD 基准上击败了与之竞争的方法。
  • 在 16-shot 设置中,LoCoOp GL 达到 AUROC 93.52%,超过了所有其他方法(没有方法超过 92%)。
  • 在 1-shot 设置中,LoCoOp GL 实现了强劲的平均 FPR95 与 AUROC(分别为 33.52 与 92.14),超越零-shot 以及部分完全监督方法。
  • LoCoOp 在一系列 K 值上保持性能稳健(对极端如 0 或 1000 时不太敏感)。
  • LoCoOp 的推理速度快于按图像提示的方法(如 CoCoOp),并且在 ID-准确度折中方面优于某些基线。
  • 使用 GL-MCM 搭配 LoCoOp 相较 MCM 能带来显著提升,尤其是在与局部特征正则化结合时。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。