Optimizers for Diffusion Models: A Controlled Benchmark
Organizations: CISPA Helmholtz Center for Information Security · KAUST · MBZUAI · EPITA
Abstract
Discrete diffusion models now match autoregressive language models on several benchmarks, while the question of how best to train them has received far less attention: the optimizer is inherited from one paper to the next and never compared. New optimizers, meanwhile, are validated almost exclusively on autoregressive pretraining, a different objective on a different loss surface. We present a controlled optimizer benchmark across four diffusion formulations, to our knowledge the first for discrete diffusion: seven optimizers (AdamW, Lion, Muon, SOAP, MARS, MARS-M, Schedule-Free) on masked diffusion (text8), uniform diffusion (QM9, and LM1B through the Gaussian duality) and Gaussian diffusion on images (CelebA-64), each on a task with published reference values. Every optimizer receives the same search protocol, and every winner is retrained at the full budget with three seeds. AdamW is a strong default but not always the right choice: it is beaten by a resolved margin on two of the four tasks, and the winner changes with the formulation, so the optimizer deserves the same care as the rest of the training recipe. Notably, methods validated on autoregressive language model pretraining transfer well: Muon, MARS-M and SOAP each beat the tuned AdamW on at least one diffusion formulation. The benchmark, all runs and every figure are reproducible end to end from the released code at https://github.com/armanbolatov/diffusion-baselines.
Figures & tables
| text8 (MDLM) | QM9 (UDLM) | LM1B (DUO) | CelebA-64 (DDPM) | |
|---|---|---|---|---|
| bpc | PPL | PPL | FID | |
| MARS-M | 1.8072 0.0089 | 2.076 0.014 ↓ | 62.2 0.4 ↑ | 6.32 0.62 |
| SOAP | 1.8073 0.0100 | 2.066 0.013 ↑ | 69.5 1.5 ↓ | 10.52 1.41 ↓ |
| Muon | 1.8126 0.0040 | 2.069 0.014 ↑ | 61.6 0.5 ↑ | 8.58 0.99 ↓ |
| AdamW | 1.8154 0.0053 | 2.072 0.013 | 68.2 0.8 | 6.88 0.71 |
| Lion | 1.8509 0.0064 ↓ | 2.068 0.014 ↑ | diverges | 11.52 3.37 ↓ |
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| task | params | shape | batch | ctx | steps | tune steps |
|---|---|---|---|---|---|---|
| text8 (MDLM) | 16.6M | 8L/256d/8h | 512 | 256 | 30000 | 6000 |
| QM9 (UDLM) | 90.2M | 12L/768d/12h | 2048 | 32 | 25000 | 5000 |
| LM1B (DUO) | 137.1M | 12L/768d/12h | 512 | 128 | 30000 | 6000 |
| CelebA-64 (DDPM) | 78.7M | UNet, ch 128 | 128 | 64px | 100000 | 20000 |
| optimizer | axis | values |
|---|---|---|
| AdamW | beta1 | , , , , , |
| beta2 | , , , , , | |
| Lion | beta1 | , , , , , |
| beta2 | , , , , , | |
| Muon | adamw_lr | , , , , , , , , |
| momentum | , , , , , , , |
| task | optimizer | axis | searched | common |
|---|---|---|---|---|
| text8 | Schedule-Free | weight_decay | (7) | (6) |
| text8 | MARS | lr | (5) | (8) |
| qm9 | MARS | lr | (5) | (8) |
| celeba64 | Muon | lr | (7) | (8) |
| celeba64 | MARS | lr | (5) | (8) |
| celeba64 | MARS-M | lr | (5) | (8) |
| task | optimizer | lr | wd | clip | other |
|---|---|---|---|---|---|
| text8 (MDLM) | AdamW | 0.001 | 0.3 | 0 | beta1=0.8 , beta2=0.8 |
| Lion | 0.0003 | 3 | 0 | beta1=0.8 , beta2=0.9 | |
| Muon | 0.01 | 0.1 | 1 | adamw_lr=0.001 , momentum=0.5 , nesterov=False | |
| Schedule-Free | 0.01 | 1 | 0 | beta1=0.95 , beta2=0.8 | |
| SOAP | 0.003 | 0.3 | 0 | precondition_frequency=10 , beta1=0.95 , beta2=0.95 | |
| MARS | 0.001 | 1 | 0 | gamma=0.003 , beta1=0.9 , beta2=0.9 |
| text8 (MDLM) | QM9 (UDLM) | CelebA-64 (DDPM) | ||||
|---|---|---|---|---|---|---|
| time | mem | time | mem | time | mem | |
| AdamW | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| Lion | 1.00 | 0.99 | 0.99 | 0.99 | 1.05 | 0.98 |
| Muon | 1.14 | 0.99 | 1.08 | 0.99 | 2.04 | 0.98 |
| Schedule-Free | 1.00 | 1.00 | 1.01 | 1.00 | 1.01 | 1.00 |
| SOAP | 1.31 | 1.03 | 1.52 | 1.10 | 2.90 | 1.02 |
| optimizer | sample (first 64 of 256 characters) |
|---|---|
| AdamW | x iat sedokungu wolozzuy portiuoudeyoimoo qamigu kamea nlako xan |
| Lion | x ikprszdokungu woeozzly lortipoudeymimooljtmigubkamea nlako xao |
| Muon | ddicture only a low low short of a common pamigabiam a n and x o |
| Schedule-Free | x ist sedobunin woeozzly corti ouceymimoo jamigu kamea stano xao |
| SOAP | xxiatriedokunin colozzen port piusecormoo quilgaliam a alkelax o |
| MARS | x iap szdokungu joeozzly korti oudeymioxolqtmigubkamea nlako xao |
| optimizer | samples (SMILES) | valid | |
|---|---|---|---|
| AdamW | C#CC(=O)C1NC1C#N | CC1CCC(=O)C(C)O1 | 100% |
| Lion | C#CC(CO)C(=O)C#N | CC1CCC(=O)C(C)O1 | 100% |
| Muon | C#CC(CO)C(=O)C#N | CC1CCC(=O)C(C)O1 | 99% |
| Schedule-Free | C#CC(=O)C1NC1C#N | CC1CCC(=O)C(C)O1 | 98% |
| SOAP | C#CC(=O)C1NC1C#N | CC1CCC(=O)C(C)O1 | 99% |
| MARS | C#CC(=O)C1NC1C#N | CC1CCC(=O)C(C)O1 | 99% |
| optimizer | valid | unique | novel | FCD |
|---|---|---|---|---|
| AdamW | 99.6% | 99.6% | 8.6% | 1.60 |
| Lion | 99.6% | 99.5% | 7.5% | 1.69 |
| Muon | 99.3% | 99.5% | 8.8% | 1.69 |
| Schedule-Free | 98.1% | 99.6% | 12.9% | 1.47 |
| SOAP | 99.1% | 99.3% | 9.1% | 1.66 |
| MARS | 99.3% | 99.9% | 7.0% | 1.72 |
| optimizer | sample (first 64 characters, median-length sentence) |
|---|---|
| AdamW | you shouldn ’ t eat water or bangladeshi bins if they want to ge |
| Lion | film the financialonero war or. corporations proposition she the |
| Muon | you don ’ t get water or fast, or if they want to study it and e |
| Schedule-Free | bharatiya pcs mohammed toro brothers or wedding corporations pro |
| SOAP | sbelle ’ blows shown brothers or wedding corporations as she pic |
| MARS | you shouldn ’ t imagine naming or amiss proposition if they want |