TL;DR
Attentive Recurrent Comparators (ARCs) mimic the human strategy of comparing objects by repeatedly looking back and forth between them to identify distinguishing features. By using an RNN-driven attention mechanism to perform "early fusion" of information, ARCs achieved a then-state-of-the-art, super-human accuracy of 98.5% on the challenging Omniglot one-shot classification task.
What Problem Does This Paper Address?
Standard Deep Learning models typically struggle with one-shot learning—the ability to recognize a new category after seeing only a single example. The traditional approach, often implemented via Siamese Networks, involves learning a fixed mapping from an image to a feature vector (embedding). To compare two images, the model calculates the distance between these two independent embeddings.
The authors argue this "Siamese way" is fundamentally different from the "human way." Humans don't just extract abstract features in isolation; we compare objects by scanning back and forth, making new observations based on what we've already seen in both items. The paper aims to bridge this gap by creating a model that performs early fusion, where the representation of one object is built dynamically in the context of the other.
Methods
The core of the paper is the Attentive Recurrent Comparator (ARC). Instead of processing images independently, the model receives a sequence that alternates between two images ($x_a, x_b, x_a, x_b, \dots$).
- RNN Controller: An LSTM or simple RNN maintains a hidden state that tracks the "context" of the comparison so far.
- Attention Mechanism: At each time step, the controller uses its hidden state to decide where to look next in the current image. This is implemented using a differentiable zoom-able attention window (based on the DRAW architecture) using Cauchy kernels.
- Glimpses: The model takes a small "glimpse" (e.g., a $4 \times 4$ patch) from the image. This glimpse, combined with the previous hidden state, updates the controller's state.
- Relative Representation: After a fixed number of glimpses, the final hidden state serves as a "relative representation" of image $x_a$ with respect to $x_b$.
For one-shot classification, the authors proposed the Full Context ARC. When a test image arrives, it is compared against every image in the "support set" (the single examples of known classes). These pairwise relative representations are then fed into a Bi-Directional LSTM to provide global context before a final classification is made.
Datasets
- Omniglot: Often called the "transpose of MNIST," it contains 1,623 handwritten characters from 50 different alphabets. It is the standard benchmark for one-shot learning.
- CASIA WebFace: A large-scale face dataset used to test the model's ability to perform face verification (similarity estimation).
- miniImageNet: A subset of ImageNet designed for few-shot learning evaluation.
Key Insights and Ideas
- Early Fusion is Key: By alternating glimpses, the model can look for a specific feature in Image B only because it saw something suggestive in Image A. This is much more efficient than trying to describe every possible feature of an image in a vacuum.
- Dynamic Representation Space: Instead of a static embedding space, ARCs create a representation that is "lazy" and "relative." The features extracted from a character change depending on what it is being compared to.
- Attention as a Convolution Alternative: The authors found that dense ARCs (using only pixels, no convolutions) could perform as well as deep CNNs on certain tasks, suggesting that recurrence and attention can capture similar spatial dependencies.
- Human-like Parsing: Qualitative analysis showed that ARCs often adopt a "left-to-right" parsing strategy, gradually shrinking their attention window to focus on tiny, distinguishing strokes.
Key Results
- Omniglot One-Shot Classification: The Full Context ConvARC achieved 98.5% accuracy (within alphabets), surpassing the estimated human performance of 95.5% and the previous state-of-the-art (BPL at 96.7%).
- Omniglot Similarity: In a binary task to determine if two characters are the same, ConvARCs reached 96.1%, outperforming Siamese ResNets (94.6%).
- Face Verification: On CASIA WebFace, ConvARCs achieved 81.73%, beating a CNN baseline (79.48%).
- Ablation Study: The model's accuracy improves significantly as the number of glimpses increases, proving that the recurrent accumulation of information is vital.
Limitations and Future Work
- Computational Expense: Because ARCs are sequential (processing glimpses one by one) and require pairwise comparisons between the test sample and the entire support set, they are more computationally expensive at inference time than simple distance-based methods.
- Scaling to High Resolution: The current implementation uses low-resolution glimpses ($4 \times 4$). Scaling this to high-resolution images while maintaining efficiency remains a challenge.
- Future Directions: The authors suggest exploring more complex controllers and better attention mechanisms to solve even more challenging AI tasks using this "bottom-up, lazy" approach.
Summary updated