[Paper Review] Getting More Juice Out of Your Data: Hard Pair Refinement Enhances Visual-Language Models Without Extra Data
This paper proposes Helip, a plug-and-play fine-tuning method that enhances pre-trained visual-language models like CLIP and SLIP by leveraging hard negative samples mined from the original training data and a novel Hard Negative Margin Loss (HNML). Without additional data or retraining, Helip boosts zero-shot ImageNet accuracy by up to 10.14% and linear probe accuracy by up to 9.5%, demonstrating consistent performance gains across multiple benchmarks.
Contrastive Language-Image Pre-training (CLIP) has become the standard for cross-modal image-text representation learning. Improving CLIP typically requires additional data and retraining with new loss functions, but these demands raise resource and time costs, limiting practical use. In this work, we introduce HELIP, a cost-effective strategy that improves CLIP models by exploiting challenging text-image pairs within existing datasets in continuous training. This eliminates the need for additional data or extensive retraining. Moreover, HELIP integrates effortlessly into current training pipelines with minimal code modifications, allowing for quick and seamless implementation. On comprehensive benchmarks, HELIP consistently boosts existing models. In particular, within just two epochs of training, it improves zero-shot classification accuracy on ImageNet for SLIP models pre-trained on CC3M, CC12M, and YFCC15M datasets by 3.05%, 4.47%, and 10.1% , respectively. In addition, on fine-grained classification datasets, HELIP improves the zero-shot performance of CLIP and SLIP by an average of 8.4% and 18.6%, and their linear probe performance by an average of 9.5% and 3.0%. The code is publicly available at: https://github.com/haonan3/HELIP-NACCL-2025.git.
Motivation & Objective
- To improve the zero-shot and retrieval performance of pre-trained visual-language models without retraining from scratch or collecting new data.
- To address the inefficacy of in-batch hard negative mining due to limited batch size and noisy web-crawled data.
- To develop a low-cost, generalizable fine-tuning strategy that enhances model performance using only original training data.
- To validate that hard negative samples and geometric regularization via HNML significantly improve representation quality.
Proposed method
- Helip performs Hard Pair Mining (HPM) by projecting a target image-text pair into the full dataset and selecting a subset of pairs with high similarity in both modality-specific representations (e.g., ResNet50 for vision, BERT for text).
- The selected subset forms the hard negative set for the target pair, ensuring high-quality, challenging negatives that are semantically close but not positive matches.
- Helip fine-tunes the pre-trained model using the standard contrastive loss alongside a new Hard Negative Margin Loss (HNML), which enforces that hard negatives are closer to the positive than normal negatives in the embedding space.
- HNML introduces geometric structure by penalizing the model when the distance to hard negatives exceeds that to normal negatives, improving discrimination.
- The method uses an approximated HPM variant that samples a fixed-size subset (e.g., 3M or 6M) from the full dataset to accelerate mining while preserving performance.
- The framework is deployed in a plug-and-play manner, requiring only fine-tuning on the original training data with no changes to the model architecture.
Experimental results
Research questions
- RQ1Can hard negative samples from the original training data significantly improve the zero-shot performance of pre-trained visual-language models without additional data?
- RQ2Does incorporating a margin-based loss that distinguishes between normal and hard negatives lead to better representation learning?
- RQ3How effective is a two-stage approach—pre-mining hard pairs globally before fine-tuning—compared to in-batch mining?
- RQ4Can the proposed method generalize across different pre-trained models (e.g., CLIP, SLIP, DECLIP) and datasets (e.g., CC3M, CC12M, YFCC15M)?
- RQ5Does the approximated HPM strategy maintain performance while enabling scalability to larger datasets?
Key findings
- Helip boosts the zero-shot ImageNet accuracy of SLIP models pre-trained on CC3M by 3.05 percentage points and on CC12M by 4.47 percentage points.
- When pre-trained on CC3M, Helip improves the average zero-shot accuracy of CLIP and SLIP by 8.4% and 18.6%, respectively, across seven fine-grained classification datasets.
- For linear probing, Helip increases the average accuracy of CC3M-pretrained CLIP and SLIP by 9.5% and 3.0%, respectively.
- The approximated HPM variant with a 6M subset achieves zero-shot performance within 0.6% of the full HPM method, demonstrating scalability and efficiency.
- The HNML loss improves performance on datasets with high class granularity (e.g., ImageNet, CIFAR-100), but slightly degrades performance on CIFAR-10, suggesting a trade-off in discriminative capacity.
- Visualizations confirm that approximated HPM selects hard samples that are semantically close to the target, validating the quality of mined negatives.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.