Visual Attention in Imaginative Agents

Samrudhdhi B. Rangrej, James J. ClarkarXiv 2021

Abstract

We present a recurrent agent who perceives surroundings through a series of discrete fixations. At each timestep, the agent imagines a variety of plausible scenes consistent with the fixation history. The next fixation is planned using uncertainty in the content of the imagined scenes. As time progresses, the agent becomes more certain about the content of the surrounding, and the variety in the imagined scenes reduces. The agent is built using a variational autoencoder and normalizing flows, and trained in an unsupervised manner on a proxy task of scene-reconstruction. The latent representations of the imagined scenes are found to be useful for performing pixel-level and scene-level tasks by higher-order modules. The agent is tested on various 2D and 3D datasets.

Introduction

In computer vision, most "hard attention" models—which process specific regions of an image sequentially—are typically trained for specific supervised tasks like classification. However, human vision operates differently; we look at our environment to build a comprehensive mental model. This paper addresses two major challenges in active vision: the ill-posed nature of partial views and the need for efficient exploration. When an agent only sees a fragment of a scene, multiple interpretations are often valid. Predicting a single "average" scene leads to blurry, unrealistic results. Furthermore, without a predefined map, an agent must intelligently decide where to look next to resolve ambiguity efficiently.

The Imaginative Agent Framework

The authors propose an "Imaginative Agent" that utilizes a generative framework to maintain multiple hypotheses about its environment. The core architecture combines a Variational Autoencoder (VAE) with Normalizing Flows, specifically Block Neural Autoregressive Flows (BNAF).

Architecture of the Imaginative Agent showing the latent space warping and multi-hypothesis generation.

The VAE serves as the agent's visual memory, learning to compress and reconstruct complete scenes. The BNAF acts as the "imagination engine," warping the latent space of the VAE based on the current observation history. Instead of a single prediction, the agent samples multiple points from this warped latent space, allowing it to simultaneously imagine several realistic and distinct possibilities (e.g., interpreting a partial curve as a '3', '7', or '9').

Uncertainty-Based Sensing

To decide where to look next, the agent calculates a pixel-wise variance map across its different imaginations. It plans its next fixation at the location where its internal hypotheses disagree the most. This uncertainty-driven approach allows the agent to filter out false hypotheses as new evidence arrives, effectively narrowing down the possibilities until a certain representation is achieved.

Experimental Evaluation

The model was evaluated on several diverse benchmarks to test its 2D, 3D, and semantic understanding capabilities:

  • MNIST and SVHN: In 2D digit recognition, the agent often achieved certainty after just three glimpses, covering less than 25% of the total area. Unlike previous methods, the imaginations remained pseudo-realistic and interpretable throughout the process.
  • ModelNet40: For 3D CAD models, the agent successfully determined global structures (e.g., distinguishing a chair from a desk) after only two glimpses, using subsequent views to refine local details.
  • Cityscapes and BDD: In urban driving scenarios, the agent predicted full semantic segmentation maps from limited glimpses, successfully "guessing" the locations of sidewalks, pedestrians, and traffic lights in unseen regions.

Key Insights and Conclusion

A significant technical novelty is the use of normalizing flows to map a simple Gaussian distribution to a complex, multi-modal posterior conditioned on observation history. This enables the representation of "either/or" scenarios rather than just "average" scenarios. Furthermore, because the agent learns to reconstruct the entire scene, its internal latent codes are scene-level representations that prove highly effective for downstream tasks like classification, even without explicit supervised training.

While the method shows promise, challenges remain regarding the high data requirements for learning complex posterior densities and the computational difficulty of scaling normalizing flows to high-resolution panoramic scenes. Future work may involve learning more complex exploration policies that balance uncertainty reduction with specific task-oriented rewards.

Summary updated

BibTeX
@misc{rangrej2021visual,
  author = {Samrudhdhi B. Rangrej and James J. Clark},
  title = {{Visual Attention in Imaginative Agents}},
  year = {2021},
  eprint = {2104.00177},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.00177},
}
Figure