Harmony without Uniformity

Towards Weight-Free Multi-Reward Reinforcement Learning
Rewards can harmonize without uniformity.
1 Adobe2 Northeastern University3 Abaka AI
SD3.5-M, CFG 4.5 + Harmony-λ step 0 / 40
Same prompt, same initial noise. Each frame is the model's estimate of the final image at one of the 40 sampling steps. Left: SD3.5-M before RL, at its default guidance 4.5. Right: SD3.5-M after RL with Harmony-λ (DiffusionNFT, text rendering, no guidance). We wrote these prompts; for each one we drew 8 seeds from Harmony-λ, kept the one we liked best, and gave the same seed to SD3.5-M. Random draws on the test prompts are in the gallery.
TL;DR

Multi-reward RL usually adds the rewards up with weights, which turns every reward into the same currency. Harmony needs no weights. Within the group of samples of one prompt, it ranks each reward, multiplies the percentiles into the region of reward space that a sample dominates, and turns that order into symmetric advantages. It replaces only the advantage step of a group-based RL algorithm.

Rewards resist uniformity

A weighted sum fixes an exchange rate between rewards. But OCR accuracy and aesthetics measure unrelated things, rewards come in different units, and some are closely entangled. Scale normalization cannot fully align them.

Harmony is not a trade

A sum lets one reward pay for another, so an unbalanced image can score as high as a balanced one. With DiffusionNFT, CorrGRPO w/ norm. reaches the highest OCR (0.942) but trails GDPO in PickScore (22.64 vs. 23.75).

Uniformity breaks harmony

Added in raw units, the easy reward runs ahead and the others stall. Under the weighted sum and CorrGRPO w/ norm., the weakest training reward stops at 0.72 and 0.67 of the best level. Harmony lifts it to 0.93.

Abstract

Rewards can harmonize without uniformity.

Multi-reward Reinforcement Learning (RL) has become an essential post-training stage for frontier models. A common assumption behind current methods is that rewards can be exchanged through weights, converting a multi-reward learning problem into a single-reward one by a weighted summation of (normalized) rewards. While simple, we challenge such an assumption behind. First, rewards resist uniformity, as their entanglement complicates optimal weighting. Second, harmony is not a trade, demanding simultaneous improvement across all rewards. Third, uniformity breaks harmony, as it allows easily optimized rewards to dominate.

In this work, we propose a weight-free multi-reward RL method, Harmony. Rather than combining rewards into scalar, Harmony judges each sample by the region of reward space it dominates, and trains the policy to enlarge this dominance volume. The rewards are never made uniform, yet they move in harmony. Requiring no weights, Harmony is bounded by the weakest reward, dynamically emphasizing the rewards on which each sample ranks lowest among its peers in each iteration. Furthermore, we empower Harmony with a Lagrangian constraint without hand-set weights to meet real-world scenarios that have detailed reward requirements, such as OCR in image generation.

Experiments across various text-to-image tasks and RL algorithms demonstrate that Harmony outperforms strong baselines and can steer a reward toward a specified target when required. Experiments on language models further show its generalization ability.

Motivation

Every method learns the easy reward first

What separates the methods is whether the lagging reward catches up. Each curve is a reward's test-set progress, (v − vbase) / (vbest − vbase): 0 is SD3.5-M before RL, 1 the best final level of any method in the setting, scored every 20 iterations.

HPSv3 comes first for everyone. On text rendering with DiffusionNFT, every method reaches 84–89% of its final HPSv3 gain by iteration 20, but only 59–66% of its OCR gain.
The lagging reward decides. The weighted sum and CorrGRPO w/ norm. leave the weakest training reward at 0.72 and 0.67 of the best level. Harmony lifts it to 0.93, and GDPO also avoids the stall.
With Flow-GRPO-Fast, Harmony lifts its weakest reward to 0.87 and 0.96 of the best level on the two tasks, while the weighted sum and CorrGRPO w/ norm. leave PickScore at 0.74 or below.
Spearman correlation matrices between reward models for several prompt sets and models

Rewards resist uniformity: Spearman ρ between rewards over 4,000 prompts × 8 samples, for several prompt sets and models. Correlations vary widely across reward pairs.

Method

Rank, multiply, then map to normal scores

For a prompt, the policy samples a group of G outputs, and K reward models score each output xi in their own units. Harmony turns the K scores into one advantage in three steps. Each step meets one requirement.

Overview of Harmony: a group of six rollouts is scored by four rewards; Harmony ranks each reward, multiplies the percentiles into a dominated volume, and maps its rank to normal scores used as advantages.

K rewards score a group of G samples (six real rollouts shown). Harmony ranks each reward within the group, multiplies the percentiles into a dominated volume (two of the K axes shown), and maps its rank to normal scores, which any group-based RL algorithm uses as advantages. An optional Lagrangian constraint raises the exponent of a reward with a target.

