SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2606.19162 · 2026

The Reward Was in Your Data All Along: Correcting Flow Matching with Discriminator-Guided RL

Michal Drozdzal, Adriana Romero-Soriano, Felix Friedrich, Xiaochuang Han, Fair At Meta, Nicolas Beltran-Velez, Reyhane Askari-Hemmat, Zhang Xiaofeng

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 7 functions out of this paper's own repositories and ran 6 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
microsoft/soc-fine-tuning-sd canonical 6 of 7
FunctionStatusWhere it lives
generate_split_indices Ran microsoft/soc-fine-tuning-sd/src/core_utils.py
code served (permissive licence) · get_code("df35c4836aa09ea6")
load_config Ran microsoft/soc-fine-tuning-sd/src/config_utils.py
code served (permissive licence) · get_code("0eb854858af4ff35")
load_config_from_checkpoint Ran microsoft/soc-fine-tuning-sd/src/evaluate_checkpoint.py
code served (permissive licence) · get_code("44bddac445356daa")
load_data Ran microsoft/soc-fine-tuning-sd/src/core_utils.py
code served (permissive licence) · get_code("e79ee9ae989a9f77")
rescale_noise_cfg Ran microsoft/soc-fine-tuning-sd/src/soc_pipeline_sd.py
code served (permissive licence) · get_code("bea2d776a332f2b0")
retrieve_timesteps Ran microsoft/soc-fine-tuning-sd/src/soc_pipeline_sd.py
code served (permissive licence) · get_code("0b56680ee1708fee")
get_eval_output_path Not yet run microsoft/soc-fine-tuning-sd/src/evaluate_checkpoint.py
code served (permissive licence) · get_code("d1ffd9d4ae3112af")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Score-and flow-matching models often rely on preference-based reinforcement learning for two purposes: aligning with subjective preferences and, surprisingly, recovering properties-such as visual realism and coherent object structure-that matching-based training is intended to learn from the data itself. We argue that this reflects a structural mismatch. Matching losses measure ℓ 2 regression error on the velocity or score field under training-time marginals, a proxy poorly aligned with the visual and semantic properties that determine sample quality at inference. Given a reward aligned with these properties, RL sidesteps the mismatch by evaluating the model on its own samples and following the reward landscape directly. The challenge is to obtain such a reward without relying on human preferences, which are expensive and conflate data realism with annotator inclinations. We propose Discriminator-Guided RL (DRL). DRL trains a discriminator to separate data from base-model samples in a pretrained representation space and uses its logit as the reward in KL-regularized RL. The pretrained space restricts the discriminator to perceptually meaningful directions, and the logit estimates the log-likelihood ratio between data and model, which is the optimal reward for targeting the data distribution. Across SiT, JiT, REPA, and RAE, DRL reduces guidance-free FID (e.g., 9.38 → 2.62 on SiT) and semantic-space FD (e.g., 88.2 → 19.3 on DINOv3 for SiT), with consistent gains across all backbones, and improves human-preference rewards without training on them. It also yields a better Pareto frontier between preference reward and image fidelity under subsequent preference-based post-training, increasing alignment while reducing low-level artifacts such as oversaturation and excessive brightness.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2606.19162")
get_code_for_paper("2606.19162")
have("2606.19162")

Connect an agent — have() is free.