PathGuide: Dynamic Classifier-Free Guidance via On-Policy Transport Alignment
cs.LG, stat.ML
Submitted: 2026-08-29
Updated: 2026-09-05
Comments: 40 pages, 8 figures, 17 tables. Includes appendices with full proofs, ablations, reproduction details and additional experiments
Code: https://github.com/toshas/torch-fidelity
License: http://creativecommons.org/licenses/by/4.0/
The gist: While modern generative models excel at modeling complex data, precise inference-time control in conditional generation remains a critical challenge.
Terminology
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 low-resolution image manifolds and 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.
Sources
- Classifier-Free Guidance is a Predictor-Corrector
- Improving Classifier-Free Guidance of Flow Matching via Manifold Projection
- Adaptive Guidance: Training-free Acceleration of Conditional Diffusion Models
- Neural Ordinary Differential Equations
- Diffusion Models Beat GANs on Image Synthesis
- CFG-Zero*: Improved Classifier-Free Guidance for Flow Matching Models
- Improving Flow Matching by Aligning Flow Divergence
- Adam: A Method for Stochastic Optimization
- Flow Matching Guide and Code
- Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow
- FiLM: Visual Reasoning with a General Conditioning Layer
- CADS: Unleashing the Diversity of Diffusion Models through Condition-Annealed Sampling
- Rectified-CFG++ for Flow Based Models
- Simulation-free Schr\"odinger bridges via score and flow matching
- Guided Flows for Generative Modeling and Decision Making
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: Local-Consistency Optimisation for Bayesian Neural Networks
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks