FlowRDM

Flow Model Post-Training as
Representation Distribution Matching

Lan Feng1,2Peter Karkus2Maximilian Igl2Yuxiao Chen2Daniel Dauner3Alexander Naumann2Jef Packer2Wenhao Ding2Xiangyu Chen2Alexandre Alahi1Boris Ivanovic2Marco Pavone2,4

1EPFL2NVIDIA3KE:SAI4Stanford University

FlowRDM post-trains flow models with rewards that give a score but no gradient. It matches each group of samples to its reward-weighted version in feature space, so high-reward samples guide the update. One formulation covers visual generation and embodied control.

The paper in three minutes: a silent film

Abstract

Flow models are often post-trained with non-differentiable rewards. Most methods weight samples independently or move a group along one mean direction, ignoring the relations among samples. We propose FlowRDM, a unified framework that formulates flow-model post-training as representation distribution matching (RDM). It matches samples to their reward-weighted distribution in feature space, letting high-reward samples guide updates without reward gradients. In embodied control, it compares actions sampled at the same visited state. Across diverse tasks and base models in visual generation and embodied control, it matches or surpasses state-of-the-art methods. On SD3.5-Medium and FLUX.1-dev, it raises total reward by 59.7% and 14.1% over the respective base models, outperforming DiffusionART and DiffusionNFT on total reward and two reward models excluded from training. Post-trained on simulated videos alone, Cosmos3-Super and Cosmos3-Nano score 67.8 and 63.7 on Physics-IQ Verified. In closed-loop driving, it improves the base policy’s distance per at-fault event by 45.5%. In humanoid motion tracking from scratch, it surpasses FPO++ and Gaussian PPO on all seven motions with 33% fewer environment steps.

Background

Post-training raises a reward that gives a score but no direction.

A flow model generates a sample by integrating a learned velocity field from Gaussian noise to data. It is often post-trained with a reward that is not differentiable: an object detector checks whether an image shows the prompted objects, and a simulator checks whether a policy completes its task.

From noise to a sample, and the score that the reward gives it

noise, t = 1
Gaussian noise
t = 0.75
The sample, three quarters noise
t = 0.5
The sample, half noise
t = 0.25
The sample, one quarter noise
sample, t = 0
The sample: three computer keyboards, generated by FLUX.1-dev

reward

3.01

“a photo of three computer keyboards”, FLUX.1-dev. The path is sketched in pixel space. The reward sums an object detector’s check of the prompt and three learned scorers.

Two widely used approaches turn these scores into updates

Weight each sample by its own reward

DiffusionNFT and policy gradients such as Flow-GRPO weight samples this way. Numbers: reward minus the mean reward.

Move every sample along one mean direction

DiffusionART moves the samples from their mean (ring) toward their reward-weighted mean (dot).

In the first approach, the samples of a prompt do not interact. In the second, they interact only through their mean. Neither uses the relations among samples.

Method

FlowRDM takes the direction from a group, the samples that share a prompt or a state. The group estimates both the current distribution and its reward-weighted target, and matching the two in fixed features gives every sample a direction.

aA group and its rewards

“a photo of three computer keyboards”FLUX.1-dev

Sample 1 of FLUX.1-dev for the prompt
2.68
Sample 2 of FLUX.1-dev for the prompt
2.19
Sample 3 of FLUX.1-dev for the prompt
3.01
Sample 4 of FLUX.1-dev for the prompt
2.61

reward of each sample, mean 2.62

One prompt or one visited state, sampled several times by the current model: a group. The reward scores each sample. Reweighting the same samples by reward gives the target.

bFeatures from a frozen copy of the model

hidden states of blocks 8 and 12featuresfrozen FLUX.1-dev transformerinput: the sample, re-noised to noise level 0.5

A frozen copy of the model reads each sample, and its hidden states are the features. Features decide which samples count as near; in learned features, near samples share content.

cMatching in these features

drag a samplefeature space

Matching the group to its target gives each sample a direction: the descent direction, at that sample, of the discrepancy between the two, here the maximum mean discrepancy (MMD). With a Gaussian kernel, each sample gets its own, toward nearby samples with above-average reward and away from nearby samples with below-average reward.

A larger disc has more weight in the target; the shading is warm where the target has more weight than the group and cool where it has less. The model is then fit by regression to move its samples along these directions.

The three formulas
The target
The distribution of the current model, reweighted by reward.
p star of x given c is proportional to p ref of x given c times the exponential of r of x and c over beta
The direction
The witness of the maximum mean discrepancy between a group and its reward-weighted group, and its gradient at each sample. Rewards enter only through the centered weights, so no reward gradient is needed.
the witness u c of f is the sum over k of alpha k times kappa of f and f k; the direction d i is the gradient of u c at f i
The update
At cached points of each sampling trajectory, the network regresses toward the velocity of the current model, shifted against gi: the direction di carried back from the features to the sample.
the loss is the sum over samples i and sampler times n of t n times the squared distance between the velocity of the network at the cached point and the velocity of the current model minus eta times g i

