[Paper Review] CAD: Co-Adapting Discriminative Features for Improved Few-Shot Classification
This paper proposes CAD (Co-Adapting Discriminative Features), a novel end-to-end meta-learning framework that enhances few-shot classification by co-adapting support and query features through a shared self-attention module. By computing cross-attention scores between query and support features and using them to re-weight representations, CAD improves prototype learning and achieves state-of-the-art performance, outperforming prior methods by 3%–5% on standard benchmarks without requiring transfer learning.
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%.
Motivation & Objective
- To address the limitation of existing few-shot learning methods that rely on static prototypes or limited feature adaptation.
- To improve metric-based meta-learning by dynamically re-weighting discriminative features using cross-relational attention.
- To eliminate dependency on pre-training by enabling end-to-end training from scratch.
- To enhance feature compactness and class separability in low-shot settings through attention-based prototype refinement.
Proposed method
- A single shared multi-head self-attention module is introduced to compute cross-attention between support and query features after global average pooling.
- The module projects base features and computes scaled-dot product attention scores for both query-to-support and support-to-query directions.
- Attention-pooled features are computed by applying the attention weights to the original features, producing refined representations.
- The refined features are added to the original projected features before being passed through a projection head to produce final embeddings.
- The method integrates attention-pooled prototypes into the initial features, enhancing discriminative power without explicit spatial correspondence learning.
- The entire framework is trained end-to-end from scratch, avoiding the need for pre-training on base classes.
![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)
Experimental results
Research questions
- RQ1Can co-adapting support and query features via cross-attention improve few-shot classification beyond static prototype learning?
- RQ2Does end-to-end training without pre-training still achieve state-of-the-art performance in few-shot learning?
- RQ3How does cross-attention between query and support features affect feature compactness and class separability?
- RQ4What is the contribution of query-to-support versus support-to-query attention in feature re-weighting?
- RQ5Can attention-based feature re-weighting outperform spatial attention mechanisms without explicit pixel-level correspondence?
Key findings
- CAD achieves a 3%–5% absolute improvement over state-of-the-art methods on standard few-shot benchmarks such as mini-ImageNet.
- The ablation study shows that using only query-to-support attention (MAB^S_h) leads to a significant drop in performance, especially in the 1-shot setting.
- Query-only adaptation (MAB^Q_h) yields consistent but slightly lower performance than the full CAD method in the 5-shot setting.
- Self-attention alone without cross-adaptation (MAB^*_h) fails to improve over baseline models like ProtoNet, particularly in extreme low-shot regimes.
- t-SNE visualization confirms that CAD produces more compact and well-separated feature clusters after adaptation, indicating improved generalization.
- Qualitative analysis shows that attention scores effectively suppress distractors (e.g., background variations, irrelevant objects), focusing on semantically relevant features.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.