TL;DR
TMPO (Trajectory Matching Policy Optimization) addresses the "reward hacking" problem in diffusion model alignment by replacing standard reward maximization with trajectory-level reward distribution matching. By employing a novel Softmax-TB objective and a dynamic tree sampling strategy, it achieves a superior trade-off between high reward and generative diversity while reducing training time by up to 27%.
What Problem Does This Paper Address?
Reinforcement Learning (RL) is a powerful tool for aligning diffusion models with human preferences or specific tasks (like text rendering). However, existing methods often suffer from reward hacking and visual mode collapse.
The authors identify the root cause as the "mode-seeking" nature of standard RL objectives, which aim to maximize expected rewards. In practice, this leads the model to over-reinforce a tiny subset of high-reward paths, causing it to generate nearly identical images for the same prompt. This is particularly problematic for generative models where diversity is a core requirement—a single prompt like "a cat in a hat" should ideally result in many different compositions, not just one "perfect" version that tricks a reward model.
Methods
TMPO introduces two primary innovations to shift from reward maximization to reward distribution matching:
- Softmax Trajectory Balance (Softmax-TB): Inspired by Generative Flow Networks (GFlowNets), this objective matches the policy's trajectory probabilities to a reward-induced Boltzmann distribution ($P_\theta(\tau) \propto \exp(\beta R(\tau))$). The authors prove that this objective inherits the "mode-covering" property of forward KL divergence. Unlike standard RL (which acts like reverse KL and seeks a single mode), TMPO is mathematically incentivized to cover all acceptable high-reward trajectories.
- Dynamic Stochastic Tree Sampling: Training on large-scale models like FLUX.1 is computationally expensive. To make multi-trajectory training feasible, TMPO uses a tree structure where $K$ trajectories share a common denoising prefix and branch out at specific steps. Crucially, these branching points follow a dynamic curriculum: early in training, branching happens at high-noise levels to encourage global structural diversity; later, it shifts to lower-noise levels for fine-grained variations.
Datasets
The authors evaluated TMPO using FLUX.1-dev and SD3.5-Medium as backbones across three main alignment tasks:
- Compositional Image Generation: Evaluated using the GenEval benchmark.
- Visual Text Rendering: Measured by OCR accuracy (1-NED).
- Human Preference Alignment: Evaluated using HPS-v2.1, ImageReward, and PickScore.
- Diversity Metrics: Generative diversity was quantified using Log Geometric Mean Distance (LGMD) in VAE latent space and Cosine Diversity in DINOv2 feature space.
Key Insights and Ideas
- Mode-Covering vs. Mode-Seeking: The most significant "aha moment" is the formal characterization of the objective. Standard RL methods (like GRPO) are shown to be mode-seeking, which explains why they inevitably lead to diversity degradation. TMPO’s Softmax-TB is inherently mode-covering, penalizing the model if it drops any high-reward mode.
- Eliminating the Partition Function: By normalizing probabilities within a group of trajectories generated from the same prompt, TMPO cancels out the intractable global partition function ($Z$) typically required by GFlowNets, resulting in a simpler, more stable objective.
- Efficiency through Prefix Sharing: The tree sampling strategy isn't just a heuristic; it's a necessity for scaling. By sharing the early denoising steps, TMPO avoids redundant computations, allowing it to process 27 trajectories per prompt more efficiently than baselines processing far fewer.
Key Results
- Diversity Gains: TMPO improved generative diversity by 9.1% on average over state-of-the-art methods. While baselines often pushed diversity metrics (LGMD) into negative territory (indicating mode collapse), TMPO consistently maintained positive diversity.
- Superior Trade-offs: Pareto analysis shows that TMPO achieves the best balance between reward and diversity, as well as reward and training efficiency.
- Speedup: TMPO reduced iteration time by approximately 20-27% compared to other tree-based or prefix-sharing RL methods like TreeGRPO.
- Qualitative Quality: Qualitative results show that TMPO produces diverse, high-fidelity images that faithfully follow complex prompts, avoiding the "near-duplicate" issue seen in Flow-GRPO.
Limitations and Future Work
- Reward Model Dependency: The quality of the alignment is still upper-bounded by the accuracy of the underlying reward models. If a reward model is fundamentally flawed, TMPO will still match that flawed distribution.
- Task Scope: This work focused primarily on Text-to-Image (T2I) alignment.
- Future Directions: The authors suggest extending trajectory-level distribution matching to more complex domains like video generation, 3D synthesis, and robotic action sequences where diversity and efficiency are equally critical.
Summary updated