On the Language Encoder of Contrastive Cross-modal Models

Mengjie Zhao, Junya Ono, Zhi Zhong, Chieh-Hsin Lai, Yuhta Takida, Naoki Murata, Wei-Hsiang Liao, Takashi Shibuya, Hiromi Wakaki, Yuki Mitsufuji · DOI

Multimodal AI models like CLIP (Contrastive Language-Image Pre-training) have fundamentally changed how machines understand the relationship between different types of data. However, most research in this field focuses on the alignment between modalities, often overlooking the intrinsic quality of the individual encoders. Researchers at Sony recently published a study investigating a pivotal question: Can specifically improving the language encoder's understanding of text enhance the overall performance of contrastive cross-modal models?

The Challenge: Anisotropy in Text Embeddings

Standard contrastive training often leads to a phenomenon known as anisotropy. In this state, text embeddings are clustered into a narrow cone within the vector space rather than being distributed uniformly. This lack of "uniformity" makes the representations less discriminative, potentially hindering the model's ability to grasp nuanced semantic relationships between different sentences.

Methodology: Integrating NLP Objectives

To combat anisotropy, the researchers introduced auxiliary training objectives derived from established Natural Language Processing (NLP) techniques:

  1. Unsupervised Sentence Embedding ($L_s$): Utilizing SimCSE, the model processes the same sentence twice with different dropout masks. It is then trained to recognize these variations as the same semantic concept, encouraging more robust representations.
  2. Supervised Sentence Embedding ($L_n$): Using Natural Language Inference (NLI) datasets, the model learns to cluster "entailed" sentences (similar meanings) while distancing "contradictory" ones.

These losses were integrated into standard CLIP and CyCLIP (a geometrically-aware variant) architectures.

The conceptual framework illustrating cross-modal consistency and contrastive objectives used in the study.

The Uniformity-Alignment Trade-off

The study's most significant finding is the uniformity-alignment trade-off. While improving the language encoder makes text representations more uniform (improving internal language scores), it can simultaneously decrease cross-modal alignment. If the text space is forced to satisfy strict internal linguistic constraints, it may "drift" away from the corresponding image or audio space.

Interestingly, models that explicitly consider the geometry of the representation space, such as CyCLIP, showed the most synergy with these NLP techniques. By maintaining geometric consistency between modalities, improving the text space naturally encouraged the image space to follow suit, mitigating the negative effects of the trade-off.

Comparison of Text-Image Alignment vs. Text Space Uniformity for CLIP (left) and CyCLIP (right) variants. Note how CyCLIP variants cluster differently, reflecting the synergy between geometric awareness and language encoder improvements.

Results and Domain-Specific Insights

The impact of these improvements varied significantly across modalities:

  • Vision-Language (VL): The benefits were clear. Adding unsupervised training (CyCLIPs) improved Text Retrieval (R@1) on the Flickr30K dataset from 37.30% to 40.00%. Furthermore, internal language quality scores (measured by SentEval) rose from 55.45 to 64.50 with supervised training.
  • Audio-Language (AL): Results for audio models (CLAP/CyCLAP) were less consistent. The authors attribute this to data scarcity; audio-language datasets are significantly smaller than vision-language ones, making it harder for models to learn complex geometric relationships from scratch.

Conclusion

This research highlights that the language encoder is not just a passive component of multimodal models but a critical lever for performance. While the uniformity-alignment trade-off presents a challenge, geometrically-aware architectures like CyCLIP offer a promising path forward. Future work involving larger audio datasets and more sophisticated prompt engineering may further unlock the potential of these enhanced encoders across all modalities.

Summary updated

BibTeX
@inproceedings{zhao2024language,
  author = {Mengjie Zhao and Junya Ono and Zhi Zhong and Chieh-Hsin Lai and Yuhta Takida and Naoki Murata and Wei-Hsiang Liao and Takashi Shibuya and Hiromi Wakaki and Yuki Mitsufuji},
  title = {{On the Language Encoder of Contrastive Cross-modal Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.293},
}
Figure