Table of Contents
Fetching ...

Constraint-Guided Prediction Refinement via Deterministic Diffusion Trajectories

Pantelis Dogoulis, Fabien Bernier, Félix Fourreau, Karim Tit, Maxime Cordy

TL;DR

This work addresses the challenge of producing constraint-satisfying predictions without constraining the base model's architecture. It introduces CarDiff, a general framework that uses a deterministic DDIM trajectory augmented with constraint-gradient corrections to refine coarse predictions onto a constraint manifold defined by $\Phi(x)=0$. The method balances global diffusion guidance with local feasibility via a proximal step that yields a closed-form update $\gamma_t$, effectively enabling post-hoc enforcement of nonlinear, non-convex constraints. Empirically, CarDiff improves constraint satisfaction and preserves performance in both constrained adversarial attacks on tabular data and AC power flow prediction, while remaining lightweight and broadly applicable. The approach offers practical benefits for real-world systems where physical or logical constraints must be respected, with potential applications in safety-critical domains and rapid, constraint-aware AI deployment.

Abstract

Many real-world machine learning tasks require outputs that satisfy hard constraints, such as physical conservation laws, structured dependencies in graphs, or column-level relationships in tabular data. Existing approaches rely either on domain-specific architectures and losses or on strong assumptions on the constraint space, restricting their applicability to linear or convex constraints. We propose a general-purpose framework for constraint-aware refinement that leverages denoising diffusion implicit models (DDIMs). Starting from a coarse prediction, our method iteratively refines it through a deterministic diffusion trajectory guided by a learned prior and augmented by constraint gradient corrections. The approach accommodates a wide class of non-convex and nonlinear equality constraints and can be applied post hoc to any base model. We demonstrate the method in two representative domains: constrained adversarial attack generation on tabular data with column-level dependencies and in AC power flow prediction under Kirchhoff's laws. Across both settings, our diffusion-guided refinement improves both constraint satisfaction and performance while remaining lightweight and model-agnostic.

Constraint-Guided Prediction Refinement via Deterministic Diffusion Trajectories

TL;DR

This work addresses the challenge of producing constraint-satisfying predictions without constraining the base model's architecture. It introduces CarDiff, a general framework that uses a deterministic DDIM trajectory augmented with constraint-gradient corrections to refine coarse predictions onto a constraint manifold defined by . The method balances global diffusion guidance with local feasibility via a proximal step that yields a closed-form update , effectively enabling post-hoc enforcement of nonlinear, non-convex constraints. Empirically, CarDiff improves constraint satisfaction and preserves performance in both constrained adversarial attacks on tabular data and AC power flow prediction, while remaining lightweight and broadly applicable. The approach offers practical benefits for real-world systems where physical or logical constraints must be respected, with potential applications in safety-critical domains and rapid, constraint-aware AI deployment.

Abstract

Many real-world machine learning tasks require outputs that satisfy hard constraints, such as physical conservation laws, structured dependencies in graphs, or column-level relationships in tabular data. Existing approaches rely either on domain-specific architectures and losses or on strong assumptions on the constraint space, restricting their applicability to linear or convex constraints. We propose a general-purpose framework for constraint-aware refinement that leverages denoising diffusion implicit models (DDIMs). Starting from a coarse prediction, our method iteratively refines it through a deterministic diffusion trajectory guided by a learned prior and augmented by constraint gradient corrections. The approach accommodates a wide class of non-convex and nonlinear equality constraints and can be applied post hoc to any base model. We demonstrate the method in two representative domains: constrained adversarial attack generation on tabular data with column-level dependencies and in AC power flow prediction under Kirchhoff's laws. Across both settings, our diffusion-guided refinement improves both constraint satisfaction and performance while remaining lightweight and model-agnostic.

Paper Structure

This paper contains 32 sections, 12 equations, 2 figures, 4 tables.

Figures (2)

  • Figure 1: Optimization trajectories on the Müller–Brown potential with the same initial points.
  • Figure 2: Two different cases of diffusion based trajectories failing to reach the global minimum.