Explicit Group Sparse Projection with Applications to Deep Learning and NMF

Riyasat Ohib, Nicolas Gillis, Niccolo Dalmasso, Sameena Shah, Vamsi K. Potluru, Sergey Plis

Abstract

We design a new sparse projection method for a set of vectors that guarantees a desired average sparsity level measured leveraging the popular Hoyer measure (an affine function of the ratio of the $\ell_1$ and $\ell_2$ norms). Existing approaches either project each vector individually or require the use of a regularization parameter which implicitly maps to the average $\ell_0$-measure of sparsity. Instead, in our approach we set the sparsity level for the whole set explicitly and simultaneously project a group of vectors with the sparsity level of each vector tuned automatically. We show that the computational complexity of our projection operator is linear in the size of the problem. Additionally, we propose a generalization of this projection by replacing the $\ell_1$ norm by its weighted version. We showcase the efficacy of our approach in both supervised and unsupervised learning tasks on image datasets including CIFAR10 and ImageNet. In deep neural network pruning, the sparse models produced by our method on ResNet50 have significantly higher accuracies at corresponding sparsity values compared to existing competitors. In nonnegative matrix factorization, our approach yields competitive reconstruction errors against state-of-the-art algorithms.

Introduction

Sparsity is a fundamental concept in signal processing and machine learning, serving as a cornerstone for model compression, feature selection, and denoising. By encouraging parameters to be zero, we can develop models that are not only faster and smaller but also more robust. However, achieving a precise target sparsity level is traditionally difficult.

The most common technique, $\ell_1$ regularization (e.g., LASSO), introduces a penalty term $\lambda$ to the objective function. The primary drawback is that the relationship between $\lambda$ and the resulting number of non-zero elements is non-linear and data-dependent. Practitioners often resort to exhaustive grid searches to find a $\lambda$ that yields the desired sparsity, a process that is computationally prohibitive for large-scale deep learning models.

The Group Sparse Projection (GSP) Framework

To address these limitations, the authors introduce Group Sparse Projection (GSP). This method allows users to explicitly set a target average sparsity for a group of vectors—such as the weights in a neural network layer—and projects the current weights onto the feasible set in a single step.

The Hoyer Measure

GSP utilizes the Hoyer measure, a smooth and differentiable proxy for the $\ell_0$ "norm" (which counts non-zero elements). The Hoyer measure of a vector $x$ is defined based on the ratio between the $\ell_1$ and $\ell_2$ norms. This measure ranges from 0 (when all entries are equal) to 1 (when only one entry is non-zero). By using this ratio, it provides a more flexible and mathematically tractable way to define sparsity than discrete counting.

Simultaneous Group Projection

The core innovation of GSP is the shift from individual vector projection to group projection. In a neural network, different filters or neurons may require different levels of sparsity to maintain performance. GSP enforces an average Hoyer sparsity across a set of vectors. This allows the algorithm to automatically allocate more non-zero parameters to "important" vectors while more aggressively sparsifying others, leading to better overall model capacity.

The authors formulated the problem as a constrained optimization: maximize the similarity to the original weights while staying within the "sparsity budget." They solved this using a dual formulation and Newton’s method, achieving linear time complexity $O(N)$, where $N$ is the total number of parameters. This ensures the method scales efficiently to modern, massive neural networks.

Experimental Results

The GSP method was evaluated across various tasks, demonstrating significant improvements over existing regularization and projection techniques.

Deep Learning Model Pruning

In the context of deep neural networks, GSP was used for "single-shot" pruning. A pre-trained dense model is projected once to the desired sparsity level and then fine-tuned. This bypasses the need to train with sparsity constraints from scratch.

  • ImageNet (ResNet-50): GSP outperformed several state-of-the-art pruning methods, including SNIP, GraSP, and ThiNet. At a 90% sparsity level, GSP maintained a top-1 accuracy drop of only about 2.2%, significantly outperforming competitors at the same compression rate.
  • CIFAR-10 (ResNet-110): The method achieved 90.72% sparsity with only a 1.17% drop in accuracy, surpassing the performance of the popular DeepHoyer regularization method.

Non-negative Matrix Factorization (NMF)

In unsupervised learning, GSP was integrated into NMF algorithms (gspNMF). On facial image datasets like CBCL and ORL, gspNMF converged to high-quality sparse representations much faster than traditional iterative methods like A-HALS or NeNMF when specific sparsity targets were required. This efficiency makes it highly suitable for large-scale data decomposition tasks.

Conclusion and Future Directions

Explicit Group Sparse Projection offers a powerful alternative to traditional regularization. By providing an explicit control mechanism for sparsity that runs in linear time, it removes the need for expensive hyperparameter tuning. While the current work focuses on NMF and CNN pruning, the authors suggest that GSP could be extended to other domains such as Sparse PCA and Dictionary Learning. Future research may also address the non-convexity of the feasible set to provide stronger global convergence guarantees.

Summary updated

BibTeX
@article{ohib2022explicit,
  author = {Riyasat Ohib and Nicolas Gillis and Niccolo Dalmasso and Sameena Shah and Vamsi K. Potluru and Sergey Plis},
  title = {{Explicit Group Sparse Projection with Applications to Deep Learning and NMF}},
  journal = {Accepted by TMLR},
  year = {2022},
  url = {https://openreview.net/forum?id=jIrOeWjdpc},
}
Figure