arXiv:2410.10417cs.LGstat.ML2024-10AAAI被引 4

用随机方法解决超参数优化难题,更稳定且能处理大模型。

A Stochastic Approach to Bi-Level Optimization for Hyperparameter Optimization and Meta Learning

  • 将双层优化转为随机优化,内层损失变概率分布,外层为期望损失
  • 在视觉变换器上成功优化8700万超参数,比传统方法更稳定可靠
  • 适合需要高鲁棒性的元学习与超参数优化场景

我们解决现代深度学习中普遍存在的可微分元学习问题,包括超参数优化、损失函数学习、少样本学习和不变性学习等。这些问题常被形式化为双层优化(BLO)。本文提出新视角:将给定的BLO问题转化为随机优化,其中内层损失函数变为平滑概率分布,外层损失则为内层分布上的期望损失。为求解该随机优化,采用随机梯度朗之万动力学(SGLD)MCMC采样内层分布,并提出递归算法计算蒙特卡洛估计的超梯度。推导方式类似前向模式微分,但引入新的的一阶近似,使大规模模型无需存储庞大雅可比矩阵即可实现。主要优势有二:其一,随机公式考虑不确定性,对内层优化次优或过参数化导致多重最小值具有鲁棒性;其二,相比现有方法在实践中常表现出不稳定和对超参数敏感的问题,本方法产生更可靠的解。我们在多种元学习任务中验证了新方法的有效性,并成功将其扩展至视觉变换器中8700万超参数的学习。

原文摘要 · Abstract (English)

We tackle the general differentiable meta learning problem that is ubiquitous in modern deep learning, including hyperparameter optimization, loss function learning, few-shot learning, invariance learning and more. These problems are often formalized as Bi-Level optimizations (BLO). We introduce a novel perspective by turning a given BLO problem into a stochastic optimization, where the inner loss function becomes a smooth probability distribution, and the outer loss becomes an expected loss over the inner distribution. To solve this stochastic optimization, we adopt Stochastic Gradient Langevin Dynamics (SGLD) MCMC to sample inner distribution, and propose a recurrent algorithm to compute the MC-estimated hypergradient. Our derivation is similar to forward-mode differentiation, but we introduce a new first-order approximation that makes it feasible for large models without needing to store huge Jacobian matrices. The main benefits are two-fold: i) Our stochastic formulation takes into account uncertainty, which makes the method robust to suboptimal inner optimization or non-unique multiple inner minima due to overparametrization; ii) Compared to existing methods that often exhibit unstable behavior and hyperparameter sensitivity in practice, our method leads to considerably more reliable solutions. We demonstrate that the new approach achieves promising results on diverse meta learning problems and easily scales to learning 87M hyperparameters in the case of Vision Transformers.

元学习超参数优化双层优化随机方法

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。