Download README.md from rezapop/IDFF: direct link, hf CLI and curl.
- Browser
- Download file 4.63 kB
-
https://huggingface.co/rezapop/IDFF/resolve/main/README.md
- Command line
-
hf download hf://rezapop/IDFF/README.md
-
curl -L -o README.md https://huggingface.co/rezapop/IDFF/resolve/main/README.md
license: other
library_name: pytorch
tags:
- generative-modeling
- flow-matching
- diffusion
- score-matching
- langevin-dynamics
- time-series
- molecular-dynamics
Implicit Dynamical Flow Fusion (IDFF) for Generative Modeling
Mohammad R. Rezaei, Milos R. Popovic, Milad Lankarany, Rahul G. Krishnan Transactions on Machine Learning Research (TMLR), 2026
Paper (PDF) 路 OpenReview 路 arXiv 路 Code (GitHub) 路 Code (Hugging Face mirror)
This repository holds the paper and the trained checkpoints of the 2-D and time-series examples. The
code is in rezapop/IDFF-code and on GitHub (release v1.0.0).
Abstract
Conditional Flow Matching (CFM) generates high-quality samples by learning a deterministic transport from noise to data, but typically requires more than a hundred network function evaluations (NFEs) per sample. IDFF augments the CFM vector field with $K$th-order score-derivative terms and attains comparable sample quality with significantly fewer NFEs. At first order ($K=1$) the method reduces to a Langevin-augmented flow whose marginal $p_t$ is preserved exactly in continuous time, so the NFE reduction is a statement about discretization robustness. For $K=2$ the paper gives an error analysis showing that the deviation of the optional curvature correction is bounded by the weighted score-matching loss already minimized by the objective. Every higher-order marginal derivative is obtained from the learned first-order score by automatic differentiation, so no additional networks are trained. On CIFAR-10 the $K=1$ configuration reaches an FID of 2.78 at 10 NFEs; IDFF also performs strongly on molecular-dynamics simulation and sea-surface-temperature forecasting.
Examples
8 Gaussians with 5 network evaluations, same noise and same trained network: deterministic CFM (blue), IDFF K=1 (red) and IDFF K=2 (purple).
Autoregressive rollouts over a 2000-step held-out Lorenz trajectory at 5 NFE per frame against the simulated trajectory (grey).
Files
| path | contents |
|---|---|
paper/IDFF_TMLR_2026.pdf |
camera-ready paper |
checkpoints/2d/{8gaussians,checkerboard,moons}/idff_model.pt |
2-D joint-head MLPs (hidden=256, depth=3, sigma0=0.2) |
checkpoints/lorenz/idff_model.pt |
Lorenz model (hidden=128, depth=2, sigma0=0.05, 2000 positions) |
checkpoints/polyALA/idff_md.pt |
polyALA molecular-dynamics surrogate (46 dihedral angles, 200 positions) |
checkpoints/*/config.json |
training arguments and the sampler settings selected on validation data |
assets/*.gif |
the animations above |
The checkpoints are PyTorch state_dicts for idff.JointHeadMLP; load them with weights_only=True.
Usage
git clone https://huggingface.co/rezapop/IDFF-code && cd IDFF-code
pip install -r requirements.txt
import json, torch
from huggingface_hub import hf_hub_download
from idff import JointHeadMLP, sample
repo = "rezapop/IDFF"
cfg = json.load(open(hf_hub_download(repo, "checkpoints/2d/8gaussians/config.json")))
model = JointHeadMLP(2, hidden=256, depth=3, sigma0=cfg["sigma0"])
model.load_state_dict(torch.load(hf_hub_download(repo, "checkpoints/2d/8gaussians/idff_model.pt"),
map_location="cpu", weights_only=True))
model.eval()
nfe = 5
s = cfg["selected"][str(nfe)] # gamma_bar and alpha_2 chosen on validation data
x_k1 = sample(model, torch.randn(2000, 2), nfe, K=1, gamma_bar=s["gamma_bar"])
x_k2 = sample(model, torch.randn(2000, 2), nfe, K=2, gamma_bar=s["gamma_bar"], alphas={2: s["alpha_2"]})
x_cfm = sample(model, torch.randn(2000, 2), nfe, K=0) # deterministic CFM baseline
Citation
@article{rezaei2026idff,
title = {Implicit Dynamical Flow Fusion ({IDFF}) for Generative Modeling},
author = {Rezaei, Mohammad R. and Popovic, Milos R. and Lankarany, Milad and Krishnan, Rahul G.},
journal = {Transactions on Machine Learning Research},
year = {2026},
url = {https://openreview.net/forum?id=RWnohJJKbq}
}