A Fully First-Order Layer for Differentiable Optimization
Zihao Zhao, Kai-Chia Mo, Shing-Hei Ho, Brandon Amos, Kai Wang
Abstract
Differentiable optimization studies how to embed a mathematical program as a differentiable layer in machine learning pipelines. However, existing approaches typically rely on implicit differentiation, involving expensive Hessian computation while differentiating through optimality conditions. To address this challenge, we formulate the differentiable optimization problem as a bilevel optimization instance. We construct a new active-set Lagrangian as a proxy to compute an -approximate hypergradient using only near-constant first-order information. We also show that applying this efficient hypergradient oracle to constrained bilevel optimization improves the overall gradient complexity to to reach a -Goldstein stationary point. We implement our method FFOLayer, as a drop-in Python library compatible with existing differentiable optimization solvers. Our algorithm shows significantly faster computation with similar convergence compared to other existing solvers. Our code is available here.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2b753279-c067-4be7-bc8b-c548d2ad8b08Builds on32
- Efficient and Modular Implicit DifferentiationMathieu Blondel, Quentin Berthet, Marco Cuturi, Roy Frostig et al.NeurIPS 2022 · 386 citations
- Provably Faster Algorithms for Bilevel OptimizationJunjie Yang, Kaiyi Ji, Yingbin LiangNeurIPS 2021 · 175 citations
- BOME! Bilevel Optimization Made Easy: A Simple First-Order ApproachBo Liu, Mao Ye, Stephen Wright, Peter Stone et al.NeurIPS 2022 · 170 citations
- Theseus: A Library for Differentiable Nonlinear OptimizationLuis Pineda, Taosha Fan, Maurizio Monge, Shobha Venkataraman et al.NeurIPS 2022 · 124 citations
- A Fully First-Order Method for Stochastic Bilevel OptimizationJeongyeol Kwon, Dohyun Kwon, Stephen Wright, Robert D. NowakICML 2023 · 123 citations
Related papers
- First-Order Methods for Linearly Constrained Bilevel OptimizationGuy Kornowski, Swati Padmanabhan, Kai Wang, Zhe Zhang et al.NeurIPS 2024 · 21 citations
- Communication-Efficient Federated Hypergradient Computation via Aggregated Iterative DifferentiationPeiyao Xiao, Kaiyi JiICML 2023 · 17 citations
- Efficient Curvature-Aware Hypergradient Approximation for Bilevel OptimizationYouran Dong, Junfeng Yang, Wei Yao, Jin ZhangICML 2025
- On the Iteration Complexity of Hypergradient ComputationRiccardo Grazzi, Luca Franceschi, Massimiliano Pontil, Saverio SalzoICML 2020 · 241 citations
- A Fully Single Loop Algorithm for Bilevel Optimization without Hessian InverseJunyi Li, Bin Gu, Heng HuangAAAI 2022 · 89 citations
