Abstract
This paper introduces Online Convolutional Sparse Coding (OCSC), a scalable algorithm that moves convolutional sparse coding (CSC) from slow batch processing to efficient online learning. By reformulating the optimization objective in the frequency domain, OCSC achieves massive memory savings and faster convergence, enabling CSC to handle datasets ten times larger than state-of-the-art batch methods.
Introduction
Convolutional Sparse Coding (CSC) has emerged as a powerful framework for learning shift-invariant features in signal and image processing. Unlike traditional patch-based sparse coding, CSC learns filters that can be applied across an entire image, effectively capturing local structures without the redundancy of overlapping patches. However, the practical application of CSC to large-scale datasets has been severely limited by its computational and memory requirements.
Existing CSC algorithms are predominantly batch-based, requiring simultaneous access to all data samples and their corresponding sparse codes. This leads to a memory complexity of $O(NPK)$, where $N$ is the number of samples, $P$ is the number of pixels, and $K$ is the number of filters. For high-resolution images or large datasets, this memory footprint quickly exceeds the capacity of modern hardware. Furthermore, batch updates are computationally expensive and exhibit slow convergence on large-scale data.
Methodology
To address these scalability challenges, we propose Online Convolutional Sparse Coding (OCSC). The core innovation lies in a mathematical reformulation of the dictionary update objective that enables efficient online learning.
Frequency Domain Optimization
Following modern CSC practices, OCSC operates in the frequency domain. This transformation converts computationally intensive spatial convolutions into efficient element-wise multiplications, significantly reducing the per-iteration time complexity.
Objective Reformulation and Memory Efficiency
The primary bottleneck in previous online CSC attempts was the growth of history matrices, which tracked the progress of the dictionary update. Earlier formulations required $O(K^2P^2)$ space, making them even less efficient than batch methods. OCSC overcomes this by decoupling the global optimization problem into $P$ independent subproblems in the frequency domain. This reformulation reduces the space complexity of history matrices to $O(K^2P)$, which is crucially independent of the number of samples $N$.
Efficient ADMM Solver
OCSC utilizes the Alternating Direction Method of Multipliers (ADMM) to solve the resulting optimization problems. By applying the Sherman-Morrison formula, the cost of matrix inversions within the ADMM steps is reduced from $O(K^3)$ to $O(K^2)$, further enhancing the algorithm's speed.
Complexity Analysis
The theoretical advantages of OCSC are summarized in the comparison below. OCSC is the only method that operates in an online fashion while maintaining a space complexity independent of the dataset size $N$.
Experimental Evaluation
The performance of OCSC was evaluated across six image datasets, ranging from standard small benchmarks (Fruit, City, House) to large-scale collections including Flower (2,040 images), Dog (12,000 images), and CIFAR-10 (50,000 images).
Scalability and Convergence
While batch methods like CBPDN and FFCSC frequently failed due to memory exhaustion on larger datasets (e.g., Dog or CIFAR-10), OCSC processed them efficiently. In terms of convergence, OCSC reached optimal objective values significantly faster than its batch counterparts. The online nature of the algorithm allows for continuous dictionary refinement, often leading to lower final objective values compared to batch methods that only update the dictionary once per full epoch.
Reconstruction Quality
OCSC consistently achieved higher Peak Signal-to-Noise Ratio (PSNR) values than competing methods. This suggests that the online learning process not only improves efficiency but also helps in learning more representative and effective filters for image reconstruction.
Conclusion
OCSC represents a significant step forward in making convolutional sparse coding practical for large-scale applications. By reformulating the dictionary update in the frequency domain, OCSC achieves a memory footprint independent of the number of training samples and a computational efficiency that matches or exceeds the fastest batch methods. Future work will explore the use of non-convex regularizers to further enhance sparsity and investigate filter approximation techniques to reduce memory scaling with respect to the number of filters.
Summary updated