Abstract
Maximum Inner Product Search (MIPS) is a critical component in various machine learning applications, ranging from recommender systems to object detection. However, scaling MIPS to massive datasets remains computationally challenging. This paper presents Asymmetric Inner-product Binary Coding (AIBC), a data-dependent hashing framework that learns compact binary codes specifically for MIPS. By leveraging asymmetric hash functions and a direct discrete optimization strategy, AIBC significantly reduces quantization error and achieves state-of-the-art retrieval accuracy on large-scale benchmarks.
Introduction
Finding the "best match" in high-dimensional space is a fundamental task in computer vision and machine learning. While Euclidean distance is common, many modern applications—such as multi-class classification, recommender systems, and deformable part models—rely on Maximum Inner Product Search (MIPS).
As datasets grow to millions of vectors, exhaustive search becomes computationally infeasible. Binary coding (hashing) offers a solution by compressing vectors into short bitstrings, enabling rapid bitwise search using Hamming distance. However, traditional hashing methods are often optimized for Euclidean distance or cosine similarity. Existing MIPS-specific methods like Asymmetric Locality Sensitive Hashing (ALSH) are typically data-independent, requiring excessively long codes to achieve acceptable performance.
Methodology: Asymmetric Inner-product Binary Coding (AIBC)
The proposed AIBC framework addresses these limitations through two key technical innovations:
1. Asymmetric Hashing
Unlike symmetric hashing, which uses a single function for both queries and database items, AIBC learns two distinct sets of hash functions: $h(x)$ for database items and $z(q)$ for queries. This asymmetry is crucial for MIPS because inner products do not satisfy the geometric constraints (like the triangle inequality) inherent in metric distances. This flexibility allows the binary inner product to more accurately approximate the original real-valued inner product.
2. Discrete Optimization
Most hashing algorithms rely on "continuous relaxation," treating bits as real numbers during training and rounding them to 0 or 1 afterward. This process introduces significant quantization error. AIBC avoids this by employing a coordinate descent-style optimization that solves for discrete bits directly. The authors derived closed-form solutions for each bit update, ensuring that the training process remains efficient; for instance, the AIBC-L variant can train on tens of thousands of images in approximately 15 seconds on a standard PC.
The framework offers two variants:
- AIBC-Q (Quadratic): Directly minimizes the squared error between binary and real-valued inner products.
- AIBC-L (Linear): A faster alternative that maximizes the correlation between binary and raw inner products.
Experimental Results
The researchers evaluated AIBC on three large-scale benchmarks: SUN397, YouTube Faces, and ImageNet.
Performance on SUN397
On the SUN397 scene recognition dataset (~108,000 images), AIBC-L demonstrated a clear lead. With 64-bit codes, it achieved a Mean Average Precision (mAP) of 0.4042, significantly outperforming ITQ (0.3336) and the data-independent ALSH (0.0913).
Face Retrieval on YouTube Faces
The advantages of AIBC were even more pronounced on the YouTube Faces dataset (~370,000 images). AIBC-L reached an mAP of 82.33% with 64-bit codes, significantly surpassing competing methods. The method also showed a clear advantage in "Hamming distance 2 precision," indicating its effectiveness in finding true matches within a very small search radius in the binary space.
Discussion and Future Work
The success of AIBC highlights that avoiding continuous relaxation is vital for preserving data structure in binary space. While the current implementation uses linear hash functions, the framework is extensible. Future work could explore integrating non-linear or deep-learning-based functions. Additionally, addressing the memory bottleneck of the similarity matrix $S$ for billion-scale datasets remains an open challenge.
Conclusion
AIBC provides a robust and efficient framework for MIPS by combining asymmetric hashing with direct discrete optimization. Its superior performance across multiple benchmarks makes it a powerful tool for large-scale retrieval tasks where inner product similarity is the primary metric.
Summary updated