Generating Semantically Precise Scene Graphs from Textual Descriptions for Improved Image Retrieval.

Sebastian Schuster, Ranjay Krishna, Angel X. Chang, Li Fei-Fei, Christopher D. ManningVL @ EMNLP 2015 · DOI

Introduction: The Semantic Gap in Image Retrieval

Searching for specific images using natural language is a common yet often frustrating task. Standard retrieval systems typically rely on keyword matching, which struggles to interpret complex relationships and specific attributes. For instance, a query for "a boy wearing a t-shirt with a plane on it" might return an image of a boy in a plain shirt playing with a toy plane. Keywords capture the presence of "boy," "t-shirt," and "plane," but fail to grasp the structural relationship: the plane is on the shirt.

Semantic ambiguity in keyword search: A query for 'boy with plane shirt' might mistakenly retrieve a boy with a toy plane (right) instead of the intended apparel (left).

To address this, researchers have proposed using scene graphs—structured semantic representations that explicitly link objects, their attributes, and their mutual relations. While effective, previous scene-graph-based systems required users to manually build these graphs. This paper introduces an automated pipeline that parses natural language descriptions into precise scene graphs for seamless image retrieval.

Methodology: From Text to Structured Graphs

The core contribution is a system that translates raw text into a graph of objects, attributes, and relations. The process begins by parsing sentences into a Universal Dependencies tree using the Stanford Parser. This tree is then converted into a "semantic graph" through several preprocessing steps, including pronoun resolution (via a modified Hobbs algorithm) and handling plural nouns or quantifiers.

The researchers evaluated two distinct extraction methods:

  1. Rule-Based Parser: This method uses manually defined dependency patterns (via Semgrex) to extract semantic components directly from syntactic structures (e.g., identifying subject-predicate-object triples).
  2. Classifier-Based Parser: A machine learning approach using two $L_2$-regularized Maximum Entropy (MaxEnt) classifiers. The first identifies candidate objects and attributes using GloVe word embeddings; the second predicts relationships between object pairs based on lexical and syntactic features.

The resulting graphs are integrated into a Conditional Random Field (CRF) model to rank and retrieve images from a database.

Experimental Setup and Datasets

The system was trained and tested on a dataset derived from the intersection of YFCC100m and Microsoft COCO. The corpus consists of 4,524 images and 50,448 sentences, annotated by Amazon Mechanical Turk workers who provided both descriptions and corresponding ground-truth scene graphs (bounding boxes, attributes, and relations).

Key Results and Performance

The effectiveness of the automated parsers was measured using Recall@10 on the image retrieval task.

Method Recall@10
Oracle (Human-annotated graphs) 33.4%
Rule-based Parser 27.1%
Classifier-based Parser 27.1%
Object-only Baseline 24.8%
Nearest-neighbor Baseline 2.3%

Both automated parsers significantly outperformed the object-only baseline. Crucially, they recovered a substantial portion of the performance achieved by human-constructed "Oracle" graphs, demonstrating that automated parsing is a viable and scalable alternative to manual annotation.

Insights and Limitations

A key finding was that explicit relations are vital: modeling how objects interact (e.g., "plane has stripe") provides a significant boost over simple object detection. Furthermore, the system's modularity allows the text-to-graph parser to be used in other domains, such as generating 3D indoor scenes.

However, challenges remain. The system is sensitive to "cascading errors" from the initial syntactic parser. It also lacks deep "world knowledge"—for example, it may fail to infer that "a woman in black" refers to her clothing rather than a spatial relationship. Additionally, human annotators often include visual details in their graphs that are not explicitly mentioned in the text, creating a performance ceiling for text-only parsers.

Despite these hurdles, this work represents a significant step toward more semantically aware and user-friendly image retrieval systems.

Summary updated

BibTeX
@inproceedings{schuster2015generating,
  author = {Sebastian Schuster and Ranjay Krishna and Angel X. Chang and Li Fei-Fei and Christopher D. Manning},
  title = {{Generating Semantically Precise Scene Graphs from Textual Descriptions for Improved Image Retrieval.}},
  booktitle = {VL @ EMNLP},
  year = {2015},
  doi = {10.18653/v1/w15-2812},
}
Figure