[Paper Review] Stochastic Gradient Descent-like relaxation is equivalent to Metropolis dynamics in discrete optimization and inference problems
This paper establishes a quantitative equivalence between stochastic gradient descent (SGD)-like relaxation and Glauber dynamics (Metropolis Monte Carlo) in discrete optimization and inference problems. Despite SGD lacking detailed balance, the two algorithms exhibit identical dynamics when the mini-batch size in SGD maps to a temperature in Metropolis sampling, enabling the transfer of Monte Carlo theory to optimize SGD’s mini-batch size for improved signal recovery in hard inference tasks.
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.
Motivation & Objective
- To resolve the fundamental open question of whether SGD differs fundamentally from Metropolis Monte Carlo dynamics in discrete optimization and inference problems.
- To establish a quantitative mapping between the mini-batch size in SGD and the temperature in Metropolis dynamics, despite SGD violating detailed balance.
- To leverage the strong theoretical framework of Markov chain Monte Carlo (MCMC) and statistical mechanics to analyze and optimize SGD performance in hard inference problems.
- To demonstrate that the dynamics of SGD-like algorithms and Glauber dynamics are indistinguishable in both equilibrium and out-of-equilibrium regimes for discrete problems.
- To provide a physical interpretation of SGD’s success by linking its stochasticity to temperature-like control via mini-batch size.
Proposed method
- Propose a novel SGD-like algorithm for discrete problems, inspired by but distinct from standard continuous SGD, designed to mimic the stochasticity of Glauber dynamics.
- Define a mapping between the mini-batch size B in SGD and the temperature T in Metropolis dynamics, such that both algorithms exhibit identical equilibrium and out-of-equilibrium behavior.
- Use numerical simulations on the planted 5-coloring problem in random graphs to compare the nucleation times, energy relaxation, and phase transitions of both algorithms.
- Apply the fluctuation-dissipation relation and dynamical mean-field theory to derive an effective temperature for SGD, linking it to mini-batch size and learning rate.
- Analyze the violation of detailed balance in SGD and show that the effective temperature mapping remains robust despite this fundamental difference.
- Use rescaling of connectivity c by log(N) to identify the critical threshold c_GD(N) ≈ A log(N) for signal recovery, demonstrating divergence in the thermodynamic limit.

Experimental results
Research questions
- RQ1Is there a fundamental difference between SGD-like relaxation and Glauber dynamics in discrete optimization and inference problems?
- RQ2Can the mini-batch size in SGD be mapped to a temperature parameter in Metropolis Monte Carlo, such that both algorithms produce identical dynamics?
- RQ3Does the absence of detailed balance in SGD prevent it from achieving the same statistical behavior as Metropolis dynamics?
- RQ4What is the critical connectivity c_GD(N) at which SGD-like algorithms fail to recover planted solutions, and how does it scale with system size N?
- RQ5Can results from Monte Carlo theory—such as phase transitions and relaxation times—be transferred to optimize SGD’s mini-batch size in hard inference tasks?
Key findings
- The dynamics of SGD-like relaxation and Glauber dynamics are quantitatively equivalent in both equilibrium and out-of-equilibrium regimes, despite SGD violating detailed balance.
- The mini-batch size B in SGD maps to a temperature T in Metropolis dynamics such that both algorithms exhibit identical nucleation time distributions and plateau energies.
- The critical connectivity c_GD(N) for signal recovery in the planted 5-coloring problem scales logarithmically with system size N, i.e., c_GD(N) ≈ A log(N), with A = O(1), and diverges in the thermodynamic limit.
- For c < 18, the inference task becomes impossible, and both algorithms perform optimization over random instances, entering paramagnetic or glassy states depending on temperature/B.
- The effective temperature in SGD, derived via the fluctuation-dissipation relation, depends on mini-batch size and learning rate, and explains the non-Gaussian noise and possible Lévy flights observed in SGD.
- The observed c-dependence of the effective T(B) relation arises from the increasing number of possible spin configurations s and u with connectivity, which slightly alters the average mapping between B and T.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.