SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2209.15571 · ICLR · 2023

Building Normalizing Flows with Stochastic Interpolants

Michael Albergo, Eric Vanden-Eijnden

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 2 failures of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2209.15571.json · badge: /api/ran/2209.15571.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
lucidrains/denoising-diffusion-pytorch community
Papers with Code archive
5 ran · 1 no recorded run
malbergo/stochastic-interpolants community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
ContinuousTimeGaussianDiffusion Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/denoising-diffusion-pytorch/denoising_diffusion_pytorch/continuous_time_gaussian_diffusion.py
code served (permissive licence) · get_code("0ffee875dc3a264b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ContinuousTimeGaussianDiffusion: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import math

torch.manual_seed(0)

class MockDiffusionModel(nn.Module):
    """Minimal diffusion model satisfying the interface used by ContinuousTimeGaussianDiffusion"""
    
    def __init__(self, channels=3, image_size=32):
        super().__init__()
        self.random_or_learned_sinusoidal_cond = True
        self.self_condition = False
        
        # Minimal network that takes concatenated input (noisy image + time embedding)
        self.net = nn.Sequential(
            nn.Linear(channels * image_size * image_size + 4, 16),
            nn.ReLU(),
            nn.Linear(16, channels * image_size * image_size)
        )
    
    def forward(self, x, time_emb):
        """
        Args:
            x: [batch, channels, height, width] noisy image
            time_emb: [batch, 4] time embeddings (log_snr or similar)
        Returns:
            predicted noise of same shape as x
        """
        batch_size = x.shape[0]
        x_flat = x.view(batch_size, -1)
        # Repeat time embedding to match batch
        time_emb_expanded = time_emb.view(batch_size, -1)
        combined = torch.cat([x_flat, time_emb_expanded], dim=1)
        out = self.net(combined)
        return out.view_as(x)

# Create a minimal mock model
model = MockDiffusionModel(channels=3, image_size=8)

ARGS = {
    'model': model,
    'image_size': 8,
    'channels': 3,
    'noise_schedule': 'linear',
    'num_sample_steps': 50,
    'clip_sample_denoised': True,
    'learned_schedule_net_hidden_dim': 64,
    'learned_noise_schedule_frac_gradient': 1.0,
    'min_snr_loss_weight': False,
    'min_snr_gamma': 5,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ContinuousTimeGaussianDiffusion — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ContinuousTimeGaussianDiffusion output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Residual Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/denoising-diffusion-pytorch/denoising_diffusion_pytorch/continuous_time_gaussian_diffusion.py
code served (permissive licence) · get_code("15688e453e256aa5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Residual: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a simple nn.Module that takes input and produces output of same shape
class SimpleBlock(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

# Instantiate the function module
fn = SimpleBlock()

# Define ARGS dictionary with all parameters for Residual
ARGS = {
    'fn': fn
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Residual — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Residual output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
alpha_cosine_log_snr Ran
ran; our contract draft was wrong, not the code
lucidrains/denoising-diffusion-pytorch/denoising_diffusion_pytorch/continuous_time_gaussian_diffusion.py
code served (permissive licence) · get_code("050a4a5dd3c4abd5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

# The function alpha_cosine_log_snr takes parameter 't' and optional parameter 's'
# 't' is used in torch operations (addition, division, passed to torch.cos)
# 's' is a scalar with default value 0.008
# The function expects 't' to be a tensor that supports standard arithmetic operations

# Create a small tensor for 't' - shape (2, 4) as specified
t = torch.rand(2, 4)

# 's' is a scalar parameter with default 0.008
s = 0.008

ARGS = {
    't': t,
    's': s
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
beta_linear_log_snr Ran
ran; our contract draft was wrong, not the code
lucidrains/denoising-diffusion-pytorch/denoising_diffusion_pytorch/continuous_time_gaussian_diffusion.py
code served (permissive licence) · get_code("801713fa0ff68db0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch.special import expm1

torch.manual_seed(0)

# The function beta_linear_log_snr takes a single parameter 't'
# Looking at the function body, 't' is used in arithmetic operations: 0.0001 + 10 * t ** 2
# This means 't' should be a torch tensor that supports these operations

# Create a small tensor for 't'
t = torch.randn(2, 4)

ARGS = {
    "t": t
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
learned_noise_schedule Ran
ran on a synthesized input · constructed an object; no result was computed
lucidrains/denoising-diffusion-pytorch/denoising_diffusion_pytorch/continuous_time_gaussian_diffusion.py
code served (permissive licence) · get_code("06899b128444deca")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, learned_noise_schedule: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn, einsum
import torch.nn.functional as F
from einops.layers.torch import Rearrange

torch.manual_seed(0)

class MonotonicLinear(nn.Module):

    def __init__(self, *args, **kwargs):
        super().__init__()
        self.net = nn.Linear(*args, **kwargs)

    def forward(self, x):
        return F.linear(x, self.net.weight.abs(), self.net.bias.abs())

class Residual(nn.Module):

    def __init__(self, fn):
        super().__init__()
        self.fn = fn

    def forward(self, x):
        return x + self.fn(x)

class learned_noise_schedule(nn.Module):
    """ described in section H and then I.2 of the supplementary material for variational ddpm paper """

    def __init__(self, *, log_snr_max, log_snr_min, hidden_dim=1024, frac_gradient=1.0):
        super().__init__()
        self.slope = log_snr_min - log_snr_max
        self.intercept = log_snr_max
        self.net = nn.Sequential(Rearrange('... -> ... 1'), MonotonicLinear(1, 1), Residual(nn.Sequential(MonotonicLinear(1, hidden_dim), nn.Sigmoid(), MonotonicLinear(hidden_dim, 1))), Rearrange('... 1 -> ...'))
        self.frac_gradient = frac_gradient

    def forward(self, x):
        frac_gradient = self.frac_gradient
        device = x.device
        out_zero = self.net(torch.zeros_like(x))
        out_one = self.net(torch.ones_like(x))
        x = self.net(x)
        normed = self.slope * ((x - out_zero) / (out_one - out_zero)) + self.intercept
        return normed * frac_gradient + normed.detach() * (1 - frac_gradient)

ARGS = {
    "log_snr_max": 10.0,
    "log_snr_min": -10.0,
    "hidden_dim": 16,
    "frac_gradient": 0.8,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type learned_noise_schedule — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a learned_noise_schedule output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Interpolant Not yet run
unverified (harvested, no recorded run)
malbergo/stochastic-interpolants/interflow/stochastic_interpolant.py
pointer only (licence: NONE) · get_code("a6bb36087314de0e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, malbergo/stochastic-interpolants when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

MonotonicLinear Not yet run
unverified (harvested, no recorded run)
lucidrains/denoising-diffusion-pytorch/denoising_diffusion_pytorch/continuous_time_gaussian_diffusion.py
code served (permissive licence) · get_code("fdb740e913ad70ce")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

A generative model based on a continuous-time normalizing flow between any pair of base and target probability densities is proposed. The velocity field of this flow is inferred from the probability current of a time-dependent density that interpolates between the base and the target in finite time. Unlike conventional normalizing flow inference methods based the maximum likelihood principle, which require costly backpropagation through ODE solvers, our interpolant approach leads to a simple quadratic loss for the velocity itself which is expressed in terms of expectations that are readily amenable to empirical estimation. The flow can be used to generate samples from either the base or target, and to estimate the likelihood at any time along the interpolant. In addition, the flow can be optimized to minimize the path length of the interpolant density, thereby paving the way for building optimal transport maps. In situations where the base is a Gaussian density, we also show that the velocity of our normalizing flow can also be used to construct a diffusion model to sample the target as well as estimate its score. However, our approach shows that we can bypass this diffusion completely and work at the level of the probability flow with greater simplicity, opening an avenue for methods based solely on ordinary differential equations as an alternative to those based on stochastic differential equations. Benchmarking on density estimation tasks illustrates that the learned flow can match and surpass conventional continuous flows at a fraction of the cost, and compares well with diffusions on image generation on CIFAR-10 and ImageNet 32×32. The method scales ab-initio ODE flows to previously unreachable image resolutions, demonstrated up to 128 × 128.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2209.15571")
get_code_for_paper("2209.15571")
have("2209.15571")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2209.15571.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2209.15571.svg)](https://syntology.ai/paper/2209.15571)

Connect an agent — have() is free.