PathGuide: Dynamic Classifier-Free Guidance via On-Policy Transport Alignment
Avishag Nevo, Tamir Hazan
ICLR 2027
TL;DR. We reformulate classifier-free guidance as an on-policy transport problem. Using the weak continuity equation, PathGuide provides a closed-form, dynamic selector for optimal guidance scales that improves sample fidelity in flow-based models.
Abstract. While modern generative models excel at modeling complex data, precise inference-time control in conditional generation remains a critical challenge. Classifier-free guidance (CFG) is a primary mechanism for such control, yet it is typically treated as a static tuning parameter. In flow-based models, however, the guidance scale fundamentally dictates the velocity field and the resulting probability path, making guidance selection a dynamic path-optimization problem. We introduce PathGuide, a framework that reformulates scalar CFG selection as an on-policy transport problem. Leveraging the weak form of the continuity equation, we derive a selection criterion with a direct path-correctness interpretation: we prove that if the guided field is weakly equivalent to the exact conditional field along the generated rollout, the sampler's path coincides with the target conditional law. For scalar CFG, this criterion yields a strictly quadratic local objective with an efficient, closed-form selector for each solver interval. PathGuide enables optimal guidance scales to be computed and used online during generation or fitted offline as a reusable piecewise-constant schedule. We validate our method on controlled settings across various continuous-time flow constructions, demonstrating that this transport-based selector improves path alignment and sample fidelity over both fixed and state-of-the-art adaptive guidance baselines.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
ICLR 2027
Withdrawn · 3 reviews · OpenReview
Updated 24 Nov 2026, 16:50 UTC.
- Rating
- 3/4
- Confidence
- 3/4
- Soundness
- 3/3
- Presentation
- 3/3
- Informativeness
- 2/3
Read review
Summary
Strengths
- The need for learning/approximating the guidance schedule is well-motivated. The paper addresses a common issue in test-time guidance of flow-based generative models.
- The optimization problem, the derivation of its solution, and its approximation are presented clearly, and the method integrates well with the sampling procedure of flow-based generative models.
- The paper has thorough ablations of each aspect of the method's implementation (e.g., choice of test functions) and use (sampling with coarser time grids than the guidance was fitted with).
- The learned guidance schedule can be computed offline for some fixed condition label , and reused. Being just a scalar-valued function, storing the guidance schedule costs little memory.
Weaknesses
- The method requires approximating multidimensional integrals. The evaluation on MNIST already uses particles. The method is not evaluated on real-world classifier-free guidance tasks (e.g., [1]).
- The method fixes a condition label before learning the guidance schedule. The ability of the guidance schedule learned offline to generalize to different conditional labels is not evaluated. Generalization would be needed when the set of is large (e.g., in text-to-image applications [1, 2]) and learning the guidance schedule online is too computationally costly.
[1] Rombach, Robin. "High-Resolution Image Synthesis with Latent Diffusion Models." arXiv preprint arXiv:2112.10752 (2022).
[2] Saharia, Chitwan, et al. "Photorealistic text-to-image diffusion models with deep language understanding." Advances in neural information processing systems 35 (2022): 36479-36494.
Questions for the authors
- How well does a guidance schedule trained offline generalize to unseen conditioning labels ? Can the method support fitting a guidance schedule to multiple conditioning labels to improve generalization?
- Rating
- 2/4
- Confidence
- 2/4
- Soundness
- 2/3
- Presentation
- 3/3
- Informativeness
- 2/3
Read review
Summary
This paper proposes PathGuide, a framework for dynamically selecting classifier-free guidance (CFG) scales in flow-based generative models. This method derives a weak-form objective from the continuity equation to measure the discrepancy between the guided velocity field and the target conditional dynamics by formulating guidance selection as an on-policy transport alignment problem. The resulting local objective admits a closed-form solution for scalar CFG, enabling both online adaptation and offline schedule calibration without modifying the pretrained backbone. Experiments on Gaussian mixture distributions and MNIST demonstrate improvements in probability-path alignment and generation quality over fixed and adaptive guidance baselines.
Strengths
- The paper provides a principled perspective on dynamic CFG selection by connecting guidance optimization with probability transport and the weak form of the continuity equation. This formulation offers an interpretable alternative to heuristic guidance schedules.
- The proposed local objective admits an efficient closed-form selector for scalar CFG. The framework supports both online adaptation and offline schedule calibration without requiring additional backbone training.
- The experiments cover multiple flow constructions, including RF, I-CFM, OT, and VP. The reported results generally show improved distribution alignment, and the ablation studies provide useful evidence regarding the effects of test functions, estimator budgets, and schedule reuse.
Weaknesses
- The experimental evaluation is insufficient to establish the practical effectiveness of the method. The experiments are primarily conducted on two-class Gaussian mixtures and MNIST, without validation on more challenging image-generation benchmarks or modern pretrained flow-based models. Furthermore, the improvements over tuned CFG are relatively modest. For example, on MNIST, PathGuide reduces FID from 15.802 to 15.699 for RF and from 7.578 to 7.375 for OT (Table 2). Although these results support the effectiveness of the method in controlled settings, they provide limited evidence that the proposed approach offers meaningful advantages in realistic high-dimensional generation tasks.
- The practical applicability of the proposed framework remains limited by its calibration requirements. As stated in Section 4.2, PathGuide requires samples from the target conditional distribution and an evaluable endpoint-conditioned probability path to estimate the guidance scale. While the latter is available for certain flow-matching constructions, obtaining representative samples from the target conditional distribution can be challenging for arbitrary conditions in open-ended generation tasks. Moreover, the scalability of the posterior-weight estimation procedure to high-dimensional data remains unverified. Although offline calibration avoids repeated estimation during deployment, it does not eliminate these requirements during schedule construction. Consequently, the practical applicability of PathGuide beyond controlled experimental settings remains unclear.
- The theoretical path-correctness guarantee does not directly extend to the practical finite approximation. Proposition 4.1 establishes path correctness under weak equivalence for all smooth compactly supported test functions, whereas the practical implementation relies on a finite family of randomly sampled test functions, primarily of first and second order. Such a restricted family may fail to detect more complex discrepancies in the velocity fields, particularly in high-dimensional settings. Although Appendix F.1 provides empirical evidence that the finite residual correlates with the resulting one-step path discrepancy, this does not establish a theoretical bound relating the empirical objective to the discrepancy of the full generated probability path. A clearer characterization of the approximation error and its implications for path correctness would strengthen the theoretical contribution.
Questions for the authors
- Can the authors provide experimental results on more challenging datasets or pretrained flow-based generative models to demonstrate that the improvements extend beyond Gaussian mixtures and MNIST?
- How can PathGuide be applied to open-ended conditional generation when samples from the target conditional distribution and evaluable endpoint-conditioned densities are unavailable? Are there practical approximations that preserve the effectiveness of the proposed selector?
- Can the authors provide a quantitative analysis or theoretical bound relating the finite empirical weak-form residual to the actual probability-path discrepancy? How does the choice of test-function family affect this relationship in higher-dimensional settings?
- Appendix E reports that a substantial proportion of guidance values are projected to the lower bound of 1. How much of the improvement comes from the proposed transport-based optimization rather than simply suppressing excessive guidance? Could the authors compare against simpler constrained or time-dependent guidance schedules under the same settings?
- Rating
- 1/4
- Confidence
- 3/4
- Soundness
- 1/3
- Presentation
- 3/3
- Informativeness
- 2/3
Read review
Summary
In this work, the authors introduce PathGuide, a new algorithm to dynamically determine the classifier-free guidance scale in flow-based models. They identify that a weak equivalence between the guided field and the exact velocity field implies the correctness of the generated path. Based on this property, they propose a closed-form local selector and the endpoint-conditioned representation of the local objective. With a Monte Carlo estimation of the objective, they are able to introduce an online scale selector and an offline selector. Their method is tested on mixture of Gaussians and MNIST.
Strengths
- This paper is very well written and easy to follow
- CFG is an important topic in flow-based models
Weaknesses
- My biggest concern regarding this paper lies in its practicality. In order to estimate the objective, the authors use a Monte Carlo estimator: for each t, they need to have N rollouts and M endpoint samples. For their main results, they use T=200 and 500, N=M=2^14 to fit the mixture of Gaussians offline model, and M = 2^11, N = 2^12, and T = 50 for the MNIST offline model. This is an absurdly large number of samples required for two relatively simple datasets.
- I fear this method cannot be scaled to actual practical applications such as text-to-image and video generation, even though the paper primarily place its motivation on them.
- Because this method does not scale, the experiments in this paper also lack practical meanings as they do not include any setting that is remotely close to real-life applications and unlike its baselines, it does not include any production level model applications (e.g. large text-to-image models such as FLUX)
- Even with this significant compute requirement, the improvement over baseline CFG-Zero* is very minimal, and CFG-Zero* barely introduce any additional compute requirements.
- The online selector is only tested as a demo, rather than in actual benchmarks.
Questions for the authors
It'd be great if the authors can answer my concerns above.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
The paper presents a method for approximating the optimal guidance scaling in classifier-free guidance for every time along the sampling trajectory. Since flow-based generative models obey the continuity equation, they use its weak form to formulate an optimization of the guidance scaling for the next subinterval of the sampling time grid. The optimization problem involves two integrals. These integrals are approximated using Monte Carlo with an ensemble of samples, and the resulting approximate optimization problem is solved exactly. The guidance scaling may be computed online or offline and reused. The method is evaluated with flow matching models for a Gaussian-mixture model and MNIST with KL divergence, Wasserstein-2 distance, and FID metrics. The paper also has ablations for the design decisions when learning the guidance schedule, such as which test functions to use.