Lune

ICLR2023Top-tier venue

Betty: An Automatic Differentiation Library for Multilevel Optimization

Sang Keun Choe, Willie Neiswanger, Pengtao Xie, Eric P. Xing

Abstract

Gradient-based multilevel optimization (MLO) has gained attention as a framework for studying numerous problems, ranging from hyperparameter optimization and meta-learning to neural architecture search and reinforcement learning. However, gradients in MLO, which are obtained by composing best-response Jacobians via the chain rule, are notoriously difficult to implement and memory/compute intensive. We take an initial step towards closing this gap by introducing BETTY, a software library for large-scale MLO. At its core, we devise a novel dataflow graph for MLO, which allows us to (1) develop efficient automatic differentiation for MLO that reduces the computational complexity from O(d 3 ) to O(d 2 ), (2) incorporate systems support such as mixed-precision and data-parallel training for scalability, and (3) facilitate implementation of MLO programs of arbitrary complexity while allowing a modular interface for diverse algorithmic and systems design choices. We empirically demonstrate that BETTY can be used to implement an array of MLO programs, while also observing up to 11% increase in test accuracy, 14% decrease in GPU memory usage, and 20% decrease in training wall time over existing implementations on multiple benchmarks. We also showcase that BETTY enables scaling MLO to models with hundreds of millions of parameters. We open-source the code at https://github.com/leopard-ai/betty .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Efficient and Modular Implicit Differentiation cites On the Iteration Complexity of Hypergradient Computation
  • Efficient and Modular Implicit Differentiation cites Bilevel Optimization: Convergence Analysis and Enhanced Design
  • Making Scalable Meta Learning Practical cites Efficient and Modular Implicit Differentiation
  • Making Scalable Meta Learning Practical cites On the Iteration Complexity of Hypergradient Computation
  • Provably Convergent Federated Trilevel Learning cites Bilevel Optimization: Convergence Analysis and Enhanced Design
  • Bilevel Optimization: Convergence Analysis and Enhanced Design cites On the Iteration Complexity of Hypergradient Computation
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Making Scalable Meta Learning PracticalSang Keun Choe, Sanket Vaibhav Mehta, Hwijeen Ahn, Willie Neiswanger et al.NeurIPS 2023 · 28 citations
  2. DreamPRM: Domain-reweighted Process Reward Model for Multimodal ReasoningQi Cao, Ruiyi Wang, Ruiyi Zhang, Sai Ashish Somayajula et al.NeurIPS 2025 · 17 citations
  3. Modality-Agnostic Self-Supervised Learning with Meta-Learned Masked Auto-EncoderHuiwon Jang, Jihoon Tack, Daewon Choi, Jongheon Jeong et al.NeurIPS 2023 · 9 citations
  4. Provably Convergent Federated Trilevel LearningYang Jiao, Kai Yang, Tiancheng Wu, Chengtao Jian et al.AAAI 2024 · 6 citations
  5. Consistency of Compositional Generalization Across Multiple LevelsChuanhao Li, Zhen Li, Chenchen Jing, Xiaomeng Fan et al.AAAI 2025 · 1 citation

Builds on16

  1. ZeRO: memory optimizations toward training trillion parameter modelsSamyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, Yuxiong HeSC 2020 · 852 citations
  2. Long-Tailed Classification by Keeping the Good and Removing the Bad Momentum Causal EffectKaihua Tang, Jianqiang Huang, Hanwang ZhangNeurIPS 2020 · 533 citations
  3. Efficient and Modular Implicit DifferentiationMathieu Blondel, Quentin Berthet, Marco Cuturi, Roy Frostig et al.NeurIPS 2022 · 386 citations
  4. Bilevel Optimization: Convergence Analysis and Enhanced DesignKaiyi Ji, Junjie Yang, Yingbin LiangICML 2021 · 343 citations
  5. On the Iteration Complexity of Hypergradient ComputationRiccardo Grazzi, Luca Franceschi, Massimiliano Pontil, Saverio SalzoICML 2020 · 241 citations

Related papers

  1. Scalable Meta-Learning via Mixed-Mode DifferentiationIurii Kemaev, Dan A. Calian, Luisa M. Zintgraf, Gregory Farquhar et al.ICML 2025
  2. Multi-Objective Meta LearningFeiyang Ye, Baijiong Lin, Zhixiong Yue, Pengxin Guo et al.NeurIPS 2021 · 71 citations
  3. A Stochastic Approach to Bi-Level Optimization for Hyperparameter Optimization and Meta LearningMinyoung Kim, Timothy M. HospedalesAAAI 2025 · 3 citations
  4. Moreau Envelope for Nonconvex Bi-Level Optimization: A Single-Loop and Hessian-Free Solution StrategyRisheng Liu, Zhu Liu, Wei Yao, Shangzhi Zeng et al.ICML 2024 · 24 citations
  5. Mixture-of-World Models: Scaling Multi-Task Reinforcement Learning with Modular Latent DynamicsBoxuan Zhang, Weipu Zhang, Zhaohan Feng, Wei Xiao et al.ICLR 2026 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines