TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Sparse Spatial Transformers for Few-Shot Learning

Sparse Spatial Transformers for Few-Shot Learning

Haoxing Chen, Huaxiong Li, Yaohui Li, Chunlin Chen

2021-09-27Few-Shot LearningPatch MatchingFew-Shot Image Classification
PaperPDFCode(official)

Abstract

Learning from limited data is challenging because data scarcity leads to a poor generalization of the trained model. A classical global pooled representation will probably lose useful local information. Many few-shot learning methods have recently addressed this challenge using deep descriptors and learning a pixel-level metric. However, using deep descriptors as feature representations may lose image contextual information. Moreover, most of these methods independently address each class in the support set, which cannot sufficiently use discriminative information and task-specific embeddings. In this paper, we propose a novel transformer-based neural network architecture called sparse spatial transformers (SSFormers), which finds task-relevant features and suppresses task-irrelevant features. Particularly, we first divide each input image into several image patches of different sizes to obtain dense local features. These features retain contextual information while expressing local information. Then, a sparse spatial transformer layer is proposed to find spatial correspondence between the query image and the full support set to select task-relevant image patches and suppress task-irrelevant image patches. Finally, we propose using an image patch-matching module to calculate the distance between dense local representations, thus determining which category the query image belongs to in the support set. Extensive experiments on popular few-shot learning benchmarks demonstrate the superiority of our method over state-of-the-art methods. Our source code is available at \url{https://github.com/chenhaoxing/ssformers}.

Results

TaskDatasetMetricValueModel
Image ClassificationCIFAR-FS 5-way (1-shot)Accuracy74.5SSFormers
Image ClassificationMini-Imagenet 5-way (5-shot)Accuracy82.75SSFormers
Image ClassificationMini-Imagenet 5-way (1-shot)Accuracy67.25SSFormers
Image ClassificationFC100 5-way (5-shot)Accuracy58.92SSFormers
Image ClassificationFC100 5-way (1-shot)Accuracy43.72SSFormers
Image ClassificationTiered ImageNet 5-way (1-shot)Accuracy72.52SSFormers
Image ClassificationTiered ImageNet 5-way (5-shot)Accuracy86.61SSFormers
Image ClassificationCIFAR-FS 5-way (5-shot)Accuracy86.61SSFormers
Few-Shot Image ClassificationCIFAR-FS 5-way (1-shot)Accuracy74.5SSFormers
Few-Shot Image ClassificationMini-Imagenet 5-way (5-shot)Accuracy82.75SSFormers
Few-Shot Image ClassificationMini-Imagenet 5-way (1-shot)Accuracy67.25SSFormers
Few-Shot Image ClassificationFC100 5-way (5-shot)Accuracy58.92SSFormers
Few-Shot Image ClassificationFC100 5-way (1-shot)Accuracy43.72SSFormers
Few-Shot Image ClassificationTiered ImageNet 5-way (1-shot)Accuracy72.52SSFormers
Few-Shot Image ClassificationTiered ImageNet 5-way (5-shot)Accuracy86.61SSFormers
Few-Shot Image ClassificationCIFAR-FS 5-way (5-shot)Accuracy86.61SSFormers

Related Papers

GLAD: Generalizable Tuning for Vision-Language Models2025-07-17ViT-ProtoNet for Few-Shot Image Classification: A Multi-Benchmark Evaluation2025-07-12Doodle Your Keypoints: Sketch-Based Few-Shot Keypoint Detection2025-07-10An Enhanced Privacy-preserving Federated Few-shot Learning Framework for Respiratory Disease Diagnosis2025-07-10Few-Shot Learning by Explicit Physics Integration: An Application to Groundwater Heat Transport2025-07-08ViRefSAM: Visual Reference-Guided Segment Anything Model for Remote Sensing Segmentation2025-07-03Dynamic Context-Aware Prompt Recommendation for Domain-Specific AI Applications2025-06-25Ancient Script Image Recognition and Processing: A Review2025-06-24