Exploring Non-Convex Discrete Energy Landscapes: An Efficient Langevin-Like Sampler with Replica Exchange

Haoyang Zheng, Hengrong Du, Ruqi Zhang, Guang Lin

Abstract

Gradient-based Discrete Samplers (GDSs) are effective for sampling discrete energy landscapes. However, they often stagnate in complex, non-convex settings. To improve exploration, we introduce the Discrete Replica EXchangE Langevin (DREXEL) sampler and its variant with Adjusted Metropolis (DREAM). These samplers use two GDSs at different temperatures and step sizes: one focuses on local exploitation, while the other explores broader energy landscapes. When energy differences are significant, sample swaps occur, governed by a mechanism tailored for discrete sampling to ensure detailed balance. Theoretically, we prove that the proposed samplers satisfy detailed balance and converge to the target distribution under mild conditions. Experiments across 2d synthetic simulations, sampling from Ising models and restricted Boltzmann machines, and training deep energy-based models further confirm their efficiency in exploring non-convex discrete energy landscapes.

TL;DR

Researchers have developed DREXEL and DREAM, two new sampling algorithms that finally bring the power of "Replica Exchange" to discrete, non-convex energy landscapes. By running two parallel chains—one to scout for new energy wells and one to refine local details—and swapping them using a specialized discrete-friendly mechanism, these samplers can escape local traps that stall traditional gradient-based methods.

Introduction: The Challenge of Discrete Energy Landscapes

Sampling from high-dimensional discrete distributions (like binary or categorical data) is a cornerstone of machine learning, appearing in everything from genome sequencing to training Deep Energy-Based Models (EBMs). However, these "energy landscapes" are often incredibly jagged and non-convex.

Imagine a mountain range at night where you are looking for the deepest valleys. Traditional Gradient-based Discrete Samplers (GDS) are like hikers who can feel the slope under their feet; they are great at finding the bottom of the nearest valley, but they often get "trapped" there, unable to climb over a high ridge to find an even deeper valley nearby. This leads to poor "mixing" — the sampler doesn't see the whole picture, only a small neighborhood.

Methodology: DREXEL and DREAM

The authors introduce two variants: DREXEL (Discrete Replica EXchangE Langevin) and DREAM (which adds an Adjusted Metropolis step for better accuracy).

The core innovation is combining Replica Exchange with discrete gradients:

  1. Two-Chain System: They run two samplers simultaneously. The "Low-Temperature" chain uses small steps to exploit local details. The "High-Temperature" chain uses larger steps and higher "heat" to jump over energy barriers and explore the broader landscape.
  2. The Discrete Swap: Periodically, the two chains try to swap their current positions. In continuous spaces, this is easy. In discrete spaces, standard swap formulas break the "detailed balance" (the mathematical guarantee that the sampler eventually converges to the right distribution).
The Discrete Swap mechanism ensures detailed balance while allowing chains at different temperatures to exchange information effectively.
  1. The Fix: The authors proposed a novel swap mechanism that incorporates energy estimates from previous samples. This ensures the math stays rigorous while allowing the chains to exchange information effectively.

Experimental Evaluation

The researchers put their samplers through a gauntlet of increasingly difficult tasks, including 2D synthetic landscapes, Ising models, and Restricted Boltzmann Machines (RBMs) evaluated on image datasets like MNIST, Fashion-MNIST, and Caltech Silhouettes.

Key Results

  • Synthetic Superiority: In 2D tasks, DREAM significantly outperformed baselines in KL divergence and Maximum Mean Discrepancy (MMD). While other samplers got stuck in one "moon" or "petal," DREAM jumped between them fluidly.
Visual comparison of DREAM vs DMALA on synthetic landscapes. DREAM successfully captures all modes, whereas DMALA often gets trapped in local optima.
  • Ising Model Efficiency: On 2D Ising models, DREXEL reduced the Root Mean Square Error (RMSE) by over 50% compared to the unadjusted Langevin baseline (DULA).
  • Deep Learning Gains: When training Deep EBMs, DREAM achieved the highest test log-likelihoods across the board. On the Omniglot and Caltech datasets, it outperformed baselines by 11.9% to 14.7%, showing that better sampling leads directly to better model learning.

Key Insights and Theoretical Contributions

  • Escaping the "Local Trap": The paper demonstrates that even the best existing discrete samplers (like DMALA) often capture only 50% of the modes in a multi-modal distribution. DREAM, by contrast, consistently finds all of them.
  • The "Previous State" Matters: A major contribution is the realization that for discrete replica exchange to be mathematically sound, the swap probability must account for the energy of the previous state, not just the current one. This preserves the "reversibility" of the Markov chain.
  • Spectral Convergence: The authors provide a non-asymptotic convergence proof using a spectral framework. This gives a theoretical guarantee that the sampler will converge at an exponential rate, even without assuming the energy landscape is "smooth."

Conclusion: Limitations and Future Work

While the paper focuses on a two-chain system (one hot, one cold), many real-world problems might benefit from a "temperature ladder" with many more replicas. The authors note that extending the framework to multiple replicas is a natural next step. Additionally, while they provide a convergence bound, they suggest that future work could more precisely quantify the "acceleration effect" — exactly how much faster the replica exchange makes the convergence compared to a single chain.

Summary updated

BibTeX
@inproceedings{zheng2026exploring,
  author = {Haoyang Zheng and Hengrong Du and Ruqi Zhang and Guang Lin},
  title = {{Exploring Non-Convex Discrete Energy Landscapes: An Efficient Langevin-Like Sampler with Replica Exchange}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i43.41003},
}
Figure