Log-likelihood evaluation enables important capabilities in generative models, including model comparison, certain fine-tuning objectives, and many downstream applications. Yet paradoxically, some of today's best generative models -- diffusion and flow-based models -- still require hundreds to thousands of neural function evaluations (NFEs) to compute a single likelihood. While recent distillation methods have successfully accelerated sampling to just a few steps, they achieve this at the cost of likelihood tractability: existing approaches either abandon likelihood computation entirely or still require expensive integration over full trajectories. We present fast flow joint distillation (F2D2), a framework that simultaneously reduces the number of NFEs required for both sampling and likelihood evaluation by two orders of magnitude. Our key insight is that in continuous normalizing flows, the coupled ODEs for sampling and likelihood are computed from a shared underlying velocity field, allowing us to jointly distill both the sampling trajectory and cumulative divergence using a single model. F2D2 is modular, compatible with existing flow-based few-step sampling models, and requires only an additional divergence prediction head. Experiments demonstrate F2D2's capability of achieving accurate log-likelihood with few-step evaluations while maintaining high sample quality, solving a long-standing computational bottleneck in flow-based generative models. As an application of our approach, we propose a lightweight self-guidance method that enables a 2-step MeanFlow model to outperform a 1024 step teacher model with only a single additional backward NFE.
翻译:对数似然评估为生成模型提供了关键能力,包括模型比较、特定微调目标以及众多下游应用。然而矛盾的是,当前最优的生成模型——扩散模型与基于流的模型——仍需要数百至数千次神经网络函数评估(NFE)来计算单次似然。尽管近期蒸馏方法已成功将采样加速至仅需几步,但这以牺牲似然可计算性为代价:现有方法要么完全放弃似然计算,要么仍需对完整轨迹进行昂贵的积分运算。本文提出快速流联合蒸馏(F2D2)框架,通过两个数量级同时减少采样与似然评估所需的NFE次数。我们的核心洞见在于:在连续归一化流中,采样与似然计算的耦合常微分方程源自共享的底层速度场,这使得我们能够通过单一模型联合蒸馏采样轨迹与累积散度。F2D2具有模块化特性,兼容现有基于流的少步采样模型,仅需额外添加散度预测头。实验表明,F2D2能够在保持高样本质量的同时,通过少量步数评估实现精确的对数似然计算,从而解决了基于流的生成模型中长期存在的计算瓶颈。作为该方法的应用,我们提出一种轻量级自引导方法,使2步MeanFlow模型仅需额外一次反向NFE即可超越1024步教师模型的性能。