| Algorithm 1 Flow-Multi with Pareto Masking (mini-batch) |
|
Require: : Online policy model (initialized from pretrained weights) : Reference model : prompt batch K: group size (default 4) : noise schedule (Equation (3): drift; : KL weight; LoRA rank r; reward weights (default )) Ensure: updated policy (LoRA-only updates) 1: Initialize policy (LoRA on Q/K/V/O); set reference 2: for epoch do 3: Sample a mini-batch of prompts from 4: for each prompt do 5: Sampling (SDE rollout): generate K images using (2) 6: Reward vector for each : 7: Group-wise Pareto non-dominated mask (Section 3.5) 8: Scalarization (Section 3.6) 9: end for 10: Gather survivors across devices; if then fallback to top-1 by 11: Compute survivors-only stats , 12: Advantage (masked) 13: Compute likelihood ratios 14: PPO-style objective with Pareto mask (Equation (9), Section 3.7) 15: KL penalty to reference (stepwise or sequence): (Equation (10), Section 3.7) 16: Update ▹ LoRA params only 17: Logging: Pareto keep ratio , each reward mean/var, A stats, KL, loss terms, learning curves 18: Periodically refresh reference 19: end for |