Abstract
Few-shot learning (FSL) remains a significant challenge in computer vision, as models must generalize from extremely limited data without overfitting. We present "Spot and Learn," a novel framework that utilizes reinforcement learning to sample informative image patches. By employing a Maximum-Entropy objective, the model learns to explore diverse sequences of "glimpses," effectively acting as a learned data augmentation strategy. Our approach achieves state-of-the-art performance on standard FSL benchmarks like Omniglot and miniImagenet by focusing on discriminative regions while simultaneously learning to ignore background noise.
Introduction
The human visual system processes complex scenes through a series of rapid eye movements called saccades, focusing high-resolution attention on salient regions while peripheral information remains blurred. In contrast, standard deep learning models typically process entire images at once, which often leads to overfitting on background noise when training data is scarce.
"Spot and Learn" addresses this by modeling the glimpse behavior. Instead of a static attention map, it treats patch selection as a sequential decision-making process. This allows the model to build a robust representation of an object from a handful of informative fragments, mimicking the way humans identify objects from partial views.
The Maximum-Entropy Sampling Framework
The core of the proposed method is a reinforcement learning (RL) agent that decomposes an input image into a sequence of patches. Unlike traditional greedy policies that might converge on a single "best" patch, this framework utilizes Maximum Entropy Reinforcement Learning (Soft Q-Learning).
Architecture Components
- Feature Extractor ($f_e$): Processes individual patches into low-dimensional embeddings ($e_i$).
- State Encoder ($f_s$): A Gated Recurrent Unit (GRU) that aggregates the sequence of patch embeddings into a latent state ($s_i$), maintaining context of what has already been "seen."
- Maximum Entropy Sampler: This module contains two sub-networks: a Q-function ($f_Q$) and a policy ($\pi_\theta$). The objective encourages stochasticity, ensuring the model explores different patch sequences during training.
- Dual Policies: The model learns a positive policy ($\pi_+$) to identify discriminative object features and a negative policy ($\pi_-$) to identify non-informative background regions.
Key Insights
Stochasticity as Learned Augmentation
By forcing the sampler to maintain high entropy, the model is exposed to a vast variety of patch combinations for the same training image. This inherent uncertainty prevents the network from memorizing specific pixel configurations, acting as a powerful regularizer that is specifically tuned to the dataset's salient features.
Learning the "Not-Object"
The inclusion of a negative policy is a critical innovation. By explicitly training the agent to find background patches, the classifier learns to distinguish between the object of interest and its environment. This "negative sampling" helps refine the decision boundaries in the embedding space, which is particularly beneficial in few-shot scenarios where class separation is difficult.
Experimental Results
The "Spot and Learn" framework was evaluated on the Omniglot and miniImagenet datasets.
- Omniglot: The model achieved 97.56% accuracy in 1-shot 5-way tasks, a significant improvement over standard fully-connected baselines.
- miniImagenet: In the more challenging 5-shot setting, the model reached 67.96% accuracy, outperforming established meta-learning methods like MAML.
Ablation studies revealed that "Soft Voting"—averaging probability scores across multiple glimpse trajectories at inference time—consistently outperformed "Hard Voting." This suggests that preserving the uncertainty information from the RL sampler is vital for final classification accuracy.
Conclusion
"Spot and Learn" demonstrates that reinforcement learning-based patch sampling is a viable and effective strategy for few-shot learning. By mimicking human visual glimpses and leveraging maximum entropy for exploration, the model achieves high generalization with minimal data. Future work will focus on adaptive stopping criteria to optimize the number of glimpses based on image complexity.
Summary updated