LLaVE: Large Language and Vision Embedding Models with Hardness-Weighted Contrastive Learning

Zhibin Lan, Liqiang Niu, Fandong Meng, Jie Zhou, Jinsong Su

Introduction

Multimodal embedding models are critical for mapping images and text into a shared vector space, enabling advanced retrieval and search capabilities. While Large Multimodal Models (LMMs) have improved understanding of complex data, they often struggle to distinguish between true matches and "hard negatives"—images that are visually or semantically similar to a target but ultimately incorrect. Analysis of standard training objectives like InfoNCE reveals a significant overlap in similarity scores for positive and negative pairs, limiting the model's discriminative precision.

Methodology: The LLaVE Framework

To address the "similarity overlap" bottleneck, the LLaVE framework introduces two key technical innovations designed to sharpen the model's embedding boundaries.

Hardness-Weighted Contrastive Learning

LLaVE employs a novel objective inspired by preference learning. The embedding model is treated as a "policy" ($\pi$), while a "reward model" ($r_\theta$)—implemented as a frozen snapshot of the policy model—assigns adaptive weights to negative pairs. Hard negatives that are highly similar to the query receive higher weights, imposing a heavier penalty for misclassification. This mechanism forces the model to focus on the most challenging examples during training.

The LLaVE framework architecture, illustrating the interaction between the policy model, reward model, and hardness-weighted contrastive learning.

Cross-Device Negative Sample Gathering

Given the high memory demands of LMMs, LLaVE utilizes a cross-device gathering strategy to increase the effective batch size. By pooling negative samples across multiple GPUs, the model gains access to a larger and more diverse set of hard negatives without exceeding individual device memory limits.

Experimental Evaluation

The researchers evaluated LLaVE on the Massive Multimodal Embedding Benchmark (MMEB), which comprises 36 datasets across four core tasks: Classification, Visual Question Answering (VQA), Retrieval, and Visual Grounding.

Key Results and Insights

LLaVE-7B achieved a new state-of-the-art score of 70.3 on MMEB, a 6.2-point improvement over the previous best, MMRet. The model showed particularly strong gains in Visual Grounding (91.9 vs. 87.3 baseline).

Comparison of cosine similarity distributions between InfoNCE and LLaVE. LLaVE significantly increases the separation between positive and negative distributions across RefCOCO and SUN397 datasets.

Beyond benchmark scores, LLaVE demonstrated superior zero-shot generalization. Despite being trained only on image-text pairs, it outperformed models specifically trained on millions of video clips in text-to-video retrieval tasks on MSR-VTT and MSVD. This suggests that the hardness-weighted objective improves the fundamental robustness of the learned representations.

Conclusion and Future Directions

LLaVE demonstrates that a more sophisticated loss function can enable smaller models to outperform larger ones trained with standard objectives. While highly effective for image-text data, future work will focus on incorporating native video data and improving the model's ability to follow complex, multi-step instructions in retrieval scenarios.

Summary updated

BibTeX
@misc{lan2025llave,
  author = {Zhibin Lan and Liqiang Niu and Fandong Meng and Jie Zhou and Jinsong Su},
  title = {{LLaVE: Large Language and Vision Embedding Models with Hardness-Weighted Contrastive Learning}},
  year = {2025},
  eprint = {2503.04812},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.04812},
}
Figure