Thermodynamic Natural Gradient Descent
Kaelan Donatella, Samuel Duffield, Maxwell Aifer, Denis Melanson, Gavin Crooks, Patrick J. Coles
TL;DR
Thermodynamic Natural Gradient Descent (TNGD) proposes a hybrid digital-analog optimizer that uses a stochastic processing unit to solve for the natural gradient $\tilde{g}_k \approx F_{k-1}^{-1} \nabla \ell_{k-1}$ via Ornstein–Uhlenbeck dynamics, yielding updates $\theta_{k+1} = \theta_k - \eta \tilde{g}_k$ with per-iteration costs approaching first-order methods. By offloading curvature computations to an analog thermodynamic computer, TNGD achieves near-linear scaling in the number of parameters and can interpolate between SGD and NGD through the analog-runtime parameter $t$, while maintaining convergence in mean for positive-definite $F$. The authors demonstrate competitive performance on MNIST and language-model fine-tuning tasks, notably showing speedups over state-of-the-art digital optimizers and robustness to hardware-noise; a hybrid variant (TNGD-Adam) can outperform Adam in QA tasks. Overall, this work illustrates the potential of co-designing optimization algorithms with specialized hardware to realize the benefits of second-order methods at practical scales.
Abstract
Second-order training methods have better convergence properties than gradient descent but are rarely used in practice for large-scale training due to their computational overhead. This can be viewed as a hardware limitation (imposed by digital computers). Here we show that natural gradient descent (NGD), a second-order method, can have a similar computational complexity per iteration to a first-order method, when employing appropriate hardware. We present a new hybrid digital-analog algorithm for training neural networks that is equivalent to NGD in a certain parameter regime but avoids prohibitively costly linear system solves. Our algorithm exploits the thermodynamic properties of an analog system at equilibrium, and hence requires an analog thermodynamic computer. The training occurs in a hybrid digital-analog loop, where the gradient and Fisher information matrix (or any other positive semi-definite curvature matrix) are calculated at given time intervals while the analog dynamics take place. We numerically demonstrate the superiority of this approach over state-of-the-art digital first- and second-order training methods on classification tasks and language model fine-tuning tasks.
