- The paper proposes a reinforcement learning post-training method that leverages analytic noise and closed-form REINFORCE-adjoint estimation for diffusion models.
- It achieves superior reward alignment with up to 50× fewer training steps while maintaining compatibility with classifier-free guidance.
- RAM simplifies optimal control by transforming costly rollouts into scalable regression tasks, enhancing both theoretical insights and practical model performance.
Reinforce Adjoint Matching: Scaling RL Post-Training for Diffusion and Flow-Matching Models
Introduction
Diffusion and flow-matching models have emerged as foundational tools for high-fidelity generative modeling in continuous domains. Their scalability is attributable to the simple supervised regression paradigm used during pretraining: analytic corruption of clean samples with Gaussian noise, followed by minimization of a closed-form regression target. Yet, to align these powerful generators with nuanced downstream desiderata—such as compositional semantics, text fidelity, or human preference rewards—reinforcement learning (RL) post-training is essential. Traditional RL post-training for these models faces challenges due to intractable sample likelihoods and high computational cost for reward alignment, especially compared to policy-gradient approaches for models with tractable likelihoods.
The "Reinforce Adjoint Matching" (RAM) method introduces a principled, scalable approach for RL post-training of diffusion and flow-matching models. RAM provides a consistency loss that extends the analytic and supervised structure of pretraining to the RL setting by leveraging a fixed-point characterization of the KL-regularized reward maximization optimum, sidestepping computational bottlenecks of SDE rollouts, reward gradient backpropagation, or surrogate losses.
Methodology
Given a pretrained model with endpoint distribution and reward function r(x), the canonical RL post-training objective is to maximize expected reward while constraining posterior drift by the KL-divergence from the reference distribution. This induces the solution: p0∗∝p0ref(x)exp(r(x))
where the optimal process tilts the endpoint distribution towards higher-reward samples but retains the conditional noising law unchanged.
This leads to a stochastic optimal control problem, steering the backward SDE with a drift correction ut, and introduces a value (Bellman) function Vtu(x) whose spatial gradient defines the adjoint Atu(x). The optimality condition can be recast as a "self-consistency" equation on the control, whereby the control must match the negative scaled adjoint: ut(x)=−σtAtu(x)
Practically, velocity regression is preferred over direct control parametrization—a distinction addressed in the RAM formulation.
Reinforce Adjoint Matching (RAM) Algorithm
RAM exploits the structure whereby post-training modifies the endpoint distribution but not the analytic noising law. Training proceeds as follows:
- Draw an endpoint sample using an ODE sampler from the current model.
- Evaluate its reward under the task reward function.
- Analytically noise the endpoint to produce intermediate training states, following the same distribution used during pretraining.
- Form batches by re-noising each endpoint multiple times, thus amortizing reward evaluation.
The value function's adjoint is estimated using a REINFORCE (score function) identity, yielding an estimator that avoids the need for reward gradients (even with non-differentiable r): Atu(x)≈E[r(X0u)∇xlogp0∣tu(X0u∣x)∣Xtu=x]
Using Bayes' rule and model velocity, the bridge score admits a closed-form: ∇xtlogp0∣t(x0∣xt)=t1−t(vt(xt)−(ϵ−x0))
RAM trains the velocity field via a consistency loss: LRAM(θ)=E∥vtθ(Xt)−sg(vtref(Xt)+r(X0)((ϵ−X0)−vtθ(Xt)))∥2
where p0∗∝p0ref(x)exp(r(x))0 denotes stop-gradient.
Figure 1: RAM training flow: ODE-sampled endpoint is rewarded, noised analytically to produce batched training pairs, bypassing SDE rollouts.
Correction Terms and Scalability
RAM omits the path-cost correction in the adjoint (justified by its variance-cost tradeoff and analytic tractability), but the paper discusses generalized estimators that retain the correction at the expense of computation and stability. Empirical analysis on toy examples demonstrates that RAM's estimator achieves the lowest variance and hence best scalability for high-dimensional tasks.
Figure 2: Path-cost-corrected estimators on a 2D toy: variance at convergence is lowest for RAM, confirming its suitability for image-scale tasks.
Experimental Results
Benchmarks and Metrics
RAM was evaluated against Flow-GRPO, DiffusionNFT, and AWM on Stable Diffusion 3.5M (SD3.5M) across three prompt-aligned image-generation tasks:
Training reward and off-the-shelf image quality metrics (Aesthetic, DeQA, ImageReward, HPSv2, PickScore) were reported both to measure task performance and to detect reward hacking.
RAM consistently achieves the highest training reward on all three tasks and matches or improves image quality metrics compared to strong baselines. Notably, RAM matches Flow-GRPO's peak reward in up to 50× fewer training steps and with similar per-step compute. Qualitative samples confirm improved compositionality, OCR fidelity, and preference alignment.
Importantly, post-trained RAM remains compatible with classifier-free guidance, unlike baselines where guidance can lower reward—a significant practical consideration.


Figure 3: Training-reward curves: RAM achieves faster and higher task reward compared to DiffusionNFT and AWM, and remains compatible with classifier-free guidance post-training.
Theoretical and Practical Implications
RAM's derivation connects RL post-training for diffusion models to classical entropy-regularized stochastic optimal control, with a path-space factorization that preserves the analytic noising law. This both generalizes and simplifies prior work, recasting the expensive or unstable optimization pipelines of previous approaches as scalable regression tasks using closed-form, unbiased targets.
Practically, RAM's amortized endpoint batching and pretraining-like consistency loss allow for orders-of-magnitude greater learning signal per step, making high-fidelity reward alignment with limited compute feasible for image-scale flows.
Theoretically, RAM establishes that structure-preserving analytic noising suffices for RL alignment under a broad class of objectives—ensuring identical fixed points to more complex rollout-based estimators when regularization and reward structure align (e.g., Gaussian priors and linear rewards).
Future Directions
- Non-Gaussian and Implicit Priors: Extending RAM to settings with complex priors or data-dependent noising kernels.
- Preference Learning beyond Scalar Rewards: Incorporating pairwise and more complex human preference structures in the RL objective.
- Efficient Path-Cost Correction: Developing low-variance scalable estimators for the path-cost correction may further refine post-training alignment.
- Applications to Video and Multimodal Generation: Deploying RAM for temporally extended or multimodal generative models.
Conclusion
Reinforce Adjoint Matching provides a theoretically grounded, scalable, and computationally efficient approach to RL post-training of diffusion and flow-matching models. By leveraging the analytic structure of pretraining and a closed-form REINFORCE-adjoint estimator, RAM enables high-quality alignment to downstream rewards with minimal compute overhead and without reward model hacks or loss of image quality. This framework stands to streamline further alignment advances for deep generative models in vision and beyond.