Betty: An Automatic Differentiation Library for Multilevel Optimization

Sang Keun Choe, Willie Neiswanger, Pengtao Xie, Eric Xing
7/5/2022
cs.LGcs.AImath.OC

Official code: leopard-ai/betty (347 stars, Apache-2.0, PyTorch, last commit 2024-06-26). 1 more implementation below.

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.

View on arXivView PDF

Code Implementations(2)

leopard-ai/bettyOfficial100%
PyTorchApache-2.0

Betty: an automatic differentiation library for generalized meta-learning and multilevel optimization

34728PythonJun 29, 20222 years agoApache-2.0
artificial-intelligenceautodiffautomatic-differentiationbilevel-optimizationdeep-learning+8 more
kailaix/ADCME.jlCommunity72%
TensorFlowMIT

Automatic Differentiation Library for Computational and Mathematical Engineering

31963Julia, DockerfileJun 2, 20193 years agoMIT
automatic-differentiationmachine-learningneural-networksnumerical-pdesoptimization+2 more

Similar Papers

Cite this paper

@article{choe2022betty,
  title  = {Betty: An Automatic Differentiation Library for Multilevel Optimization},
  author = {Sang Keun Choe and Willie Neiswanger and Pengtao Xie and Eric Xing},
  year   = {2022},
  eprint = {2207.02849},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2207.02849v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2207.02849.svg)](https://codeofpaper.com/paper/2207.02849)

Discussion