Scene Graph based Image Retrieval - A case study on the CLEVR Dataset

Sahana Ramnath, Amrita Saha, Soumen Chakrabarti, Mitesh M. KhapraarXiv 2019

Introduction

Standard text-based image retrieval systems typically rely on "black-box" neural models that map images and text into a shared latent space. While effective for general categorization, these models often struggle to capture the explicit structural relationships between objects—such as spatial constraints or specific attribute pairings. For instance, a purely neural model might struggle to distinguish between a "red ball to the left of a blue cube" and a "blue ball to the left of a red cube" if the latent features are not sufficiently disentangled.

This paper proposes a neural-symbolic approach to image retrieval that moves away from monolithic embeddings toward structured representations known as Scene Graphs. By representing both the image catalog and the user queries as graphs, the authors transform retrieval into a learnable graph-matching problem, laying the groundwork for more transparent and interactive search systems.

The Scene Graph Framework

At the core of this approach is the symbolic representation of visual data. In a scene graph, nodes represent individual objects (characterized by attributes like color, shape, or material), and edges represent the relationships between them (such as "behind," "under," or "left of").

Catalog Consolidation

Unlike traditional systems that treat images as isolated entities, this framework consolidates the entire image library into a single Catalog Scene Graph. Identical objects appearing across different images are collapsed into single nodes, with each node and edge maintaining an inverted index of the images in which they appear. This transformation turns the retrieval task into a structural navigation of a unified graph rather than a linear scan of thousands of individual files.

Query Parsing and Matching

To process user requests, input text is converted into a Query Scene Graph using the SPICE framework, which parses sentence dependencies to identify objects and their relations. The retrieval process is then defined as a graph subsumption problem: the system attempts to find where the query graph "fits" within the larger catalog graph.

Matching is performed using a "subsumption score" that measures the alignment between query nodes and catalog nodes. This score utilizes a weighted Frobenius distance between GloVe embeddings of attributes. Notably, the scoring is asymmetric; it only evaluates attributes explicitly mentioned in the query. If a user does not specify a color, the model does not penalize catalog nodes for having one, allowing for flexible and underspecified queries.

Training via Reinforcement Learning

The model is trained end-to-end using the REINFORCE algorithm. During training, the agent receives a reward based on how closely the retrieved image matches a "gold" target image within a latent feature space. This allows the symbolic matching logic to be optimized alongside neural feature extractors.

Experimental Results on the CLEVR Dataset

The authors evaluated their framework using the CLEVR dataset—a synthetic 3D environment designed to test visual reasoning—and CLEVR-Dialog, which extends the dataset into multi-turn conversations.

To test the robustness of the graph-matching approach, the authors performed a "sanity check" using varying levels of query completeness:

  • Perfect Information: When the query graph perfectly matched the target image's scene graph, the model achieved 99.9% retrieval accuracy.
  • Degraded Information: To simulate real-world ambiguity, nodes were randomly removed from the query graph:
  • With a 20% node drop, accuracy decreased to 89%.
  • With a 30% node drop, accuracy fell to 75%.

These results indicate that while the graph-matching approach is highly precise, it is sensitive to the completeness of the user's description.

Strategic and Iterative Retrieval

One of the most significant advantages of this symbolic approach is its potential for interactive search. Because the model can mathematically identify which nodes or attributes are missing from a query to uniquely identify a target, it can act as a "Questioner."

In a multi-turn scenario, the system can proactively ask the user questions (e.g., "What color is the cylinder to the left of the sphere?") to efficiently "shatter" the remaining search space. This moves image retrieval closer to a natural dialogue, where the system and user collaborate to find the correct result.

Limitations and Future Directions

While promising, the current study is limited by its reliance on the synthetic and "clean" nature of the CLEVR dataset. Real-world images, such as those in retail or travel catalogs, contain significantly more noise and complex relationships that may challenge current scene graph generators. Furthermore, the system's performance is heavily dependent on the initial parsing of the text via the SPICE framework; errors in the initial graph generation can lead to retrieval failure. Future work will focus on scaling the "Questioner" and "Answerer" agents to handle the nuances of natural, non-synthetic imagery.

Summary updated

BibTeX
@misc{ramnath2019scene,
  author = {Sahana Ramnath and Amrita Saha and Soumen Chakrabarti and Mitesh M. Khapra},
  title = {{Scene Graph based Image Retrieval - A case study on the CLEVR Dataset}},
  year = {2019},
  eprint = {1911.00850},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.00850},
}
Figure