Abstract
The visual system processes a scene using a sequence of selective glimpses, each driven by spatial and object-based attention. These glimpses reflect what is relevant to the ongoing task and are selected through recurrent processing and recognition of the objects in the scene. In contrast, most models treat attention selection and recognition as separate stages in a feedforward process. Here we show that using capsule networks to create an object-centric hidden representation in an encoder-decoder model with iterative glimpse attention yields effective integration of attention and recognition. We evaluate our model on three multi-object recognition tasks; highly overlapping digits, digits among distracting clutter and house numbers, and show that it learns to effectively move its glimpse window, recognize and reconstruct the objects, all with only the classification as supervision. Our work takes a step toward a general architecture for how to integrate recurrent object-centric representation into the planning of attentional glimpses.
Introduction
Human vision is inherently dynamic, processing complex scenes through a sequence of selective glimpses, or saccades, driven by both spatial and object-based attention. This active sampling is guided by our current hypotheses about the scene—we look where we expect to find relevant information.
In contrast, standard deep learning vision models typically process entire images in a single feedforward pass. Even models incorporating attention mechanisms often bifurcate the process into distinct stages: saliency detection followed by classification. This separation prevents recognition from informing future attention. Furthermore, while Capsule Networks (CapsNets) excel at part-whole binding, they often struggle with temporal processing or handling multiple instances of the same category in large scenes. This paper introduces OCRA (Object-Centric Recurrent Attention), a unified architecture where attention and recognition exist in a tightly coupled, iterative loop.
Methods
OCRA utilizes a deterministic Encoder-Decoder Recurrent Neural Network (RNN) architecture designed to mimic human-like visual sampling:
- Differentiable Glimpse Attention: Inspired by the DRAW architecture, OCRA employs a "zoom lens" mechanism. At each timestep, it extracts a localized "read glimpse" from the image using a grid of Gaussian filters.
- Capsule-Based Encoder: The glimpse is processed by a small CNN and an Encoder RNN, which feeds into a Capsule Network. Using dynamic routing (optimized with max-min normalization), the model binds low-level features into object-level capsules.
- Attention-Driven Decoder: The most active object capsule is routed to a Decoder RNN. This decoder maintains the evolving state of the scene and predicts the location and zoom parameters for the next glimpse.
- Iterative Reconstruction: The decoder also generates a "write glimpse," drawing recognized objects onto a cumulative canvas. This provides a step-by-step visualization of the model's internal recognition process.
Training is performed end-to-end using a combination of margin loss for classification and mean squared error for reconstruction, requiring no bounding box annotations.
Evaluation and Results
The model was evaluated on three benchmarks: MultiMNIST (80% overlap), MultiMNIST Cluttered (digits hidden among noise), and Street View House Numbers (SVHN).
OCRA demonstrated significant efficiency and performance gains. On MultiMNIST, it achieved a 5.08% error rate with 10 glimpses, outperforming the original CapsNet baseline while utilizing three times fewer parameters and a training set 20 times smaller. In cluttered environments, OCRA achieved a 7.12% error rate, proving competitive with complex reinforcement-learning-based models like DRAM while remaining fully differentiable.
Key Insights and Discussion
OCRA demonstrates that capsules and glimpses are complementary: glimpses solve spatial scaling in large images, while capsules solve feature-binding within those glimpses. This synergy allows the model to handle severe occlusion and clutter that typically baffle feedforward networks.
Furthermore, the model exhibits emergent top-down attention. It naturally learns to start with a broad "gist" of the image before sequentially zooming in on specific objects. The iterative reconstruction process also makes OCRA highly interpretable; by observing the cumulative canvas, researchers can verify exactly which features the model has bound to a specific object category.
While the current backbone is relatively small, scaling OCRA to higher-resolution real-world scenes and more complex part-whole matching represents a promising path for modeling expert human attention, such as in medical diagnostic imaging.
Summary updated