Semantic Composition in Visually Grounded Language Models

Rohan PandeyarXiv 2023 · DOI

Introduction

Modern Vision-Language Models (VLMs) have achieved remarkable success in tasks ranging from image captioning to visual question answering. However, a persistent weakness remains: these models often behave as "bags-of-words," identifying individual objects without grasping the complex relationships between them. For instance, a model might correctly identify a "person" and a "dog" in an image but fail to distinguish between "a dog chasing a person" and "a person chasing a dog." This research investigates the failure of semantic composition—the ability to build complex meanings from simpler parts based on their structure—and proposes a suite of tools to probe and rectify this deficiency.

The Compositionality Challenge

The core issue identified is a lack of "compositional inductive bias" in current VLM architectures. While Large Language Models (LLMs) demonstrate sophisticated reasoning, their visually grounded counterparts often ignore syntax and spatial relations in favor of simple keyword matching. This paper addresses this through three primary lenses: benchmarking, probing, and novel training objectives.

Methodology

1. WinogroundVQA

To evaluate generative models like MiniGPT-4, which do not naturally produce image-text matching scores, the author introduced WinogroundVQA. This adapts the existing Winoground benchmark—consisting of 400 "minimal pairs" where two images and two captions share the same words but different meanings—into a Visual Question Answering format. This allows for a more granular assessment of how generative models handle relational logic.

2. SynNaMoN (Syntactic NeurAl Module Net)

To probe whether a model's internal representations follow grammatical structures, the author developed SynNaMoN. This method distills transformer embeddings into a tree-structured network where each module corresponds to a specific grammar rule (e.g., Noun Phrase $\rightarrow$ Determiner + Noun). This allows researchers to see if the model's latent space actually mirrors the hierarchical nature of language.

3. CACR (Cross-modal Attention Congruence Regularization)

The primary technical contribution is CACR, a novel training objective designed to align relations across modalities. Unlike previous methods that relied on "hard" assignments (mapping specific words to specific image regions), CACR utilizes a "soft" change-of-basis approach. It projects the attention patterns of one modality into the basis of the other, encouraging the model to ensure that the relationship between entities in the text (e.g., "mug" and "grass") matches the spatial and semantic relationship between those entities in the image.

4. Syntactic MeanPool

As an alternative to simple vector averaging, Syntactic MeanPool averages word vectors hierarchically according to a syntax tree. This leverages the non-associative nature of the mean operation to embed structural information directly into the final sentence vector.

Results and Discussion

Performance Benchmarks

The implementation of CACR yielded significant improvements. When applied to the UNITER model, CACR achieved a Group Score of 14.25 on the Winoground benchmark. This nearly doubles the performance of the baseline UNITER-base (8.50) and outperforms the previous state-of-the-art method, IAIS-base (13.00).

Conversely, testing on generative models via WinogroundVQA revealed a significant gap; MiniGPT-4 scored only 5.75 on the Group metric, highlighting that even advanced generative VLMs struggle with relational understanding.

Probing Insights

The SynNaMoN experiments provided unexpected insights into transformer behavior. The results suggested that much of the composition occurring within transformers is linear; adding non-linearities to the modules did not consistently improve the approximation of the model's behavior. This implies that transformers may be performing a form of "vector addition" rather than complex hierarchical processing. Additionally, while Syntactic MeanPool increased the Euclidean distance between different captions, it did not immediately translate to higher Winoground scores, suggesting that the model's matching heads must be specifically trained to utilize this structured information.

Conclusion and Future Work

While CACR represents a significant step forward in teaching VLMs to "compose," several challenges remain. Experimental results were constrained by hardware limitations (single NVIDIA K80 GPUs), suggesting that further hyperparameter tuning could yield even higher performance. Future research directions include the application of Homotopy Type Theory to formalize how referent spaces should compose in a model's latent space, providing a more rigorous mathematical foundation for visual grounding.

Summary updated

BibTeX
@misc{pandey2023semantic,
  author = {Rohan Pandey},
  title = {{Semantic Composition in Visually Grounded Language Models}},
  year = {2023},
  eprint = {2305.16328},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.16328},
}
Figure