Introduction
Large-scale image retrieval aims to find semantically similar images—those belonging to the same category—rather than just visually similar ones. To manage millions of images efficiently, researchers typically use compact coding to compress high-dimensional vectors into short binary strings.
While hashing has dominated this field, it is limited by a small number of discrete Hamming distance values. This paper introduces Supervised Quantization (SQ), the first approach to apply vector quantization to semantic similarity search. Quantization approximates vectors as a sum of codebook entries, allowing for much finer distance approximations. SQ bridges the gap by making quantization work for supervised tasks where class labels are available, significantly outperforming state-of-the-art supervised hashing in both accuracy and efficiency.
Methodology
The SQ framework simultaneously optimizes three core components:
- Feature Transformation: A linear transformation matrix projects data into a low-dimensional discriminative subspace.
- Composite Quantization: The projected data is approximated as a sum of elements from multiple dictionaries, offering more flexibility than standard K-means.
- Semantic Separability: A classification layer using regression loss is integrated into the objective function, forcing quantized points of the same class to cluster together while keeping different classes disjoint.
The optimization uses an alternating approach to update the transformation matrix, dictionaries, and binary assignment codes. To ensure fast retrieval, a "constant inter-dictionary element-product" constraint is included, allowing distances to be computed via efficient lookup tables.
Datasets and Evaluation
The authors evaluated SQ on four standard benchmarks: CIFAR-10, MNIST, NUS-WIDE (using the 21 most frequent labels), and ImageNet (ILSVRC 2012) using AlexNet features.
Key Insights
- Quantization vs. Hashing: Quantization provides higher resolution for distance approximation. For a fixed code length, it represents a vastly larger variety of distances, leading to superior ranking.
- Joint Learning: Simultaneously learning the subspace transformation and quantization ensures that the compression process preserves features critical for class discrimination.
- Efficiency of Classification Loss: While triplet loss is common for similarity, it is computationally expensive. A simple classification-based regression loss proved more efficient and effective for this architecture.
Key Results
SQ demonstrates substantial improvements in search accuracy across all datasets. For instance, on CIFAR-10, SQ achieved a Mean Average Precision (MAP) of ~0.70 with 64 bits, a 23% improvement over Supervised Discrete Hashing (SDH).
Furthermore, SQ is highly efficient. Despite the complexity of quantization, the use of distance lookup tables keeps query times comparable to traditional hashing methods. On ImageNet, SQ not only improves accuracy over raw Euclidean baselines but also maintains a competitive speed-to-accuracy trade-off.
Limitations and Future Work
Current limitations include the use of a linear feature transformation; integrating non-linear or deep transformations directly into the loop could further boost performance. Additionally, while the method handles multi-label data like NUS-WIDE, the core formulation is single-label. Future work may explore more complex hierarchical or multi-label taxonomies.
Summary updated