Multi-Modal Representation Learning with Text-Driven Soft Masks

Jaeyoo Park, Bohyung HanCVPR 2023

Abstract

Current Vision-Language Pretraining (VLP) models often focus on the most discriminative image features, ignoring broader context. We present SoftMask++, a framework that employs text-driven soft masking to encourage models to learn finer details and complementary attributes. By reducing the intensity of obvious features based on specific caption words, SoftMask++ achieves state-of-the-art performance on multiple vision-language benchmarks, including image-text retrieval and visual reasoning.

Introduction: The "Lazy" Learning Problem

A significant challenge in Vision-Language Pretraining (VLP) is the tendency of models to rely on "lazy" shortcuts. For instance, when matching a "zebra in a field" to its caption, a model might only identify a small patch of stripes to confirm the match, effectively ignoring the rest of the scene, such as the grass or the animal's posture.

While "hard masking"—completely removing random image patches—is a common strategy to force deeper learning, it often destroys the structural information necessary for fine-grained matching. SoftMask++ addresses this by introducing a "soft" alternative that hides obvious parts just enough to promote exploration without losing global context.

Methodology

The SoftMask++ framework introduces three primary innovations to improve multi-modal representation:

  1. Text-Driven Soft Masking (SoftMask): Utilizing Grad-CAM, the system identifies image regions most relevant to specific words in a caption. Instead of deleting these regions, it applies a "soft mask" that reduces their feature intensity. This forces the multi-modal encoder to seek out secondary, less obvious regions to maintain alignment.
  2. Focal Image-Text Contrastive (ITC) Loss: To prioritize learning from difficult examples, the authors implement a focal version of the standard contrastive loss. This down-weights "easy" pairs that the model already understands, focusing training on "hard" examples.
  3. Multi-Modal Data Augmentation (MMDA): Aggressive augmentations (e.g., color jitter, word masking) are applied to both modalities. These "hard positives" enhance the model's robustness and flexibility.
The SoftMask++ architecture, highlighting the Soft Masking Module and the interaction between visual and text encoders.

Experimental Results

The model was pretrained on a standard 4M image-text dataset aggregate (including MS-COCO, Visual Genome, SBU, and Conceptual Captions) and evaluated across several downstream tasks.

Retrieval Performance

SoftMask++ demonstrated superior performance in image-text retrieval. On the Flickr30K benchmark (R@1), it outperformed the ALBEF baseline by 1.1% in fine-tuning and 2.9% in zero-shot settings. Notably, the computational overhead for calculating Grad-CAM masks was minimized through optimized encoder passes, maintaining a training speed comparable to baseline models (1.98s/it vs. 1.94s/it).

Qualitative Analysis

Visualizations of the model's attention maps reveal that SoftMask++ identifies objects more comprehensively than previous methods. While baselines might focus solely on a dog's head, SoftMask++ activations extend across the entire body and include relevant contextual elements like frisbees or beach environments.

Qualitative comparison between SoftMask++ (Ours) and ALBEF, showing more comprehensive attention maps for various keywords.

Conclusion and Future Directions

SoftMask++ demonstrates that "softness" in masking provides a better balance between information preservation and learning incentive than binary hard masking. While the technique significantly improves retrieval and matching, the authors noted that its benefits do not currently extend to Masked Language Modeling (MLM). Future work will explore scaling these techniques to foundation-model sizes and investigating potential biases introduced when masking salient features.

Summary updated

BibTeX
@inproceedings{park2023multi,
  author = {Jaeyoo Park and Bohyung Han},
  title = {{Multi-Modal Representation Learning with Text-Driven Soft Masks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  url = {https://openreview.net/forum?id=bAtN1LMrysT},
}
Figure