Skip to main content
QUICK REVIEW

[论文解读] Optimizing the optimizer for data driven deep neural networks and physics informed neural networks

John Taylor, Wenyi Wang|arXiv (Cornell University)|May 16, 2022
Model Reduction and Neural Networks被引用 10
一句话总结

本文评估了一阶和二阶优化器——Adam、Levenberg-Marquardt (LM)、BFGS 和 L-BFGS——在训练小型至中型深度神经网络及物理信息神经网络 (PINNs) 中的表现。结果表明,LM 优化器在无需超参数调优的情况下即可实现机器精度的收敛,其均方误差 (MSE) 性能比 Adam 提升了数个数量级,而 Adam 需要多达 26 倍的参数才能达到 LM 的精度。

ABSTRACT

We investigate the role of the optimizer in determining the quality of the model fit for neural networks with a small to medium number of parameters. We study the performance of Adam, an algorithm for first-order gradient-based optimization that uses adaptive momentum, the Levenberg and Marquardt (LM) algorithm a second order method, Broyden,Fletcher,Goldfarb and Shanno algorithm (BFGS) a second order method and LBFGS, a low memory version of BFGS. Using these optimizers we fit the function y = sinc(10x) using a neural network with a few parameters. This function has a variable amplitude and a constant frequency. We observe that the higher amplitude components of the function are fitted first and the Adam, BFGS and LBFGS struggle to fit the lower amplitude components of the function. We also solve the Burgers equation using a physics informed neural network(PINN) with the BFGS and LM optimizers. For our example problems with a small to medium number of weights, we find that the LM algorithm is able to rapidly converge to machine precision offering significant benefits over other optimizers. We further investigated the Adam optimizer with a range of models and found that Adam optimiser requires much deeper models with large numbers of hidden units containing up to 26x more parameters, in order to achieve a model fit close that achieved by the LM optimizer. The LM optimizer results illustrate that it may be possible build models with far fewer parameters. We have implemented all our methods in Keras and TensorFlow 2.

研究动机与目标

  • 评估主要优化器(Adam、LM、BFGS 和 L-BFGS)在小型至中型神经网络上的性能。
  • 研究优化器在拟合具有可变振幅但恒定频率的函数(如 y = sinc(10x))时的表现。
  • 评估优化器选择对物理信息神经网络 (PINNs) 中模型拟合质量与收敛速度的影响。
  • 确定二阶方法(如 LM)是否能以更少的参数实现比一阶方法(如 Adam)更高的模型精度。
  • 探讨优化器选择在需要高精度回归的科学机器学习应用中的实际影响。

提出的方法

  • 使用包含 20 个隐藏单元的全连接前馈神经网络,在 20,000 个训练点上拟合函数 y = sinc(10x)。
  • 应用 Adam、Levenberg-Marquardt (LM)、BFGS 和 L-BFGS 优化器以最小化均方误差 (MSE) 损失函数。
  • 使用 Keras 和 TensorFlow 2 实现所有优化器,包括对 LM 和 BFGS 的自定义集成。
  • 对模型架构(1–4 个密集层,16–80 个隐藏单元)进行网格搜索,以提升 Adam 在 sinc 函数上的性能。
  • 使用 LM 和 BFGS 优化器求解一维 Burgers 方程的 PINN,以测试在 PDE 约束问题上的性能。
  • 监控训练过程,分析不同振幅分量在 sinc 函数中被学习的顺序。

实验结果

研究问题

  • RQ1一阶优化器(Adam)与二阶优化器(LM、BFGS)在拟合具有可变振幅和恒定频率的挑战性函数时表现如何比较?
  • RQ2Levenberg-Marquardt 优化器是否能在无需超参数调优的情况下实现比 Adam 更快、更精确的收敛?
  • RQ3为补偿 Adam 在低振幅区域收敛性差的问题,模型架构(深度与宽度)需要增加到何种程度?
  • RQ4在使用 PINN 求解 Burgers 方程时,LM 优化器是否能实现比其他优化器更高的精度?
  • RQ5在小型至中型神经网络中,使用 LM 相较于 Adam 是否在参数效率方面具有显著优势?

主要发现

  • Levenberg-Marquardt (LM) 优化器在无需超参数调优的情况下实现了机器精度收敛,将均方误差 (MSE) 降低至 1×10⁻⁸ 以下。
  • Adam 在四层模型中最多需要 26 倍的参数(13,201 对比 507)才能使 MSE 低于 1×10⁻⁶,但仍无法达到 LM 的性能。
  • LM 优化器是唯一能够准确拟合 sinc(10x) 函数中高振幅与低振幅分量的优化器,而 Adam、BFGS 和 L-BFGS 在低振幅区域均出现失败。
  • 在 Burgers 方程的 PINN 中,LM 优化器实现了高于以往使用其他优化器报告结果的精度。
  • LM 优化器收敛迅速,且无需学习率或动量调优,而 Adam 则需要大量超参数调整。
  • 本研究证明,二阶优化器(如 LM)可使模型显著更小、更高效,尤其在科学机器学习应用中,相较于一阶方法(如 Adam)具有明显优势。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。