1

In-group percentiles

Unit-free
\[u_{ik}=\tfrac{1}{G}\textstyle\sum_{j\in g}\big(\mathbf{1}[r_{jk}\lt r_{ik}]+\tfrac12\mathbf{1}[r_{jk}=r_{ik}]\big)\]

Rewards differ in magnitude, and their order within a group is more reliable than the raw scores. Each score becomes its in-group percentile, so the advantages stay the same under any strictly increasing transform of a reward. Like GRPO's normalization, the in-group comparison removes prompt difficulty without an external reference.

2

Product of percentiles

Weak-aware
\[S_i=\sum_{k=1}^{K}\log u_{ik}=\log\prod_{k=1}^{K}u_{ik}\]

In rank space \([0,1]^K\), \(\prod_k u_{ik}\) is the volume that \(x_i\) dominates, and for independent rewards the chance that it beats a random group member on every reward. Since \(\partial S_i/\partial u_{ik}=1/u_{ik}\), a gain on a weaker reward counts more: \(0.5\times0.5=0.25\), but \(0.9\times0.1=0.09\).

3

Normal scores

Symmetric advantages
\[R_i=\mathcal{N}_g(S_i)=\Phi^{-1}\big((m_i-\tfrac12)/G\big)\]

The logarithm is steep near 0 and flat near 1, so raw \(S_i\) is skewed: 4.3% of text-rendering samples get advantages below −2 and none above +2. Harmony keeps the order of \(S_i\) (rank \(m_i\), ties averaged) and replaces its values with normal scores. Without ties, every group gets the same G values, within ±2.04 for G = 24.

\[A_i=\dfrac{R_i-\mu^g(R)}{\sigma^{\mathcal{B}}(\tilde R)}\]

The normal scores enter the usual group centring and batch std. Harmony takes K + 1 sorts of G numbers per group and needs no weights, hyper-parameters, or reference samples.

How the multi-reward rules compare

\(w_k\): weight; \(\sigma^g_k\), \(\rho^g\): in-group std and correlation; \(\mathcal{P}_g\): in-group Pareto front; \(u_{ik}\): in-group percentile; \(\mathcal{N}_g\): in-group rank to normal score. Unit-free: unchanged under any increasing transform of a reward. Weak-aware: a reward that ranks low counts more. Symmetric: the m-th best and m-th worst get advantages of equal size and opposite sign.

One group, step by step

Six real rollouts of one prompt from training (text rendering, DiffusionNFT, iteration 100), drawn on two of the four rewards, PickScore and CLIPScore. Press play, or pick a step.

Interactive demo

Change the scores, then change the units

Each row is one sample of a group, each column a reward in its own units. Drag a point or type a score, and three rules recompute the advantages: the weighted sum, GDPO, and Harmony. Then give one reward new units. The same preference in new units moves the linear rules; Harmony's advantages stay exactly the same.

Scores

as the trainer sees them

Rank space

Drag a point to change its two scores. The shaded box is the region it dominates on these two rewards; Harmony uses the product over all K.

Advantages

dashed: before the change of units

Harmony, worked out

m: rank of \(\prod_k u_{ik}\); A: its normal score, centred and scaled
Checking the JS port against harmony/advantage.py…
Harmony-λ

When a reward has a requirement, set a target

Some uses need one reward above a level, for example legible text. The weight that reaches a given OCR depends on the algorithm and on the other rewards, so it is hard to set by hand. Harmony-λ takes the target itself. A multiplier λ grows while the target is missed and shrinks once it is met.

\[\max_\theta J(\theta)\ \ \text{s.t.}\ \ \mathbb{E}_{\pi_\theta}[r_k]\ge b_k,\ k\in\mathcal{C}\]
\[R_i=\mathcal{N}_g\Big(\sum_{k=1}^{K}(1+\lambda_k)\log u_{ik}\Big)\]
\[\lambda_k\leftarrow\operatorname{clip}\Big(\lambda_k+\eta\,\dfrac{b_k-\bar r_k}{\bar\sigma_k},\ 0,\ \lambda_{\max}\Big)\]

The order stays ordinal: \(1+\lambda_k\) is the bargaining power of reward \(k\), and \(\lambda_k=0\) gives back Harmony. One projected dual step per iteration moves \(\lambda_k\) by the gap between the running mean \(\bar r_k\) and the target \(b_k\), in units of the in-group std. Because the values are still normal scores, the target changes the order of the samples, not the size of their advantages.

