Betty:多级优化的自动微分库
Betty: An Automatic Differentiation Library for Multilevel Optimization
摘要:
基于约束的多级优化(MLO)作为研究众多问题的框架而受到关注,从超参数优化和元学习到神经结构搜索和强化学习。然而,MLO中的梯度是通过链式法则组成最佳响应雅可比矩阵而获得的,众所周知,它很难实现,并且是内存/计算密集型的。我们通过引入Betty(一个用于大规模MLO的软件库),迈出了缩小这一差距的第一步。在其核心,我们为MLO设计了一个新的Bronlow图,它允许我们(1)为MLO开发有效的自动微分,将计算复杂性从O(d^3)降低到O(d^2),(2)结合系统支持,如混合精度和数据并行训练的可扩展性,以及(3)便于实现任意复杂度的MLO程序,同时允许用于不同算法和系统设计选择的模块化接口。我们的经验表明,贝蒂可以用来实现一系列的MLO程序,同时也观察到高达11%的测试精度增加,14%的GPU内存使用量减少,和20%的训练壁时间减少比现有的实现多个基准。我们还展示了Betty能够将MLO扩展到具有数亿参数的模型。我们在https://github.com/leopard-ai/betty上开源代码。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。