Stochastic Gradient Descent-like relaxation is equivalent to Metropolis dynamics in discrete optimization and inference problems
Maria Chiara Angelini, Angelo Giorgio Cavaliere, Raffaele Marino, Federico Ricci-Tersenghi
TL;DR
This work addresses whether an SGD-like relaxation on discrete optimization problems is fundamentally different from Metropolis MC dynamics. By analyzing the planted and random $q$-coloring problem, the authors show that SGD-like dynamics with mini-batch size $B$ closely emulate Metropolis MC dynamics at an effective temperature $T$ that is a function of $B$, in both equilibrium and out-of-equilibrium regimes. Although SGD-like does not strictly satisfy detailed balance, an averaged condition yields an effective mapping that accounts for the observed dynamical equivalence, enabling the use of Monte Carlo results to guide mini-batch optimization and improve recovery performance. The findings suggest that fluctuations introduced by mini-batching play a role analogous to thermal fluctuations and open avenues to transfer MC theory to SGD-like algorithms, with potential extensions to continuous and dense problems.
Abstract
Is Stochastic Gradient Descent (SGD) substantially different from Metropolis Monte Carlo dynamics? This is a fundamental question at the time of understanding the most used training algorithm in the field of Machine Learning, but it received no answer until now. Here we show that in discrete optimization and inference problems, the dynamics of an SGD-like algorithm resemble very closely that of Metropolis Monte Carlo with a properly chosen temperature, which depends on the mini-batch size. This quantitative matching holds both at equilibrium and in the out-of-equilibrium regime, despite the two algorithms having fundamental differences (e.g.\ SGD does not satisfy detailed balance). Such equivalence allows us to use results about performances and limits of Monte Carlo algorithms to optimize the mini-batch size in the SGD-like algorithm and make it efficient at recovering the signal in hard inference problems.
