[论文解读] CAD: Co-Adapting Discriminative Features for Improved Few-Shot Classification
本文提出了一种新型端到端元学习框架CAD(Co-Adapting Discriminative Features),通过共享的自注意力模块协同适应支持集和查询集特征,提升少样本分类性能。通过计算查询特征与支持集特征之间的交叉注意力分数,并利用这些分数重新加权表示,CAD改进了原型学习,在标准基准上实现了最先进性能,相比之前方法提升3%–5%,且无需迁移学习。
Few-shot classification is a challenging problem that aims to learn a model that can adapt to unseen classes given a few labeled samples. Recent approaches pre-train a feature extractor, and then fine-tune for episodic meta-learning. Other methods leverage spatial features to learn pixel-level correspondence while jointly training a classifier. However, results using such approaches show marginal improvements. In this paper, inspired by the transformer style self-attention mechanism, we propose a strategy to cross-attend and re-weight discriminative features for few-shot classification. Given a base representation of support and query images after global pooling, we introduce a single shared module that projects features and cross-attends in two aspects: (i) query to support, and (ii) support to query. The module computes attention scores between features to produce an attention pooled representation of features in the same class that is later added to the original representation followed by a projection head. This effectively re-weights features in both aspects (i & ii) to produce features that better facilitate improved metric-based meta-learning. Extensive experiments on public benchmarks show our approach outperforms state-of-the-art methods by 3%~5%.
研究动机与目标
- 为解决现有少样本学习方法依赖静态原型或有限特征适应的局限性。
- 通过跨关系注意力动态重加权判别性特征,改进基于度量的元学习。
- 通过端到端训练从零开始,消除对预训练的依赖。
- 通过注意力驱动的原型精炼,在低样本设置下增强特征紧凑性和类别可分性。
提出的方法
- 引入一个单一共享的多头自注意力模块,在全局平均池化后计算支持集与查询集特征之间的交叉注意力。
- 该模块对基础特征进行投影,并为查询到支持集和支持集到查询集两个方向计算缩放点积注意力分数。
- 通过将注意力权重应用于原始特征,计算注意力池化后的特征,生成精炼表示。
- 在将特征输入投影头生成最终嵌入向量之前,将精炼特征与原始投影特征相加。
- 该方法将注意力池化后的原型整合到初始特征中,增强判别能力,且无需显式学习空间对应关系。
- 整个框架从零开始端到端训练,避免了在基础类别上进行预训练的需求。
![Figure 1 : Visual intuition of the proposed framework compared to other approaches using attention. (a) Standard ProtoNet [ 41 ] architecture with nearest neighbour classifier (NN). (b) Adaptation of support embeddings only without using relations in the query sets, with backbone pre-training [ 52 ]](https://ar5iv.labs.arxiv.org/html/2203.13465/assets/x1.png)
实验结果
研究问题
- RQ1通过交叉注意力实现支持集与查询集特征的协同适应,是否能超越静态原型学习,在少样本分类中取得更好性能?
- RQ2在不进行预训练的情况下,端到端训练是否仍能在少样本学习中实现最先进性能?
- RQ3查询集与支持集特征之间的交叉注意力如何影响特征紧凑性和类别可分性?
- RQ4查询到支持集与支持集到查询集的注意力在特征重加权中分别起到多大贡献?
- RQ5注意力机制驱动的特征重加权是否能超越显式像素级对应关系的空间注意力机制?
主要发现
- CAD在mini-ImageNet等标准少样本基准上相比最先进方法实现了3%–5%的绝对性能提升。
- 消融实验表明,仅使用查询到支持集注意力(MAB^S_h)会导致性能显著下降,尤其在1-shot设置下。
- 仅查询端适应(MAB^Q_h)在5-shot设置下表现一致但略低于完整CAD方法。
- 仅使用自注意力而无交叉适应(MAB^*_h)无法超越ProtoNet等基线模型,尤其在极端低样本场景下表现更差。
- t-SNE可视化结果表明,CAD在特征适配后生成的特征簇更加紧凑且分离良好,表明泛化能力得到提升。
- 定性分析显示,注意力分数能有效抑制干扰项(如背景变化、无关物体),聚焦于语义相关特征。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。