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})$.
The PSC framework splits the original sparse coding problem into two smaller subproblems. The authors proposed two solvers:
- Iterative PSC (IPSC): A binary search algorithm that finds the optimal regularization balance ($\lambda_1$) between subproblems, ensuring global optimality under most conditions.
- 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.
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