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.
翻译:我们介绍了DiffOpt.jl,一个用于对优化问题的解关于目标函数和/或约束中任意参数进行微分的Julia库。该库建立在MathOptInterface之上,从而充分利用丰富的求解器生态,并与JuMP等建模语言良好集成。DiffOpt提供前向和反向两种微分模式,支持从超参数优化到反向传播和灵敏度分析的多种应用场景,弥合了约束优化与端到端可微编程之间的鸿沟。DiffOpt基于两个已知规则构建,用于对二次规划和锥规划标准形式进行微分。然而,由于具备对模型变换进行微分的能力,用户无需局限于这些形式,而是可以对任何能够重写为标准形式的模型参数进行微分。这尤其包括混合仿射锥约束与凸二次约束或目标函数的优化问题。