Combining Geometric, Textual and Visual Features for Predicting Prepositions in Image Descriptions

Arnau Ramisa, Josiah Wang, Ying Lu, Emmanuel Dellandréa, Francesc Moreno-Noguer, Robert J. Gaizauskas

Abstract

Predicting the correct spatial preposition (e.g., "on," "under," "beside") is a fundamental challenge in generating natural image descriptions. While identifying objects is a mature task, modeling their spatial interactions requires a nuanced understanding of geometry and linguistics. This paper proposes a multi-modal approach that combines geometric bounding-box features, textual word embeddings, and visual features from Convolutional Neural Networks (CNNs). Our results on the MSCOCO and Flickr30k datasets show that multi-modal models significantly outperform frequency-based and single-modality baselines, achieving a top accuracy of 80.4% on MSCOCO.

1. Introduction

Modern computer vision systems excel at identifying objects within an image but often struggle to describe the relationships between them. Moving from a simple list of labels like "man, horse" to a coherent description like "a man sitting on a horse" requires selecting the appropriate preposition. This "spatial reasoning" is the "glue" of natural language.

Existing approaches often fall into two traps: text-only models that rely on statistical priors (e.g., assuming "person on horse" regardless of the actual visual evidence) and geometric models that use rigid, hand-coded rules. This work aims to bridge this gap by learning to predict prepositions jointly from visual, geometric, and textual contexts to ensure descriptions are both physically accurate and linguistically natural.

Example of spatial preposition prediction task involving a boy in a sled.

2. Methodology

The task is framed as a classification problem: given a "trajector" (subject) and a "landmark" (object), the model predicts the most likely preposition from a predefined set.

2.1 Feature Extraction

The researchers evaluate three distinct feature types:

  • Geometric Features: An 11-dimensional vector derived from object bounding boxes, capturing relative distance, aspect ratios, Intersection over Union (IoU), and normalized centroid offsets.
  • Textual Features: The model utilizes Word2vec embeddings for object labels. This allows for semantic generalization; for instance, knowledge of "man on boat" can be transferred to "person on ship," mitigating data sparsity.
  • Visual Features: Features are extracted from the final layer of a CNN pre-trained on ImageNet, providing context for entities where specific labels might be missing.

2.2 Prediction Models

For scenarios with known object labels, Multi-class Logistic Regression is employed. In cases where labels are unknown, a 3-node Chain Conditional Random Field (CRF) is used to jointly predict object labels and the intervening preposition.

2.3 Datasets

Experiments were conducted on two major benchmarks: MSCOCO (80 object categories) and Flickr30k (known for descriptive captions). Training triples of (trajector, preposition, landmark) were extracted using the Stanford CoreNLP dependency parser.

3. Results and Analysis

The integration of multiple modalities consistently yielded the best performance. A key finding was the importance of the vertical offset (Y-axis) for prepositions like "on" and "under." Additionally, knowing the "landmark" (reference object) proved more beneficial for prediction than knowing the "trajector."

Performance comparison of different feature combinations across MSCOCO and Flickr30k datasets.

As shown in the results table, the combined models (e.g., W2V+GF) significantly outperform the baseline. On MSCOCO, the model achieved 80.4% accuracy, a substantial leap from the 40.2% baseline. The Mean Rank metric further confirms the model's precision, with the correct preposition typically appearing as the first or second choice (Mean Rank of 1.42 on MSCOCO).

4. Conclusion and Future Work

While the model shows high accuracy, challenges remain regarding synonym ambiguity (e.g., "near" vs. "next to"). Future work will focus on incorporating verbs (e.g., "riding") to enrich descriptions and integrating this preposition "expert" into end-to-end image captioning pipelines to improve overall narrative quality.

Summary updated

BibTeX
@inproceedings{ramisa2015combining,
  author = {Arnau Ramisa and Josiah Wang and Ying Lu and Emmanuel Dellandréa and Francesc Moreno-Noguer and Robert J. Gaizauskas},
  title = {{Combining Geometric, Textual and Visual Features for Predicting Prepositions in Image Descriptions}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2015},
  doi = {10.18653/v1/d15-1022},
}
Figure