With target 0.92 and cap 4, λ ends at 3.67 with DiffusionNFT, whose rollouts hover around the target, and falls to 0.35 with Flow-GRPO-Fast once the target is met.
With DiffusionNFT and cap 2, the run of the main table, λ stays at its cap on 456 of 499 iterations: there the cap, not the target, sets the power. With a smaller step η = 0.01 or 0.02, λ never reaches the cap, and OCR ends at 0.900 and 0.907, against 0.900 with η = 0.3.

Training rollouts, every iteration: the multiplier λ (top) and the running mean of rollout OCR (bottom) with the target 0.92.

Targets or weights

Tuning weights only moves a baseline along its own trade-off. With DiffusionNFT, tuning the weighted sum raises OCR from 0.903 to 0.937, while the other three training rewards fall from 0.86 to 0.77 of the best progress.

A target gives Harmony a better curve. With DiffusionNFT, Harmony-λ reaches OCR 0.916, above the weighted sum's 0.903, and keeps more of the other rewards (0.92 vs. 0.86). With Flow-GRPO-Fast, target 0.95 reaches 0.927, above CorrGRPO w/ norm. (0.923), at a much smaller cost (0.92 vs. 0.85).

All 12 target and cap settings tested raise OCR over Harmony.

Iterations 420–500. x: test OCR; y: mean progress of PickScore, HPSv3 and CLIPScore. Arrows go from equal to tuned weights. The green line joins Harmony and Harmony-λ with target 0.92 as the cap grows from 1 to 4; hollow circles: target 0.95.

Text-to-image results

Best mean rank in all four settings, with no weights

SD3.5-M post-trained with LoRA by DiffusionNFT and Flow-GRPO-Fast, 500 iterations of 48 prompts × 24 images. Text rendering trains on OCR, PickScore, HPSv3 and CLIPScore; general prompts on PickScore, HPSv3 and CLIPScore. Five held-out rewards check that the gains carry over. Scores are means of the last five evaluations; each method is trained once (seed 42).

Mean rank over all nine rewards

Averaged over the last five evaluations; lower is better. NFT: DiffusionNFT; FGF: Flow-GRPO-Fast.

Harmony ranks first in every setting over the last five evaluations, and first or second at the last one.
On text rendering with DiffusionNFT, Harmony has the highest PickScore, HPSv3, CLIPScore, ImageReward, and both UnifiedReward scores. The weighted sum and CorrGRPO w/ norm. reach higher OCR but fall behind on the other rewards.
On general prompts with DiffusionNFT, Harmony's advantage is scaled by 0.35 to match the step size of the training recipe; GDPO ranks first there at the last evaluation alone.

All scores

Best in bold, second underlined, as in the paper. Training rewards first, then held-out: OCR-VL (a stricter text reader), ImageReward, Aesthetic V2.5, UnifiedReward and its alignment score. Rank: mean rank over all nine rewards at the last evaluation and over the last five.

Is the gain real?

GPT-4.1 as judge. With both image orders, Harmony is preferred over GDPO on 58.6% of prompts and over the weighted sum on 71.8%. It beats the weighted sum in all four settings (61.8%–75.3%).
Not an HPSv3 artifact. After resizing and JPEG compression, Harmony still beats GDPO on HPSv3 in three of the four settings (z = 6 to 13 across prompts).
Prompt by prompt. With the same prompts and initial noise, Harmony's images dominate the baselines' on more prompts than the reverse, in all four settings.

Why it lifts the weakest reward

Training samples whose mean in-group percentile is in [0.45, 0.55] (2,071 samples, 8 rollout batches), binned by their lowest percentile: mean advantage per bin.

Take samples that are equally good on average, and ask how much their advantage depends on their weakest reward. Across the weakest-percentile range, Harmony's advantage changes by 0.97 (−0.58 to +0.39), about twice GDPO's 0.47 and three times the weighted sum's 0.31. A sum of percentiles, with the same normal scores, changes by only 0.15.

Linear rules use the same exchange rate for every sample. The product sets it by rank: a sample's weakest reward counts most.

Ablation, text rendering with DiffusionNFT

Rank: mean rank over all nine rewards among the rows of the full ablation; four rewards shown. Raw \(S_i\) gives much larger negative than positive advantages (−2.59 vs. +1.35), and its KL to the reference rises from 0.095 to 0.257.

Same preference, new units

Replace PickScore by exp(PickScore) on text rendering with Flow-GRPO-Fast. The order of every pair of images is unchanged, so Harmony's advantages are the same bit for bit. The linear rules follow the new units toward PickScore and give up OCR, HPSv3 and CLIPScore.

For a linear rule, the unit of each reward acts as a hidden weight. Try it in the demo above.

Test-set means over iterations 420–500, raw units; the evaluation always reports the usual PickScore.

Language models

Safe RLHF: helpful and harmless

