OptNet: Differentiable Optimization as a Layer in Neural Networks

Brandon Amos, J. Zico Kolter
3/1/2017
cs.LGcs.AImath.OC

Official code: Kyubyong/sudoku (867 stars, GPL-3.0, last commit 2023-02-17). 1 more implementation below.

Abstract

This paper presents OptNet, a network architecture that integrates optimization problems (here, specifically in the form of quadratic programs) as individual layers in larger end-to-end trainable deep networks. These layers encode constraints and complex dependencies between the hidden states that traditional convolutional and fully-connected layers often cannot capture. We explore the foundations for such an architecture: we show how techniques from sensitivity analysis, bilevel optimization, and implicit differentiation can be used to exactly differentiate through these layers and with respect to layer parameters; we develop a highly efficient solver for these layers that exploits fast GPU-based batch solves within a primal-dual interior point method, and which provides backpropagation gradients with virtually no additional cost on top of the solve; and we highlight the application of these approaches in several problems. In one notable example, the method is learns to play mini-Sudoku (4x4) given just input and output games, with no a-priori information about the rules of the game; this highlights the ability of OptNet to learn hard constraints better than other neural architectures.

View on arXivView PDF

Code Implementations(2)

Kyubyong/sudokuOfficial100%
GPL-3.0

Can Neural Networks Crack Sudoku?

867131PythonDec 19, 20163 years agoGPL-3.0
convolutional-neural-networksnumberpuzzlesudoku
locuslab/optnetOfficial100%
PyTorchApache-2.0

OptNet: Differentiable Optimization as a Layer in Neural Networks

59380Shell, PythonMar 1, 20176 years agoApache-2.0
deep-learningmachine-learningoptimizationpaperpytorch

Similar Papers

Cite this paper

@article{amos2017optnet,
  title  = {OptNet: Differentiable Optimization as a Layer in Neural Networks},
  author = {Brandon Amos and J. Zico Kolter},
  year   = {2017},
  eprint = {1703.00443},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1703.00443}
}

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

Discussion