Task Discrepancy Maximization for Fine-grained Few-Shot Classification

Su Been Lee, WonJun Moon, Jae-Pil Heo

Abstract

Recognizing discriminative details such as eyes and beaks is important for distinguishing fine-grained classes since they have similar overall appearances. In this regard, we introduce Task Discrepancy Maximization (TDM), a simple module for fine-grained few-shot classification. Our objective is to localize the class-wise discriminative regions by highlighting channels encoding distinct information of the class. Specifically, TDM learns task-specific channel weights based on two novel components: Support Attention Module (SAM) and Query Attention Module (QAM). SAM produces a support weight to represent channel-wise discriminative power for each class. Still, since the SAM is basically only based on the labeled support sets, it can be vulnerable to bias toward such support set. Therefore, we propose QAM which complements SAM by yielding a query weight that grants more weight to object-relevant channels for a given query image. By combining these two weights, a class-wise task-specific channel weight is defined. The weights are then applied to produce task-adaptive feature maps more focusing on the discriminative details. Our experiments validate the effectiveness of TDM and its complementary benefits with prior methods in fine-grained few-shot classification.

Introduction

In fine-grained classification, the challenge lies in distinguishing between categories that share a common global structure, such as different bird species or aircraft models. The critical information for classification often resides in subtle, localized details. This difficulty is compounded in few-shot learning scenarios, where a model must generalize from only 1 to 5 labeled examples. Standard deep learning models often treat all feature channels with equal importance, failing to prioritize the specific "discriminative details" necessary for fine-grained tasks. Task Discrepancy Maximization (TDM) addresses this by dynamically identifying and weighting channels that maximize the discrepancy between classes in a specific task episode.

Methodology

The TDM module is a plug-and-play component that generates task-specific channel weights through two primary modules:

  1. Support Attention Module (SAM): SAM analyzes the labeled support images to determine which channels are most consistent within a class (intra-score) and most unique across different classes (inter-score). This allows the model to prioritize features that are both reliable and distinctive.
  2. Query Attention Module (QAM): To mitigate potential biases from the small support set, QAM identifies object-relevant channels within the unlabeled query image. This provides a complementary perspective, ensuring the model focuses on the actual object of interest.
Overview of the Task Discrepancy Maximization (TDM) architecture, showing how SAM and QAM generate task-specific weights.

These weights are integrated into a single task-specific vector and applied to the original feature maps. This re-weighting process suppresses common, non-informative features (like generic backgrounds or shared body parts) and highlights the details that differentiate the classes in the current episode.

Experiments and Results

TDM was evaluated across seven diverse fine-grained benchmarks, including CUB-200-2011 (birds), FGVC-Aircraft, and Stanford-Cars. The module demonstrated significant and consistent performance gains when integrated with existing metric-based learners.

Visualization of channel weights and the resulting accuracy improvement on the ProtoNet baseline.

Key quantitative findings include:

  • ProtoNet Improvement: On the CUB dataset (1-shot), TDM boosted ProtoNet accuracy from 62.90% to 69.94%.
  • State-of-the-Art Performance: When paired with the Feature Reconstruction Network (FRN), TDM achieved 84.36% (1-shot) and 93.37% (5-shot) on CUB, outperforming previous benchmarks.
  • Generalization: The module showed robust improvements across all seven datasets, proving its effectiveness for various fine-grained object types.

Conclusion

Task Discrepancy Maximization offers a simple yet effective way to enhance fine-grained few-shot classification. By treating common features as noise and dynamically focusing on discrepancy-maximizing details, TDM allows models to overcome the limitations of small datasets. While primarily designed for fine-grained tasks, its success suggests that task-adaptive channel weighting is a powerful tool for specialized computer vision challenges.

Summary updated

BibTeX
@inproceedings{lee2022task,
  author = {Su Been Lee and WonJun Moon and Jae-Pil Heo},
  title = {{Task Discrepancy Maximization for Fine-grained Few-Shot Classification}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  url = {https://openreview.net/forum?id=T0eMyG4t2J},
}
Figure