# Flexible Differentiable Optimization via Model Transformations

arXiv: https://arxiv.org/abs/2206.06135 · HTML: https://mlsanity.com/paper/2206.06135/

## Key facts

- Cited by 16 papers in the map (data through 14 Oct 2026).
- Builds on 19 of its 63 references that are in the map.
- First posted on arXiv 10 Jun 2022.

## Builds on (most cited first, 19 of 19)

- [OptNet: Differentiable Optimization as a Layer in Neural Networks](https://mlsanity.com/paper/1703.00443/) (2017)
- [Differentiable Convex Optimization Layers](https://mlsanity.com/paper/1910.12430/) (2019)
- [Meta-Learning with Differentiable Convex Optimization](https://mlsanity.com/paper/1904.03758/) (2019)
- [Gradient-based Hyperparameter Optimization through Reversible Learning](https://mlsanity.com/paper/1502.03492/) (2015)
- [Efficient and Modular Implicit Differentiation](https://mlsanity.com/paper/2105.15183/) (2021)
- [Fast Differentiable Sorting and Ranking](https://mlsanity.com/paper/2002.08871/) (2020)
- [OSQP: An Operator Splitting Solver for Quadratic Programs](https://mlsanity.com/paper/1711.08013/) (2017)
- [End-to-End Constrained Optimization Learning: A Survey](https://mlsanity.com/paper/2103.16378/) (2021)
- [A Differentiable Programming System to Bridge Machine Learning and Scientific Computing](https://mlsanity.com/paper/1907.07587/) (2019)
- [Differentiating Through a Cone Program](https://mlsanity.com/paper/1904.09043/) (2019)
- [JuMP: A Modeling Language for Mathematical Optimization](https://mlsanity.com/paper/1508.01982/) (2015)
- [CombOptNet: Fit the Right NP-Hard Problem by Learning Integer Programming Constraints](https://mlsanity.com/paper/2105.02343/) (2021)
- [A mathematical model for automatic differentiation in machine learning](https://mlsanity.com/paper/2006.02080/) (2020)
- [Solution Refinement at Regular Points of Conic Problems](https://mlsanity.com/paper/1811.02157/) (2018)
- [MathOptInterface: a data structure for mathematical optimization problems](https://mlsanity.com/paper/2002.03447/) (2020)
- [Provably Correct Automatic Subdifferentiation for Qualified Programs](https://mlsanity.com/paper/1809.08530/) (2018)
- [Differentiating through Log-Log Convex Programs](https://mlsanity.com/paper/2004.12553/) (2020)
- [Solving natural conic formulations with Hypatia.jl](https://mlsanity.com/paper/2005.01136/) (2020)
- [AbstractDifferentiation.jl: Backend-Agnostic Differentiable Programming in Julia](https://mlsanity.com/paper/2109.12449/) (2021)

## Built on by (most cited first, 16 of 16)

- [Learning with Combinatorial Optimization Layers: a Probabilistic Approach](https://mlsanity.com/paper/2207.13513/) (2022)
- [Differentiation Through Black-Box Quadratic Programming Solvers](https://mlsanity.com/paper/2410.06324/) (2024)
- [A General and Streamlined Differentiable Optimization Framework](https://mlsanity.com/paper/2510.25986/) (2025)
- [A Fully First-Order Layer for Differentiable Optimization](https://mlsanity.com/paper/2512.02494/) (2025)
- [Sobolev Training of End-to-End Optimization Proxies](https://mlsanity.com/paper/2505.11342/) (2025)
- [Relaxation-Informed Training of Neural Network Surrogate Models](https://mlsanity.com/paper/2604.22746/) (2026)
- [Differentiable Optimization for Deep Learning-Enhanced DC Approximation of AC Optimal Power Flow](https://mlsanity.com/paper/2504.01970/) (2025)
- [Batched First-Order Methods for Parallel LP Solving in MIP](https://mlsanity.com/paper/2601.21990/) (2026)
- [SOC-ICNN: From Polyhedral to Conic Geometry for Learning Convex Surrogate Functions](https://mlsanity.com/paper/2604.22355/) (2026)
- [Price-Aware Deep Learning for Electricity Markets](https://mlsanity.com/paper/2308.01436/) (2023)
- [partialCBDs: Differentiable Causal Block Diagrams](https://mlsanity.com/paper/2602.07581/) (2026)
- [DisjunctiveNet: Neural Symbolic Learning via Differentiable Convexified Optimization Layers](https://mlsanity.com/paper/2605.30456/) (2026)
- [Elastic ODYN: Differentiable Optimization for Infeasible Control and Learning in Robotics](https://mlsanity.com/paper/2606.16564/) (2026)
- [TorchDCM: A Unified PyTorch-Native Package for Discrete Choice Modeling](https://mlsanity.com/paper/2608.19231/) (2026)
- [Differentiable Electricity-Market Clearing for Gradient-Based Planning](https://mlsanity.com/paper/2609.02646/) (2026)
- [dOPT: Differentiating Conic Optimization via Geometric Reduction](https://mlsanity.com/paper/2609.33828/) (2026)

## Abstract (arXiv)

We introduce DiffOpt.jl, a Julia library to differentiate through the solution of optimization problems with respect to arbitrary parameters present in the objective and/or constraints. The library builds upon MathOptInterface, thus leveraging the rich ecosystem of solvers and composing well with modeling languages like JuMP. DiffOpt offers both forward and reverse differentiation modes, enabling multiple use cases from hyperparameter optimization to backpropagation and sensitivity analysis, bridging constrained optimization with end-to-end differentiable programming. DiffOpt is built on two known rules for differentiating quadratic programming and conic programming standard forms. However, thanks ability to differentiate through model transformation, the user is not limited to these forms and can differentiate with respect to the parameters of any model that can be reformulated into these standard forms. This notably includes programs mixing affine conic constraints and convex quadratic constraints or objective function.