The policy is Safe RLHF's SFT model, a reproduction of Alpaca-7B, trained with GRPO in verl on PKU-SafeRLHF prompts. The two rewards are Safe RLHF's reward model for helpfulness and its cost model for harm, which often conflict. Since safety on a harmful request is a requirement, Harmony-λ also gets one target: at least 90% safe rollouts. All evaluations except the two training rewards use held-out models.

Iteration 100. Safe: share of responses rated safe by Safe RLHF's unified cost model (%). Sky.: Skywork-Reward-V2-Llama-3.1-8B. Guard.: Granite Guardian's probability of harm (%). These three on the 1,097 PKU-SafeRLHF test prompts. GPT-4o win (%): against the SFT model in both orders, on AlpacaEval (Help, 805 prompts) and PKU-SafeRLHF (Harm, 500 prompts). Len.: mean tokens; Trunc.: share reaching the 512-token limit (%).

Most helpful. Harmony wins 75.3% of GPT-4o's helpfulness comparisons, more than every baseline, and it is more helpful than every baseline with each of three training seeds.
Safe and still helpful. Harmony-λ matches the weighted sum in safety (96.6% vs. 96.4% safe) and is 4.0 points more helpful (95% CI [0.9, 7.0]), with the best harmlessness, Skywork, and Guardian scores.
No over-refusal. Trained longer, some baselines refuse benign requests. After one pass over the prompts, plain Harmony over-refuses 1.2%, against 60.0% for the weighted sum and 98.4% for CorrGRPO.

GPT-4o win rate against SFT

Example responses

Code and checkpoints

Quick start

The method is one numpy module with no training-framework dependency. The same class runs every baseline of the paper.

# install
git clone https://github.com/GITHUB_USER/Harmony.git && cd Harmony
pip install -e .
from harmony import MultiRewardAdvantage, PRESETS

est = MultiRewardAdvantage(PRESETS["harmony"],
                           rewards=["ocr", "pickscore", "hpsv3", "clipscore"])
# prompts: [N] group key of each sample
# scores:  {reward name: [N] scores in any units}
adv, info = est(prompts, scores)   # once per iteration, whole batch

# Harmony-λ: mean OCR accuracy of the rollouts >= 0.92
est = MultiRewardAdvantage(PRESETS["harmony_lambda_ocr"],
                           rewards=["ocr", "pickscore", "hpsv3", "clipscore"])
adv, info = est(prompts, scores)   # info["lambda/ocr"]: the multiplier

Presets for the baselines: weighted_sum, gdpo, mo_grpo, corrgrpo, corrgrpo_norm, pareto. Training patches for DiffusionNFT and Flow-GRPO-Fast and a verl plugin for language models come with the code.

import torch
from diffusers import StableDiffusion3Pipeline
from huggingface_hub import snapshot_download
from peft import PeftModel

pipe = StableDiffusion3Pipeline.from_pretrained(
    "stabilityai/stable-diffusion-3.5-medium", torch_dtype=torch.float16)
lora = snapshot_download("HF_USER/Harmony-SD3.5M", allow_patterns="ocr_diffusionnft/*")
pipe.transformer = PeftModel.from_pretrained(pipe.transformer, f"{lora}/ocr_diffusionnft")
pipe.to("cuda")
image = pipe('A neon sign above a small diner that says "OPEN 24 HOURS"',
             num_inference_steps=40, guidance_scale=1.0,   # trained without CFG
             height=512, width=512).images[0]

Checkpoints

CheckpointPrompts / taskAlgorithmMethod
Harmony-SD3.5M/ocr_diffusionnfttext renderingDiffusionNFTHarmony
Harmony-SD3.5M/ocr_flowgrpofasttext renderingFlow-GRPO-FastHarmony
Harmony-SD3.5M/general_diffusionnftgeneralDiffusionNFTHarmony (advantage × 0.35)
Harmony-SD3.5M/general_flowgrpofastgeneralFlow-GRPO-FastHarmony
Harmony-SD3.5M/ocr_diffusionnft_lambdatext renderingDiffusionNFTHarmony-λ, mean OCR ≥ 0.92
Harmony-SD3.5M/ocr_flowgrpofast_lambdatext renderingFlow-GRPO-FastHarmony-λ, mean OCR ≥ 0.92
Harmony-Alpaca-7B-SafeRLHFSafe RLHFGRPO (verl)Harmony
Harmony-lambda-Alpaca-7B-SafeRLHFSafe RLHFGRPO (verl)Harmony-λ, ≥ 90% safe rollouts

SD3.5-M LoRA weights (rank 32) after 500 iterations (EMA), one per run of the main table; Alpaca-7B models after 100 iterations, seed 42. Links appear here when the checkpoints are public.

BibTeX