One formulation; each task sets its discrepancy, its representation and its groups

DiscrepancyRepresentationGroup
Text-to-imageMMD, Gaussian kernelgenerator featuresK samples per prompt
Text-to-video, world modelMMD, Gaussian kernellatents, generator featuresK samples per condition
DrivingMMD, linear kernelFrenet coordinatesK executed plans per state
Manipulation, humanoidMMD, linear or degree-two kernelaction (chunk)K samples, one executed

With a linear kernel on latents, the matching gives the direction of DiffusionART and, with rank weights, the preference field of DrPO for one-step generators.

Text-to-image

SD3.5-Medium, FLUX.1-dev

With four rewards at once, FlowRDM reaches a higher total reward than DiffusionART and DiffusionNFT on both models.

The rewards are GenEval, PickScore, CLIPScore and HPSv2.1, with equal weights; the total reward is the sum of the four normalized scores. On SD3.5-Medium it rises from 2.0136 to 3.2149 after 500 updates, 128 GPU hours, and on FLUX.1-dev from 2.8031 to 3.1983. FlowRDM also scores highest on ImageReward and UnifiedReward, two reward models excluded from training.

Same prompt and noise: SD3.5-Medium and three post-trained models

“a photo of two pizzas”

Base model
Base model: a photo of two pizzas

total reward 1.80

DiffusionNFT
DiffusionNFT: a photo of two pizzas

total reward 1.83

DiffusionART
DiffusionART: a photo of two pizzas

total reward 1.88

FlowRDM
FlowRDM: a photo of two pizzas

total reward 3.25

“a photo of a white banana and a black elephant”

Base model
Base model: a photo of a white banana and a black elephant

total reward 2.10

DiffusionNFT
DiffusionNFT: a photo of a white banana and a black elephant

total reward 2.57

DiffusionART
DiffusionART: a photo of a white banana and a black elephant

total reward 2.49

FlowRDM
FlowRDM: a photo of a white banana and a black elephant

total reward 3.34

Sampled without classifier-free guidance. The three post-trained models after 500 updates.

Total reward against training compute, SD3.5-Medium

2,212 evaluation images. The curves start at the base model’s 2.014, below the axis.

+59.7%

total reward over SD3.5-Medium, from 2.0136 to 3.2149

+14.1%

total reward over FLUX.1-dev, from 2.8031 to 3.1983

Text-to-video

Wan2.2-TI2V-5B

A blind vision-language judge prefers the post-trained Wan2.2 in 78% of 256 pairs.

Wan2.2 is post-trained at its release setting, 121 frames at 1280 × 704, on the prompts of Movie Gen Video Bench, with HPSv3 and the text alignment of VideoReward as the reward. For 128 held-out prompts and two seeds, a vision-language model, GPT-6-Astra, sees the base model’s video and the post-trained model’s video in random order and names the better one. After 24 updates, the judge prefers FlowRDM in 78% of the 256 pairs.

Same prompt and seed, before and after post-training

“A serene meadow filled with wildflowers and butterflies.”

Wan2.2
Wan2.2 + FlowRDM

“bears figure out how to launch a rocket”

Wan2.2
Wan2.2 + FlowRDM

“a red panda and a toucan are best friends taking a stroll through santorini during the blue hour”

Wan2.2
Wan2.2 + FlowRDM

1280 × 704, 121 frames: vision-language judge, GPT-6-Astra

78%

of 256 pairs: the vision-language judge prefers FlowRDM to Wan2.2

Visual quality 87%, motion 65%, text alignment 70%.

480 × 832, 81 frames: VideoReward against training GPU hours

100 prompts excluded from training. FlowRDM passes DiffusionART’s final reward after 105 GPU hours.

World model

Cosmos3 on Physics-IQ Verified

Post-trained on simulated videos alone, Cosmos3-Super reaches 67.8 and Cosmos3-Nano 63.7 on Physics-IQ Verified.

Cosmos3 continues a three-second input video for five seconds, and Physics-IQ scores the continuation against the real one. The training set is 336 simulated rigid-body clips from the physical interaction scenes released with Cosmos3, with no video or prompt of the benchmark, and the reward of a sample is the benchmark’s score against the simulated continuation of its clip. The base models’ publicly reported scores are 65.5 and 61.8.

Training clips: rigid-body simulation, 18 of 336 shown

On a real scene: a three-second clip, continued for five seconds

Real continuation
the orange ball has left the table
Cosmos3-Super
the orange ball is still on the table

score 60.7

Cosmos3-Super + FlowRDM
the orange ball has left the table

score 73.9

The clips play the first two seconds of the continuation twice, then the first second, and hold. Scores: Physics-IQ Verified on the whole five seconds.

Physics-IQ Verified, before and after post-training

