Physics-Constrained Flow Matching: Sampling Generative Models with Hard Constraints
A Julia implementation for the NeurIPS 2025 Paper: Physics-Constrained Flow Matching: Sampling Generative Models with Hard Constraints
Note: This package is under active development. More features and capabilities will be added progressively.
using Pkg
Pkg.add(url = "https://github.com/utkarsh530/PCFM.jl")Or in development mode:
Pkg.develop(path = "/path/to/PCFM")For a complete working example, see examples/train_diffusion.jl.
To run the example:
julia --project examples/train_diffusion.jlIf you use this package, please cite:
@article{utkarsh2025physics,
title={Physics-Constrained Flow Matching: Sampling Generative Models with Hard Constraints},
author={Utkarsh, Utkarsh and Cai, Pengfei and Edelman, Alan and Gomez-Bombarelli, Rafael and Rackauckas, Christopher Vincent},
journal={arXiv preprint arXiv:2506.04171},
year={2025}
}MIT License - see LICENSE file for details.