Binary Random Projections with Controllable Sparsity Patterns

Wenye Li, Shuzhong ZhangJournal of the Operations Research Society of China 2020 · DOI

Abstract

This paper presents two novel sparse binary random projection models designed to reduce data dimensionality while preserving pairwise Euclidean distances. By utilizing 0-1 matrices and a mathematical "centering" correction to eliminate statistical bias, the proposed Bernoulli and Fixed-Sparsity models achieve lower variance and higher accuracy than traditional Gaussian methods. Empirical evaluations on diverse real-world datasets, including dense word vectors and highly sparse text data, demonstrate the superior performance and computational efficiency of these controllable sparsity patterns.

Introduction

Random Projection (RP) is a cornerstone technique in machine learning for projecting high-dimensional data into lower-dimensional subspaces while maintaining distance relationships, as guaranteed by the Johnson-Lindenstrauss lemma. While dense Gaussian matrices are standard, their computational cost is prohibitive for large-scale applications. Sparse random projections offer a faster alternative, yet the use of binary (0-1) matrices—which replace expensive multiplications with simple additions—has historically been limited by a failure to preserve distances for uncentered data.

This research addresses this limitation by introducing a centering transformation that removes the inherent statistical bias of naive binary projections. This allows for the use of extremely sparse binary matrices without sacrificing theoretical guarantees or empirical accuracy.

Proposed Methodology

The authors propose two distinct binary models that incorporate a centering trick to ensure the expected squared norm of the projected vector matches the original:

  1. Bernoulli Projection Model: The projection matrix $W_B$ consists of i.i.d. Bernoulli($p$) entries. The modified projection $\eta = (W_B - pE)x$, where $E$ is an all-ones matrix, effectively subtracts the mean to preserve distances.
  2. Fixed-Sparsity Model: This model ensures each row of the matrix has exactly $c$ non-zero entries, providing more granular control over sparsity. A similar transformation $(W_F - cqE)$ is applied to maintain distance-preserving properties.

Theoretical analysis provides concentration bounds and a new Johnson-Lindenstrauss style theorem, confirming that these models offer stable distance preservation with high probability.

Experimental Setup

The models were evaluated across three datasets with varying characteristics:

  • GLOVE: Dense word vectors (300 dimensions).
  • IMAGENET: Visual features (1,000 dimensions) with ~30% non-zero entries.
  • RCV1: Sparse text data (2,000 dimensions) with only ~2.9% non-zero entries.

Key Results and Discussion

Variance Reduction

A significant finding is that these binary models can outperform standard Gaussian projections in terms of stability. For sparsity levels $p > 0.3$, the variance of the distance estimate is mathematically and empirically lower than that of Gaussian methods. This is consistent across all tested datasets, as shown in Figure 1.

Comparison of Variances across GLOVE, IMAGENET, and RCV1 datasets for Gaussian, Bernoulli, and Fixed-Sparsity models.

Accuracy and Retrieval Performance

The proposed models consistently achieved lower Mean Squared Error (MSE) in distance preservation compared to established sparse methods like PING and Achlioptas. This improvement is particularly evident in sparse datasets like RCV1, where the binary models maintain high accuracy even at significant compression levels.

Comparison of Mean Squared Error (MSE) on the RCV1 dataset with projection dimension $m=0.5d$, showing the proposed models against several baselines.

In similarity search tasks ($k$-nearest neighbors), the binary models demonstrated lower retrieval errors. The performance gain on sparse datasets suggests that these models are uniquely suited for high-dimensional text and feature-based retrieval systems. Furthermore, the 0-1 nature of the matrices ensures that the projection step is computationally faster than methods requiring floating-point multiplications.

Conclusion

By correcting the statistical bias of binary matrices, this work enables the use of ultra-fast, sparse random projections for general data. The resulting models not only offer computational speedups but also provide superior accuracy and lower variance than traditional dense projections. Future work will explore adapting these controllable sparsity patterns for other metrics, such as Cosine similarity, and investigating hardware-level optimizations to further exploit the binary nature of the projection matrices.

Summary updated

BibTeX
@misc{li2020binary,
  author = {Wenye Li and Shuzhong Zhang},
  title = {{Binary Random Projections with Controllable Sparsity Patterns}},
  year = {2020},
  eprint = {2006.16180},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.16180},
}
Figure