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

Testing Sparsity over Known and Unknown Bases

Siddharth Barman, Arnab Bhattacharyya, Suprovat Ghoshal

Introduction

Sparsity is a cornerstone of modern machine learning and signal processing. However, determining whether a high-dimensional signal is truly sparse is often computationally expensive. This paper introduces efficient "property testing" algorithms capable of detecting sparsity using only a few linear measurements (sketches). This provides a fast mechanism to vet data before committing to intensive reconstruction or dictionary learning tasks.

The Problem: Verifying Sparsity

In fields like compressed sensing and image processing, data is frequently assumed to be "sparse"—meaning it can be represented using only a few non-zero coefficients in some basis (such as a Fourier transform). Verifying this assumption, however, is notoriously difficult. If the basis is known, finding the sparse representation is a classic "Sparse Recovery" problem. If the basis is unknown, it becomes "Dictionary Learning." Both exact forms are generally NP-hard.

The authors tackle this challenge through the lens of property testing. Instead of attempting to reconstruct the signal or find the dictionary, they ask a simpler question: Can we distinguish between a signal that is $k$-sparse and one that is "far" from being sparse, using as few queries as possible? Crucially, these tests are performed on "sketches"—low-dimensional projections of the data—rather than the full high-dimensional input.

Methodology: Property Testing via Sketches

The paper proposes two primary testing frameworks:

  1. Unknown Basis Testing: Given a collection of vectors, is there any basis (specifically one satisfying the Restricted Isometry Property, or RIP) in which these vectors are sparse? To solve this, the authors use Gaussian width as a proxy. Gaussian width is a geometric measure of how "bulky" a set is. The key insight is that sparse sets have a small Gaussian width. By estimating this width from linear sketches, the algorithm can efficiently decide if a sparse decomposition is possible.
  2. Known Basis Testing: Given a specific design matrix $A$ and a vector $y$, is $y = Ax$ for some sparse $x$? Here, the authors project the problem into a lower dimension using a random Gaussian matrix and then perform a convex hull membership test. If the sketched vector falls within the convex hull of the sketched basis columns, it is likely sparse.

The authors utilize tools from high-dimensional probability, such as Gordon’s Theorem and the Johnson-Lindenstrauss lemma, to prove that these low-dimensional sketches preserve enough geometric information to make accurate decisions.

Empirical Validation

While the paper is primarily theoretical—focusing on rigorous proofs of query complexity and hardness—the authors validated their "Unknown Basis" approach using an empirical study on the classic "Barbara" benchmark image.

They subdivided the 512x512 grayscale image into sub-images and further into patches to create a matrix representation.

Barbara image with numbered patches

By analyzing these specific patches, they demonstrated a real-world correlation between the theoretical metric (Gaussian width) and the actual reconstruction error found by the $k$-SVD algorithm.

Scatter plot of Gaussian Width vs. Reconstruction Error

As shown in the scatter plot, there is a clear, positive correlation between the estimated Gaussian width of an image patch and its reconstruction error. This confirms that their theoretical metric tracks well with practical machine learning performance.

Key Insights and Theoretical Results

  • Gaussian Width as a Robust Metric: The most significant insight is that Gaussian width serves as an excellent surrogate for sparsity. Because it is invariant under orthogonal transformations (rotations), it can detect "structure" even when the coordinate system (the basis) creating that structure is unknown.
  • The Necessity of Relaxation: The authors prove (Theorem 1.4) that a perfectly efficient tester for the "Known Basis" case is impossible without a "bicriteria relaxation." The tester must distinguish between $k$-sparsity and being far from $K$-sparsity (where $K > k$). Without this gap, the problem remains as hard as solving SAT (assuming a variant of the Exponential Time Hypothesis).
  • Sketching for Efficiency: By demonstrating that property testing can be done on linear sketches, the paper aligns with modern hardware strengths. GPUs are highly optimized for the matrix-vector multiplications used in sketching, making these testers potentially very fast in practice.
  • Query Complexity: For the unknown basis case, the algorithm requires only $O(\epsilon^{-2} \log(p/\delta))$ queries, where $p$ is the number of vectors. For the known basis, it requires $O(k \epsilon^{-2} \log(m/\delta))$ queries. Both are significantly lower than the dimensions of the original data.

Limitations and Future Directions

  • RIP Assumption: The results for the unknown basis setting rely on the assumption that the underlying basis satisfies the Restricted Isometry Property (RIP). While common in compressed sensing, not all real-world dictionaries satisfy this property.
  • Oblivious vs. Non-Oblivious Testers: The current testers are "oblivious," meaning the random measurement matrix is chosen without looking at the data. The authors suggest that "non-oblivious" testers, which adapt to the input, might provide even stronger guarantees.
  • Broadening the Scope: The authors propose extending this sketching-based property testing to other fundamental machine learning concepts, such as testing for low Non-negative Rank or VC-dimension.

Summary updated

BibTeX
@inproceedings{barman2018testing,
  author = {Siddharth Barman and Arnab Bhattacharyya and Suprovat Ghoshal},
  title = {{Testing Sparsity over Known and Unknown Bases}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
}
Figure