Skip to content

Optimize Your Sampling: Tuned Diffusion Sampling with Bayesian Optimization

Aug 2026 · 0 citations · 51 references
Computer Science

TL;DR

Optizing Your Sampling (OYS), which instead treats timestep selection as a black-box optimization problem, optimizing the target metric directly with Bayesian optimization, improves both simple and sophisticated samplers such as Euler and DPM-Solver++.

Abstract

Sampling from a diffusion model typically requires many forward passes through a large neural network, making generation computationally expensive. While much work has focused on efficient solvers and samplers, comparatively little attention has been paid to selecting the sampling timesteps themselves. A recent line of work optimizes theoretically derived surrogates for sample quality rather than the quality metric itself. We propose Optimizing Your Sampling (OYS), which instead treats timestep selection as a black-box optimization problem, optimizing the target metric directly with Bayesian optimization. OYS outperforms both the default schedules and those of Align Your Steps on text-to-image generation, and improves over the default schedules on inpainting and other image tasks, in both quantitative and human evaluations. OYS requires no additional training, is applicable even to distilled models, and improves both simple and sophisticated samplers such as Euler and DPM-Solver++. A 5-step OYS schedule retains 89%-94% of the quality of a 50-step schedule while reducing inference cost by 10x.

View source

Similar papers

Preprint Jul 2026

Learning Sampling Parameters for Diffusion Models

Text-to-image diffusion models expose many inference-time sampling parameters, including prompts, negative prompts, classifier-free guidance scales, and noise schedules. These parameters are typically manually chosen once and then held fixed across prompts and denoising timesteps, even though different prompts and stages of generation can benefit from different parameter values. We introduce LeSAMP, a framework for learning prompt-conditioned, timestep-varying sampling parameters. We formulate parameter selection as a reinforcement learning problem: Given a user prompt, a large language model is trained to emit schedules for the chosen sampling parameters. We optimize our model using rewards from human preference models and VLM-as-a-judge. We evaluate our model on Flux.1 [dev] and Stable Diffusion 3.5, and find that compared to baselines, LeSAMP has a win rate of up to 68.12% using human preference scores and 73.37% using VLM-as-a-judge. These gains are validated in a user study where we achieve win rates of up to 59.46% over previous baselines. Our results suggest that learned sampling-parameter policies provide a complementary approach to existing post-training methods for improving diffusion model outputs.

Arisrei Lim, Yossi Gandelsman · 0 citations
Preprint Jul 2026

Inference-Time Scaling of Diffusion Models via Progressive Seed Pruning

Diffusion and flow-matching models dominate conditional image generation, yet inference-time scaling for these models is far less developed than for autoregressive language models. Because final quality is highly sensitive to the initial noise seed, many approaches spend extra compute on seed search or resampling under a black-box reward, but typically maintaining a constant memory footprint throughout inference. We show that relaxing this constraint enables an underexplored inference-time scaling axis: by front-loading exploration, evaluating many seeds early, and pruning aggressively, we can use a fixed compute budget more effectively. \emph{Progressive Seed Pruning} (\PSP) scores intermediate denoised estimates and progressively narrows the candidate set so that only promising trajectories are fully denoised, while keeping the total number of model evaluations fixed. Across diffusion and flow-matching backbones, \PSP \ consistently improves reward-guided selection and achieves higher GenEval scores (automated) and better human evaluation on prompt-alignment than best-of-$N$, importance-sampling, and tree-search baselines at matched compute. Project page: https://www.vision.caltech.edu/psp. Code: https://github.com/rogerioagjr/psp.

Rogério Guimarães, Pietro Perona · 0 citations
#machine learning Preprint Aug 2026

Enhancing Bayesian Optimization and Active Learning Through Kernel Diversity

A unified framework, KENDO (Kernel ENsemble Disagreement-aware Operator), is proposed that integrates Ensemble Gaussian Processes (EGP) with disagreement-aware acquisition strategies and extends the approach to multi-objective optimization via random scalarization that preserves the single-optimizer conditioning structure.

Heng Zhang, Haotian Xiang, Qin Lu et al. · 0 citations
Preprint Jul 2026

Guiding Posterior Exploration with Optimizer-Derived Geometry

Sampling-based methods offer a principled approach to uncertainty quantification in Bayesian neural networks. Their practical use, however, is often challenged by the computational cost of exploring high-dimensional and multimodal posterior distributions. To overcome these difficulties, Bayesian Deep Ensembles, i.e., warmstarting the sampling from several optimized solutions, have proven to be an effective strategy. In this paper, we demonstrate that curvature estimates computed during the warmstart as a byproduct in adaptive optimizers such as AdamW can inform the sampling phase at negligible additional cost. Specifically, our proposed preconditioned sampling strategy based on optimizer-derived geometries can substantially reduce or even eliminate the need for a lengthy sampling burn-in phase and leads to greater numerical stability. This approach consistently maintains or improves predictive performance and uncertainty quantification without any additional computational costs. We confirm the consistency of our findings across various datasets and network architectures.

Moritz Schlager, Emanuel Sommer, Thomas Möllenhoff et al. · 0 citations
Preprint Aug 2026

Fast and efficient nested sampling with BEST

Nested sampling is widely used for Bayesian evidence computation, but its intrinsically sequential structure limits how efficiently it can exploit modern vectorised likelihoods and emulators. We present a new nested-sampling implementation in \textsc{best}, written entirely in TensorFlow and designed for efficient XLA compilation on both CPUs and GPUs. The sampler combines clustering and slice sampling with the possibility of updating several live points simultaneously. Since batching breaks the strict ordering of conventional nested sampling, we introduce sorting and history-based corrections to reduce the resulting bias in the evidence estimate. We test the sampler on Gaussian, Rosenbrock, and multimodal likelihoods and compare its performance with JAXNS and UltraNest. The results show that accurate evidence estimates can be retained for moderate batch sizes, with $m/N_{\rm live}\lesssim 0.1$ providing a useful practical regime. Finally, using a 27-dimensional cosmological likelihood emulator, we show that batched live-point updates can substantially reduce the wall-clock time while remaining consistent with sequential sampling within the reported uncertainties. The new implementation therefore extends \textsc{best} with an efficient nested-sampling method tailored to fast, vectorised likelihoods and emulator-based inference.

Andreas Nygaard · 0 citations
Preprint Jul 2026

Transfer Learning Architectures for Scalable Multi-Fidelity Bayesian Optimization

This work benchmarks eleven transfer-learning surrogates against four GP methods under an identical selection rule, fidelity budget, and model size, across nine tasks spanning synthetic functions to real chemistry and materials problems, where transfer-learning surrogates reach substantially better solutions using far less computation.

Jaewook Lee, Ethan Errington, Christian D. Lorenz et al. · 0 citations

Related blog posts

MIT News · Artificial Intelligence Aug 27, 2026

Looking beyond natural sequences

A new machine-learning framework aims to improve the success rate of computational protein design while moving away from results that reproduce sequences found in nature.