NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Detecting the large entries of a sparse covariance matrix in sub-quadratic time

Ofer Shwartz, Boaz NadlerarXiv 2015

Introduction

In modern data science, the estimation of covariance matrices is fundamental for understanding relationships between variables. However, as the dimensionality $p$ of datasets grows, researchers encounter a "computational wall." Calculating a full covariance matrix requires $O(np^2)$ operations, where $n$ is the number of observations. For high-dimensional fields such as genomics, climate modeling, or social network analysis, where $p$ can exceed tens of thousands, the $p^2$ term results in billions of entries, making exhaustive calculation computationally prohibitive.

Fortunately, many high-dimensional covariance matrices are "sparse," meaning most variables are effectively uncorrelated. In these scenarios, only a small fraction of the matrix entries are "large" or statistically significant. This paper addresses the challenge of identifying these significant entries without the need to compute the entire matrix, effectively reducing the quadratic bottleneck to a near-linear task.

Methodology

The authors propose two randomized algorithms designed to detect large covariance entries in sub-quadratic time by exploiting matrix sparsity.

1. The sFFT-based Algorithm

This approach utilizes a mathematical reduction where each row of a covariance matrix is treated as the Discrete Fourier Transform (DFT) of a specific vector. By leveraging the Sparse Fast Fourier Transform (sFFT), the algorithm can identify "heavy hitters"—the largest entries in a row—in sub-linear time relative to the row's length. This transforms a statistical estimation problem into a signal processing task, benefiting from optimized sFFT techniques.

2. The Tree-based Algorithm (SparseCovTree)

SparseCovTree employs a "coarse-to-fine" strategy using $m$ random binary trees. In this structure, individual variables are placed at the leaves, while parent nodes represent groups of variables. The algorithm performs statistical "group tests" at higher levels of the tree. If a group test indicates low variance for a specific branch, the algorithm prunes that entire branch, skipping thousands of potential calculations in a single step. It only recurses into branches that show evidence of containing large covariance entries.

Theoretical Insights

A key theoretical contribution is the link established between covariance rows and the Fourier domain (Lemma 1). This connection allows for the application of sub-linear time algorithms from signal processing to high-dimensional statistics.

Furthermore, the paper bridges the gap between population sparsity (the underlying truth) and sample sparsity (what is observed). The authors prove that if a population covariance matrix is sparse, the sample covariance matrix remains "approximately sparse" enough for their algorithms to function effectively, provided the sample size $n = O(p \log p)$.

Experimental Results

The algorithms were evaluated using synthetic Gaussian data and near-duplicate detection datasets (simulating all-pairs similarity search). Key findings include:

  • Computational Efficiency: For dimensions such as $p = 10,000$, SparseCovTree demonstrated significant speedups over the standard $O(p^2)$ approach. The runtime complexity is $O(nrp \log^2 p)$, where $r$ is the maximum number of large entries per row. This is nearly linear in $p$ when $r$ is small.
  • Comparison with MIPS: The authors compared their method against popular Maximum Inner Product Search (MIPS) algorithms, including LSH-kNN and kd-trees. In high-dimensional settings, these traditional approximate methods often performed slower than direct calculation, whereas SparseCovTree maintained a clear sub-quadratic advantage.
  • Accuracy: Simulations indicated that the algorithms successfully detected over 99% of large entries, maintaining high fidelity while significantly reducing the computational load.

Conclusion and Future Work

This research provides a path forward for high-dimensional covariance estimation by breaking the quadratic complexity barrier. However, some limitations remain. The current algorithms require a-priori knowledge of sparsity parameters, such as the threshold $\mu$ and the expected number of large entries $r$. Future work may focus on automating the estimation of these parameters from the data and extending the theoretical framework beyond the $L_2$ norm to other metrics like the $L_1$ norm. Additionally, the question of whether the "poly-log" factor in the complexity can be further reduced remains an open theoretical challenge.

Summary updated

BibTeX
@misc{shwartz2015detecting,
  author = {Ofer Shwartz and Boaz Nadler},
  title = {{Detecting the large entries of a sparse covariance matrix in sub-quadratic time}},
  year = {2015},
  eprint = {1505.03001},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1505.03001},
}
Figure