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

SC2Net: Sparse LSTMs for Sparse Coding

Joey Tianyi Zhou, Kai Di, Jiawei Du, Xi Peng, Hao Yang, Sinno Jialin Pan, Ivor W. Tsang, Yong Liu, Zheng Qin, Rick Siow Mong Goh

Abstract

Sparse Coding (SC) is a cornerstone of signal processing, yet traditional iterative solvers are often computationally heavy and non-adaptive. This paper introduces SC2Net, which reformulates the Iterative Soft-Thresholding Algorithm (ISTA) as a novel Recurrent Neural Network unit termed the Sparse LSTM (SLSTM). By integrating adaptive momentum and LSTM-style gating with a specialized "Double Tanh" activation function, SC2Net bridges the gap between optimization theory and deep learning, achieving superior convergence and accuracy on benchmarks like CIFAR-10.

Introduction

Sparse Coding (SC) aims to find succinct representations of data by solving $\ell_1$-regularized optimization problems. Despite its utility, traditional approaches like the Iterative Soft-Thresholding Algorithm (ISTA) suffer from three primary limitations:

  1. Non-adaptivity: Fixed learning rates across all dimensions are suboptimal for complex, high-dimensional data.
  2. Lack of Memory: Standard iterative solvers typically ignore historical optimization data, which slows down convergence.
  3. Training Dependencies: Earlier "unfolded" networks, such as LISTA, often require pre-computed sparse codes from traditional solvers to act as a "teacher," making them difficult to deploy in truly end-to-end or unsupervised scenarios.

Methodology: The Sparse LSTM (SLSTM)

The authors propose Adaptive ISTA, which incorporates adaptive momentum vectors for per-dimension updates. They demonstrate that this formulation is mathematically equivalent to a specific Recurrent Neural Network (RNN) structure, leading to the development of the Sparse LSTM (SLSTM) unit.

The SLSTM Architecture

The SLSTM unit mirrors the standard LSTM architecture but is specifically tailored for sparse coding tasks. It utilizes "input" and "forget" gates to adaptively weight current gradients against historical states, effectively managing long-term dependencies in the optimization process and mitigating the error propagation issues common in traditional unfolded networks.

The internal architecture of the SLSTM unit, showing the gating mechanisms and state transitions.

Double Tanh Activation

A critical innovation in SC2Net is the replacement of standard activation functions (like ReLU or Sigmoid) with a Double Tanh function. This function is designed to approximate the non-differentiable shrinkage (soft-thresholding) operator essential to sparse coding while remaining smooth and differentiable. This differentiability is crucial for stable backpropagation and avoiding the vanishing gradient problem during training.

Comparison between the Double Tanh function and the traditional shrinkage operator.

Experimental Evaluation

SC2Net was evaluated on the MNIST and CIFAR-10 datasets. For CIFAR-10, features were extracted using a pre-trained CNN to handle the increased complexity of color images. The model was tested in both unsupervised (minimizing reconstruction error and sparsity) and supervised (adding classification loss) modes.

Key Results

SC2Net demonstrated a significant performance leap over baselines like ISTA, FISTA, and LISTA:

  • Classification Accuracy: On CIFAR-10, the supervised SLSTM achieved 79.53% accuracy, vastly outperforming LISTA (52.35%) and standard ISTA (51.05%).
  • Convergence Speed: The SLSTM reached lower objective losses significantly faster than other RNN-based solvers during training.
  • Reconstruction Quality: Qualitative results showed that SLSTM recovers more fine-grained details in reconstructed images compared to simpler RNN-based optimization methods.

Key Insights and Conclusion

SC2Net provides a theoretical and practical bridge between $\ell_1$-solvers and LSTMs, providing a framework for why LSTM-like structures are effective for iterative optimization. Unlike previous methods that approximate a fixed mathematical algorithm, SC2Net learns the dictionary and the sparse coding process simultaneously from data, allowing it to transcend the limitations of the algorithms that inspired it.

While the SLSTM unit is more complex than a simple RNN, its robustness and performance gains suggest a promising path for "model-based" deep learning. Future work may extend this framework to other supervised tasks such as action recognition and person identification, or explore its application to optimization problems beyond sparse coding.

Summary updated

BibTeX
@inproceedings{zhou2018sc,
  author = {Joey Tianyi Zhou and Kai Di and Jiawei Du and Xi Peng and Hao Yang and Sinno Jialin Pan and Ivor W. Tsang and Yong Liu and Zheng Qin and Rick Siow Mong Goh},
  title = {{SC2Net: Sparse LSTMs for Sparse Coding}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.1609/aaai.v32i1.11721},
}
Figure