Score-Repellent Monte Carlo: Toward Efficient Non-Markovian Sampler with Constant Memory in General State Spaces
Abstract
Lay Summary
Many problems in science and machine learning, from understanding protein structures to training generative AI models, require drawing random samples from complicated probability distributions. The standard tool for this is a family of algorithms called Markov chain Monte Carlo (MCMC), which works by taking a long random walk through the space of possibilities. The trouble is that these walks often get stuck: they wander around the same neighborhood over and over, missing large regions that the algorithm should also be exploring. This produces unreliable answers. A natural idea is to let the algorithm remember where it has already been and gently push itself away from over-visited areas. This works well in small, simple settings, but it breaks down for the kinds of problems people actually care about today, i.e., high-dimensional images and large molecular configurations, because keeping track of every visited state would require an astronomical amount of memory. We propose a new method, Score-Repellent Monte Carlo (SRMC), that summarizes the entire history of the walk using a single compact running average. Instead of remembering individual locations, the algorithm remembers a brief, fixed-size sketch of which directions it has been drifting toward, and uses this sketch to nudge itself away from those directions in the future. This keeps the memory cost essentially flat regardless of the problem size, while preserving the benefits of history-aware exploration. We prove mathematically that this approach is correct in the long run: the algorithm still produces unbiased answers and actually reduces uncertainty in its estimates as the repellence strength increases. In experiments on both continuous problems and large discrete image models, our method finds many more distinct modes of the target distribution and produces more reliable estimates than standard MCMC baselines, while adding minimal computational overhead. The method works as a simple plug-in wrapper around existing samplers, so practitioners can adopt it without overhauling their pipelines.