Explicit Group Sparse Projection with Applications to Deep Learning and NMF

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

TL;DR

Researchers have developed a novel "Grouped Sparse Projection" (GSP) method that allows users to set an explicit average sparsity target for a collection of vectors. By leveraging the Hoyer measure—a smooth proxy for the number of non-zero elements—this linear-time algorithm automatically decides which vectors in a group should be sparse and which should remain dense, leading to state-of-the-art results in deep neural network pruning and non-negative matrix factorization.

What Problem Does This Paper Address?

Sparsity is the "secret sauce" of efficient machine learning. By forcing many parameters to be zero, we can reduce noise, improve model interpretability, and drastically speed up computation on specialized hardware. However, achieving a specific level of sparsity is surprisingly difficult.

The standard measure of sparsity is the $\ell_0$-norm (a simple count of non-zero elements), but optimizing for it is NP-hard. Most researchers use the $\ell_1$-norm as a proxy, but this requires tuning a "regularization parameter" ($\lambda$). Finding the right $\lambda$ to hit a specific sparsity target (e.g., "I want exactly 90% of my weights to be zero") usually involves a tedious and expensive grid search.

Furthermore, existing methods often project vectors individually. In a neural network layer, you might want the entire layer to have an average sparsity, allowing some filters to stay complex while others become very simple. Previous tools couldn't easily handle this "group" constraint without forcing every individual vector to meet the same rigid target.

Methods

The authors introduce Grouped Sparse Projection (GSP). The core of their approach is the Hoyer measure, which is a ratio of the $\ell_1$ and $\ell_2$ norms. Unlike the jumpy $\ell_0$ count, the Hoyer measure is smooth and differentiable, making it much friendlier for optimization.

Key Innovations: 1. Global Constraint, Local Tuning: Instead of setting a sparsity target for every single vector, GSP sets one target for the whole group. The algorithm then automatically distributes the "sparsity budget," allowing vectors that are naturally dense to stay that way while pushing others toward zero. 2. Linear Complexity: The authors formulated the projection as a dual optimization problem. They show it can be solved using a combination of Newton’s method and a bisection search. The result is an algorithm with $O(N)$ complexity—meaning it scales linearly with the number of parameters. 3. Weighted Extension: They also proposed a weighted version (WGSP). This allows practitioners to inject domain knowledge—for example, forcing the edges of a facial recognition basis image to be sparser than the center, where the features are.

Datasets

The efficacy of GSP was tested across several standard benchmarks:

  • Computer Vision: CIFAR-10 (using VGG16, ResNet-56, and ResNet-110) and the massive ImageNet/ILSVRC2012 dataset (using ResNet-50).
  • Matrix Factorization: The CBCL facial image dataset and the ORL face dataset.
  • Synthetic Data: Custom-generated datasets were used to test convergence speed and accuracy against ground-truth sparse structures.

Key Insights and Ideas

  • The "Aha" Moment for Pruning: The authors realized that by projecting a pre-trained model just once (Single-Shot GSP) and then fine-tuning it, they could achieve results comparable to much more complex, iterative pruning schedules. This skips the expensive "regularization-heavy" training phase entirely.
  • Avoiding Layer Collapse: In deep learning, if you stack all layers together and prune them globally, you often hit "layer collapse," where an entire layer is zeroed out, making the model untrainable. GSP’s formulation allows for layer-wise control that prevents this while still maintaining flexible sparsity within the layer.
  • Prior Knowledge Matters: In NMF, if the algorithm is told the true average sparsity of the underlying data, it converges to the exact solution much faster than standard unconstrained algorithms.

Key Results

  • ResNet-50 on ImageNet: GSP outperformed a wide range of competitors (like SNIP, GraSP, and ThiNet). At 90% sparsity, the model's accuracy dropped by only 2.2 percentage points, a significantly better trade-off than existing methods.
  • VGG16 on CIFAR-10: At extreme sparsity levels (97%), GSP maintained a 91.92% accuracy, while traditional magnitude pruning collapsed to just 10% accuracy.
  • Computational Efficiency: On synthetic tests with vectors of size 1,000, the Newton-based solver typically converged in 4 iterations or fewer, confirming its practical speed for large-scale models.

Limitations and Future Work

  • Non-Unique Solutions: The authors note that if a vector has multiple identical "largest" entries, the projection might not be unique. While they include a method to detect and handle these discontinuities, it remains a theoretical edge case.
  • Hyperparameter 's': While GSP eliminates the need to tune $\lambda$, the user still has to choose the target sparsity $s$. While $s$ is highly interpretable (unlike $\lambda$), finding the optimal $s$ for a specific accuracy-speed trade-off still requires some experimentation.
  • Hardware Integration: While the projection is mathematically efficient, the paper does not explore how these specific sparse patterns map to actual speedups on various hardware backends (like CPUs vs. GPUs vs. NPUs), which is a common next step in pruning research.

Summary updated

BibTeX
@article{ohib2022explicit,
  author = {Riyasat Ohib and Nicolas Gillis and Niccolò 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