Sign-Full Random Projections

Ping Li

Abstract

In large-scale similarity search, 1-bit random projections offer extreme storage efficiency but at the cost of significant estimation variance. This paper introduces "sign-full" random projections, an asymmetric framework that utilizes the full precision of query vectors while maintaining the database in a 1-bit compressed format. We derive several new estimators, including normalized versions that drastically reduce variance in high-similarity regimes. Theoretical and empirical analyses demonstrate that these proposed estimators approach the maximum likelihood limit, offering a "free lunch" in accuracy for search systems where query processing is not the primary bottleneck.

Introduction

The explosion of high-dimensional "Big Data" has made Random Projections (RP) a standard tool for dimensionality reduction. A particularly popular variant is 1-bit (or "sign-sign") random projection, which compresses data into binary signatures. While this allows for rapid similarity calculations via XOR operations and minimal storage, it discards the magnitude information of the projected vectors.

Existing methods typically treat the database and the query symmetrically, converting both to bits. However, in most real-world search architectures, the database storage is the primary constraint, whereas the query vector is processed on the fly. This paper explores the "Sign-Full" paradigm: storing the database as signs ($sgn(x)$) but keeping the query ($y$) in its original full-precision form.

Methodology and Estimators

The core idea is to estimate the cosine similarity $\rho$ between two vectors $x$ and $y$ using the signs of the projected training data and the full values of the projected query data. The paper introduces and analyzes several estimators:

  1. Basic Estimators: $\hat{\rho}_g$ (based on the expected product of sign and value) and $\hat{\rho}_s$ (based on indicator functions).
  2. Normalized Estimators: $\hat{\rho}_{g,n}$ and $\hat{\rho}_{s,n}$. By normalizing the query's projected values, the author proves that the estimation variance can be significantly lowered.
  3. Maximum Likelihood Estimator (MLE): The theoretical upper bound for accuracy given the asymmetric information available.
Theoretical variance ratios of sign-full estimators compared to standard 1-bit projections across the similarity range $\rho$.

As shown in the figure above, the variance ratios for normalized estimators ($V_{g,n}$ and $V_{s,n}$) are substantially lower than the basic versions, especially as $\rho$ approaches 1 or -1. The $V_{s,n}$ estimator, in particular, tracks the theoretical MLE ($V_m$) closely across a wide range of similarities.

Empirical Evaluation

The proposed methods were tested on several large-scale datasets, including MNIST, RCV1, and YouTube features. The results consistently show that the sign-full approach provides a significant accuracy boost over standard 1-bit hashing.

Empirical MSE performance of various estimators at high similarity ($\rho = 0.95$) as a function of projection count $k$.

In the high-similarity regime ($\rho = 0.95$), the normalized estimator $\hat{\rho}_{s,n}$ (labeled 's,n') exhibits much lower Mean Squared Error (MSE) than the standard 1-bit estimator or the unnormalized sign-full versions. This improvement is critical for applications like near-duplicate detection or high-precision retrieval, where distinguishing between very similar items is paramount.

Key Insights

  • The Free Information Principle: Using full precision for the query is essentially "free" because it does not impact the size of the indexed database.
  • Normalization is Essential: The transition from $\hat{\rho}_s$ to $\hat{\rho}_{s,n}$ is the key technical contribution that allows the variance to approach zero as similarity approaches 1.
  • Efficiency: In high-similarity regions, the sign-full MLE can achieve the same accuracy as standard 1-bit projections using only one-third the number of samples ($k$).

Conclusion

Sign-full random projections provide a robust and efficient way to improve the accuracy of 1-bit hashing systems. By breaking the symmetry between query and database, researchers can achieve near-optimal estimation performance with zero additional storage overhead. Future work may extend these principles to other distance metrics beyond cosine similarity and explore hybrid estimation strategies for broader similarity ranges.

Summary updated

BibTeX
@inproceedings{li2019sign,
  author = {Ping Li},
  title = {{Sign-Full Random Projections}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33014205},
}
Figure