Differentiable Convex Optimization Layers

By Akshay Agrawal, Brandon Amos, Shane T. Barratt, Stephen P. Boyd, Steven Diamond, J. Kolter. 2019

894 citations recorded by the source corpus.

Recent work has shown how to embed differentiable optimization problems (that is, problems whose solutions can be backpropagated through) as layers within deep learning architectures. This method provides a useful inductive bias for certain problems, but existing software for differentiable optimization layers is rigid and difficult to apply to new settings. In this paper, we propose an approach to differentiating through disciplined convex programs, a subclass of convex optimization problems used by domain-specific languages (DSLs) for convex optimization. We introduce disciplined parametrized programming, a subset of disciplined convex programming, and we show that every disciplined parametrized program can be represented as the composition of an affine map from parameters to problem data, a solver, and an affine map from the solver’s solution to a solution of the original problem (a new form we refer to as affine-solver-affine form). We then demonstrate how to efficiently differentiate through each of these components, allowing for end-to-end analytical differentiation through the entire convex program. We implement our methodology in version 1.1 of CVXPY, a popular Python-embedded DSL for convex optimization, and additionally implement differentiable layers for disciplined convex programs in PyTorch and TensorFlow 2.0. Our implementation significantly lowers the barrier to using convex optimization problems in differentiable programs. We present applications in linear machine learning models and in stochastic control, and we show that our layer is competitive (in execution time) compared to specialized differentiable solvers from past work.

Subfields: Artificial Intelligence, Optimization & Training, Mathematical Optimization

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Chunhua Shen
  2. Guosheng Lin
  3. Chi Zhang
  4. Fabian Pedregosa
  5. Simon Lacoste-Julien
  6. Percy Liang
  7. Dacheng Tao
  8. Li Shen

In Optimization & Training

  1. Simon Lacoste-Julien
  2. Fabian Pedregosa
  3. G. Peyr'e
  4. Marco Cuturi
  5. Alejandro Ribeiro
  6. Mathieu Blondel
  7. Pierre Ablin
  8. Thomas Moreau

In Mathematical Optimization

  1. G. Peyr'e
  2. Marco Cuturi
  3. Simon Lacoste-Julien
  4. Andreas Krause
  5. Pierre Ablin
  6. Thomas Moreau
  7. Chris J. Maddison
  8. Mathieu Blondel

Citations in the corpus