arXiv:2509.18111cs.LGcs.AI2025-09

用提示优化与子空间学习提升少样本分布外检测效果

Prompt Optimization Meets Subspace Representation Learning for Few-shot Out-of-Distribution Detection

  • 将提示向量构建子空间,分离正常与异常特征
  • 在多个真实数据集上实现高精度分布外检测
  • 适合需要可靠异常识别的开放世界AI系统

人工智能系统在开放世界中的可靠性取决于其识别训练中未见分布外(OOD)输入的能力。近年来,大规模视觉语言模型(VLMs)使得仅用少量正常样本即可实现少样本OOD检测成为可能。然而,现有基于提示学习的方法仅依赖softmax概率,忽略了VLMs从海量数据中学到的丰富特征表示潜力。为此,我们提出一种基于CoOp的新型框架,将子空间表示学习与提示调优结合:将正常特征投影至由提示向量张成的子空间,将非正常特征投影至正交的零空间,以增强正常与分布外样本的可分性。为训练该框架,设计了一种易于实现的端到端学习准则,兼顾强分布外检测性能与高正常分类准确率。在多个真实世界数据集上的实验验证了方法的有效性。

原文摘要 · Abstract (English)

The reliability of artificial intelligence (AI) systems in open-world settings depends heavily on their ability to flag out-of-distribution (OOD) inputs unseen during training. Recent advances in large-scale vision-language models (VLMs) have enabled promising few-shot OOD detection frameworks using only a handful of in-distribution (ID) samples. However, existing prompt learning-based OOD methods rely solely on softmax probabilities, overlooking the rich discriminative potential of the feature embeddings learned by VLMs trained on millions of samples. To address this limitation, we propose a novel context optimization (CoOp)-based framework that integrates subspace representation learning with prompt tuning. Our approach improves ID-OOD separability by projecting the ID features into a subspace spanned by prompt vectors, while projecting ID-irrelevant features into an orthogonal null space. To train such OOD detection framework, we design an easy-to-handle end-to-end learning criterion that ensures strong OOD detection performance as well as high ID classification accuracy. Experiments on real-world datasets showcase the effectiveness of our approach.

少样本检测分布外检测提示学习子空间学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。