Near-Optimal Entrywise Sampling for Data Matrices

Dimitris Achlioptas, Zohar Shay Karnin, Edo LibertyNeurIPS 2013

This paper presents a sophisticated yet practical approach to matrix sparsification—the process of reducing a massive matrix to a much smaller, sparser version while preserving its essential mathematical properties. By "reverse-engineering" the Matrix Bernstein inequality, the authors derive a near-optimal sampling distribution that adapts to the sampling budget, works in a single-pass stream, and produces highly compressible sketches.

The Challenge of Matrix Sparsification

In the era of Big Data, matrices representing user-item interactions, text corpora, or image datasets are often too large to fit in memory. To perform essential computations like Principal Component Analysis (PCA) or Singular Value Decomposition (SVD), practitioners rely on a "sketch"—a sparse proxy matrix $B$ that approximates the original matrix $A$.

The gold standard for evaluating this approximation is the spectral norm ($\|A - B\|_2$), which measures how much the error matrix distorts the strongest signals in the data. Previous methods, such as $L_2$ sampling, often struggled with variance "blowing up" when very small entries were accidentally sampled. Furthermore, many existing techniques required multiple passes over the data, rendering them unsuitable for real-time streaming applications.

A Top-Down Methodological Approach

Instead of guessing a distribution and proving its efficacy post hoc, the authors take a unique "top-down" approach. They start with the Matrix Bernstein Inequality, a powerful tool in random matrix theory that bounds the probability of large deviations.

They treat the parameters of this inequality as an optimization problem, seeking the probability distribution $p$ that minimizes the error bound for a given budget of $s$ non-zero entries.

Algorithm 1: Construct a sketch B of a data matrix A

This optimization yields a budget-adaptive sampling strategy. The optimal distribution dynamically changes based on the total number of allowed samples $s$:

  • For small budgets, the distribution behaves like standard $L_1$ sampling ($p_{ij} \propto |A_{ij}|$).
  • For large budgets, it shifts toward "Row-$L_1$" sampling ($p_{ij} \propto |A_{ij}| \cdot \|A_{(i)}\|_1$), where $\|A_{(i)}\|_1$ is the $L_1$ norm of the $i$-th row.

The resulting distribution has a closed-form solution. If the ratios of row-norms are known or can be estimated, the algorithm can process entries in a single pass with $O(1)$ computation per non-zero entry.

Key Insights and Empirical Results

The authors evaluated their approach on four diverse datasets: Wikipedia (term-document tf-idf), Enron (email corpus), Images (wavelet transforms), and a Synthetic collaborative filtering matrix.

Theoretical Optimality and Sample Complexity: The proposed distribution is provably within a factor of 3 of the optimal offline distribution (which would require seeing the entire matrix at once). To achieve a target error $\epsilon$, the method requires significantly fewer samples than previous state-of-the-art bounds.

Empirical Dominance: In practical experiments, the "Bernstein-sampling" method proved far superior to traditional techniques. While much of the prior literature focused on $L_2$ sampling ($p \propto A_{ij}^2$), this paper demonstrates that $L_1$-based methods are more robust and theoretically closer to the optimal offline distribution.

Empirical performance comparison of sampling methods across datasets

Compressibility: Because the sampled entries in the sketch $B$ take a specific mathematical form, they can be stored using very few bits. The authors observed a 2x to 5x reduction in disk space compared to standard sparse formats. In some experiments, the average number of bits needed per sample was as low as 5 to 22 bits—often less than the bits required just to store the $(i, j)$ coordinates.

Limitations and Future Work

While highly effective, the approach has a few limitations:

  • Data Matrix Assumptions: The theoretical proofs rely on the matrix being a "Data Matrix" (where columns far outnumber rows, $n \gg m$, and row norms are somewhat balanced). The bounds might degrade for square or highly irregular matrices.
  • A Priori Knowledge: The streaming model assumes prior knowledge of the row-norm ratios. While these can often be estimated via domain knowledge (e.g., word frequencies) or initial sampling, a truly "zero-knowledge" one-pass version remains an open challenge.
  • Sampling with Replacement: The current theory is built on sampling with replacement. Exploring "sampling without replacement" could potentially yield even tighter results in practice.

Summary updated

BibTeX
@inproceedings{achlioptas2013near,
  author = {Dimitris Achlioptas and Zohar Shay Karnin and Edo Liberty},
  title = {{Near-Optimal Entrywise Sampling for Data Matrices}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2013},
}
Figure