Cooper: A Library for Constrained Optimization in Deep Learning

Jose Gallego-Posada, Juan Ramirez, Meraj Hashemizadeh, Simon Lacoste-Julien
4/1/2025
cs.LGcs.MS

Official code: cooper-org/cooper (166 stars, MIT, PyTorch, last commit 2025-11-15).

Abstract

Cooper is an open-source package for solving constrained optimization problems involving deep learning models. Cooper implements several Lagrangian-based first-order update schemes, making it easy to combine constrained optimization algorithms with high-level features of PyTorch such as automatic differentiation, and specialized deep learning architectures and optimizers. Although Cooper is specifically designed for deep learning applications where gradients are estimated based on mini-batches, it is suitable for general non-convex continuous constrained optimization. Cooper's source code is available at https://github.com/cooper-org/cooper.

View on arXivView PDF

Code Implementations(1)

cooper-org/cooperOfficial100%
PyTorchMIT

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

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

Similar Papers

Cite this paper

@article{gallegoposada2025cooper,
  title  = {Cooper: A Library for Constrained Optimization in Deep Learning},
  author = {Jose Gallego-Posada and Juan Ramirez and Meraj Hashemizadeh and Simon Lacoste-Julien},
  year   = {2025},
  eprint = {2504.01212},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.01212v1}
}

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/2504.01212.svg)](https://codeofpaper.com/paper/2504.01212)

Discussion