2nd Place Solution to Google Universal Image Embedding

Xiaolong Huang, Qiankun LiarXiv 2022 · DOI

Introduction

The Google Universal Image Embedding Competition 2022, held at the ECCV Instance-Level Recognition Workshop, sought to advance the state of multi-domain image retrieval. Unlike previous competitions that focused on narrow domains like landmarks, the "Universal" challenge required models to generalize across a vast array of categories, including furniture, artwork, fashion, and consumer goods. Participants were tasked with producing compact feature embeddings of fewer than 64 dimensions to retrieve similar instances from a database of 200,000 images. This paper details the 2nd place solution, which achieved high performance by framing the retrieval task as a massive-scale fine-grained classification problem.

Methodology

The authors' approach is built on the premise that a model capable of distinguishing between hundreds of thousands of specific instances will develop internal features that serve as highly effective embeddings for retrieval.

Model Architecture

The proposed pipeline consists of three main stages:

  1. Backbone: The team utilized the OpenCLIP-ViT-H-14 model, which was pre-trained on the extensive LAION-2B dataset. This choice provided a strong foundation of general visual knowledge.
  2. Neck: To meet the competition's dimensionality constraints, a custom "neck" was implemented. This includes a Dropout layer (0.2 rate) followed by a Fully Connected (FC) layer that compresses the high-dimensional transformer output into the required 64x1 embedding.
  3. Head: For the classification task, an ArcFace head was employed. ArcFace is widely recognized in facial recognition for its ability to maximize inter-class variance and minimize intra-class variance, making it ideal for fine-grained instance recognition.
Overview of the proposed model architecture, featuring an OpenCLIP backbone, a custom neck for dimensionality reduction, and an ArcFace head.

Training Innovations and Optimizations

Several technical refinements were critical to the model's success:

  • Projection Layer Removal: The authors observed that the standard projection layers in CLIP models are often excessively large, leading to overfitting on specific training data. By removing these layers and feeding backbone features directly into the custom neck, they improved the model's ability to generalize to unseen domains.
  • Dynamic Margin Implementation: To address training instability in the early stages, a dynamic margin was used for the ArcFace head. This margin gradually increases over the first few epochs, allowing the model to converge more reliably.
  • Stratified Learning Rate: To prevent the "catastrophic forgetting" of the backbone's pre-trained knowledge, the authors applied a stratified learning rate. The backbone's learning rate was kept significantly lower than that of the newly initialized neck and head components.

Dataset Construction

A significant challenge was the lack of official training data. The authors constructed a "Universal Dataset" by aggregating 15 open-source benchmarks, covering fashion (DeepFashion, Shopee), food (LargeFineFoodAI), and general objects (Stanford Cars, Google Landmarks 2021).

The final dataset comprised 7.4 million images across 274,000 classes. To optimize training, categories were capped at 100 images, and any category with fewer than 3 images was removed. Furthermore, resampling was used to ensure every class had at least 20 images, preventing the model from ignoring smaller, less frequent categories.

Results and Discussion

The solution achieved a mean Precision@5 (mP@5) of 0.713 on the public leaderboard and 0.709 on the private leaderboard. The ablation study presented in the table below illustrates the impact of each design choice.

Ablation study demonstrating the incremental performance gains from architectural tweaks, training strategies, and data scaling.

The results indicate that while the choice of backbone is fundamental, the combination of architectural refinements (removing the projection layer), training strategies (dynamic margin and stratified learning rates), and massive data scaling (from 1.1M to 7.4M images) was essential for reaching the top of the leaderboard.

Conclusion

This work demonstrates that for universal instance-level retrieval, massive-scale classification remains a dominant strategy. The key insights—specifically the value of removing redundant projection layers and the necessity of diverse, large-scale training data—provide a roadmap for building robust embedding systems. Future work could explore the trade-offs of the 64-dimension bottleneck and the potential for even larger-scale pre-training.

Summary updated

BibTeX
@misc{huang2022nd,
  author = {Xiaolong Huang and Qiankun Li},
  title = {{2nd Place Solution to Google Universal Image Embedding}},
  year = {2022},
  eprint = {2210.08735},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2210.08735},
}
Figure