Consistency driven Sequential Transformers Attention Model for Partially Observable Scenes

Samrudhdhi B. Rangrej, Chetan L. Srinidhi, James J. ClarkCVPR 2022

Abstract

Most hard attention models in computer vision rely on an initial low-resolution "glance" of a complete scene to identify informative regions. However, in many practical applications—such as aerial imaging, autonomous navigation, or medical pathology—acquiring a full-scene overview is often impossible due to resource or time constraints. We propose the Sequential Transformers Attention Model (STAM), a reinforcement learning-based agent designed for truly partially observable environments. STAM predicts informative glimpse locations based solely on past observations. By incorporating a novel consistency-driven training objective—where a teacher model seeing the full image guides the student model seeing only glimpses—STAM achieves state-of-the-art accuracy. On ImageNet and fMoW datasets, STAM outperforms previous methods while sensing 27% and 42% fewer pixels, respectively.

Introduction

In standard computer vision tasks, models typically process an entire high-resolution image simultaneously. Yet, real-world data acquisition is often constrained by bandwidth, sensor limitations, or the cost of high-resolution scanning. "Hard attention" models attempt to mitigate this by focusing on specific patches, but most existing architectures "cheat" by taking a global low-resolution look at the image first to decide where to focus.

This paper addresses the challenge of classification in environments where the agent has no prior knowledge of the scene. The goal is to build an agent that can navigate a scene and identify objects based strictly on a sequence of small, scattered patches (glimpses) it has already observed.

Methodology

STAM Architecture

STAM treats image classification as a Partially Observable Markov Decision Process (POMDP). The model is built upon a Vision Transformer (specifically DeiT-distilled). Transformers are uniquely suited for this task because their self-attention mechanism naturally handles sequences of patches and can model long-range spatial dependencies between glimpses that may be far apart in the original image.

Sequential Decision Making and Glimpse Sensing

The image is treated as a grid of potential patches. The agent begins at a random location and receives an initial glimpse. At each subsequent step, the agent uses its internal state—encoded from the history of glimpses and their coordinates—to predict two outputs:

  1. The Class Label: A prediction of the object category based on current evidence.
  2. The Attention Policy: The coordinates for the next glimpse location.

Consistency-Driven Training

Training a reinforcement learning (RL) agent on partial data is notoriously unstable. To provide a more reliable training signal, we introduce a Teacher-Student framework. A "Teacher" model, which has access to the full image, generates a soft probability distribution of classes. The "Student" (STAM) is trained to minimize the divergence between its prediction (based on limited glimpses) and the Teacher’s full-scene prediction. This consistency loss acts as a powerful regularizer, encouraging the agent to reach the same conclusion it would if it could see the entire scene.

Optimization

The attention policy is optimized using a one-step actor-critic algorithm. This approach is more computationally efficient for transformer architectures than traditional REINFORCE methods, allowing the model to learn effective search strategies more quickly.

Experimental Results

Performance on ImageNet and fMoW

We evaluated STAM on two benchmarks: ImageNet (natural images) and fMoW (satellite imagery). Satellite imagery is a particularly relevant test case, as sensors often operate under the exact partial-observability constraints STAM is designed to solve.

  • Efficiency: STAM outperformed the previous state-of-the-art (PatchDrop) while sensing 27% fewer pixels on ImageNet and 42% fewer pixels on fMoW.
  • Impact of Consistency: The inclusion of the consistency loss improved accuracy by 3% on ImageNet and 8% on fMoW when the agent was restricted to observing only 4% of the total image area.
  • Early Termination: By implementing a confidence threshold, the agent can choose to stop sensing once it reaches a certain probability. Using this method, STAM correctly classified approximately 65% of images while observing less than 18% of the total image area.

Discussion and Insights

Emergent Search Behavior

Visualizing the agent's policy reveals intuitive search patterns. On ImageNet, where objects are typically centered, the agent learns to prioritize central regions. Conversely, on fMoW, where objects like buildings or infrastructure are scattered, the agent learns an exploratory behavior, scanning the scene until it identifies a relevant feature.

Limitations and Future Work

While effective, the transformer-based nature of STAM introduces quadratic computational complexity relative to the number of glimpses. Future iterations may utilize "sparse transformers" to mitigate this cost. Additionally, while this work focuses on static scenes, extending the consistency-driven approach to dynamic scenes—such as video or real-time robotic navigation—remains a promising avenue for research.

Conclusion

STAM demonstrates that partial observability does not have to result in significant performance loss. By leveraging transformer architectures and a teacher-student consistency loss, we can build agents that are both more "honest" about their sensory limitations and more efficient in their acquisition of information.

Summary updated

BibTeX
@inproceedings{rangrej2022consistency,
  author = {Samrudhdhi B. Rangrej and Chetan L. Srinidhi and James J. Clark},
  title = {{Consistency driven Sequential Transformers Attention Model for Partially Observable Scenes}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  url = {https://openreview.net/forum?id=6PmSX4mqM_},
}
Figure