[Paper Review] Unicom: Universal and Compact Representation Learning for Image Retrieval
Unicom learns universal and compact image representations by clustering image-text features from CLIP on LAION-400M and applying conflict-robust random negative prototype selection and random feature selection, improving both unsupervised and supervised image retrieval.
Modern image retrieval methods typically rely on fine-tuning pre-trained encoders to extract image-level descriptors. However, the most widely used models are pre-trained on ImageNet-1K with limited classes. The pre-trained feature representation is therefore not universal enough to generalize well to the diverse open-world classes. In this paper, we first cluster the large-scale LAION400M into one million pseudo classes based on the joint textual and visual features extracted by the CLIP model. Due to the confusion of label granularity, the automatically clustered dataset inevitably contains heavy inter-class conflict. To alleviate such conflict, we randomly select partial inter-class prototypes to construct the margin-based softmax loss. To further enhance the low-dimensional feature representation, we randomly select partial feature dimensions when calculating the similarities between embeddings and class-wise prototypes. The dual random partial selections are with respect to the class dimension and the feature dimension of the prototype matrix, making the classification conflict-robust and the feature embedding compact. Our method significantly outperforms state-of-the-art unsupervised and supervised image retrieval approaches on multiple benchmarks. The code and pre-trained models are released to facilitate future research https://github.com/deepglint/unicom.
Motivation & Objective
- Address the limited generalization of ImageNet-pretrained features for open-world retrieval.
- Leverage multimodal (image+text) clustering to form pseudo-classes from a large-scale unlabeled corpus.
- Design a robust discrimination objective with random negative prototype selection to handle inter-class conflict.
- Promote feature compactness by random feature selection to improve retrieval efficiency.
Proposed method
- Cluster images and CLIP text features into 1M pseudo-classes using offline k-means on LAION-400M mixed with image-text features.
- Train with a conflict-robust margin-based softmax by randomly selecting a subset of negative prototypes (class dimension) per iteration.
- Impose feature compactness by randomly selecting a subspace of feature dimensions (shared Gamma_t mask) in both embeddings and prototypes during loss computation.
- Maintain the full prototype matrix but update only a random subset of classes and features each iteration to reduce inter-class conflict and promote compactness.
- Use ArcFace-style margin-based softmax (margin=0.3, scale=64) for both pre-training and retrieval tasks.
- Optionally ensemble image and text features (平均 fusion) in clustering to form prototypes.
Experimental results
Research questions
- RQ1Does cluster discrimination with random negative prototype selection improve universal representation learning over instance discrimination on CLIP-based systems?
- RQ2Can random feature selection during discrimination yield compact yet competitive embeddings for retrieval without sacrificing accuracy?
- RQ3How does the number of clusters (k) and the choice of clustering modality (image, text, or joint) affect retrieval performance?
- RQ4Do the proposed methods generalize to both unsupervised and supervised image retrieval and to transfer learning (e.g., ImageNet-1K)?
Key findings
- Linear probing on 13 datasets shows the proposed cluster discrimination outperforms CLIP and OPEN-CLIP with the same data, with average gains of 3.6% (ViT B/32), 2.7% (ViT B/16), and 1.4% (ViT L/14).
- Unsupervised image retrieval with ViT L/14 achieves 69.9% average mAP across 7 datasets, surpassing OPEN-CLIP by 7.5% and a larger OPEN-CLIP model by 5.4%.
- Transfer learning to ImageNet-1K shows competitive Top-1 accuracy, e.g., ViT B/16 Ours reaches 85.9% and ViT L/14 Ours reaches 88.3% Top-1 (when pre-trained on LAION-400M).
- Compared to prior methods, Unicom with joint image+text clustering and random selection strategies consistently improves both linear probe and retrieval benchmarks across diverse datasets (CUB, Cars, SOP, In-Shop, INaturalist, VehicleID, GLDv2).
- Ablation studies demonstrate the importance of random negative class sampling (r1 ≈ 0.1) and random feature sampling (r2 ≈ 0.5) for achieving strong performance and feature compactness.
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.