[Paper Review] Hierarchical Attention Network for Few-Shot Object Detection via Meta-Contrastive Learning
This paper proposes a hierarchical attention network with meta-contrastive learning for few-shot object detection, combining local and global attention via a multi-scale feature aggregation module and a class-agnostic similarity learning objective to improve feature representation. The method achieves state-of-the-art performance on COCO with 1–30 shots, even without fine-tuning, by effectively leveraging support images through correlation-based contrastive learning.
Few-shot object detection (FSOD) aims to classify and detect few images of novel categories. Existing meta-learning methods insufficiently exploit features between support and query images owing to structural limitations. We propose a hierarchical attention network with sequentially large receptive fields to fully exploit the query and support images. In addition, meta-learning does not distinguish the categories well because it determines whether the support and query images match. In other words, metric-based learning for classification is ineffective because it does not work directly. Thus, we propose a contrastive learning method called meta-contrastive learning, which directly helps achieve the purpose of the meta-learning strategy. Finally, we establish a new state-of-the-art network, by realizing significant margins. Our method brings 2.3, 1.0, 1.3, 3.4 and 2.4% AP improvements for 1-30 shots object detection on COCO dataset. Our code is available at: https://github.com/infinity7428/hANMCL
Motivation & Objective
- To address the limitation of existing few-shot object detection methods that rely solely on global attention, which underutilizes local context information.
- To investigate whether meta-learning is effective in few-shot object detection and to improve its objective function for better feature alignment.
- To design a hierarchical attention mechanism that progressively expands receptive fields from local to global regions for enhanced feature representation.
- To develop a meta-contrastive learning module that enables class-agnostic similarity learning between query and support images, improving generalization.
- To achieve state-of-the-art performance in low-data scenarios, including zero-shot and cross-domain settings, without requiring fine-tuning.
Proposed method
- Introduces a hierarchical attention module (HAM) that combines depth-wise and dilated convolutions with global self-attention to progressively expand receptive fields from local to global scales.
- Employs a meta-contrastive learning module (Meta-CLM) that uses a shared fully connected layer to generate correlation features between query and support image features, enabling binary classification of similarity regardless of category.
- Uses a two-stage Faster R-CNN backbone with ResNet-101 as the feature extractor, integrating HAM into the region proposal network and detection head.
- Applies a contrastive loss based on correlation features to encourage discriminative embedding space where query-support pairs from the same class are close and different pairs are far apart.
- Trains the model end-to-end using meta-learning on base classes, enabling zero-shot inference on novel categories without fine-tuning.
- Utilizes a hierarchical attention structure with increasing kernel sizes (e.g., 5, 7, 14, 21, 28) to systematically explore local-to-global context, validated through ablation studies.
Experimental results
Research questions
- RQ1Can a hierarchical attention mechanism that combines local and global attention improve feature representation in few-shot object detection?
- RQ2Does meta-learning effectively improve few-shot object detection when the objective function is restructured for similarity-based matching rather than multi-class classification?
- RQ3Can a class-agnostic contrastive learning objective enhance feature alignment between query and support images across novel categories?
- RQ4How does the proposed method perform in zero-shot and cross-domain few-shot detection scenarios where domain or category shift occurs?
- RQ5Is a hierarchical attention structure with increasing receptive fields more effective than non-hierarchical or inverse-hierarchical designs?
Key findings
- The proposed method achieves state-of-the-art mean average precision (mAP) on COCO for 1, 2, 3, 5, 10, and 30 shots, outperforming prior methods without requiring fine-tuning.
- On the zero-shot evaluation setting, where the model is trained only on base classes and tested on novel categories, the method maintains strong performance, demonstrating high adaptability.
- The ablation study confirms that the hierarchical attention mechanism significantly improves mAP compared to non-hierarchical or inverse-hierarchical structures, with the best performance at kernel sizes 14, 21, and 28.
- The meta-contrastive learning module improves feature discrimination, as shown by higher mAP in ablation studies, especially in few-shot and cross-domain settings.
- In cross-domain evaluation (e.g., training on Pascal VOC and testing on COCO), the model generalizes better than existing methods, showing robustness to domain shift.
- Visualizations of attention maps demonstrate that the proposed method more accurately focuses on object regions compared to baseline methods, even for unseen categories.
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.