Manuscript Offprint
arXiv:2610.38648Logical Guidance of Stochastic Interpolants
Gerrit Gerhartz NEC Laboratories Europe ITP, Heidelberg University
Francesco Alesiani NEC Laboratories Europe
Jonathan Warrell NEC Laboratories America
Henrik Christiansen NEC Laboratories Europe
Matheus Ferraz NEC Bio B.V.
Mathias Niepert NEC Laboratories Europe University of Stuttgart
ABSTRACT
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 transfer (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.
1 INTRODUCTION
Guidance and composition are central to generative AI, enabling controlled generation across domains ranging from visual design to chemistry and biology (Saharia et al., 2022; Hoogeboom et al., 2022; Watson et al., 2023; Skreta et al., 2025; Blohm & Garg, 2026). Guidance steers a model toward desired properties, while composition combines multiple conditions or concepts to produce outputs that satisfy more complex requirements. Most existing methods target diffusion models (Sohl-Dickstein et al., 2015; Ho et al., 2020; Song et al., 2021; 2020), where one endpoint is a fixed Gaussian, and the reverse dynamics depend only on the score. A natural extension is to lift logical guidance to stochastic interpolants (SI) (Albergo et al., 2025), which unify diffusion and flow matching (Lipman et al., 2023) and are not tied to a Gaussian endpoint. Classical guidance (Dhariwal & Nichol, 2021; Ho & Salimans, 2022) for SI has been studied (Feng et al., 2025; Jiang et al., 2026), but logical composition of atomic conditions in this regime remains open. We focus on domain transfer (Liu et al., 2023): an interpolant transports a source distribution to a target , samples can be initialized from concrete source instances (Albergo et al., 2024), and guidance enforces a Boolean formula over target attributes. For example, we may edit a source molecule by adding a geometry (e.g. rings) and an atom-composition constraint (e.g. oxygen).
Throughout, we distinguish between unconditional velocity and score fields (or velocities and scores for short), denoted by and , and conditional velocity and score fields, denoted by and , which steer generation toward samples satisfying a constraint or property .
The core challenge is that SIs learn conditional velocities, but it is not clear a priori how these fields should be combined to enforce a Boolean formula . For conditional scores, Alesiani et al. (2026) (LogDiff) derive exact recursive composition rules. We show that the analogous velocity

Velocities compose
if we have Gaussian paths
For general interpolants and distributions composition does not apply LoGSI is needed
c) LoGSI
- Transport
Use a proxy velocity as a transport process
- Re-Equilibration
Equilibrate with the
exactly composed score
→ LoGSI achieves
compositionality for
GENERAL interpolants
and endpoint distributions

