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

Product Sparse Coding

Tiezheng Ge, Kaiming He, Jian SunCVPR 2014

Introduction

Sparse Coding (SC) is a fundamental technique in computer vision, representing data as a sparse linear combination of codewords from a dictionary. Despite its effectiveness in tasks like image classification and retrieval, SC suffers from high computational costs. State-of-the-art solvers typically scale linearly with the codebook size ($K$), creating a "performance ceiling" where researchers are forced to use smaller dictionaries (e.g., $K=1000$) to maintain reasonable processing times, sacrificing potential accuracy gains from larger dictionaries.

Product Sparse Coding (PSC)

To address this bottleneck, Ge et al. (CVPR 2014) introduced Product Sparse Coding (PSC). Inspired by Product Quantization (PQ), PSC decomposes a large codebook into a Cartesian product of two smaller subcodebooks ($A_1$ and $A_2$), each of size $\frac{d}{2} \times \sqrt{K}$. This structural change reduces the computational complexity from $O(K)$ to $O(\sqrt{K})$.

Comparison of Vector Quantization (VQ), Product Quantization (PQ), Sparse Coding (SC), and Product Sparse Coding (PSC).

The PSC framework splits the original sparse coding problem into two smaller subproblems. The authors proposed two solvers:

  1. Iterative PSC (IPSC): A binary search algorithm that finds the optimal regularization balance ($\lambda_1$) between subproblems, ensuring global optimality under most conditions.
  2. Approximate PSC (APSC): A faster, non-iterative heuristic that simply splits the regularization parameter in half. In practice, this heuristic performs nearly as well as the iterative version.

Experimental Results

The method was evaluated on benchmarks like Caltech 101 and the Holidays dataset. PSC achieves massive speedups with negligible loss in accuracy. For a codebook of size $K=16,384$, the APSC algorithm is over 100x faster than standard Feature Sign (SC-FS) solvers.

Computational efficiency comparison of various sparse coding methods. APSC achieves a 104x speedup over standard SC-FS.

Beyond speed, PSC is highly memory-efficient. While standard SC might require over 2 GB to store a $K \times K$ Gram matrix for $K=16,384$, PSC only requires 262 KB for its sub-matrices, making it much more suitable for modern CPU caches and low-memory systems. On Caltech 101, PSC achieved 78.02% accuracy compared to SC’s 78.55%, but processed images in 0.65 seconds versus 14.6 seconds.

Conclusion and Limitations

PSC effectively breaks the linear complexity barrier of sparse coding. While the Cartesian product structure is a constraint, the ability to use much larger codebooks often compensates for this limitation. Current challenges include handling more than two subspaces in the iterative solver and determining optimal subspace decompositions for different data types.

Summary updated

BibTeX
@inproceedings{ge2014product,
  author = {Tiezheng Ge and Kaiming He and Jian Sun},
  title = {{Product Sparse Coding}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2014},
  doi = {10.1109/cvpr.2014.125},
}
Figure