Introduction
Maximum Inner Product Search (MIPS) is a critical operation in modern large-scale machine learning, particularly within recommendation systems and high-dimensional classification. Given a query vector $q$ and a database of vectors $\mathcal{X}$, the goal is to find $x \in \mathcal{X}$ that maximizes the inner product $q^\top x$. As datasets scale to millions or billions of items, exhaustive search becomes computationally prohibitive.
Locality Sensitive Hashing (LSH) has emerged as a standard technique to accelerate these searches by grouping similar items into "buckets." However, traditional LSH schemes are designed for metrics like Euclidean distance or angular similarity (cosine). Inner products pose a unique challenge because they do not satisfy the triangle inequality; a vector's magnitude can significantly influence its inner product, regardless of its orientation relative to the query.
The Myth of Asymmetry
Previous research suggested that a symmetric LSH for MIPS was theoretically impossible, leading to the development of complex Asymmetric LSH (ALSH) schemes. These methods use different transformation functions for queries and database items. This paper, presented at ICML 2015, challenges that notion, demonstrating that for bounded real-world data, symmetric hashing is not only possible but often superior.
Methodology: SIMPLE-LSH
The authors introduce SIMPLE-LSH, a parameter-free symmetric hashing scheme. The core idea is to map data onto a higher-dimensional unit sphere where inner products become equivalent to cosine similarities.
The Transformation
Assuming database vectors are bounded such that $\|x\| \le 1$ and queries are normalized ($\|q\| = 1$), each database vector $x \in \mathbb{R}^d$ is transformed into $P(x) \in \mathbb{R}^{d+1}$: $$P(x) = [x; \sqrt{1 - \|x\|^2}]$$ This transformation ensures that $\|P(x)\| = 1$ for all $x$. Consequently, the inner product $q^\top x$ is directly related to the angular distance between the query and the transformed vector.
Hashing Mechanism
Once the data is mapped to the unit sphere, the authors apply Sign-Random Projection (Sign-RP), an efficient and well-understood LSH for cosine similarity. This approach avoids the complex hyper-parameter tuning (e.g., $m, U, r$) required by previous ALSH methods, making SIMPLE-LSH a universal and parameter-free solution.
Asymmetric Extension: SIMPLE-ALSH
For scenarios where neither the query nor the data is normalized, the authors propose SIMPLE-ALSH. This variant uses a similar "dummy dimension" trick but applies it asymmetrically to queries and data to keep everything on the unit sphere while preserving the inner product relationship.
Theoretical Analysis
The effectiveness of an LSH scheme is often measured by its hashing quality, $\rho$. A lower $\rho$ value indicates a better ability to distinguish between "near" and "far" items, leading to faster search times and higher accuracy.
As shown in Figure 1, SIMPLE-LSH maintains a favorable probability gap across various similarity thresholds $S$. The "impossibility" of symmetric LSH only holds in an infinite, unbounded space; within the practical bounds of real-world datasets, the symmetric approach is mathematically sound and provides better hashing quality than previous asymmetric methods.
Empirical Evaluation
The authors evaluated SIMPLE-LSH against state-of-the-art asymmetric methods (L2-ALSH and SIGN-ALSH) using classic collaborative filtering datasets like Netflix and Movielens 10M. These datasets represent typical recommendation scenarios where MIPS is used to retrieve top items from latent factor models.
The empirical results in Figure 2 highlight the dramatic improvements offered by SIMPLE-LSH. Across different retrieval targets (Top-1 to Top-10) and hash lengths ($K=64$ to $K=512$), the symmetric scheme (red solid line) consistently provides higher precision for a given recall level compared to the more complex L2-ALSH (blue dashed line).
Conclusion
This work demonstrates that simplicity often triumphs over complexity. By recognizing that real-world data is bounded, the authors replaced intricate asymmetric hashing schemes with a straightforward symmetric transformation. SIMPLE-LSH is not only easier to implement but also more robust and performant, setting a new baseline for large-scale Maximum Inner Product Search.
Summary updated