Figure 1: Overview of LOGSI. (a) Logical composition targets samples from satisfying , transported from 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.
composition is exact for Gaussian-path bridges, and that outside that regime it fails if the Boolean formula contains conjunctions or conditional-independent disjunctions (CI-disjunctions).
We introduce LOGSI to address this asymmetry between velocity and score compositionality (Figure 1). On general stochastic interpolants with a non-Gaussian starting distribution, both velocity and score are available at sampling time, but only the score admits exact logical composition for every formula (Alesiani et al., 2026). In LOGSI, composed velocities are exact on Gaussian-path bridges and can be used as a proxy transport field elsewhere. LOGSI therefore separates roles: an approximate transport step along the proxy transport field advances mass along the interpolant, while exact composed conditional scores re-equilibrate samples toward at each timestep. In the limit of sufficient score-correction steps at fixed , the procedure is consistent with the logical target. Concretely, we realize this split as a transport–re-equilibration sampler: each outer step applies a transport update along , followed by overdamped Langevin steps with the exactly composed conditional score.
We evaluate our method on image and molecular transfer with non-Gaussian endpoints, testing general Boolean templates (conjunction, disjunction, negation) and randomly generated expression trees. At matched network-evaluation budget, score-guided re-equilibration with a proxy velocity improves rule conformity over composed-velocity integration. It also yields higher fidelity on the image experiments.
Our main contributions are as follows:
-
Score–velocity asymmetry for logical SI. On Gaussian-path flow matching, LogDiff score composition induces an exact velocity composition rule. For general stochastic interpolants with non-Gaussian endpoints, score composition carries over unchanged, velocity rules fail for conjunction and CI-disjunction, and therefore for general logical statements .
-
Logical guidance by score correction. We sample under Boolean formulas by re-equilibrating with exactly composed conditional scores at each timestep, avoiding any closed-form composed velocity field.
-
Proxy velocity transport. We reuse the Gaussian-path velocity rule as a transport proxy, cutting the number of correction steps needed and improving conformity over the composed-velocity baseline.
2 RELATED WORK
Generative methods and bridges. Diffusion models generate data by reversing a fixed noising process (Sohl-Dickstein et al., 2015; Ho et al., 2020; Song & Ermon, 2020), unified by Song et al. (2021) in the notion of stochastic processes. Song et al. (2021) also propose to sample with a predictor-corrector scheme, where a Langevin corrector uses the score to remove the predictor's discretization error while both target the same marginal. Our sampler is similar but structurally different: because only the score composes exactly for formulas containing conjunctions or general disjunctions (Remark 1), the score–velocity asymmetry (Section 4.2) forces the transport step to be a deliberate proxy , while the corrector is the exactness mechanism enforcing the logical constraint, needed beyond discretization error even with infinitesimal transport steps. Flow matching (Lipman et al., 2023) learns a velocity field between two distributions, and stochastic interpolants (Albergo et al., 2025) generalize both diffusion and flow matching while dropping the Gaussian-endpoint assumption, which is why we adopt them for our method. Finally, Schrödinger bridges (De Bortoli et al., 2021; Shi et al., 2023) transport between arbitrary distributions under an entropy-optimal-transport objective. Since our logical composition is orthogonal to how the bridge is trained, extending it to such samplers is an appealing direction for future work.
Guidance and compositional conditioning. Guidance of generative models was first achieved by training a separate classifier to steer diffusion sampling (Dhariwal & Nichol, 2021). The noise-aware classifiers we use for the posterior weights in our logical composition play an analogous role. Classifier-free guidance (Ho & Salimans, 2022) shortly after removed the need for a separately trained classifier by jointly modeling conditional and unconditional scores. Both approaches condition on a single condition and do not address how multiple conditions should be combined. Compositional generation, started in products of experts (Hinton, 2002) and revived more recently (Du et al., 2023; Gaudi et al., 2025), targets exactly this problem, and subsequent work developed compositional and logical conditioning for diffusion models (Liu et al., 2022). Closely related, Skreta et al. (2025) introduce SuperDiff, which composes pretrained diffusion models at inference time through logical AND and OR operators. We discuss the connection to our bridge setting in Section A.6. Most relevant to us, Alesiani et al. (2026) derive exact recursive rules for composing conditional scores under Boolean formulas. Guidance has also been extended to flow matching (Feng et al., 2025) and stochastic interpolants (Jiang et al., 2026), but to our knowledge logical composition in these settings remains unexplored.
3 PRELIMINARIES
To build our method we rely on the framework of stochastic interpolants by Albergo et al. (2025) and the logical guidance work of Alesiani et al. (2026).
3.1 STOCHASTIC INTERPOLANTS
In this work we use the framework of stochastic interpolants by Albergo et al. (2025), which unifies diffusion and flow matching models. The idea of this framework is to replace the diffusion or linear interpolation of diffusion and flow matching models between the two distributions and with an interpolant of the form
where is a coupling with marginals and , the interpolation satisfies the boundary conditions and , and the noise scheduler satisfies and for all . One can think of this as an interpolation between the distributions and , bridged by intermittently adding Gaussian noise to the process. The cases (flow matching) and Gaussian-path diffusion are special cases (Albergo et al., 2025). We work with general endpoints and refer to Section 4.1 for the Gaussian-path theory used in our velocity composition result. In the bridge problem we regress two targets between the given target distributions: the velocity generated by the interpolation and the score generated by the noise scheduler . The training objectives are
(2) where the expectations are over , , and . The minimisers define the marginal velocity and score fields
where is the probability density of . For a later derivation we will also need that, by Tweedie's identity, the Gaussian noise component implies that . With these two fields trained, we can sample the stochastic interpolant deterministically (ODE) or stochastically (SDE). For ODE-based sampling only the velocity is needed:
For SDE-based sampling the score is also needed explicitly to control the amount of injected noise:
where is a sampling noise scheduler, which is distinct from the training scheduler . Empirically choosing them to be equal , works well. All SDEs, regardless of the noise scheduler, share the same marginal as the probability-flow ODE.
3.2 EXACT COMPOSITIONS OF SCORES
For diffusion models, exact logical composition was developed by Alesiani et al. (2026). There only the score enters the reverse-time dynamics, so it is natural to work with posterior logical scores rather than with conditional densities directly. Let be a set of atomic predicates (e.g. atomic conditions), and let be a Boolean formula over built from conjunction, disjunction, and negation. For and , define the backward truth probability and the logical score
where means that the terminal state satisfies . By Bayes' rule, the conditional score, used for generation, satisfies . For an atomic predicate , the corresponding logical score can be obtained from a conditional and an unconditional score network as . Exact composition is possible whenever admits a probabilistic-circuit representation whose conjunction nodes combine conditionally independent subformulas and whose disjunction nodes combine conditionally independent or mutually exclusive subformulas (Alesiani et al., 2026). The exact recursive formulas are given in Appendix A.1. Under these conditions, the composed conditional score is an affine combination of the atomic conditional scores: letting denote the number of atoms appearing in , there exist coefficients , determined recursively from the posterior estimates , such that
In practice the atomic posteriors are estimated with a noise- and time-aware classifier, while the score terms come from the trained conditional and unconditional networks.
4 METHOD
We first characterize when logical composition extends from scores to velocities (Section 4.1), identify exactly where this extension fails for general stochastic interpolants (Section 4.2), and then describe our sampling method (Sections 4.3 and 4.4) which resolves the problems.
4.1 GAUSSIAN-PATH LOGICAL COMPOSITION
We generalize LogDiff-style guidance (Alesiani et al., 2026) to Gaussian-path flow matching, where the source distribution is Gaussian, and show that velocity composition in the sense of LogDiff is then exact (Proposition 1). Throughout, we take , . On such a path the conditional velocity is an affine function of the conditional score, , with coefficients that depend on but not on the conditioning. This is true for every terminal condition determined by whose noising kernel is independent of given . This relation is standard, see e.g. Zheng et al. (2023). We restate it with the explicit coefficients as Lemma 1 in Appendix A.2. Combining it with the compositionality of the scores gives the logical composition rule for velocities. (Equation (7))
Proposition 1 (Exact logical velocity composition on Gaussian paths). Let be a Boolean formula whose score satisfies the linear combination form of Section 3.2 and the coefficients of LogDiff. On the Gaussian path above,
This is a sufficiency result: because are independent of the conditioning, the composed score of Section 3.2 induces the matching composed velocity, whereas necessity of the affine relation is not established. Proofs are in Section A.2 and the recursive formulas for the in Section A.1. For general stochastic interpolants this rule becomes invalid in general, while negation and exclusive disjunction remain exact, as we show next.
4.2 VELOCITY COMPOSITION ON GENERAL STOCHASTIC INTERPOLANTS
We now drop the Gaussian-path assumption and return to the general stochastic-interpolant framework of Section 3.1: with (both possibly non-Gaussian), and
with the same boundary conditions on and as in the preliminaries. As in Section 4.1, we seek a relation between the conditional velocity and score. For a general stochastic interpolant, the marginal velocity admits the decomposition
which separates a conditioning-dependent drift from a score term whose coefficient depends on only. This identity is established in the theoretical analysis of Albergo et al. (2025). It is then natural to test whether LogDiff composition, exact for scores, remains exact when applied directly to velocities. We define and as
Since the score term in Equation (10) composes exactly, i.e. (under the assumptions given in Section 3.2), the question of when Equation (11) is exact reduces entirely to the drift: the two fields differ exactly by . By writing , we define the logical drift moment of a subformula as
Both and are linear in the indicator , so every Boolean operation is inherited exactly except conjunction (and therefore also for CI-disjunction, since ), where weights the drift by a product of indicators that does not reduce to the atomic moments (see Lemma 2 in the Appendix). Two consequences follow, one positive (Theorem 1) and one negative (Theorem 2).
Theorem 1 (Exact velocity composition for negation and mutual exclusive disjunction). For any interpolant , noise schedule , coupling and endpoints , the NOT rule (whenever ) and the OR-ME rule (whenever ) of Section A.1 are exact for velocities. Consequently, if admits a probabilistic-circuit representation containing no conjunction or CI-disjunction node, then on every stochastic interpolant.
For conjunction the obstruction can be computed in closed form, and it turns out to be an interaction between the atomic conditions.
Theorem 2 (Exact obstruction for conjunction). Let , assume the atoms are conditionally independent given in a neighbourhood of with , so that LogDiff's AND rule gives the exact composed score and , and let , , be the four cell-conditional drifts, where and . Then, for every interpolant , noise schedule , coupling and endpoints ,
The bias thus factorises into a purely probabilistic prefactor and the drift interaction . Composition at a conjunction is therefore exact if and only if , in particular whenever the conditional drift is additive in the truth values of the atoms, , and asymptotically as .
The same computation applies at any conjunction node with conditionally independent children, so each such node contributes a residual of the form Equation (14). Composed velocities are exact only if all of these vanish or cancel, which does not hold in general, as the counterexample in Section A.3 shows. The same applies to CI-disjunction through . Proofs are in Appendix A.3. Remark 2 shows that Gaussian-path structure forces . Since a logical statement containing conjunctions cannot be used to combine velocities, we need a sampler that still enforces conformity, even when the velocity composition is not exact.
Remark 1 (Scores still compose exactly). The obstruction in Theorem 2 is specific to general composed velocities. The composed conditional score from Section 3.2 remains exact on general stochastic interpolants under the same conditional-independence and exclusivity assumptions as in LogDiff.
4.3 GUIDING GENERAL STOCHASTIC INTERPOLANTS
In the general bridge problem, the probability-flow ODE and its equivalent SDE family share the marginals , but only the score can be composed exactly for general logical statements (Remark 1). We therefore split sampling into two roles: (i) a transport step advances mass toward , and (ii) exact composed scores re-equilibrate each sample to the correct conditional marginal .
Transport-re-equilibration. On a time grid with step , each outer iteration first takes a single transport step along , using either the ODE or SDE transport (Line 9 and 11 of Algorithm 1, a hyperparameter of our method). It then runs overdamped Langevin correctors at fixed after transport,
initialized at the transported state, with independent, for . As in diffusion sampling, correctors are not applied at the endpoints, where the score is undefined. We have picked as Langevin step size to not introduce a new hyperparameter. In principle one can choose other step sizes, and we discuss this in Appendix B.5. The conditional score is assembled from the atomic conditional scores via Section 3.2. For an algorithmic depiction, see Algorithm 1, Algorithm 2 and Algorithm 3 in the appendix. For an discussion about the consistency of this equilibration see Section A.4.
4.4 PROXY VELOCITY FOR TRANSPORT
A natural, easy to compute transport step uses the unconditional velocity, . However, this step advances the sample along trajectories that are typically misaligned with , therefore requiring many Langevin equilibration steps to re-equilibrate with the logical marginal at each noise level. We instead propose to use the Gaussian-path composition rule Equation (11) as a proxy velocity , evaluated with the atomic conditional velocities of the trained stochastic interpolant. Outside the Gaussian-path regime this field is not equal to the true conditional velocity in general (Theorem 2), but it is the unique velocity that would be correct if the affine relation of Lemma 1 held. Additionally, by Theorem 1 it is exact at every negation and exclusive-disjunction node of , which is what makes Equation (11) a good transport

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 . Rand-2/Rand-3 are random depth-2/3 expressions. (right) FID as a function of corrector steps at matched NFE. For overview reasons only Rand-2/Rand-3 are shown, for all of the experiments see Figure 8.
field despite not being the conditional velocity in general. Empirically it reduces the burden on the corrector as shown in the experiment section.
5 EXPERIMENTS
We evaluate LOGSI on three domain-transfer benchmarks that test logical composition under non-Gaussian endpoints. In each setting we train a stochastic interpolant transporting a source distribution to a target distribution , then sample from subject to a Boolean constraint over semantic attributes. Atoms are class-conditional velocity and score networks, plus noise-aware classifiers for the posterior weights in disjunctions and negations (Section B). All results are averaged over 3 training and evaluation runs.
Baselines and compute matching. We compare our method against two composition-only baselines without score re-equilibration (): CompVel, deterministic ODE integration of the composed proxy velocity in Equation (11) (the analogue of LogDiff-style guidance (Alesiani et al., 2026)), and CompSI, SDE integration that combines that velocity with the exactly composed score. Our sampler is run as LOGSI-ODE and LOGSI-SDE, using the ODE or SDE predictor of Algorithm 1 with Langevin correctors at fixed . For the logical AND we additionally report Oracle-ODE/SDE: compute-matched CFG on the joint label (guidance weight 1), without composition or score correction. All main-text comparisons are compute-matched in number of function evaluations (NFE): each LOGSI run with outer steps and correctors is matched against the corresponding baseline with enough extra integration steps to equalise the budget (LOGSI-ODE against CompVel, LOGSI-SDE against CompSI), which isolates score-based re-equilibration from simply spending more network calls on transport.
Metrics. Our primary metric is logical conformity: the fraction of generated samples whose attributes satisfy . On the image benchmarks attributes are read off by a held-out evaluator classifier, distinct from the noise-aware classifier that drives sampling. On QM9 they are recomputed from the generated structure with RDKit (RDKit contributors), along with chemical validity, and conformity is measured only over valid molecules. For images we additionally report FID against an expression-conditioned reference set (real images whose ground-truth attributes satisfy the same ) and LPIPS to the source image. For QM9 we report validityconformity, source-to-sample Kabsch root mean square deviation (RMSD), and novelty. Full definitions are in Section B.4.
EMNIST to CMNIST transfer. We train paired ResNet (He et al., 2016) velocity and score models transporting greyscale EMNIST (Cohen et al., 2017) letters (a--e, A--E) to Colored MNIST digits (LeCun et al., 1998; Gaudi et al., 2025), so each source letter is edited into a digit satisfying the logical rule. Atoms are Digit() and Color() for . We evaluate fixed templates (AND, OR, OR, AND) and randomly generated expression trees of depth two and three over

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 . (right) FID as a function of corrector steps 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 . The dotted line marks the RMSD between random QM9 molecules. (right) Novelty of generated molecules vs. .
the same atoms. Section B.2 states which disjunction rule applies to which formula. Figure 2 summarizes the compute-matched comparison. Adding correctors improves conformity by up to 14 pp over CompSI in the AND case and up to 4 pp on random depth-three expressions, where the smaller gain may be caused by the already high conformity . FID also decreases with more correctors, falling below the baselines, so re-equilibration improves fidelity as well as conformity rather than trading one for the other. OR still benefits from correctors because Theorem 1 is exact only for the true fields, whereas learned velocities, classifier posteriors, and discretization remain approximate. ODE and SDE transport are indistinguishable at larger . Oracle-SDE matches the baselines while being stronger at small , and Oracle-ODE is worse throughout. Further metrics are in Figure 8: LPIPS to the source grows with but stays below the LPIPS of random source-target pairs, so edits remain close to their source.
CelebA transfer. Inspired by Shi et al. (2023), we transport CelebA (Liu et al., 2015) female images () to male images (), training two SiT models (Ma et al., 2024) for velocity and score in the FLUX.1-schnell VAE (Black Forest Labs, 2024) latent space. Logical atoms are the two attributes Hat and Glasses, and we test the statements AND, OR, and AND¬. Posterior weights for OR and negation come from a time-conditioned latent SiT classifier (Section B). Figure 3 reports the compute-matched results. Conformity again rises with correctors, by up to 18 pp over the baseline. Similarly to CMNIST, FID also decreases past the baseline values, and the ODE and SDE predictors perform comparably. Additionally, both Oracle baselines perform worse. As on CMNIST, LPIPS to the source image grows with but stays below the random source–target LPIPS (Figure 7), so edited faces remain close to their source seed.
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.
| 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 |
| ½ v_t(x|c_1) + ½ v_t(x|c_2) 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 |
QM9 molecular editing. On QM9 (Ramakrishnan et al., 2014; Ruddigkeit et al., 2012) we train EGNN (Satorras et al., 2021) (as in Hoogeboom et al. (2022)) velocity and score models that bridge source to target molecular graphs, both drawn from QM9. Unlike mirror interpolants that connect a sample to itself, we use a random coupling so that any molecule can be transported to any other, enabling editing. Atoms are binary molecular attributes. Our main statement pairs has_rings=1 with has_oxygen=1 under AND, OR_c1, and AND¬. Each sample is initialized from a concrete source graph whose labels violate , so conformity measures whether the sampler can create the constraint from a non-conforming start (Section B). Figure 4 reports the compute-matched results, a stricter test than the image benchmarks since a sample must be chemically valid and rule-conforming. Validity×conformity rises with the corrector budget by up to 16 pp over the baseline. Decomposing the product (Figure 9) reveals a trade-off: conformity among valid molecules rises while validity loses. Since exact re-equilibration targets , whose samples are valid by construction, we read this loss as finite- approximation error rather than as a property of the guidance target. As expected, the Kabsch RMSD to the source grows with , reaching around 1.4 Å, but stays well below the RMSD between random QM9 molecules (dotted line), so edits remain local. Novelty likewise grows with . As before, ODE and SDE transport differ little at large , and both Oracle baselines perform worse than the proposed method.
Transport-velocity ablation. It is a priori unclear which transport velocity is best, so we compare our Gaussian-path proxy velocity Equation (11) against the unconditional velocity , against no transport step at all, and against the equal-weight average , i.e. Liu et al. (2022)'s weighted score composition applied to velocities instead of scores (Tables 1 and 4). The proxy velocity yields higher conformity across all three benchmarks, confirming the design choice of Section 4.4. We report ODE transport here, and the SDE variant (Table 5) shows the same trend.
6 CONCLUSION
We studied logical composition for stochastic interpolants that transport between non-Gaussian source and target distributions. While conditional scores compose exactly in the LogDiff sense on general interpolants, the analogous velocity rule survives only in part: negation and exclusive disjunction remain exact on any interpolant, whereas conjunction, and hence any formula containing one, is exact only on Gaussian-path bridges. LOGSI therefore separates roles: a proxy composed velocity advances samples along the interpolant, and exactly composed conditional scores re-equilibrate them toward at each timestep. Across EMNIST-to-CMNIST, CelebA, and QM9 editing benchmarks, this transport–re-equilibration procedure improves logical conformity at matched network-evaluation budget over composed-velocity baselines, for both fixed Boolean templates and randomly generated formulas. It additionally improves fidelity (FID) on the image benchmarks and novelty on QM9. More broadly, the same score-based viewpoint may extend to other bridge learners and to settings where logical combinations of constraints arise together with non-Gaussian transport.
REFERENCES
Michael Albergo, Nicholas M Boffi, and Eric Vanden-Eijnden. Stochastic interpolants: A unifying framework for flows and diffusions. Journal of Machine Learning Research, 26(209):1–80, 2025.
Michael Samuel Albergo, Mark Goldstein, Nicholas Matthew Boffi, Rajesh Ranganath, and Eric Vanden-Eijnden. Stochastic interpolants with data-dependent couplings. In International Conference on Machine Learning, pp. 921–937. PMLR, 2024.
Francesco Alesiani, Jonathan H Warrell, Tanja Bien, Henrik Christiansen, Matheus Ferraz, and Mathias Niepert. Logical guidance for the exact composition of diffusion models. In Forty-third International Conference on Machine Learning, 2026.
Black Forest Labs. Flux.1 [schnell]. https://github.com/black-forest-labs/flux, 2024.
Peter Blohm and Vikas K Garg. Composition of pretrained diffusion models: A logic-based calculus. In The Fourteenth International Conference on Learning Representations, 2026. URL https://openreview.net/forum?id=ADLiUSC7Qm.
Gregory Cohen, Saeed Afshar, Jonathan Tapson, and Andre Van Schaik. Emnist: Extending mnist to handwritten letters. In 2017 international joint conference on neural networks (IJCNN), pp. 2921–2926. IEEE, 2017.
Valentin De Bortoli, James Thornton, Jeremy Heng, and Arnaud Doucet. Diffusion schrödinger bridge with applications to score-based generative modeling. Advances in neural information processing systems, 34:17695–17709, 2021.
Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis. Advances in neural information processing systems, 34:8780–8794, 2021.
Yilun Du, Conor Durkan, Robin Strudel, Joshua B Tenenbaum, Sander Dieleman, Rob Fergus, Jascha Sohl-Dickstein, Arnaud Doucet, and Will Sussman Grathwohl. Reduce, reuse, recycle: Compositional generation with energy-based diffusion models and mcmc. In International conference on machine learning, pp. 8489–8510. PMLR, 2023.
Ruiqi Feng, Chenglei Yu, Wenhao Deng, Peiyan Hu, and Tailin Wu. On the guidance of flow matching. In International Conference on Machine Learning, pp. 16993–17029. PMLR, 2025.
Sachit Gaudi, Gautam Sreekumar, and Vishnu Boddeti. Coind: Enabling logical compositions in diffusion models. In Y. Yue, A. Garg, N. Peng, F. Sha, and R. Yu (eds.), International Conference on Representation Learning, volume 2025, pp. 32159–32191, 2025.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
Geoffrey E Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8):1771–1800, 2002.
Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance, 2022. URL https://arxiv.org/abs/2207.12598.
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840–6851, 2020.
Emiel Hoogeboom, Victor Garcia Satorras, Clément Vignac, and Max Welling. Equivariant diffusion for molecule generation in 3d. In International conference on machine learning, pp. 8867–8887. PMLR, 2022.
Puming Jiang, Meiyi Wang, Kelvin Lin, Ce Hao, and Harold Soh. Guided streaming stochastic interpolant policy. arXiv preprint arXiv:2605.10051, 2026.
Wolfgang Kabsch. A solution for the best rotation to relate two sets of vectors. Foundations of Crystallography, 32(5):922–923, 1976.
Yann LeCun, Corinna Cortes, and Christopher J.C. Burges. The MNIST database of handwritten digits, 1998. URL http://yann.lecun.com/exdb/mnist/.
Yaron Lipman, Ricky TQ Chen, Heli Ben-Hamu, Maximilian Nickel, and Matthew Le. Flow matching for generative modeling. In The Eleventh International Conference on Learning Representations, 2023.
Guan-Horng Liu, Arash Vahdat, De-An Huang, Evangelos Theodorou, Weili Nie, and Anima Anandkumar. I2sb: Image-to-image schrödinger bridge. In International Conference on Machine Learning, pp. 22042–22062. PMLR, 2023.
Nan Liu, Shuang Li, Yilun Du, Antonio Torralba, and Joshua B Tenenbaum. Compositional visual generation with composable diffusion models. In European conference on computer vision, pp. 423–439. Springer, 2022.
Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In Proceedings of the IEEE international conference on computer vision, pp. 3730–3738, 2015.
Nanye Ma, Mark Goldstein, Michael S Albergo, Nicholas M Boffi, Eric Vanden-Eijnden, and Saining Xie. Sit: Exploring flow and diffusion-based generative models with scalable interpolant transformers. In European Conference on Computer Vision, pp. 23–40. Springer, 2024.
Ethan Perez, Florian Strub, Harm De Vries, Vincent Dumoulin, and Aaron Courville. Film: Visual reasoning with a general conditioning layer. In Proceedings of the AAAI conference on artificial intelligence, volume 32, 2018.
Raghunathan Ramakrishnan, Pavlo O Dral, Matthias Rupp, and O Anatole von Lilienfeld. Quantum chemistry structures and properties of 134 kilo molecules. Scientific Data, 1, 2014.
RDKit contributors. RDKit: Open-source cheminformatics. https://www.rdkit.org.
Lars Ruddigkeit, Ruud Van Deursen, Lorenz C Blum, and Jean-Louis Reymond. Enumeration of 166 billion organic small molecules in the chemical universe database gdb-17. Journal of chemical information and modeling, 52(11):2864–2875, 2012.
Chitwan Saharia, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily L Denton, Kamyar Ghasemipour, Raphael Gontijo Lopes, Burcu Karagol Ayan, Tim Salimans, et al. Photorealistic text-to-image diffusion models with deep language understanding. In Advances in Neural Information Processing Systems, 2022.
Victor Garcia Satorras, Emiel Hoogeboom, and Max Welling. E (n) equivariant graph neural networks. In International conference on machine learning, pp. 9323–9332. PMLR, 2021.
Yuyang Shi, Valentin De Bortoli, Andrew Campbell, and Arnaud Doucet. Diffusion schrödinger bridge matching. Advances in neural information processing systems, 36:62183–62223, 2023.
Marta Skreta, Lazar Atanackovic, Joey Bose, Alexander Tong, and Kirill Neklyudov. The superposition of diffusion models using the itô density estimator. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=2o58Mbqkd2.
Jascha Sohl-Dickstein, Eric A. Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics, 2015. URL https://arxiv.org/abs/1503.03585.
Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020.
Yang Song and Stefano Ermon. Generative modeling by estimating gradients of the data distribution, 2020. URL https://arxiv.org/abs/1907.05600.
Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations, 2021.
Joseph L Watson, David Juergens, Nathaniel R Bennett, Brian L Trippe, Jason Yim, Helen E Eisenach, Woody Ahern, Andrew J Borst, Robert J Ragotte, Lukas F Milles, et al. De novo design of protein structure and function with rfdiffusion. Nature, 620(7976):1089–1100, 2023.
Qinqing Zheng, Matt Le, Neta Shaul, Yaron Lipman, Aditya Grover, and Ricky TQ Chen. Guided flows for generative modeling and decision making. arXiv preprint arXiv:2311.13443, 2023.
A METHOD DETAILS
A.1 RECURSIVE COMPOSITION RULES
Scores. As stated in the main text, exact composition is possible whenever admits a probabilistic-circuit representation whose conjunction nodes combine conditionally independent subformulas and whose disjunction nodes combine either conditionally independent or mutually exclusive subformulas (Alesiani et al., 2026). In that case, and can be computed recursively from the atomic quantities. Writing for posterior estimates of subformulas , the main rules are
(Atomic)
(16)
(NOT)
(17)
(AND)
(18)
(OR-CI)
(19)
(OR-ME)
(20)
with matching recursive rules for given in Alesiani et al. (2026). For each disjunction one uses the OR-CI rule if the subformulas are conditionally independent given , and the OR-ME rule if they are mutually exclusive.
Velocities. Under the same conditions as above, the velocities of Gaussian path FM combine in a very similar way as the scores. Here is the conditional velocity field and is the unconditional velocity field. By Theorem 1 the Atomic, NOT and OR-ME rules below are exact for velocities on any stochastic interpolant. Only the AND rule, and through inclusion-exclusion the OR-CI rule, require the Gaussian-path assumption, with the error of the AND rule given in closed form by Theorem 2.
(Atomic)
(21)
(NOT)
(22)
(AND)
(23)
(OR-CI)
(24)
(OR-ME)
(25)
The recursive rules for the noise aware classifiers stay also the same as above.
A.2 PROOF OF GAUSSIAN-PATH RESULTS
Lemma 1 (Affine velocity-score relation). Let with independent of , and let be a terminal condition determined by whose noising kernel is independent of given . Then for every
where the coefficients depend on only, not on . In particular .
Proof of Lemma 1. Let with , and let be any conditioning event under which the noising kernel does not depend on directly, only through the law of :
Since holds surely, taking the conditional expectation defining the marginal velocity field,
using that enters linearly, so the substitution can be pushed through the expectation term by term.
By equation 27 and Bayes' rule, , and differentiating under the integral sign with gives the Tweedie-type identity
Substituting equation 29 into equation 28:
Thus with as in the statement, independent of . Taking to be the trivial conditioning event gives .
Proof of Proposition 1. By Lemma 1, for any conditioning label c,
Hence
(33)
because we used equation 7 in the first step, and the terms cancel identically in the last substitution.
A.3 LOGICAL RULES FOR VELOCITIES
We first record the reduction of the problem to the drift, then state and prove Lemma 2, prove Theorem 1 including its circuit consequence, prove Theorem 2 in both of its forms, and finally give the explicit counterexample.
Obstruction in the drift. Using equation 10, expand from equation 11 as
where and we used the exact score identity equation 7. Comparing with , the score terms cancel and
Thus iff
Therefore, the property of velocity compositionality reduces to the property of the compositionality of drifts.
Drift moments and Boolean algebra
Lemma 2 (Drift moments and Boolean algebra). Let and with , and let be subformulas with . Then, with as in Equation (12),
together with and . These identities hold for any interpolant , noise schedule , coupling and endpoints , with no independence or exclusivity assumption.
Proof of Lemma 2. Fix and with , and let be the conditional density of given , so that and . For , the conditional law of given is restricted to and renormalised by , hence
Both and are linear in the indicator , so the remaining identities follow from the pointwise Boolean identities
□
Exact rules: negation and exclusive disjunction
Proof of Theorem 1. Writing for the logical velocity of a subformula, the two rules to be proved are
which are the NOT and OR-ME rules of Section A.1. Write , and , so that Equation (10) reads with independent of the conditioning event. It suffices to show that the linear combinations of the drifts is the same as the scores (Section A.1).
Negation. By Lemma 2, and , so
The coefficients agree with the rules for the score (Section A.1), which gives the NOT rule.
Exclusive disjunction. If then and by Lemma 2 and Equation (39), hence
Here, the weights are again the same as the scores (Section A.1). Adding times the score identities to the drift identities yields Equations (40) and (41).
Conjunction-free circuits. The second claim follows by induction over the circuit. At a leaf, holds by definition and in practice is supplied by the noise-aware classifier. If the children of a node are exact, then Equations (40) and (41) show that a negation or exclusive-disjunction node returns the exact logical velocity of its subformula, and the accompanying posterior recursions and are exact by Lemma 2. The value at the root is therefore , i.e. . A conditionally independent disjunction is not covered, because contains a conjunction moment. This obstruction, which this creates is covered in Theorem 2.
The obstruction at conjunction
Proof of Theorem 2. Define the following function,
We first show that the difference of proxy and true velocity equals , and then convert this into the form given in the main text Equation (13).
For put and , with and , and abbreviate , , , ; by Lemma 2, . Expanding the product in Equation (44) and using linearity of the conditional expectation,
Conditional independence gives , so dividing Equation (45) by and using from Lemma 2,
because the AND coefficients are , for which . Conditional independence also makes the composed score exact, so Equation (35) applies and
Next we show how to convert this into the statement in the main text.
Write and , and let all expectations be under . All four cells then carry positive mass, so the cell-conditional drifts are well defined. Conditioning additionally on the pair and using the tower property,
Since is a function on , it has the exact multilinear expansion
with , and ; the coefficient of the product term is the mixed second difference Equation (14). Conditional independence of together with gives
so only the interaction term of Equation (49) survives,
Substituting into Equation (47) gives , which is Equation (13). Since , the bias vanishes if and only if , equivalently , and the two limiting cases in the statement follow by inspection of the prefactor.

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.
Remark 2 (Gaussian paths force the residual to vanish). On the Gaussian path of Section 4.1, with independent of and , the relation holds surely, so
Given the drift is thus an affine function of with coefficients that do not depend on the conditioning, and by the Tweedie identity equation 29 the conditional mean is an affine function of with -independent coefficients. Exact score composition equation 7 therefore propagates to the drifts, , i.e. in Theorem 2. This is the mechanism behind Proposition 1. Since the two indicator variances are strictly positive for , Equation (52) then also gives : on a Gaussian path, conditional independence of the atomic events already forces additivity of the cell-conditional drifts. It is exactly this implication that non-Gaussian endpoints destroy.
Now that we have seen that the problem is inside the drift part of the velocity field, we can construct an explicit FM counterexample.
Explicit counterexample. We now give a construction where the atoms are exactly conditionally independent given , so LogDiff's CI-AND score rule with is the exact composed score, while the LogDiff velocity composition still fails.
We use the flow-matching bridge with independent coupling. Fix cluster centres and a small cluster half-width with (so the intervals are disjoint). Take
with large (concretely ). The source is non-Gaussian, so we are not on a Gaussian-path bridge. Define atoms and formula
(55) and evaluate at . At , , so a change of variables gives the conditional density of given :
Define
For every and every , one has , so the indicator is 1 and is constant in . By Bayes' rule,
so the posterior of given equals throughout , with mass on each cluster . In particular, , and throughout this neighborhood
Thus holds locally around . The corresponding probability identity can therefore be differentiated with respect to , and LogDiff's CI-AND rule gives the exact composed score at .
Velocities and LogDiff velocity composition. For and linear I,
which at , becomes . Since each cluster is symmetric around its centre and receives uniform weight, exactly, hence:
The LogDiff velocity composition (with the correct CI-AND coefficients ) evaluates to
(62)
Interpretation. Consistent with equation 35, , and the residual is
matching -13.5 - (-10) = -3.5. The drift residual vanishes exactly when the four values form a parallelogram, , a condition independent of the CI condition on the atomic probabilities. Choosing to satisfy uniform posterior (which yields CI at ) but to violate therefore isolates the failure of velocity composition from the score composition, which is exact at this point.
Remark 3 (The counterexample and Theorem 2). The four clusters are exactly the four cells of the atom pair, , , and , with cell-conditional drifts for the corresponding cluster j. The mixed second difference Equation (14) is therefore
and since , Equation (13) predicts the residual , matching the direct computation above. Equivalently, by Equation (52), and . The “parallelogram” condition is thus precisely the vanishing of the drift interaction , which by Theorem 2 is the exact criterion for velocity composition at a conjunction, and which is logically independent of the conditional independence of the atoms holding here.
A.4 CONSISTENCY OF THE EQUILIBRATION
For fixed , the continuous-time Langevin dynamics corresponding to Equation (15), driven by the exact composed score , admit as an invariant distribution. Under standard regularity and ergodicity assumptions, these dynamics therefore re-equilibrate the sample toward the desired logical marginal, independently of the preceding transport along . The updates in Equation (15) form the corresponding Euler-Maruyama approximation. Their accuracy improves as decreases and the effective equilibration time increases. In the joint limit and , the corrector recovers at that fixed time. At finite , the choice of remains important because a well-aligned transport step provides a better initialization for re-equilibration. Taking and yields score-only Langevin dynamics at fixed . In principle, writing Equation (15) as a Langevin step with step size shows that this coefficient is a free hyperparameter of our method, and could be chosen differently. Unless stated otherwise we use this schedule-tied default. Reasons for this choice and an ablation are given in Appendix B.5.
A.5 ALGORITHMS
Algorithm 1 LOGSI: logical sampling with transport-re-equilibration guidance
Require: Boolean formula ; initial state ; grids ; equilibration budget ; flags ODE, PROXY
1: for do 2: ; 3: if PROXY then 4: Algorithm 2 5: Equation (11) 6: else 7: 8: if ODE then 9: ODE transport 10: else 11: Algorithm 3 12: SDE transport 13: if then 14: 15: for do 16: Algorithm 3 17: corrector, Equation (15) 18: return
Algorithm 2 COMPOSEWEIGHTS: recursive LogDiff coefficients (Section 3.2)
Require: Boolean formula over atoms ; state ; time ; classifier posteriors
Ensure: coefficients such that
1:
2: return
3: function LOGICALWEIGHTS() returns with
4: if is atomic then
5:
6: return
7: else if then
8:
9: return NOT
10: else if then
11: ;
12: return AND
13: else if and mutually exclusive then
14: ;
15:
16: return OR-ME
17: else if and conditionally independent then
18: ;
19:
20:
21: return OR-CI
Algorithm 3 COMPOSESCORE: LogDiff score composition via composed weights (Sections A.1 and 3.2)
Require: Boolean formula ; state ; time ; atomic networks
Ensure: composed conditional score
1: Algorithm 2
2: return Equation (7)
A.6 RELATION TO SUPERDIFF
SuperDiff Skreta et al. (2025) introduce a method to track changes in the conditional densities along a sample path without training a noise-aware classifier. Their Theorem 1 gives an Itô estimator for . In principle, this construction could also be applied to stochastic interpolants and bridges as in our setting, although they only develop it for diffusion models.
For logical AND, they choose weights (with ) by requiring equal infinitesimal density updates, , and transport the state with a -weighted linear combination of the atomic SDE drifts, so that in expectation the endpoint is equally likely under each conditional model, for all . Crucially, matching the increments along the trajectory only pins down terminal densities up to the initial gap: integrating from 0 to 1 gives
so the construction lands on the AND manifold only when the initial laws already agree, for all . This is true for standard diffusion models, where generation begins from a shared Gaussian independent of the condition, but fails in our bridge setting: we do not start from noise but from explicit samples , and in general . By equation 65, the endpoint gap then equals the initial gap and the resulting sample is not on the AND manifold.
A further practical difference concerns the divergence term in their density update. For VP/OU diffusion, in Theorem 1 is available in closed form because the forward drift is linear. For general stochastic interpolants one would instead need div of each atomic drift , which for neural must be estimated stochastically at every step (e.g. via Hutchinson's estimator), adding per-step cost and variance to the density updates rather than being a fundamental obstruction.
For these reasons we do not compare against SuperDiff in our experiments. Adapting their density-tracking construction to bridge interpolants, either by re-deriving the AND weights so that equation 65 is closed by the choice of , or by initialising from a coupling under which the initial gap vanishes, is a natural future direction.
B EXPERIMENTAL DETAILS
B.1 TRAINING HYPERPARAMETERS
Training hyperparameters for the velocity and score networks are summarised in Table 2, architecture and evaluation-metric details follow in subsequent subsections.
Table 2: Training hyperparameters for our experiments. CFG dropout means the probability with which the condition is exchanged with the unconditional symbol.
| Hyperparameter | CMNIST | CelebA | QM9 |
|---|---|---|---|
| Epochs | 500 | 500 | 500 |
| Batch size | 1024 | 64 | 128 |
| Learning rate | |||
| Weight decay | 0.01 | 0.01 | |
| Noise scheduler | |||
| Optimizer / scheduler | AdamW + cosine annealing to 0 over training | ||
| CFG dropout | 20% per-label / per-atom unconditional tokens | ||
B.2 DATASETS AND TRANSFER PROTOCOLS
EMNIST to CMNIST. The source distribution is the EMNIST dataset restricted to ten letter classes (, A-E), the target distribution is the Colored MNIST dataset with ten digit and ten
Table 3: Classifier accuracies for the metrics used in the CMNIST and CelebA experiments.
| Dataset | Attribute | Accuracy |
|---|---|---|
| CMNIST | Digit | 0.996 |
| Color | 1.000 | |
| Joint | 0.996 | |
| CelebA | Glasses | 0.993 |
| Hat | 0.986 | |
| Joint | 0.979 |
colour classes (10 colours are multiplied by the greyscale MNIST samples). Images are rendered as 28×28 RGB tensors in [0, 1]. Each sample is initialised from a concrete source image and transported toward CMNIST while enforcing a Boolean formula over Digit() and Color() atoms. We evaluate fixed templates (AND, OR, OR, AND) and randomly generated expression trees of depth two-three over the same atom vocabulary, while ensuring that conditional independence and mutual exclusivity hold. Cross-axis formulas such as Digit() Color() use the OR-CI rule of Section A.1, while same-axis pairs such as Digit() Digit() (or the analogue for colours) use OR-ME.
CelebA. We train a stochastic interpolant from CelebA female to male images in the latent space of the FLUX.1-schnell VAE (16 channels, 16×16 spatial resolution). Logical atoms are two binary CelebA attributes: Glasses and Hat. We test the logical statements AND, OR-CI, and AND. Decoded outputs are evaluated at 128×128 in pixel space.
QM9. We bridge noisy source molecules drawn from the QM9 dataset (matched in atom count to each target) to target molecules from QM9. Each graph carries 3D coordinates and a 5-way atom-type vector over , coordinates are center-of-mass centred. Atoms are binary molecular attributes (ring presence, oxygen presence, etc.) composed with the same LogDiff rules as in Section 3.2. The main logical statement pairs has_rings= 1 with has_oxygen= 1 under AND, OR-CI, and AND. Bridge sources are restricted to molecules whose ground-truth labels violate the rule, so conformity measures whether the sampler can create the constraint from a non-conforming start.
B.3 MODEL ARCHITECTURES
Each benchmark uses a separate trained velocity network , and score network . A time-aware classifier for posterior weights in OR / negation, and a held-out evaluator for the conformity metric is also trained (the molecular experiments uses rdkit as conformity metric). All the models were trained in a CFG way, to directly predict unconditioned and conditioned output with the same model.
B.3.1 EMNIST TO CMNIST
Velocity and score fields. Both fields are U-Net-style ResNets with base width 96, conditioning dimension 64, and 3-channel 28×28 inputs. The encoder-decoder has three downsample stages (average pooling) and skip connections; residual blocks use FiLM-style modulation(Perez et al., 2018) from the combined (digit, colour, ) embedding. The velocity head outputs a 3-channel field, the score head outputs a 3-channel score and, on its bottleneck features, two auxiliary classifiers (digit and colour logits) used at sampling time.
Noise-aware classifier (guidance). During sampling, atom log-probabilities for dis-junction and negation are read from the score network's auxiliary heads: the model is queried with the unconditional wildcard label on both axes, and log-softmax probabilities are taken for the atom's digit or colour value at the current . No separate guidance classifier is trained for CMNIST.
Conformity evaluator. Rule conformity on generated images is measured with a held-out classifier: ResNet18 adapted for 28×28 inputs (3×3 stem, no initial max-pool) with separate linear heads for digit and colour. This model is trained only on clean Colored MNIST and is not used inside the sampler. Accuracy of the classifier is reported in Table 3.
B.3.2 CELEBA
Velocity and score fields. Both fields are class-conditional SiT transformers trained on 16×16 VAE latents with 16 input channels, patch size 1, hidden size 384, depth 12, and 6 attention heads. CelebA's 40 binary attributes are embedded with a multi-label encoder (per-attribute 3-way tables: negative / positive / wildcard) and summed with a sinusoidal timestep embedding. Outputs are unpatchified to a 16-channel velocity or score field in latent space.
Noise-aware classifier (guidance). OR and AND¬ require time-conditioned atom posteriors on the noisy latent . We train a SiT model on the same latent geometry (patch size 2, hidden size 192, depth 6, 6 heads) with timestep conditioning only. The model outputs 40 independent logits; at step the probability that attribute equals value is if and if . With probability 0.1 during classifier training, and clean latents are shown so the network is calibrated near the source endpoint.
Conformity evaluator. After VAE decoding to 128×128 RGB, conformity uses a ResNet classifier trained on male CelebA samples with a 40-way sigmoid head (as a training starting point the ResNet classifier was initialized with the ImageNet trained weights). Accuracy of the classifier is reported in Table 3 (Only the tested attributes are reported).
B.3.3 QM9
Velocity and score fields. Both fields are EGNNs built on fully connected molecular graphs (all ordered atom pairs within each molecule). We use the EDM-stabilised EGNN variant with hidden size 256, depth 9, and 5 atom-type channels. Node inputs are continuous one-hot atom vectors and 3D coordinates; a conditioning module adds a sinusoidal time embedding plus embeddings for the binary graph labels (has_rings= 1, has_oxygen= 1 etc.), each with an extra “unknown” index for classifier-free guidance. The network predicts equivariant position velocities and invariant atom-type velocities; discrete types are recovered by argmax at the end of sampling.
Noise-aware classifier (guidance). The classifier shares the same graph construction but is a classification-only stack (hidden size 256, depth 6): equivariant message-passing blocks, mean pooling over nodes, layer norm, and a linear head producing one logit per binary attribute. It is trained on noisy graphs with the same bridge noise as the generator; atom posteriors for OR / AND¬ are sigmoids of the corresponding logits at the current .
Validity and conformity. Chemical validity and rule satisfaction are evaluated with RDKit (not with a learned classifier like in the image cases). Conformity is defined only on RDKit-valid molecules.
B.4 EVALUATION METRICS
B.4.1 IMAGE BENCHMARKS
Rule conformity. For a batch with logical formula , conformity is the fraction of generated images whose evaluator predictions satisfy . On CMNIST and CelebA the evaluator is the ResNet18 classifier, see last section. This is distinct from the noise-aware classifiers used inside the sampler.
FID. We report Fréchet Inception Distance (FID) with Inception-v3 pool3 features (2048-dimensional, torchmetrics implementation, normalize=True). Generated and reference images are bilinearly resized to 128×128 and clamped to before feature extraction.
For CMNIST, FID is computed per expression: for each in the evaluation schedule, the reference set is the subset of real Colored MNIST training images whose ground-truth digit and colour satisfy
; generated samples for that batch are compared to this expression-conditioned reference (up to real images). The reported FID is the mean across expression batches.
For CelebA, it is similar. We report the FID scores with the expression-conditioned references (up to 5,000 reals).
B.4.2 QM9 METRICS
RDKit validity. For each molecule we build an RDKit conformer from predicted coordinates and atomic numbers, infer bonds, and run SanitizeMol. The validity rate is the fraction of samples for which this pipeline succeeds.
Rule conformity. On valid molecules only, we recompute binary attributes from the perceived structure: ring-based labels via RDKit ring perception (has_rings, etc.) and element-presence labels by atomic number. Conformity is the fraction of valid molecules whose recomputed attributes satisfy (AND / OR / AND over the two chosen atoms).
Joint success. The primary success metric reported in the main figures is validity conformity (equivalently, the fraction of all samples that are both valid and rule-conforming).
Structural edit distance (RMSD). To calculate the distance between source and final molecule, we first apply the Kabsch algorithm (Kabsch, 1976) after centering both structures at zero centre of mass, removing rigid rotation ambiguity, and second calculate the RMSD between the positions of the atoms. As a baseline, we calculate the mean Kabsch-RMSD between two random QM9 molecules. This is purely a geometric metric, the atomtypes are not taken into account.
Novelty. Valid molecules are converted to canonical SMILES. Novelty is the fraction of unique valid SMILES not present in a reference set of canonical SMILES for the full QM9 dataset.
B.4.3 COMPUTE MATCHING AND ERROR BARS
Network-evaluation (NFE) budgets for LOGSI vs. matched baselines follow Section 5: outer steps with corrector substeps are matched against a baseline with additional integration steps, such that the number of evaluations of the velocity and score networks match. When multiple training or evaluation seeds are run, main-text error bars aggregate across seeds for training and evaluation.
B.5 ADDITIONAL EXPERIMENTS
Langevin step size ablation The Langevin corrector step size is in principle a free hyperparameter of LOGSI. In the main experiments we use the schedule-tied choice
which reuses the SI noise scheduler, stays consistent with the -based equilibration limit in the main text, and introduces no extra hyperparameter. As an ablation we instead use the variance-exploding (VE) signal-to-noise (SNR) rule of Song et al. (2021), originally proposed for Langevin correctors in score-based diffusion sampling:
with target SNR .
We apply the same rule in our bridge / stochastic-interpolant sampler, where the corrector targets the logically composed marginal rather than a reverse diffusion. Because this choice introduces the additional hyperparameter , we grid-search and report the value with highest conformity in the case of the QM9 dataset. Figure 6 shows that SNR tuning can raise logical conformity, but the resulting steps are often large enough that source identity is effectively lost (Kabsch RMSD approaching the level of unrelated source-target pairs). In the QM9 editing setting this is undesirable, so we keep the schedule-tied step size as the default: it trades a possible conformity gain for edits that remain local to the source. Designing step sizes that improve conformity without erasing source identity is left to future work.

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 (66) to the SNR rule of Song et al. (2021) Equation (67), for both ODE and SDE transport.
Table 4: Transport velocity ablation. 1 step ablation of the experiment given in Table 1
| Method | CMNIST | CelebA | QM9 |
|---|---|---|---|
| LogSI 1 step | |||
| uncd. 1 step | |||
| 1 step | |||
| only score 1 step |
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.
| Method | CMNIST | CelebA | QM9 |
|---|---|---|---|
| LogSI 1 step | |||
| uncd. 1 step | |||
| 1 step | |||
| only score 1 step | |||
| LogSI 5 step | |||
| uncd. 5 step | |||
| 5 step | |||
| only score 5 step |
B.6 SAMPLES

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.

Figure 10: Samples of the CMNIST experiments. We plot samples from different randomly generated logical expressions. On the top we use the expression and on the bottom we use the expression .

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.