Contrastive Energy Prediction for Exact Energy-Guided Diffusion Sampling in Offline Reinforcement Learning

Cheng Lu, Huayu Chen, Jianfei Chen, Hang Su, Chongxuan Li +1 more
4/25/2023
cs.LG

No official code found. Best implementation: thu-ml/CEP-energy-guided-diffusion (36 stars, MIT, last commit 2023-11-03).

Abstract

Guided sampling is a vital approach for applying diffusion models in real-world tasks that embeds human-defined guidance during the sampling procedure. This paper considers a general setting where the guidance is defined by an (unnormalized) energy function. The main challenge for this setting is that the intermediate guidance during the diffusion sampling procedure, which is jointly defined by the sampling distribution and the energy function, is unknown and is hard to estimate. To address this challenge, we propose an exact formulation of the intermediate guidance as well as a novel training objective named contrastive energy prediction (CEP) to learn the exact guidance. Our method is guaranteed to converge to the exact guidance under unlimited model capacity and data samples, while previous methods can not. We demonstrate the effectiveness of our method by applying it to offline reinforcement learning (RL). Extensive experiments on D4RL benchmarks demonstrate that our method outperforms existing state-of-the-art algorithms. We also provide some examples of applying CEP for image synthesis to demonstrate the scalability of CEP on high-dimensional data.

View on arXivView PDF

Code Implementations(1)

MIT

Official codebase for Exact Energy-Guided Diffusion Sampling via Contrastive Energy Prediction

363PythonMay 8, 20232 years agoMIT

Similar Papers

Cite this paper

@article{lu2023contrastive,
  title  = {Contrastive Energy Prediction for Exact Energy-Guided Diffusion Sampling in Offline Reinforcement Learning},
  author = {Cheng Lu and Huayu Chen and Jianfei Chen and Hang Su and Chongxuan Li and Jun Zhu},
  year   = {2023},
  eprint = {2304.12824},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.12824v2},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2304.12824.svg)](https://codeofpaper.com/paper/2304.12824)

Discussion