Velox World/Research/RPOPreprint · arXiv
RPO
Routing Policy Optimization for online diffusion reinforcement learning.
Reinforcement learning can align visual generators with rewards beyond pretraining, but score-function methods usually inject noise into the reverse trajectory and pay for it with large groups of complete rollouts. RPO moves exploration inside the generator: attention routing, drawn from the generator's own attention mass, becomes the stochastic action, and inference returns to dense attention with the original sampler.
To train on Wan2.2
H100 GPU-hours. Flow-GRPO took 75.4 and DanceGRPO 102.3; the runs are not compute-matched.
Less training compute
Than Flow-GRPO and DanceGRPO respectively, with the same HPSv3 reward.
Steps to pass Flow-GRPO
On SD3.5, the dense reward at step 25 already exceeds Flow-GRPO's step-50 value; it ends 1.1 points higher (one seed).
Rollouts per group
A matched pair, against G = 8 for DanceGRPO. Both share prompt and noise; 64 pairs per step.
01 · The idea
Put the randomness inside attention, not on the sampler's path.
Sampler-space RL such as Flow-GRPO and DanceGRPO explores by perturbing the reverse process, then estimates an advantage from a group of complete stochastic rollouts.
RPO keeps the deterministic sampler. At a few selected denoising levels, each query block either stays dense or keeps its own block plus key blocks drawn in proportion to the generator's native attention mass. The sampled route perturbs that step's velocity, and a Gaussian likelihood around the dense velocity scores it.
Two rollouts share the prompt, the initial latent, the routed levels and the anchor layers. They differ only in their routing seeds, so their reward difference measures the effect of the two routes. Below, each row is a query block. Change the temperature and the keep ratio, and watch the two routes agree or diverge.
a₁Rollout 1
Dense rows —
a₂Rollout 2
Dense rows —
ΔWhere they differ
Differ on — of cells
01
Score with dense attention
At a routed level, a no-gradient pass measures how much attention each query block puts on each key block.
02
Draw two routes
Each block stays dense or keeps its own block plus candidates, drawn in proportion to that attention mass.
03
Step with the routed velocity
Same prompt, latent, levels and anchor layers (which stay dense). Only the routing seeds differ.
04
Score the difference
The reward difference of the pair is the advantage, with opposite signs for the two members.
05
Update the dense velocity
A Gaussian likelihood around the dense velocity is replayed with gradient, so the update lands on the field the sampler uses.
Nothing changes at inference. All masks are removed: dense attention and the original deterministic sampler. The gains transfer because the loss differentiates the dense velocity that the sampler evaluates.
02 · Results
Faster to learn, and the gain survives dense inference.
Training rewards are scored on routed or SDE rollouts, so the comparison that matters is the dense model that ships: same prompts, same noise, same sampler.
RPO passes Flow-GRPO's final reward in half the steps. The dense model scores 8.90 at step 25, above Flow-GRPO's step-50 score of 8.81.
It keeps climbing. RPO peaks at 10.20 at step 40 and ends at 9.91, a gain of +5.97 over its step-zero score, against +4.86 for Flow-GRPO, which ends 1.1 points lower.
It is not ahead everywhere. Flow-GRPO starts slightly faster at step 5, and RPO leads from step 10 onward. Both curves come from a single training seed.
Both methods train the same LoRA adapters with the same HPSv3 reward and 10-step sampler. RPO collects 64 matched pairs per step; on Wan2.2, DanceGRPO uses groups of G = 8 and updates the full model.
RPO is the only trained checkpoint above the base model overall (82.00 against 81.61; DanceGRPO 81.46, Flow-GRPO 81.19). Differences from the base are largest on semantic dimensions: human action +4.80, object class +4.40, scene +3.43 and multiple objects +2.15, and smaller on quality and consistency dimensions.
There are trade-offs. RPO lowers color and appearance style relative to the base model, although it still leads the trained baselines there. The four Wan2.2 overall scores span only 0.81 points on one seed set, so the aggregate ranking is directional.
SD3.5-Medium · DrawBench, no CFG
1,000 images from 200 prompts and 5 seeds. None of these metrics is the training reward.
03 · Gallery
Every prompt, side by side.
Full comparison pages, with per-prompt scores, wipe and frame-by-frame viewers. Both models render the same prompts from the same starting noise.
Wan2.2-TI2V-5B · video
61 prompts, each a 13-frame 1280 × 704 clip, base against RPO, with a wipe, side-by-side and per-frame viewer.
Matched prompt and starting noise · numeric order
SD3.5-Medium · image
64 prompts at 512 × 512, base against RPO, same prompt and same starting noise.
HPSv3 3.97 → 10.00 · RPO higher on 63 of 64
MiniMax-H3 · video
Comparison page for a third generator.
Coming soon
04 · Release
The preprint is public.
Cite the arXiv version below. Code and results will be linked here when they are released.
Preprint
The paper, with implementation settings and evaluation protocols in the appendix.
Code and results
Training code for the routing policy and the evaluation outputs.
MiniMax-H3 gallery
A third comparison page, next to Wan2.2 and SD3.5.
@article{shen2026rpo,
title = {Routing Policy Optimization for Online Diffusion Reinforcement Learning},
author = {Shen, Qiuhong and Yang, Yiding and Zhang, Yuxin and Huang, Xinwei and Lin, Minxuan and Liu, Bo and Kang, Hao and Yang, Haotian and Wang, Yizhi and Ma, Chongyang and Wang, Xinchao},
journal = {arXiv preprint arXiv:2610.22282},
year = {2026}
}