TL;DR
SWIM (Spend Where It Matters) is a training-free, two-stage framework that significantly improves the alignment of generated audio and video with text prompts under fixed compute budgets. By combining an adaptive "particle funnel" for global exploration with Metropolis-Hastings for local refinement, it outperforms existing inference-time alignment methods like Best-of-N and EvoSearch.
What Problem Does This Paper Address?
Generative models for joint audio-visual (AV) content, such as JavisDiT++ and LTX-2, often struggle with "alignment." This means the generated video might not match the text prompt, the audio might be out of sync with the visuals, or the audio content itself might not match the scene.
While we can use reward models to "steer" these generators at inference time, doing so is computationally expensive. Existing methods like Best-of-N (BoN) sampling are inefficient because they don't reuse computation. Particle-based search methods (which evolve a population of candidates) can explore globally but suffer from high estimation error when the population is small. Conversely, Metropolis-Hastings (MH) is excellent at local refinement but requires a very strong starting point to be effective. SWIM addresses these inefficiencies by intelligently allocating a fixed "compute budget" across these different strategies.
Methods
SWIM introduces a two-stage, reward-agnostic framework:
- Stage 1: Adaptive Particle Funnel: Instead of using a fixed number of "particles" (candidate generations) throughout the denoising process, SWIM adaptively reallocates them. It uses online variance estimates (specifically the Effective Sample Size) to detect which denoising checkpoints are most "informative." It "spends" more particles where the reward signal is most discriminative and prunes them where they are less useful.
- Stage 2: Metropolis-Hastings (MH) Refinement: The best candidate from the first stage initializes a short MH chain. This stage uses a "noise-and-denoise" proposal—adding a bit of noise to the output and re-denoising it—to locally optimize the reward without needing a massive global search.
This "division of labor" allows the system to find a promising global candidate and then polish it to recover additional reward that would otherwise require a much larger (and more expensive) particle population.
Datasets
The authors evaluated SWIM across multiple modalities and models:
- Audio-Visual Generation: Evaluated on JAVISBENCH-MINI using the JavisDiT++ and LTX-2 models.
- Image Generation: To show generalizability, they tested on DrawBench and Simple Animals using Stable Diffusion v1.5.
- Metrics: A suite of seven metrics was used for AV, including ImageBind (for text-visual, text-audio, and audio-visual alignment), AVHScore, JavisScore, CLAP, and VideoReward.
Key Insights and Ideas
- "Spending" Compute Strategically: The core "aha moment" is that not all denoising steps are equally important for alignment. By concentrating compute in the middle stages of denoising—where the model is making critical structural decisions—SWIM achieves better results than uniform allocation.
- Hybrid Search is Better than Scaling: The authors show that for the same total number of model evaluations (NFE), combining particle search with MH refinement yields higher rewards than simply increasing the number of particles or running a longer MH chain from scratch.
- Variance as a Proxy for Quality: The paper mathematically formulates particle allocation as a variance-minimization problem. Reducing the estimation variance of the reward signal directly correlates with higher-quality final outputs.
- Training-Free and Modular: Because SWIM operates entirely at inference time, it can be plugged into any diffusion or flow-matching model and used with any reward model without retraining the underlying generator.
Key Results
SWIM demonstrates substantial gains over state-of-the-art baselines at matched compute budgets:
- AV Alignment: On JAVISBENCH-MINI, SWIM achieved mean relative gains of 30.7% over BoN and 14.1% over EvoSearch with JavisDiT++. With LTX-2, it saw gains of 9.2% over BoN and 17.0% over EvoSearch.
- Human Preference: In user studies, SWIM was consistently preferred over EvoSearch across all criteria, including text-visual alignment, audio-visual sync, and overall aesthetics.
- Image Quality: For SD1.5, adaptive allocation improved AestheticScore by 2.2% and ImageReward by 6.0% over standard uniform allocation.
Limitations and Future Work
- Hyperparameter Sensitivity: While the allocation is adaptive, the framework still introduces extra parameters (like the "pacing floor" and "step size") that might require tuning for different models.
- Forecast Lag: The current "persistence forecast" (assuming the next step's variance will be like the current one) might be suboptimal if the reward landscape changes very abruptly between checkpoints.
- Inference Cost: While SWIM is more efficient than other search methods, it still requires multiple forward passes, which may be too slow for real-time applications without further optimizations like step distillation or latent caching.
The authors suggest that future work could explore more sophisticated variance forecasting or integrating SWIM with model-distillation techniques to bring these alignment gains to real-time generation.
Summary updated