让视觉语言模型的提示词融入先验知识,提升零样本识别能力
InPK: Infusing Prior Knowledge into Prompt for Vision-Language Models
- 初始化时将类别先验知识注入可学习提示词,增强语义关联
- 多层特征中持续强化提示词与先验知识的交互,提升泛化性
- 适合需要零样本/少样本识别的视觉任务,尤其对未知类别表现优
提示调优已成为适应视觉语言模型(VLM)于零样本/少样本图像识别任务的主流方法。尽管部分提示技术引入了丰富的先验知识,但若可学习提示词随机初始化且与先验知识脱节,易在已见类别上过拟合,并在未见类别上因领域偏移而表现不佳。为此,我们提出InPK模型,在初始化阶段将类别特定的先验知识注入可学习提示词,使模型能明确关注类别相关信息。此外,为缓解多层编码器对类别信息的削弱,我们在多个特征层级上持续强化提示词与先验知识的交互。这种渐进式交互使可学习提示词更有效地捕捉先验知识中的细粒度差异与通用视觉概念,从而提取更具区分性和泛化性的文本特征。即使面对未见类别,模型也能通过学习到的交互捕获其共性表征,并推断其在现有语义结构中的合理位置。同时,我们引入可学习的文本到视觉投影层以适应文本调整,确保视觉-文本语义对齐。在11个识别数据集上的大量实验表明,InPK在多项零样本/少样本图像分类任务中显著优于现有最先进方法。
原文摘要 · Abstract (English)
Prompt tuning has become a popular strategy for adapting Vision-Language Models (VLMs) to zero/few-shot visual recognition tasks. Some prompting techniques introduce prior knowledge due to its richness, but when learnable tokens are randomly initialized and disconnected from prior knowledge, they tend to overfit on seen classes and struggle with domain shifts for unseen ones. To address this issue, we propose the InPK model, which infuses class-specific prior knowledge into the learnable tokens during initialization, thus enabling the model to explicitly focus on class-relevant information. Furthermore, to mitigate the weakening of class information by multi-layer encoders, we continuously reinforce the interaction between learnable tokens and prior knowledge across multiple feature levels. This progressive interaction allows the learnable tokens to better capture the fine-grained differences and universal visual concepts within prior knowledge, enabling the model to extract more discriminative and generalized text features. Even for unseen classes, the learned interaction allows the model to capture their common representations and infer their appropriate positions within the existing semantic structure. Moreover, we introduce a learnable text-to-vision projection layer to accommodate the text adjustments, ensuring better alignment of visual-text semantics. Extensive experiments on 11 recognition datasets show that InPK significantly outperforms state-of-the-art methods in multiple zero/few-shot image classification tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。