Abstract
MultiGrain is a unified neural network architecture that produces a single, compact image embedding suitable for three distinct tasks: image classification, instance retrieval, and copy detection. By jointly training with a classification loss and a ranking loss—leveraging data augmentation to define "instances" without extra labels—the authors achieve state-of-the-art classification results on ImageNet while maintaining high performance for finding specific objects.
Introduction
In computer vision, researchers often treat classification (identifying a category) and instance retrieval (finding the exact same object) as separate problems. Classification requires invariance to factors like lighting and pose, while retrieval requires sensitivity to fine-grained details. Traditionally, specialized and incompatible architectures are used for each, which is computationally inefficient for platforms that need to perform both tasks. MultiGrain bridges this gap with a single "universal" embedding.
Methodology
The core of MultiGrain is a standard ResNet-50 trunk with several modifications to its training and pooling stages to accommodate multi-task learning.
Joint Training and Repeated Augmentation
The model is trained using a weighted sum of two losses: a standard cross-entropy loss for classification and a margin loss (a variant of triplet loss) for retrieval. To learn instance-level features without specialized labels, the authors use Repeated Augmentation (RA). Each training batch contains multiple augmented versions of the same image, and the model is tasked with recognizing that these different "views" belong to the same instance.
Generalized Mean (GeM) Pooling
Instead of standard average pooling, MultiGrain uses GeM pooling. By adjusting an exponent $p$, the model can vary its focus from global (average) to local (max) features. This flexibility is crucial for adapting the model to higher resolutions during evaluation, where standard pooling often "blurs" the activations of small objects.
Key Results
- State-of-the-Art Classification: MultiGrain achieves 79.4% top-1 accuracy on ImageNet with a ResNet-50, a +1.8% absolute improvement over previous bests for this architecture.
- Efficient Retrieval: The model performs on par with specialized retrieval systems, reaching 92.5 mAP on the Holidays dataset at 800px.
- Practical Speed: By performing well at 500px, MultiGrain offers a 5x speedup over traditional retrieval models that often require 1024px resolutions, making it much more practical for large-scale applications.
Conclusion
MultiGrain demonstrates that classification and retrieval objectives are complementary rather than conflicting. The joint training framework acts as a powerful regularizer, helping the model learn more robust features that excel at both broad categorization and fine-grained instance identification.
Summary updated