RL correction sits 93.5° from CFG; CCR restores clarity from 208 to 841

Preserving Pretrained CFG Structure in RL for Diffusion Models with Conditional Contrast Regularization

Yunfei Zheng, Xiaolong Wang, Dandan Zheng, Xianjun Deng, Shenghao Liu, Wei Xiang, Yuqian Li, Laurence Tianruo Yang

cs.LG, cs.AI, cs.CV

2026-11-20

On Z-Image, standard RL reaches GenEval 0.938 but drops Laplacian clarity from 1064 to 208. CCR restores clarity to 841 and holds reward at 0.960.

What problem this solves

RL post-training for diffusion models often raises the target reward while images get blurrier or drift off the prompt. The scalar the reward model can see goes up. Sharpness, prompt alignment, and perceptual quality do not reliably follow. That gap is reward hacking: optimization exploits the one number it is given.

KL penalties and data regularization limit how far the policy moves. Direction is a separate question. CFG, classifier-free guidance, amplifies the gap between a conditional prediction and an empty-condition prediction, and at inference it usually improves clarity and alignment. DiffusionNFT already showed that RL can beat a CFG-enabled pretrained model on reward even when sampling uses no CFG. A higher reward does not mean the quality-related structure CFG used to supply is still there.

Method

CFG and RL are both written as corrections to the pretrained conditional prediction. The CFG correction, Δcfg, is proportional to the conditional prediction minus the unconditional one. The RL correction, Δlearn, is the finetuned velocity minus the pretrained conditional velocity. Project Δlearn onto Δcfg and average over the denoising trajectory. That coefficient is ᾱ. Positive means the update still points with pretrained CFG. Negative means it points the other way.

After GenEval RL, the learned correction sits at an average angle of about 93.5° from pretrained CFG: nearly orthogonal, and slightly on the anti-CFG side. At sampling time the length of the correction stays fixed and only the angle changes. Turning it toward CFG raises clarity and alignment. Past 90°, semantic errors and failed samples increase. Reward peaks on the original RL direction. Quality and reward point different ways, so rotating at inference is not enough. The useful component has to be kept while training.

CCR, conditional contrast regularization, sits on top of DiffusionNFT. The main loss is still the implicit positive and negative branches, plus a KL term toward the reference model. CCR does not distill a guided target at the original noisy state. The current policy first predicts a clean estimate, noise is added back around that estimate, and the frozen reference model is queried once with the prompt and once with an empty condition. The difference is a local conditional contrast. After normalization it is added back to the clean estimate under a stop-gradient, so the target receives no gradient, and the current prediction is pulled along that direction. The regularizer follows the current RL trajectory. A fixed CFG target does not compete with the reward. The total loss is the RL loss plus λ times the CCR loss.

Results

The main runs use Z-Image at 512 resolution with LoRA, rank 32 and α 64. Rewards are GenEval, PickScore, HPSv2.1, and a multi-reward mix of PickScore, HPSv2.1, and CLIPScore. Baselines are default KL at 1e-4, a larger KL at 1e-2, DDRL data regularization, and GARDO dynamic KL. Clarity is Laplacian variance and CLIP-IQA. Alignment is DPG and VQAScore. Perception is MUSIQ, MANIQA, and DEQA.

On pretrained Z-Image with no CFG, Laplacian variance is 1064, DPG is 78.5, and GenEval is 0.258. At CFG scale 5 those numbers are 1279, 86.0, and 0.667.

RewardMethodLaplacianDPGReward score
GenEvalDefault KL20879.80.938
GenEvalLarger KL33183.30.952
GenEvalDDRL54281.80.923
GenEvalGARDO82179.30.758
GenEvalCCR84183.10.960
PickScoreDefault KL22982.80.842
PickScoreCCR137485.30.830
HPSv2.1Default KL92880.40.377
HPSv2.1CCR191985.30.367
multi-rewardDefault KL75585.81.456
multi-rewardCCR206386.81.431

On GenEval, default KL scores 0.938 reward at a Laplacian of 208. Larger KL reaches 0.952 reward and Laplacian 331. GARDO keeps Laplacian 821 but reward falls to 0.758. CCR lands at Laplacian 841 and reward 0.960, with CLIP-IQA 0.96 and MUSIQ 74.7, against 70.9 for pretrained CFG scale 5. On the other three rewards, default KL is slightly ahead: PickScore 0.842 vs 0.830, HPSv2.1 0.377 vs 0.367, multi-reward 1.456 vs 1.431. Clarity is not close: 229 vs 1374, 928 vs 1919, and 755 vs 2063. The last two CCR numbers also beat pretrained CFG scale 5, which sits at 1279.

The projection tracks the same split. Under default KL, ᾱ falls during training and finishes GenEval at -0.173. CCR at λ=0.05 finishes at 0.301. Direct CFG distillation pushes the projection to 0.606 and Laplacian variance to 1743, but DPG is 81.5 and reward is 0.935, behind CCR at 83.1 and 0.960. The coefficient is a diagnostic. That ablation is why maximizing it is the wrong training target.

On Qwen-Image, default KL lifts GenEval from 0.677 to 0.947 while Laplacian variance falls from 242 to 169 and MUSIQ from 68.2 to 66.0. CCR holds reward at 0.933, Laplacian at 744, and MUSIQ at 72.3. On SD3.5-Medium the default-KL projection stays positive through training, and the quality gap versus CCR is smaller. External CFG during both training and inference still lands behind CCR overall. No full numeric table is given for that comparison.

λ is not a knob to max out. On GenEval, weights 0.03, 0.05, and 0.10 give Laplacian 623, 841, and 1487, and reward 0.950, 0.960, and 0.944. At 0.10, DPG falls back to 80.9. On multi-reward, 0.10 drops DPG from 86.8 to 76.2 and reward from 1.431 to 1.385.

Why it matters

A KL term controls how large the drift is. Direction has to be handled on its own. The reward-maximizing update can sit almost perpendicular to pretrained CFG, so clarity collapses while the reward still rises. CCR leaves the reward model alone, and inference can stay CFG-free. The extra cost is one more conditional pass and one unconditional pass of the frozen reference model per training sample.

The regularizer earns its place when standard RL drives the projection negative, which is what happens on Z-Image and Qwen-Image. On SD3.5-Medium the projection is already positive, and the case for CCR is weak. Against default KL this is a tied reward with a real quality recovery on the backbones that otherwise fall apart.

Limitations

Clarity is carried largely by Laplacian variance, which only measures high-frequency energy. Oversmoothing is not the only way to move it. Extra sharpness and noise raise it too. CCR reaches 1919 and 2063 on HPSv2.1 and multi-reward, above the pretrained CFG-scale-5 value of 1279, with no human preference study to separate cleaner images from images that are merely sharper. CLIP-IQA, MUSIQ, MANIQA, and DEQA move together, so they are not four independent checks.

The full comparison exists only for Z-Image. Qwen-Image is reported for GenEval alone. SD3.5-Medium is mostly a projection curve. External CFG has no full numeric table. Every baseline is a regularizer inside DiffusionNFT, not a different RL algorithm such as Flow-GRPO or DDPO. Resolution is 512, and only LoRA is trained.

The rotation test applies one angle to every denoising step, and it edits sampling on an already trained model. It shows that the CFG direction carries quality information. Direct distillation, which drives the projection to 0.606, still has a worse trade-off than CCR at 0.301. Push λ too high and multi-reward alignment breaks. Preserving CFG structure as a fix for reward hacking is, so far, a result about these metrics and about the two backbones that drift.

Terms

Source

What people are saying

Related papers

All paper explainers