Data Efficient Masked Language Modeling for Vision and Language

Yonatan Bitton, Michael Elhadad, Gabriel Stanovsky, Roy Schwartz

Abstract

Standard Masked Language Modeling (MLM) in vision-language pre-training is often inefficient due to its tendency to mask "easy" stop-words that do not require visual context for prediction. This research introduces targeted masking strategies that prioritize physical objects and concrete content words. By forcing models to rely on visual data to resolve linguistic ambiguities, these strategies significantly enhance performance and data efficiency. Experimental results demonstrate that models pre-trained with these methods on only 10% of the standard dataset can outperform baselines trained on much larger corpora.

Introduction

Vision-Language Pre-training (VLP) models, such as LXMERT and ViLBERT, have established a new state-of-the-art in cross-modal AI. These models typically rely on Masked Language Modeling (MLM)—a technique borrowed from BERT where random tokens are hidden and the model must predict them. However, applying vanilla MLM to image captions reveals two critical inefficiencies:

  1. The "Nothingness" Problem: Captions are significantly shorter than standard text corpora. At a 15% masking rate, approximately one-third of training sentences contain zero masked tokens, resulting in wasted computation.
  2. The "Stop-word" Shortcut: Roughly half of masked tokens are stop-words (e.g., "the," "is") or punctuation. These can often be predicted using local textual context alone, allowing the model to bypass the image entirely and failing to learn effective cross-modal fusion.

Targeted Masking Strategies

To address these issues, the researchers propose moving away from random masking toward strategies that force the model to utilize visual information.

Key Techniques

  • $Δ$ Image Loss: A novel metric that quantifies a word's dependence on visual context by calculating the difference in prediction loss when the image is present versus when the model is "blind."
  • Objects Masking: Specifically targets words representing physical entities (e.g., "tiger," "carrot") identified through scene-graphs or linguistic heuristics.
  • Content Word Masking: Guarantees at least one non-stop-word is masked per sentence, increasing the probability of masking meaningful tokens to 80%.
  • Top Concrete Masking: Utilizes psycholinguistic datasets to mask words with high "concreteness" scores—terms referring to things perceivable by the senses.

Analysis and Insights

The core of the improvement lies in Ambiguity Resolution. In a standard text-only model, a prompt like "A [MASK] is eating the carrot" might lead the model to guess "rabbit" due to strong textual associations. A vision-language model must be forced to look at the image to correctly identify a "tiger" in that specific context.

Comparison of masking strategies: Targeted masking of 'tiger' forces the model to use visual cues, whereas baseline MLM often masks non-informative words.

The authors' $Δ$ image loss analysis confirmed that "grounded objects"—words appearing in both the text and the image's scene-graph—are the most critical for learning cross-modal relationships. Stop-words, by contrast, show near-zero $Δ$ loss, contributing little to the fusion of modalities.

Key Results

The proposed strategies consistently outperformed the BERT-style baseline across multiple benchmarks, including VQA 2.0, GQA, and NLVR2.

Data Efficiency

The most striking result is the gain in data efficiency. Using the "Objects" masking strategy with just 10% of the training data yielded a 4% improvement on NLVR2 compared to the baseline MLM. This suggests that the quality of masked tokens is far more important than the sheer quantity of training examples.

Accuracy on NLVR2 across different pre-training data scales, showing the efficiency of targeted masking strategies over the baseline.

Visual Grounding

In prompt-based probing (e.g., "A photo of a [MASK]"), models trained with targeted strategies were significantly more accurate at identifying specific objects. In contrast, the baseline model often defaulted to generic terms like "person" or "woman," regardless of the actual image content, indicating a lack of true visual grounding.

Conclusion

While targeted masking significantly improves performance on tasks involving objects and relations, it can lead to a slight decrease in the model's ability to predict stop-words. Future work may involve dynamic masking strategies that use $Δ$ image loss during training to select the most challenging words for the model, further optimizing the balance between linguistic fluency and visual grounding.

Summary updated

BibTeX
@inproceedings{bitton2021data,
  author = {Yonatan Bitton and Michael Elhadad and Gabriel Stanovsky and Roy Schwartz},
  title = {{Data Efficient Masked Language Modeling for Vision and Language}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.findings-emnlp.259},
}
Figure