[论文解读] Differentiating through Log-Log Convex Programs
本文提出了一种高效方法,用于对对数-对数凸规划(LLCP)进行微分,通过自动微分实现参数化LLCP的梯度计算。该方法结合凸优化微分技术与对数-对数变换,使在PyTorch和TensorFlow中训练可微分优化层成为可能,并在单调回归和排队系统设计等应用中实现了最先进的性能。
We show how to efficiently compute the derivative (when it exists) of the solution map of log-log convex programs (LLCPs). These are nonconvex, nonsmooth optimization problems with positive variables that become convex when the variables, objective functions, and constraint functions are replaced with their logs. We focus specifically on LLCPs generated by disciplined geometric programming, a grammar consisting of a set of atomic functions with known log-log curvature and a composition rule for combining them. We represent a parametrized LLCP as the composition of a smooth transformation of parameters, a convex optimization problem, and an exponential transformation of the convex optimization problem's solution. The derivative of this composition can be computed efficiently, using recently developed methods for differentiating through convex optimization problems. We implement our method in CVXPY, a Python-embedded modeling language and rewriting system for convex optimization. In just a few lines of code, a user can specify a parametrized LLCP, solve it, and evaluate the derivative or its adjoint at a vector. This makes it possible to conduct sensitivity analyses of solutions, given perturbations to the parameters, and to compute the gradient of a function of the solution with respect to the parameters. We use the adjoint of the derivative to implement differentiable log-log convex optimization layers in PyTorch and TensorFlow. Finally, we present applications to designing queuing systems and fitting structured prediction models.
研究动机与目标
- 实现对参数化对数-对数凸规划(LLCP)的高效梯度计算,LLCP虽为非凸,但在对数变换下可转化为凸问题。
- 通过计算解映射对问题参数的导数,支持LLCP中的敏感性分析与参数优化。
- 通过基于CVXPY的层,将可微分LLCP集成到PyTorch和TensorFlow等深度学习框架中。
- 在具有结构化约束的单调回归与排队系统设计等应用中,展示其实际效用。
- 提供一种可扩展的端到端方法,用于训练预测结果为可学习参数LLCP解的模型。
提出的方法
- 通过变换 $ u = \log x $,$ F(u) = \log f(e^u) $ 将参数化LLCP转换为凸优化问题,使对数-对数凸函数转化为凸函数。
- 将解映射表示为三部分的复合:(1) 光滑的参数变换,(2) 一个凸优化问题,(3) 解的指数变换。
- 利用近期发展的凸优化问题微分方法,高效计算整个复合函数的导数。
- 在CVXPY中实现该方法,使用户仅需几行代码即可指定参数化LLCP并计算梯度或伴随导数。
- 利用导数的伴随(adjoint)构建与PyTorch和TensorFlow兼容的可微分优化层。
- 通过伴随梯度反向传播,训练基于LLCP的模型,实现对解映射的端到端优化。
实验结果
研究问题
- RQ1对数-对数凸规划的解映射能否高效地对其参数进行微分?
- RQ2如何在不进行显式符号微分的情况下,计算参数化LLCP解的导数?
- RQ3可微分LLCP层能否集成到深度学习框架中,实现端到端训练?
- RQ4在结构化预测任务中,通过LLCP强制单调性可带来多大的性能提升?
- RQ5与标准最小二乘拟合相比,可微分LLCP方法在单调性与泛化能力方面表现如何?
主要发现
- 该方法利用解映射导数的伴随,高效计算了LLCP解的标量函数对参数的梯度。
- 在CVXPY中的实现使用户能以极简代码定义并微分参数化LLCP,支持前向与伴随梯度计算。
- 在单调回归任务中,LLCP模型在10次训练迭代后验证误差降至0.0077,优于初始最小二乘拟合的0.0081。
- LLCP模型生成单调预测,而最小二乘拟合结果非单调,这对结构化预测任务具有关键优势。
- 每次训练迭代包含约150次LLCP求解与微分,运行在2012年款MacBook Pro上耗时约10秒,证明了其实际可扩展性。
- 该方法成功实现了在PyTorch和TensorFlow中构建可微分优化层,支持嵌入优化的模型端到端训练。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。