NCVX: A General-Purpose Optimization Solver for Constrained Machine and Deep LearningDownload PDF

Published: 23 Nov 2022, Last Modified: 05 May 2023OPT 2022 PosterReaders: Everyone
Keywords: constrained deep learning, BFGS-SQP, second-order methods, nonconvex optimization, nonsmooth optimization, nonsmooth constraints, auto-differentiation
TL;DR: NCVX is a user-friendly and scalable python software package targeting general nonsmooth NCVX problems with nonsmooth constraints
Abstract: Imposing explicit constraints are new and increasingly trendy in deep learning, stimulated by, e.g., trustworthy AI that performs robust optimization over complicated perturbation sets and scientific applications that need to respect physical laws and constraints. However, it can be hard to reliably solve constrained deep learning problems without optimization expertise. Existing deep learning frameworks do not admit constraints. General-purpose optimization packages can handle constraints but do not perform auto-differentiation and have trouble dealing with nonsmoothness. In this paper, we introduce a new software package called NCVX, whose initial release contains the solver PyGRANSO, a PyTorch-enabled general-purpose optimization package for constrained machine and deep learning problems, the first of its kind. NCVX inherits auto-differentiation, GPU acceleration, and tensor variables from PyTorch, is built on freely available and widely used open- source frameworks. NCVX is available at, with detailed documentation and numerous examples from machine/deep learning and other fields. Future updates on this topic will be posted at
0 Replies