Cosmos3-Super

65.5publicly reported, 67.8+ FlowRDM

Cosmos3-Nano

61.8publicly reported, 63.7+ FlowRDM

Physics-IQ Verified, video-to-video
Cosmos3-Super + FlowRDM67.8Odyssey-3 Pro66.1Cosmos3-Super base model65.5Odyssey-364.4FLUX 3 [large]64.4

Cosmos3-Super post-trained with FlowRDM, next to the four highest public entries of the leaderboard on 20 October 2026 (grey). The Cosmos3 and Odyssey entries, ours included, take one of eight samples per item, chosen with a reward model or by consensus; FLUX 3 [large] reports a best-of-N selection.

Closed-loop driving

Alpamayo-like 2B VLA policy

In closed loop, the distance per at-fault event rises by 45.5%, from 1.89 to 2.75 km.

The policy is an Alpamayo-like vision-language-action policy with 2B parameters. Its trajectory head, a flow-matching expert, is post-trained with the backbone frozen, on states shortly before closed-loop failures in simulation. On 441 held-out scenarios the driving score (mean route progress, zero for a failed scenario) rises from 0.840 to 0.879.

Two held-out scenarios that the base policy fails and FlowRDM passes

Front camera of the base policy, with both paths over the next 4 s:base policyFlowRDMTop view:other road users

The base policy leaves the road
top view
base policy: off the road in 1.5 sFlowRDM
The base policy collides with a parked vehicle
top view

Distance per at-fault event, 441 held-out scenarios

Kilometres
FlowRDM2.75FPO++1.98Flow-GRPO1.80DiffusionNFT1.75Alpamayo 1.5 (10B)1.59

base policy (2B), 1.89 km

+45.5%

distance per at-fault event over the base policy

From 1.89 to 2.75 km. Flow-GRPO, FPO++ and DiffusionNFT, trained on the same scored plans, stay near the base policy.

Manipulation

RoboMimic, DexMimicGen

FlowRDM matches or outperforms FPO++ on five tasks, with 0.64 success on Square against 0.54.

Each task starts from an image-based flow-matching policy pretrained on demonstrations. FlowRDM runs the released FPO++ training loop and replaces its policy loss: at each state the policy draws nine action chunks and executes one, which receives its advantage estimate; the other eight receive zero and need no environment steps. The policy’s samples at that state then move toward the executed chunk when its advantage is positive and away from it when it is negative.

From the same initial state, before and after post-training

Can

Base policy
solved in 8.5 s
+ FlowRDM
solved in 5.6 s

Box Cleanup

Base policy
not solved within 20 s
+ FlowRDM
solved in 7.8 s

Threading

Base policy
not solved within 20 s
+ FlowRDM
solved in 8.8 s

The clips show the first 9.6 s of each episode in real time.

The fine-tuning suite of FPO++

TaskStepsFPO++, reportedFPO++, re-runFlowRDM
Can5.0M0.950.939 ± 0.0030.986 ± 0.001
Square8.0M0.540.550 ± 0.0020.637 ± 0.008
Box Cleanup5.0M1.000.994 ± 0.005†1.000 ± 0.000
Tray Lift4.3M0.950.932 ± 0.0070.937 ± 0.009
Threading8.0M0.890.852 ± 0.0200.923 ± 0.012

FlowRDM is higher on Can, Square and Threading; on Box Cleanup and Tray Lift the two are level. Success rate of the in-training evaluation over the last 40% of the steps, with the standard error over three seeds. Reported: the mean curve of the FPO++ paper over the same window. †The evaluations of these runs end at 77 to 87% of the range.

Square: success rate against environment steps

FlowRDM: mean and range of three seeds. The other curves are the mean curves reported in the FPO++ paper.

0.64

success rate on Square,
0.54 reported for FPO++

Mean over the last 40% of training and three seeds.

Humanoid motion tracking

Unitree G1, LAFAN1 motions

In training from scratch, FlowRDM surpasses FPO++ and Gaussian PPO on all seven motions with 33% fewer environment steps.

The Unitree G1 tracks seven motions of LAFAN1 in the BeyondMimic environment, with one policy per motion trained from scratch. After 197M environment steps, the zero-noise evaluation return of FlowRDM is above the 295M-step return of FPO++ and Gaussian PPO on every motion.

Seven motions, one policy each, trained from scratch with FlowRDM for 197M steps

Walk
Run
Dance 1
Dance 2
Fight
Jumps
Fall and get up

After 197M steps, FlowRDM is above both baselines at 295M

Dance 2, one of the seven: return against environment steps

Lines: training return, three seeds. Circles: zero-noise evaluation. Dotted: FlowRDM’s evaluation at 197M steps, carried across to 295M.

33%

fewer environment steps to surpass FPO++ and Gaussian PPO on all seven motions: 197M against 295M

FlowRDM after 197M steps, Dance 2