Papers › Maximum Entropy Inverse Reinforcement Learning of Diffusion Models with Energy-Based Models

Maximum Entropy Inverse Reinforcement Learning of Diffusion Models with Energy-Based Models

30 Jun 2024arXiv:2407.00626archive 2025-07-28

Sangwoong Yoon, Himchan Hwang, Dohyun Kwon, Yung-Kyun Noh, Frank C. Park

We present a maximum entropy inverse reinforcement learning (IRL) approach for improving the sample quality of diffusion generative models, especially when the number of generation time steps is small. Similar to how IRL trains a policy based on the reward function learned from expert demonstrations, we train (or fine-tune) a diffusion model using the log probability density estimated from training data. Since we employ an energy-based model (EBM) to represent the log density, our approach boils down to the joint training of a diffusion model and an EBM. Our IRL formulation, named Diffusion by Maximum Entropy IRL (DxMI), is a minimax problem that reaches equilibrium when both models converge to the data distribution. The entropy maximization plays a key role in DxMI, facilitating the exploration of the diffusion model and ensuring the convergence of the EBM. We also propose Diffusion by Dynamic Programming (DxDP), a novel reinforcement learning algorithm for diffusion models, as a subroutine in DxMI. DxDP makes the diffusion model update in DxMI efficient by transforming the original problem into an optimal control formulation where value functions replace back-propagation in time. Our empirical studies show that diffusion models fine-tuned using DxMI can generate high-quality samples in as few as 4 and 10 steps. Additionally, DxMI enables the training of an EBM without MCMC, stabilizing EBM training dynamics and enhancing anomaly detection performance.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2407.00626")

Code

Syntology Ran 9 of 18 code samples harvested from 1 repository linked to this paper; 9 have no recorded run. Of those that ran: 2 ran · honoured contract; 1 ran · violated contract; 6 ran with no contract checked.

By repository: official repository: 18 samples from 1 repository, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

swyoon/diffusion-by-maxentirl officialmentioned in papermentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

18 samples harvested; 9 ran; 2 honoured the contract we drafted; 9 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
1ran · violated contract
6ran
9unverified

Licence: 0 of the 18 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from swyoon/Diffusion-by-MaxEntIRL. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

get_activation swyoon/Diffusion-by-MaxEntIRL/models/modules.py official repository ran MIT (permissive) · 6c1e362234350951 · report
make_beta_schedule swyoon/diffusion-by-maxentirl/models/DxMI/trainer.py official repository ran · honoured contract MIT (permissive) · 01baa8e1e4e273e2 · report
parse_arg_type swyoon/Diffusion-by-MaxEntIRL/cmd_utils.py official repository ran fingerprinted MIT (permissive) · 3a94534d8de246ee · report
parse_nested_args swyoon/Diffusion-by-MaxEntIRL/cmd_utils.py official repository ran MIT (permissive) · 2312bb33e056cfa7 · report
parse_unknown_args swyoon/Diffusion-by-MaxEntIRL/cmd_utils.py official repository ran MIT (permissive) · 24050cdd9df51454 · report
process_single_t swyoon/diffusion-by-maxentirl/models/DxMI/trainer.py official repository ran · violated contract fingerprinted MIT (permissive) · 64a941eba4950213 · report
remove_module swyoon/Diffusion-by-MaxEntIRL/models/utils.py official repository ran MIT (permissive) · 90f2942b737cb482 · report
rescale swyoon/Diffusion-by-MaxEntIRL/generate_cifar10.py official repository ran · honoured contract fingerprinted MIT (permissive) · 4e07246a19ae09b7 · report
weight_norm swyoon/Diffusion-by-MaxEntIRL/models/utils.py official repository ran MIT (permissive) · ffd7b0f9be1df615 · report
DxMI_Trainer swyoon/diffusion-by-maxentirl/models/DxMI/trainer.py official repository unverified MIT (permissive) · 2feb70fa82de3bb5 · report
calculate_frechet_distance swyoon/Diffusion-by-MaxEntIRL/pytorch_fid/fid_score.py official repository unverified MIT (permissive) · fcdc92d3d2e8edc1 · report
extract swyoon/diffusion-by-maxentirl/models/DxMI/trainer.py official repository unverified MIT (permissive) · 30e33c6c36337446 · report
fix_legacy_dict swyoon/Diffusion-by-MaxEntIRL/models/utils.py official repository unverified MIT (permissive) · 995510dd78052fbc · report
get_activations swyoon/Diffusion-by-MaxEntIRL/pytorch_fid/fid_score.py official repository unverified MIT (permissive) · 26edbd4467e04bec · report
get_activations_from_tensor swyoon/Diffusion-by-MaxEntIRL/pytorch_fid/fid_score.py official repository unverified MIT (permissive) · 9226d84ff74e8d9f · report
get_sigmas_karras swyoon/Diffusion-by-MaxEntIRL/models/cm/karras_diffusion.py official repository unverified MIT (permissive) · 00611e9feba0f93d · report
get_weightings swyoon/Diffusion-by-MaxEntIRL/models/cm/karras_diffusion.py official repository unverified MIT (permissive) · b50e02eda098b1ea · report
karras_sample swyoon/Diffusion-by-MaxEntIRL/models/cm/karras_diffusion.py official repository unverified MIT (permissive) · 0caab2b1bad90636 · report

Tasks

Anomaly Detection

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

DiffusionEBM

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections