Skip to main content
U.S. Department of Energy
Office of Scientific and Technical Information

Using the Metropolis algorithm to explore the loss surface of a recurrent neural network

Journal Article · · Journal of Chemical Physics
DOI:https://doi.org/10.1063/5.0221223· OSTI ID:2574501

In the limit of small trial moves the Metropolis Monte Carlo algorithm is equivalent to gradient descent on the energy function in the presence of Gaussian white noise. This observation was originally used to demonstrate a correspondence between Metropolis Monte Carlo moves of model molecules and overdamped Langevin dynamics, but it also applies in the context of training a neural network: making small random changes to the weights of a neural network, accepted with the Metropolis probability, with the loss function playing the role of energy, has the same effect as training by explicit gradient descent in the presence of Gaussian white noise. We explore this correspondence in the context of a simple recurrent neural network. We also explore regimes in which this correspondence breaks down, where the gradient of the loss function becomes very large or small. In these regimes the Metropolis algorithm can still effect training, and so can be used as a probe of the loss function of a neural network in regimes in which gradient descent struggles. We also show that training can be accelerated by making purposely-designed Monte Carlo trial moves of neural-network weights.

Research Organization:
Lawrence Berkeley National Laboratory (LBNL), Berkeley, CA (United States)
Sponsoring Organization:
US Department of Energy; USDOE Office of Science (SC), Basic Energy Sciences (BES) (SC-22), Scientific User Facilities Division (SC-22.3 )
Grant/Contract Number:
AC02-05CH11231
OSTI ID:
2574501
Journal Information:
Journal of Chemical Physics, Journal Name: Journal of Chemical Physics Journal Issue: 23 Vol. 161
Country of Publication:
United States
Language:
English

Similar Records

Training neural networks using Metropolis Monte Carlo and an adaptive variant
Journal Article · Sun Dec 18 23:00:00 EST 2022 · Machine Learning: Science and Technology · OSTI ID:1905918

Related Subjects