Frankenstein Optimizer: Harnessing the Potential by Revisiting Optimization Tricks
Chia-Wei Hsu, Nien-Ti Tsou, Yu-Cheng Chen, Yang Jeong Park, Ju Li
TL;DR
Frankenstein addresses the generalization gap observed with adaptive optimizers by dynamically adjusting momentum and learning dynamics. It couples an adaptive first-moment coefficient $β$, a relaxation strategy with a dynamic EMA for the second moment $v_t$ via a variable $β_2$, and an acceleration factor $ξ$ to reflect gradient changes. Across vision, NLP, few-shot learning, and materials simulations, Frankenstein achieves faster convergence and better generalization than Adam-like optimizers and SGD, as demonstrated by extensive experiments and qualitative analyses. Centered Kernel Alignment (CKA) and loss-landscape visualizations provide mechanistic insights into the training dynamics, supporting the optimizer’s broad applicability and practical impact.
Abstract
Gradient-based optimization drives the unprecedented performance of modern deep neural network models across diverse applications. Adaptive algorithms have accelerated neural network training due to their rapid convergence rates; however, they struggle to find ``flat minima" reliably, resulting in suboptimal generalization compared to stochastic gradient descent (SGD). By revisiting various adaptive algorithms' mechanisms, we propose the Frankenstein optimizer, which combines their advantages. The proposed Frankenstein dynamically adjusts first- and second-momentum coefficients according to the optimizer's current state to directly maintain consistent learning dynamics and immediately reflect sudden gradient changes. Extensive experiments across several research domains such as computer vision, natural language processing, few-shot learning, and scientific simulations show that Frankenstein surpasses existing adaptive algorithms and SGD empirically regarding convergence speed and generalization performance. Furthermore, this research deepens our understanding of adaptive algorithms through centered kernel alignment analysis and loss landscape visualization during the learning process. Code is available at https://github.com/acctouhou/Frankenstein_optimizer
