Guidance and composition of generative models have applications in visual design, chemistry, and biology. Logical guidance composes conditional scores exactly for diffusion models. However, Flow Matching (FM) and Stochastic Interpolants (SI) learn velocity fields. We show that negation and exclusive disjunction admit exact conditional velocity composition on any interpolant, whereas conjunction, and therefore any formula containing one, is exact on Gaussian paths but in general incurs a drift-interaction error, so composed velocities need not sample the logical target. LOGSI solves this by using score-based re-equilibration as our principled mechanism and falling back to the Gaussian-path velocity rule as an approximate transport predictor. In non-Gaussian bridge problems, generation alternates transport steps with score re-equilibration steps. On image trans fer (EMNIST to CMNIST, CelebA) and QM9 source-to-target molecular editing with logical attribute constraints, LOGSI improves rule conformity at the same network-evaluation budget over composed-velocity baselines, while also improving fidelity on the image tasks. More broadly, LOGSI applies wherever stochastic interpolants need guidance and logical combinations of constraints are natural.
Figures & tables
Figure 1: Overview of LoGSI . (a) Logical composition targets samples from ρ1 satisfying c1∧c2 , transported from ρ0 by a stochastic interpolant, sampling can only use the atomic conditioned scores and velocities. (b) Scores compose exactly for general stochastic interpolants, velocity composition matches the same rule on Gaussian-path / diffusion bridges, except at negation and exclusive-disjunction nodes, which match on any interpolant ( Theorem 1 ). (c) Our method transports samples with a proxy velocity roughly pointing in the right direction, then re-equilibrates with the exactly composed conditional score.
Figure 2: EMNIST to CMNIST logical sampling at matched NFE. (left) Conformity of LoGSI and of the compute-matched baselines, as a function of corrector steps K . Rand-2/Rand-3 are random depth-2/3 expressions. (right) FID as a function of corrector steps K at matched NFE. For overview reasons only Rand-2/Rand-3 are shown, for all of the experiments see Figure 8 .
Figure 3: CelebA latent transfer with logical constraints on Hat and Glasses . (left) Conformity of LoGSI and the compute-matched baselines as a function of corrector steps K . (right) FID as a function of corrector steps K at matched NFE. Colours index the logical template (AND, OR, AND ¬ ). For readability, the plots with the error bars are moved to the appendix in Figure 7 .
Figure 4: QM9 molecular editing with logical constraints on rings and oxygen , at matched NFE. (left, top) validity × conformity and (left, bottom) Kabsch-aligned RMSD to the source molecule, both as functions of corrector steps K . The dotted line marks the RMSD between random QM9 molecules. (right) Novelty of generated molecules vs. K .
Method
CMNIST
CelebA
QM9
LoGSI 5 step
0.904±0.003
0.63±0.09
0.34±0.02
uncd. 5 step
0.150±0.004
0.07±0.03
0.27±0.02
21vt(x∣c1)+21vt(x∣c2) 5 step
0.650±0.007
0.29±0.08
0.31±0.02
only score 5 step
0.034±0.001
0.030±0.002
0.053±0.007
Table 1: Transport-velocity ablation. Conformity (validity × conformity for QM9) if the transport step uses the Gaussian-path proxy velocity ( LoGSI ) vs. the unconditional velocity (uncd.), at 5 corrector steps. Furthermore, we report also a baseline where no transport step was used. We report the AND case only, to avoid confounding from the noise-aware classifier used in OR/negation.
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Explicit counterexample. Here we plot the situation depicted in the counterexample Appendix A.3 . On the left of each plot the source distribution and on the right the target distribution is shown. The first plot depicts the velocity field at different times of the AND composition. (Since the problem is one dimensional the velocity field is also one dimensional and has no component across time) The second plot depicts the linear combined atomic velocity fields. And the right shows the difference between these two, proving that velocities can not be combined together in the same way scores can. The depicted arrows of the velocity are downscaled by a factor 0.03 for readability.
Hyperparameter
CMNIST
CelebA
QM9
Epochs
500
500
500
Batch size
1024
64
128
Learning rate
10−3
2×10−4
10−4
Weight decay
10−5
0.01
0.01
Noise scheduler γ(t)
4t(1−t)
8t(1−t)
t(1−t)
Optimizer / scheduler
AdamW + cosine annealing to 0 over training
Appendix
Table 2: Training hyperparameters for our experiments. CFG dropout means the probability with which the condition is exchanged with the unconditional symbol.
Dataset
Attribute
Accuracy
CMNIST
Digit
0.996
Color
1.000
Joint
0.996
CelebA
Glasses
0.993
Hat
0.986
Joint
0.979
Appendix
Table 3: Classifier accuracies for the metrics used in the CMNIST and CelebA experiments.
Figure 6: Langevin step size ablation on QM9. Left: conformity, right: Kabsch distance to the source as a function of correction steps. We compare schedule-tied steps Equation 69 to the SNR rule of Song et al. (2021) Equation 70 , for both ODE and SDE transport.
Figure 7: Additional CelebA experiments. Further metrics of the experiment regarding transfer learning on CelebA. We report conformity, FID score and additionally we report LPIPS distance to the starting sample. The dotted horizontal is the mean random LPIPS score between female source and male target sample in the CelebA dataset.
Figure 8: Additional CMNIST experiments. Further metrics of the experiment regarding transfer learning from EMNIST to CMNIST. We report FID score and additionally we report LPIPS distance to the starting sample. The dotted horizontal is the mean random LPIPS score between source sample in EMNIST and target sample in the CMNIST dataset.
Figure 9: Additional QM9 experiments. Further metrics of the experiment regarding QM9 editing. We report validity and conformity separately. Furthermore, we report uniqueness and Kabsch RMSD. The dotted horizontal is the mean random Kabsch RMSD score between QM9 samples.
Method
CMNIST
CelebA
QM9
LoGSI 1 step
0.79±0.03
0.54±0.12
0.27±0.03
uncd. 1 step
0.020±0.001
0.016±0.009
0.15±0.02
21vt(x∣c1)+21vt(x∣c2) 1 step
0.44±0.02
0.16±0.05
0.20±0.01
only score 1 step
0.033±0.002
0.018±0.006
0.016±0.005
Appendix
Table 4: Transport velocity ablation. 1 step ablation of the experiment given in Table 1
Method
CMNIST
CelebA
QM9
LoGSI 1 step
0.84±0.02
0.49±0.12
0.29±0.01
uncd. 1 step
0.022±0.002
0.02±0.01
0.19±0.02
21vt(x∣c1)+21vt(x∣c2) 1 step
0.51±0.01
0.14±0.05
0.246±0.008
only score 1 step
0.033±0.002
0.018±0.006
0.016±0.005
LoGSI 5 step
0.912±0.004
0.58±0.09
0.354±0.009
uncd. 5 step
0.150±0.007
0.05±0.02
0.294±0.004
Appendix
Table 5: Transport velocity ablation. Ablations on each of the proposed experiments, where the transport step velocity is exchanged by unconditional velocity, mean velocity between the two conditions and not using a transport step.
Figure 10: Samples of the CMNIST experiments. We plot samples from different randomly generated logical expressions. On the top we use the expression (8∨4)∨(4∨0) and on the bottom we use the expression (7∨6)∧(beige∨blue) .
Figure 11: Samples of the CelebA experiments. Here we show samples from the logical condition glasses∨hat . On the left the source images and on the right the final images are shown.
Figure 12: Samples of the QM9 experiments. Both valid and conform samples of the logical statement rings∧oxygen are shown. On the left the starting molecules and on the right the generated molecules are depicted.
Conditional Flow Matching trains generative models by regressing a network onto the velocity of a prescribed noise-to-data interpolation path. The interpolation schedule that shapes this path is known to affect convergence and sample quality, yet it is invariably fixed in advance, independent of both the data and the model. We show that the regression difficulty of Conditional Flow Matching varies systematically along the path, and we propose Difficulty-Calibrated Flow Matching, which derives the schedule from the model itself: a short pilot run with the linear path records the per-time loss, and the schedule is set to the quantile function of this difficulty profile, so the trajectory lingers where the velocity is hardest to learn. The method has a single hyperparameter, leaves the training objective and its gradient equivalence intact, composes with classifier-free guidance, and adds about two percent training overhead. In controlled experiments on CIFAR-10, MNIST, and Fashion-MNIST with an identical compact U-Net, the calibrated path attains the best FID on CIFAR-10 at full sampling budget and clearly outperforms all fixed schedules in the large-batch, few-update regime, precisely the setting where compute is scarcest.
Airin Akter Tania, Md Raihan Khan
Dept. of Electrical and Electronic Engineering Khulna University of Engineering & Technology Khulna, Bangladesh · Dept. of Electrical and Electronic Engineering North Western University Khulna, Bangladesh
Flow matching enables language generation in few steps, but whether additional integration steps improve reasoning remains unclear. We prove that a flow parameterized by a two-layer Transformer can solve graph reachability, with the required number of integration steps increasing with the target's distance from the root. Yet, standard flow language models can fail to benefit from additional steps on reasoning tasks. We attribute this limitation to objectives that supervise each time point independently, without explicitly training successive steps to build on one another. To address this, we instead train through the model's own latent rollout over a randomly sampled subinterval of [0, 1], decoding only at the endpoint. On ProsQA, this raises accuracy to 97% and enables performance to improve with additional integration steps. For the longer rollouts required by reasoning tasks such as Sudoku and Maze, retracting the latent state onto a sphere stabilizes the dynamics and yields substantial gains over baselines with more than three times as many parameters. Sampling multiple rollouts further improves performance when paired with a parameter-free selection score, although reliable selection remains challenging for longer answers. Together, these results establish a theoretical basis for reasoning with flows and show how rollout training, stable latent dynamics, and rollout selection help realize this capacity in practice.
Faissal Izermine, Hanru Bai, Oscar Davis +1
Max Planck Institute for Intelligent Systems · ELLIS Institute Tübingen · ETH Zurich +3
Controllable generation with discrete diffusion models is often hindered by high computational overhead or the need for retraining. In this paper, we present Gradient-Informed Logit Correction (GILC), a plug-and-play framework that efficiently estimates guidance signals by repurposing the pretrained denoising network as a variational proxy. To circumvent the gradient instability inherent in high-dimensional discrete spaces, we introduce a Jacobian-free mechanism that directly corrects the clean prediction logits, facilitating stable and effective guidance. Our method accommodates both differentiable and non-differentiable reward functions. Extensive experiments across DNA, protein sequence, and molecular generation tasks demonstrate that GILC achieves state-of-the-art performance without additional training, frequently outperforming fine-tuning approaches.
Hongkun Dou, Zike Chen, Fengji Li +2
Beihang University, Beijing, China · Zhongguancun Academy, Beijing, China.