Logical guidance improves generation with stochastic interpolants in images and molecules

Logical Guidance of Stochastic Interpolants

Machine Learning

Summary

This paper looks at how to better guide computer models that create images or molecules by combining logical rules. The authors found that some logical operations work exactly when combined this way, but others can cause errors. They designed a method called LOGSI that fixes these errors by adjusting the model's behavior during generation. Their approach performs better on tasks like changing handwritten digits and editing molecules to meet specific attributes.

What this means in practice

  • For machine learning engineers: Construct image generation systems that better follow complex logical constraints with improved fidelity and rule conformity.
  • For computational chemistry teams: Edit molecular structures guided by logical attribute constraints to generate molecules meeting desired criteria more reliably.

Authors

Gerrit Gerhartz, Francesco Alesiani, Jonathan Warrell, Henrik Christiansen, Matheus Ferraz, Mathias Niepert

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 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.