Contrastive Language-Image Pre-training (CLIP) has shown powerful zero-shot learning performance. Few-shot learning aims to further enhance the transfer capability of CLIP by giving few images in each class, aka 'few shots'. Most existing methods either implicitly learn from the few shots by incorporating learnable prompts or adapters, or explicitly embed them in a cache model for inference. However, the narrow distribution of few shots often contains incomplete class information, leading to biased visual knowledge with high risk of misclassification. To tackle this problem, recent methods propose to supplement visual knowledge by generative models or extra databases, which can be costly and time-consuming. In this paper, we propose an Iterative Visual Knowledge CompLetion (KCL) method to complement visual knowledge by properly taking advantages of unlabeled samples without access to any auxiliary or synthetic data. Specifically, KCL first measures the similarities between unlabeled samples and each category. Then, the samples with top confidence to each category is selected and collected by a designed confidence criterion. Finally, the collected samples are treated as labeled ones and added to few shots to jointly re-estimate the remaining unlabeled ones. The above procedures will be repeated for a certain number of iterations with more and more samples being collected until convergence, ensuring a progressive and robust knowledge completion process. Extensive experiments on 11 benchmark datasets demonstrate the effectiveness and efficiency of KCL as a plug-and-play module under both few-shot and zero-shot learning settings. Code is available at https://github.com/Mark-Sky/KCL.
翻译:对比语言-图像预训练(CLIP)已展现出强大的零样本学习能力。小样本学习的目的是通过每类给定少量图像(即“小样本”)来进一步提升CLIP的迁移能力。现有方法大多通过融入可学习的提示或适配器隐式学习小样本,或将其显式嵌入缓存模型进行推理。然而,小样本的狭窄分布常包含不完整的类别信息,导致视觉知识存在偏差,并伴随高分类错误风险。为解决此问题,近期方法提出通过生成模型或额外数据库补充视觉知识,但这可能带来高昂的时间与成本开销。本文提出一种迭代式视觉知识补全方法(KCL),通过合理利用无标注样本补充视觉知识,无需依赖任何辅助或合成数据。具体而言,KCL首先测量无标注样本与各类别间的相似度;随后,根据设计的置信度准则筛选并收集每个类别中置信度最高的样本;最后,将收集样本视为标注样本加入小样本集,共同重新估计剩余无标注样本。上述步骤将重复一定迭代次数,随着样本逐步收集直至收敛,确保渐进且鲁棒的知识补全过程。在11个基准数据集上的大量实验表明,KCL作为即插即用模块,在小样本与零样本学习场景下均具高效性和有效性。代码发布于 https://github.com/Mark-Sky/KCL。