LeapAlign: 通过构建两步轨迹实现任意生成步骤的训练后流匹配模型对齐
LeapAlign: Post-Training Flow Matching Models at Any Generation Step by Building Two-Step Trajectories
AI总结:
本文提出LeapAlign方法,通过缩短生成轨迹为两步,减少计算成本并实现早期生成步骤的梯度传播,提升模型更新效率与稳定性,优于现有方法。
摘要:
本文聚焦于流匹配模型与人类偏好的对齐问题。通过直接反向传播奖励梯度通过可微生成过程进行微调是一种有前景的方法。然而,通过长轨迹反向传播会导致内存成本过高和梯度爆炸。因此,直接梯度方法难以更新早期生成步骤,这些步骤对最终图像的全局结构至关重要。为了解决这个问题,我们引入了LeapAlign,一种微调方法,它减少了计算成本并使奖励到早期生成步骤的梯度传播成为可能。具体来说,我们通过设计两个连续的跳跃将长轨迹缩短为仅两步,每个跳跃跳过多个ODE采样步骤并单步预测未来潜在特征。通过随机化跳跃的起始和结束时间步,LeapAlign实现了在任意生成步骤上的高效稳定模型更新。为了更好地利用此类缩短的轨迹,我们赋予更一致于长生成路径的轨迹更高的训练权重。为了进一步增强梯度稳定性,我们减少具有大梯度幅度的梯度项的权重,而不是像以前的工作那样完全移除它们。在微调Flux模型时,LeapAlign在各种指标上均优于最先进的GRPO基于和直接梯度方法,实现了更高质量的图像和图像-文本对齐。
英文摘要:
This paper focuses on the alignment of flow matching models with human preferences. A promising way is fine-tuning by directly backpropagating reward gradients through the differentiable generation process of flow matching. However, backpropagating through long trajectories results in prohibitive memory costs and gradient explosion. Therefore, direct-gradient methods struggle to update early generation steps, which are crucial for determining the global structure of the final image. To address this issue, we introduce LeapAlign, a fine-tuning method that reduces computational cost and enables direct gradient propagation from reward to early generation steps. Specifically, we shorten the long trajectory into only two steps by designing two consecutive leaps, each skipping multiple ODE sampling steps and predicting future latents in a single step. By randomizing the start and end timesteps of the leaps, LeapAlign leads to efficient and stable model updates at any generation step. To better use such shortened trajectories, we assign higher training weights to those that are more consistent with the long generation path. To further enhance gradient stability, we reduce the weights of gradient terms with large magnitude, instead of completely removing them as done in previous works. When fine-tuning the Flux model, LeapAlign consistently outperforms state-of-the-art GRPO-based and direct-gradient methods across various metrics, achieving superior image quality and image-text alignment.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。