Abstract
This paper presents a novel approach to image retrieval using scene graph embeddings. By leveraging a layout prediction network as a pretext task and introducing triplet-based losses, the method enables complex structured queries (e.g., "woman rides motorcycle") to outperform traditional single-object searches. The system is particularly effective for long-tail object categories and operates entirely in the embedding space during retrieval, without requiring pixel-level access at test time.
Introduction
Traditional content-based image retrieval (CBIR) systems often struggle with the complexity of human language. While searching for a single keyword like "car" is relatively straightforward, human queries frequently involve specific interactions between multiple entities, such as "dog chasing ball."
While object detection has seen significant progress, visual relationship detection—identifying how these objects interact—remains a major bottleneck in computer vision. State-of-the-art recall for relationships often falls below 35%, compared to ~70% for object detection. This research addresses the challenge of accurate retrieval using these difficult-to-model relationships, specifically focusing on "long-tail" datasets where many object categories appear infrequently.
Methodology
The authors propose a retrieval system based entirely on embeddings derived from scene graphs—structured representations where objects are nodes and relationships are edges.
The Layout Prediction Pretext Task
Instead of training for retrieval directly, the model uses a layout prediction network as a pretext task. A Graph Convolutional Neural Network (GCNN) processes an input scene graph to produce object embeddings. These embeddings are then used to predict an image layout, including masks and bounding boxes.
Triplet-Based Losses
To ensure the embeddings are descriptive of relationships rather than just individual objects, the authors introduce two novel supervisory signals:
- Triplet Mask Loss ($L_{triplet-mask}$): This penalizes errors in predicting masks that distinguish between the 'subject' and 'object' within a specific relationship.
- Triplet Superbox Loss ($L_{triplet-superbox}$): This penalizes errors in predicting the "superbox"—the bounding box that encompasses both the subject and the object.
Once trained, retrieval is performed by calculating the $L_2$ distance between the embedding of a structured query and the embeddings of images in a database. Crucially, this method performs retrieval using only the graph embeddings, bypassing the need for visual features or word embeddings at test time.
Experimental Results
The study utilized the COCO-Stuff dataset, which includes 40K training images and 5K validation images across 171 categories. Since COCO-Stuff lacks native scene graphs, the authors generated synthetic ones based on 2D image coordinates using six geometric relationships: left of, right of, above, below, inside, and surrounding.
Key Findings
- Structure vs. Isolation: Structured queries (subject + object) outperformed single-object queries by approximately 17%. The context provided by the relationship makes the search significantly more specific.
- The Predicate Paradox: Interestingly, the authors found that subject and object embeddings carry the most weight. In some instances, omitting the specific predicate (the relationship edge) from the query actually improved recall, suggesting that the GCNN-learned embeddings for objects already "bake in" the structural context.
- Robustness to Rarity: The model performed exceptionally well on "long-tail" classes. The Recall@100 for rare classes (0.51) was slightly higher than for frequent "head" classes (0.50), indicating that structural relationships provide a stable anchor for identifying objects the model has rarely seen.
- Performance Gains: The inclusion of triplet losses boosted retrieval recall by up to 10%. The "Triplet-s+o" model achieved a Recall@100 of 46%, nearly double the baseline single-object retrieval rate of 29%.
Discussion and Future Work
While the results are promising, the current work is limited to six geometric predicates and relies on synthetic graphs generated from ground-truth bounding boxes. Future applications will need to integrate automated scene graph generators, which may introduce noise. Additionally, the authors suggest that incorporating more diverse supervisory signals for predicates could enhance the model's ability to distinguish between complex semantic or action-based interactions, such as "wearing" or "kicking."
Summary updated