Controlled Sparsity via Constrained Optimization or: How I Learned to Stop Tuning Penalties and Love Constraints

Jose Gallego-Posada, Juan Ramirez, Akram Erraqabi, Yoshua Bengio, Simon Lacoste-Julien
8/8/2022
cs.LG

No official code found. Best implementation: cooper-org/cooper (166 stars, MIT, PyTorch, last commit 2025-11-15). 1 more below.

Abstract

The performance of trained neural networks is robust to harsh levels of pruning. Coupled with the ever-growing size of deep learning models, this observation has motivated extensive research on learning sparse models. In this work, we focus on the task of controlling the level of sparsity when performing sparse learning. Existing methods based on sparsity-inducing penalties involve expensive trial-and-error tuning of the penalty factor, thus lacking direct control of the resulting model sparsity. In response, we adopt a constrained formulation: using the gate mechanism proposed by Louizos et al. (2018), we formulate a constrained optimization problem where sparsification is guided by the training objective and the desired sparsity target in an end-to-end fashion. Experiments on CIFAR-{10, 100}, TinyImageNet, and ImageNet using WideResNet and ResNet{18, 50} models validate the effectiveness of our proposal and demonstrate that we can reliably achieve pre-determined sparsity targets without compromising on predictive performance.

View on arXivView PDF

Code Implementations(2)

cooper-org/cooperCommunity100%
PyTorchMIT

A general-purpose, deep learning-first library for constrained optimization in PyTorch

16617PythonFeb 4, 202211 months agoMIT
constrained-optimizationdeep-learningmachine-learningoptimizationpython+1 more
MIT

Official implementation for the paper "Controlled Sparsity via Constrained Optimization"

121Shell, PythonAug 4, 20224 years agoMIT

Similar Papers

Cite this paper

@article{gallegoposada2022controlled,
  title  = {Controlled Sparsity via Constrained Optimization or: How I Learned to Stop Tuning Penalties and Love Constraints},
  author = {Jose Gallego-Posada and Juan Ramirez and Akram Erraqabi and Yoshua Bengio and Simon Lacoste-Julien},
  year   = {2022},
  eprint = {2208.04425},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2208.04425v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2208.04425.svg)](https://codeofpaper.com/paper/2208.04425)

Discussion