On the Transferability of Visually Grounded PCFGs

Yanpeng Zhao, Ivan Titov

Abstract

There has been a significant surge of interest in visually grounded grammar induction in recent times. While a variety of models have been developed for the task and have demonstrated impressive performance, they have not been evaluated on text domains that are different from the training domain, so it is unclear if the improvements brought by visual groundings are transferable. Our study aims to fill this gap and assess the degree of transferability. We start by extending VC-PCFG (Visually-grounded Compound PCFG) in such a way that it can transfer across text domains. We consider a zero-shot transfer learning setting where a model is trained on the source domain and is directly applied to target domains, without any further training. Our experimental results suggest that the benefits from using visual groundings transfer to text in a domain similar to the training domain but fail to transfer to remote domains. Further, we find that the lexicon overlap between the source domain and the target domain is the most important factor in the transferability of VC-PCFG.

Introduction

Unsupervised grammar induction—the task of learning the hierarchical structure of language without human-annotated trees—is a fundamental challenge in computational linguistics. Recently, researchers have found that "grounding" language in visual experiences (training models on images paired with captions) significantly improves performance. However, a critical question remains: are these models learning universal linguistic rules, or are they merely specializing in the specific "dialect" of image captions? This paper investigates the transferability of these models across diverse text domains, from news reports to informal blogs.

Methodology: From VC-PCFG to tvc-PCFG

To evaluate transferability, the authors build upon the VC-PCFG (Visually grounded Compound Probabilistic Context-Free Grammar) and introduce tvc-PCFG (Transferable VC-PCFG).

The primary technical innovation in tvc-PCFG is the integration of pre-trained, frozen GloVe embeddings. Standard grammar induction models often learn word embeddings from scratch, which limits their vocabulary to words seen during training. By using GloVe, the model can leverage semantic similarities in a continuous vector space. For example, if the model learns the syntactic role of "dog" during training, it can use the embedding space to infer that "canine" (an unseen word at test time) should behave similarly.

The training process involves two simultaneous objectives:

  1. Language Modeling: Learning general text patterns by predicting word sequences.
  2. Contrastive Learning: Aligning sentences with their corresponding images to learn how visual objects relate to syntactic structures.

Experimental Setup

The study utilizes a zero-shot transfer setting, where the model is trained on a source domain and tested on target domains without further tuning.

  • Source Domain: MSCOCO, containing over 400,000 image-caption pairs.
  • Proximate-Domain Transfer: Flickr30k, which consists of image captions similar to the source but with different statistical properties.
  • Remote-Domain Transfer:
    • WSJ (Wall Street Journal): Formal newswire text.
  • Brown Corpus: Diverse subdomains including fiction and humor.
  • Enweb (English Web Treebank): Informal text such as emails and reviews.

Key Insights

The Lexicon Bottleneck

The most significant finding is that the "grammar" learned by these models is inextricably tied to the vocabulary. The researchers identified a strong positive correlation (0.59) between lexicon overlap and parsing success. When the vocabulary changes significantly between domains, the model's understanding of syntactic structure crumbles. This suggests that visual grounding helps the model capture domain-specific lexical information effectively, but this specialization makes it less robust to domain shifts.

The "l10c" Baseline Comparison

In a surprising result, the authors compared their grounded model against a "weak" baseline: a text-only model trained on just 6,000 short sentences from the target domain (referred to as l10c). This tiny, in-domain model often outperformed the massive grounded model transferred from MSCOCO. This suggests that even a small amount of relevant, in-domain data is often superior to a large amount of irrelevant grounded data.

Heuristic Fallback

When models fail to generalize to remote domains, they often revert to simple heuristics rather than applying learned grammar. In English, this typically manifests as "Right Branching," a structural bias where the most important information appears early in the sentence and modifiers follow.

Results Summary

  • Proximate Transfer Success: On Flickr30k, the tvc-PCFG achieved a Sentence-F1 (S-F1) score of 66.6, a +20.8% improvement over text-only models.
  • Remote Transfer Failure: On the WSJ dataset, performance dropped to 35.3 S-F1. For context, the model trained directly on short WSJ sentences (l10c) reached 48.2 S-F1.
  • Unknown Word Impact: Parsing success drops sharply as the number of "unknown" tokens in a sentence increases, particularly in longer, more complex sentences.

Limitations and Future Directions

The study is currently limited to English, which possesses a strong Right-Branching bias; results may differ for morphologically rich languages or those with different word orders. Additionally, PCFG-based models exhibit high variance during training, which can complicate evaluation.

Future research may explore few-shot transfer, where a grounded model is fine-tuned on a small sample of target-domain sentences. This could potentially combine the strengths of visual grounding with the necessary domain-specific vocabulary to achieve more robust language understanding.

Summary updated

Abstract

There has been a significant surge of interest in visually grounded grammar induction in recent times. While a variety of models have been developed for the task and have demonstrated impressive performance, they have not been evaluated on text domains that are different from the training domain, so it is unclear if the improvements brought by visual groundings are transferable. Our study aims to fill this gap and assess the degree of transferability. We start by extending VC-PCFG (short for Visually-grounded Compound PCFG~\citep{zhao-titov-2020-visually}) in such a way that it can transfer across text domains. We consider a zero-shot transfer learning setting where a model is trained on the source domain and is directly applied to target domains, without any further training. Our experimental results suggest that: the benefits from using visual groundings transfer to text in a domain similar to the training domain but fail to transfer to remote domains. Further, we conduct data and result analysis; we find that the lexicon overlap between the source domain and the target domain is the most important factor in the transferability of VC-PCFG.
BibTeX
@inproceedings{zhao2023transferability,
  author = {Yanpeng Zhao and Ivan Titov},
  title = {{On the Transferability of Visually Grounded PCFGs}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=9XAo4XLETK},
}
Figure