Abstract
Large-scale image retrieval requires compact representations for efficient storage and rapid search. While Product Quantization (PQ) offers superior distance resolution compared to traditional Binary Hashing (BH), existing deep PQ methods typically rely on extensive labeled datasets. This paper presents the Generalized Product Quantization (GPQ) network, the first deep semi-supervised framework for PQ-based image retrieval. GPQ integrates a novel $N$-pair metric learning strategy with a subspace entropy mini-max loss to effectively exploit both limited labeled data and abundant unlabeled pools. Experimental results on CIFAR-10 and NUS-WIDE benchmarks demonstrate that GPQ achieves state-of-the-art retrieval accuracy, particularly in low-bitrate scenarios and unseen category retrieval tasks.
Introduction
In the domain of large-scale image retrieval, representing images as compact codes is essential for performance. Traditionally, researchers have utilized Binary Hashing, which maps images to discrete Hamming spaces. However, BH suffers from limited distance resolution. Product Quantization (PQ) provides a more powerful alternative by representing images using a set of real-valued codewords, enabling finer-grained Asymmetric Distance Computation (ADC).
Despite its advantages, deep learning approaches for PQ often require massive amounts of labeled data, which is expensive to obtain. The GPQ network addresses this by providing a semi-supervised framework that learns robust feature embeddings and quantization codebooks from a mix of labeled and unlabeled data.
The GPQ Framework
The GPQ network consists of three primary trainable modules: a CNN-based feature extractor ($F$), a product quantization table ($Z$) containing learnable codewords, and a cosine similarity-based classifier ($C$). Unlike traditional PQ methods that rely on separate clustering steps like k-means, GPQ optimizes the feature extractor and codewords jointly in an end-to-end fashion.
Learning Objectives
The core innovation of GPQ lies in its dual-loss training strategy designed for semi-supervised learning:
- $N$-pair Product Quantization Loss ($L_{N-PQ}$): For labeled data, the network employs an $N$-pair metric learning approach. It pulls semantically similar images (and their quantized versions) together in the embedding space while pushing dissimilar ones away. This ensures the codewords themselves capture semantic meaning rather than just low-level visual patterns.
- Subspace Entropy Mini-max Loss ($L_{SEM}$): This is the primary mechanism for leveraging unlabeled data. The network calculates the entropy (uncertainty) of how unlabeled data points relate to "prototypes" in the classifier. Using a Gradient Reversal Layer (GRL), the network simultaneously maximizes entropy to move prototypes toward the unlabeled data distribution and minimizes entropy to force unlabeled data to cluster tightly around those moved prototypes.
Experimental Evaluation
The authors evaluated GPQ on two standard benchmarks: CIFAR-10 and NUS-WIDE. They tested two protocols: Single Category Retrieval (all classes known, but labels scarce) and Unseen Category Retrieval (generalization to entirely new classes).
Key Results
- State-of-the-Art Performance: GPQ achieved superior results across both datasets. On CIFAR-10 with only 12 bits, GPQ reached a Mean Average Precision (mAP) of 0.858, significantly outperforming previous semi-supervised hashing methods like SSGAH (0.819).
- Low-Bitrate Superiority: The model consistently outperformed both deep binary hashing and other deep quantization methods across all tested bit lengths (12, 24, 32, and 48 bits).
- Robust Generalization: In the Unseen Category protocol, GPQ maintained its lead, proving that its learned codewords are generalized enough to be effective for object classes not present during supervised training.
Conclusion
The GPQ network demonstrates that combining $N$-pair metric learning with entropy mini-max optimization allows for highly effective semi-supervised image retrieval. By leveraging the superior distance resolution of Product Quantization and the structural discovery capabilities of entropy-based losses, GPQ sets a new benchmark for large-scale retrieval with limited labels. Future work may explore the integration of more advanced backbones, such as Vision Transformers, and investigate scalability to extremely high-cardinality label spaces.
Summary updated