Task-aware Part Mining Network for Few-Shot Learning

Jiamin Wu, Tianzhu Zhang, Yongdong Zhang, Feng Wu

Abstract

Few-Shot Learning (FSL) seeks to recognize novel categories from a very limited number of examples. While metric-based approaches have shown promise, they often rely on Global Average Pooling (GAP), which can obscure fine-grained local features essential for distinguishing similar classes. We present the Task-aware Part Mining Network (TPMN), a novel framework that automatically identifies and weights discriminative object parts. By utilizing a meta-learner to generate task-specific filters, TPMN dynamically adapts its focus based on the categories being compared. Experimental results on standard benchmarks like miniImageNet and tieredImageNet demonstrate that TPMN achieves state-of-the-art performance, particularly in challenging cross-domain scenarios.

Introduction

The primary challenge in Few-Shot Learning (FSL) is the scarcity of labeled data for new classes. Humans excel at this by focusing on specific, discriminative details—such as the shape of a bird's beak or the pattern on a butterfly's wing. In contrast, many FSL models use Global Average Pooling (GAP) to compress images into single vectors, effectively "washing out" these crucial local details. While some methods attempt to incorporate local features using fixed grids, these approaches are often static and sensitive to background noise and spatial misalignment.

Methods

The Task-aware Part Mining Network (TPMN) addresses these limitations through three core components:

  1. Task-aware Part Filter Module: A Meta Filter Learner (MFL) generates custom $1 \times 1$ convolution kernels based on the task embedding (the mean features of the support set). These kernels act as "part hunters" tailored to the specific classes in the current task.
  2. Automatic Part Mining: These task-specific filters produce activation maps that automatically locate semantic regions (e.g., head, torso) without manual annotations. This avoids the rigidity of grid-based methods.
  3. Adaptive Importance Generator ($G_a$): This module assigns weights to the identified parts based on their discriminative power for the current task. For instance, ear shape might be weighted more heavily when distinguishing between dog breeds than when distinguishing a dog from a car.
  4. Diversity Loss ($\mathcal{L}_{div}$): To ensure the model captures a variety of features, a diversity loss encourages filters to focus on non-overlapping regions.
Figure 3: (a) Comparison between traditional grid-based division and the proposed automatic part mining. (b) Visualization of task-aware attention: the model focuses on different regions (e.g., nose vs. fur) depending on the comparison class.

Key Insights

  • Task-Awareness: The paper argues that "discriminativeness" is relative. A feature is only useful if it helps distinguish the current classes. By generating filters based on the task context, the model mimics how humans shift their attention based on the comparison they are making.
  • Semantic Correspondence: Because filters are generated from the task embedding, the "Part 1" filter for a query image and a support image naturally target the same semantic concept (e.g., "the head"), maintaining consistency across different scales or orientations.

Experimental Results

TPMN was evaluated on miniImageNet, tieredImageNet, FC100, and CIFAR-FS. It consistently outperformed existing methods. On miniImageNet, TPMN achieved 67.64% (1-shot) and 83.44% (5-shot) accuracy, a significant improvement over baseline ProtoNet (by 7.17% in 1-shot). Furthermore, in cross-domain tests (miniImageNet to CUB-200), TPMN showed a 2.16% improvement over the previous state-of-the-art, highlighting its robustness to data distribution shifts.

Conclusion and Future Work

By shifting from global averages to task-aware local part mining, TPMN more closely mimics human visual recognition. The ability to dynamically adjust attention based on the task context is a significant step forward for Few-Shot Learning. Future work may explore reducing the computational overhead of meta-filter generation and extending the framework to Vision Transformer (ViT) architectures, which possess inherent attention mechanisms that could complement part mining.

Summary updated

BibTeX
@inproceedings{wu2021task,
  author = {Jiamin Wu and Tianzhu Zhang and Yongdong Zhang and Feng Wu},
  title = {{Task-aware Part Mining Network for Few-Shot Learning}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00832},
}
Figure