SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.01357 · NeurIPS · 2021

Diffusion Schrödinger Bridge with Applications to Score-Based Generative Modeling

James Thornton, Arnaud Doucet, Valentin De Bortoli, Jeremy Heng

arXiv · PDF · Open in the Atlas

Code that ran

22 of 35 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 5 honoured the contract we drafted, 2 violated it and 5 have no contract verdict; 10 failures of our instrument; 13 no recorded run), measured 2026-11-22; 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/2106.01357.json · badge: /api/ran/2106.01357.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
maxencenoble/tree-diffusion-schrodinger-bridge community
Papers with Code archive
16 ran · 7 no recorded run
JTT94/diffusion_schrodinger_bridge marked official in Papers with Code
Papers with Code archive
6 ran · 6 no recorded run
FunctionStatusWhere it lives
BW2_UVP Ran
ran, violated the contract we drafted
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("dff092e26328f464")
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 complex128, ndim 0, dtype family float, shape () 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 numpy as np
import scipy.linalg as ln
from numpy import linalg as LA

torch.manual_seed(0)
np.random.seed(0)

# Create small sample batches
dim = 4
batch_size = 2

# Generate sample data as torch tensors
b_samples = torch.randn(batch_size, dim)

# Generate ideal mean and covariance
mean_ideal = np.random.randn(dim)

# Generate ideal covariance matrix (must be positive definite)
temp_cov = np.random.randn(dim, dim)
cov_ideal = temp_cov @ temp_cov.T + np.eye(dim)

# Generate another covariance for testing cov_ideal function
temp_cov2 = np.random.randn(dim, dim)
cov_ideal_2 = temp_cov2 @ temp_cov2.T + np.eye(dim)

ARGS = {
    "b_samples": b_samples,
    "mean_ideal": mean_ideal,
    "cov_ideal": cov_ideal,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type complex128, ndim 0, dtype family float, shape () — shape () 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
BW2_distance Ran
ran, violated the contract we drafted
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("621c3b5c6259b97e")
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 float64, ndim 0, dtype family float, shape () 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 numpy as np
import scipy.linalg as ln
from numpy import linalg as LA

# Create small example covariance matrices and means for testing BW2_distance
dim = 4

# Create two valid positive-definite covariance matrices
# Using random symmetric positive-definite construction
np.random.seed(0)
A1 = np.random.randn(dim, dim)
cov_ideal_val = np.asmatrix(A1 @ A1.T + np.eye(dim))

A2 = np.random.randn(dim, dim)
cov_ours_val = np.asmatrix(A2 @ A2.T + np.eye(dim))

# Create mean vectors
mean_ideal_val = np.asmatrix(np.random.randn(dim, 1))
mean_ours_val = np.asmatrix(np.random.randn(dim, 1))

ARGS = {
    "mean_ideal": mean_ideal_val,
    "mean_ours": mean_ours_val,
    "cov_ideal": cov_ideal_val,
    "cov_ours": cov_ours_val,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float, shape () — shape () 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
CacheLoader Ran
ran on a synthesized input · constructed an object; no result was computed
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("e4c94ae30f27ac18")
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, CacheLoader: 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
from torch.utils.data import Dataset

torch.manual_seed(0)

# Create a minimal Langevin sampler mock
class MockLangevin:
    def __init__(self, d, num_steps):
        self.d = d  # shape tuple
        self.num_steps = num_steps
    
    def record_init_langevin(self, batch):
        # Returns x, out, steps_expanded
        batch_size = batch.shape[0]
        x = torch.randn(batch_size, self.num_steps, *self.d)
        out = torch.randn(batch_size, self.num_steps, *self.d)
        steps_expanded = torch.arange(self.num_steps).unsqueeze(0).expand(batch_size, -1).unsqueeze(2)
        return x, out, steps_expanded
    
    def record_langevin_seq(self, sample_net, batch, ipf_it):
        # Returns x, out, steps_expanded
        batch_size = batch.shape[0]
        x = torch.randn(batch_size, self.num_steps, *self.d)
        out = torch.randn(batch_size, self.num_steps, *self.d)
        steps_expanded = torch.arange(self.num_steps).unsqueeze(0).expand(batch_size, -1).unsqueeze(2)
        return x, out, steps_expanded

# Create a minimal sample_net
class MockSampleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x):
        return self.linear(x)

# Create mock dataloaders as iterables of (tensor, label) tuples
class MockDataLoader:
    def __init__(self, batch_size, shape):
        self.batch_size = batch_size
        self.shape = shape
        self.counter = 0
    
    def __iter__(self):
        self.counter = 0
        return self
    
    def __next__(self):
        if self.counter >= 10:
            raise StopIteration
        self.counter += 1
        batch = torch.randn(self.batch_size, *self.shape)
        labels = torch.randint(0, 2, (self.batch_size,))
        return (batch, labels)

# Setup parameters
shape = (4,)  # 1D shape with size 4
batch_size = 2
num_steps = 3
num_batches = 2
n = 2  # IPF iteration

langevin = MockLangevin(d=shape, num_steps=num_steps)
sample_net = MockSampleNet()
dataloader_b = MockDataLoader(batch_size=batch_size, shape=shape)
dataloader_f = MockDataLoader(batch_size=batch_size, shape=shape)
mean = torch.zeros(shape)
std = torch.ones(shape)

ARGS = {
    'fb': 'b',
    'sample_net': sample_net,
    'dataloader_b': dataloader_b,
    'num_batches': num_batches,
    'langevin': langevin,
    'n': n,
    'mean': mean,
    'std': std,
    'batch_size': batch_size,
    'device': 'cpu',
    'dataloader_f': dataloader_f,
    'transfer': False
}
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 CacheLoader — the run constructed an instance of its own class and did not call it; no shape is 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
EMAHelper Ran
ran on a synthesized input · constructed an object; no result was computed
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("8d8cecbcb2f02933")
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, EMAHelper: 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

torch.manual_seed(0)

# Create a simple neural network module
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Create module instance
module = SimpleModel()

# Define ARGS dict with all parameters for EMAHelper.__init__
ARGS = {
    'mu': 0.999,
    'device': 'cpu'
}
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 EMAHelper — 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 EMAHelper 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
Langevin Ran
ran on a synthesized input · constructed an object; no result was computed
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("2f94bf4947f9510a")
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, Langevin: 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 numpy as np

torch.manual_seed(0)

# Create a simple forward network that takes x and time and outputs a tensor
class SimpleForwardNet(nn.Module):
    def __init__(self, input_dim, output_dim):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x, t):
        # x shape: (batch, *spatial), t shape: (batch, num_steps, 1) or similar
        # Flatten x, apply linear, reshape back
        batch_size = x.shape[0]
        spatial_dims = x.shape[1:]
        x_flat = x.reshape(batch_size, -1)
        out = self.linear(x_flat)
        return out.reshape(batch_size, *spatial_dims)

# Create a simple backward network
class SimpleBackwardNet(nn.Module):
    def __init__(self, input_dim, output_dim):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, x, t):
        batch_size = x.shape[0]
        spatial_dims = x.shape[1:]
        x_flat = x.reshape(batch_size, -1)
        out = self.linear(x_flat)
        return out.reshape(batch_size, *spatial_dims)

# Define parameters
num_steps = 5
num_corrector_steps = 2
gammas = torch.linspace(0.01, 0.1, num_steps)
device = None
mean_match = True
snr = 0.01

# Create source samples (batch_size=2, spatial_dim=4)
source_samples = torch.randn(2, 4)
shape = (4,)

# Create networks
forward_net = SimpleForwardNet(4, 4)
backward_net = SimpleBackwardNet(4, 4)

# Create a simple corrector function (can be any callable)
def corrector_fn(x, score, gamma):
    return x + gamma * score

ARGS = {
    'num_steps': num_steps,
    'num_corrector_steps': num_corrector_steps,
    'gammas': gammas,
    'device': device,
    'mean_match': mean_match,
    'snr': snr,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Langevin — 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 Langevin 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
Langevin Ran
ran on a synthesized input · constructed an object; no result was computed
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("c88909f2cfb2fb91")
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, Langevin: 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)

# Build a minimal neural network that the Langevin class expects
class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 4)
    
    def forward(self, x, t):
        # x: (batch, 4), t: (batch, num_steps, 1)
        # The function calls net(x, steps[:, k, :]) where steps[:, k, :] is (batch, 1)
        return self.fc(x)

# Parameters for Langevin
num_steps = 5
shape = (4,)  # 1D shape with 4 dimensions
gammas = torch.tensor([0.1, 0.1, 0.1, 0.1, 0.1])
device = None
mean_final = torch.tensor([0.0, 0.0])
var_final = torch.tensor([0.5, 0.5])
mean_match = True

def dummy_time_sampler(num_steps):
    return torch.arange(num_steps)

time_sampler = dummy_time_sampler

ARGS = {
    'num_steps': num_steps,
    'shape': shape,
    'gammas': gammas,
    'time_sampler': time_sampler,
    'device': device,
    'mean_final': mean_final,
    'var_final': var_final,
    'mean_match': mean_match,
}
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 Langevin — 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 Langevin 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
Stacked_MNIST Ran
ran on a synthesized input · constructed an object; no result was computed
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("5537e783e5bad68a")
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, Stacked_MNIST: 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 os
import tempfile
import shutil

torch.manual_seed(0)

# Create a temporary directory for the dataset
temp_dir = tempfile.mkdtemp()

# Pre-create the data and targets files to avoid actual MNIST download
imageSize = 28
num_channels = 3

# Create dummy data and targets tensors
dummy_data = torch.randn(10, num_channels, imageSize, imageSize)
dummy_targets = torch.randint(0, 1000, (10,), dtype=torch.int64)

# Save them to the temp directory
torch.save(dummy_data, os.path.join(temp_dir, 'data.pt'))
torch.save(dummy_targets, os.path.join(temp_dir, 'targets.pt'))

# Create the im subdirectory
im_dir = os.path.join(temp_dir, 'im')
os.makedirs(im_dir, exist_ok=True)

ARGS = {
    'root': temp_dir,
    'load': True,
    'source_root': None,
    'imageSize': 28,
    'train': True,
    'num_channels': 3,
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Stacked_MNIST — the run constructed an instance of its own class and did not call it; no shape is 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
add_module_state_dict Ran
ran; our contract draft was wrong, not the code
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("07ab67e31f0a2c0e")
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 OrderedDict. 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 collections import OrderedDict

torch.manual_seed(0)

# Create a sample state_dict that mimics a PyTorch model's state dictionary
state_dict = OrderedDict([
    ('layer1.weight', torch.randn(4, 3)),
    ('layer1.bias', torch.randn(4)),
    ('layer2.weight', torch.randn(5, 4)),
    ('layer2.bias', torch.randn(5)),
])

ARGS = {
    'state_dict': state_dict
}
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 OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
centered_mean_and_covariance Ran
ran; our contract draft was wrong, not the code
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("2f48cf5e340d5036")
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 tuple. 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 numpy as np
import sklearn

ARGS = {
    "dim": 4,
    "seed": 42,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
cov_ideal Ran
ran; our contract draft was wrong, not the code
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("f5b271662945056a")
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 matrix, ndim 2, dtype family float, shape (4, 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 numpy as np

# Set random seed for reproducibility
np.random.seed(0)

# Define dimensions
dim = 4
n_datasets = 3

# Create list of covariance matrices
# Each covariance matrix should be positive definite and symmetric
list_cov = []
for i in range(n_datasets):
    # Generate a random matrix and make it positive definite by A @ A.T
    A = np.random.randn(dim, dim)
    cov = np.matmul(A, A.T)
    list_cov.append(cov)

# Create weights that sum to 1
weights = np.array([0.3, 0.4, 0.3])

ARGS = {
    "list_cov": list_cov,
    "weights": weights,
    "dim": dim
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type matrix, ndim 2, dtype family float, shape (4, 4) — shape (4, 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
cov_real Ran
ran, honoured the contract we drafted
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("7542200a9ef8296f")
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 ndarray, ndim 2, dtype family float, shape (4, 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 numpy as np

torch.manual_seed(0)

# Create a small tensor sample for b_samples
# Shape: (batch_size=2, features=4)
# This will be used to compute covariance across features
b_samples_tensor = torch.randn(2, 4)

# Define ARGS dict mapping all parameters to valid values
ARGS = {
    "b_samples": b_samples_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (4, 4) — shape (4, 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
data_distrib Ran
ran; our contract draft was wrong, not the code
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("d602cc73ac0424e5")
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 tuple. 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 numpy as np
import sklearn

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    "npar": 2,
    "dim": 4,
    "seed": 42
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
data_distrib Ran
ran, honoured the contract we drafted
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("55327fa0ee65d637")
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 (10, 2) 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 numpy as np
from sklearn import datasets

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    'npar': 10,
    'data': 'mixture'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, 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 (10, 2) — shape (10, 2) 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
gaussian_ds Ran
ran; our contract draft was wrong, not the code
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("1365335a7bfbbec5")
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 tuple. 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 numpy as np
from torch.utils.data import TensorDataset
import sklearn

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    "npar": 2,
    "dim": 4,
    "seed": 42,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
get_dataset Ran
ran; our contract draft was wrong, not the code
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("446d5ae9b2d8c92a")
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 tuple. 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 numpy as np
from torch.utils.data import TensorDataset
from unittest.mock import MagicMock

torch.manual_seed(0)

# Create a minimal args object with required attributes
class Args:
    def __init__(self):
        self.Dataset = 'gaussian'  # Using DATASET_GAUSSIAN
        self.npar = 2
        self.cache_npar = 1
        self.dim = 4
        self.data_dir = '/tmp'
        self.seed_data = 42
        self.name_data = 'test'
        self.load_data = False
        self.data = MagicMock()
        self.data.image_size = 32
        self.data.channels = 3
        self.data.random_flip = False

args = Args()

ARGS = {
    'args': args,
    'data_label': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
get_optimizers Ran
ran; our contract draft was wrong, not the code
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("77e8834da5dd3a78")
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 tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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)

class SimpleNet(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

net_f = SimpleNet()
net_b = SimpleNet()
lr = 0.001

ARGS = {
    "net_f": net_f,
    "net_b": net_b,
    "lr": lr,
}
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 tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
given_singular_spd_cov Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("774e6c73d0322778")
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 ndarray, ndim 2, dtype family float, shape (4, 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 numpy as np
import sklearn
import sklearn.utils

ARGS = {
    "dim": 4,
    "random_state": 42,
    "range_sing": [0.5, 5.0]
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (4, 4) — shape (4, 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
grad_gauss Ran
ran, honoured the contract we drafted
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("f63e44465df9dea5")
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 numpy as np

torch.manual_seed(0)

# Construct arguments for grad_gauss(x, m, var)
# The function computes: xout = (x - m) / var, then returns -xout
# All parameters appear to be tensors or array-like objects that support subtraction and division

x = torch.randn(2, 4)  # batch_size=2, feature_dim=4
m = torch.randn(2, 4)  # mean, same shape as x
var = torch.randn(2, 4).abs() + 0.1  # variance (keep positive to avoid division issues)

ARGS = {
    "x": x,
    "m": m,
    "var": var
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
mean_cov_from_samples Ran
ran; our contract draft was wrong, not the code
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("9b452f0316038a1c")
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 tuple. 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 numpy as np

torch.manual_seed(0)

# Create a small batch of samples
# The function expects b_samples to be either a torch.Tensor or numpy array
# with shape (batch_size, features)
# Using batch_size=2 and features=4

b_samples_torch = torch.randn(2, 4)

ARGS = {
    "b_samples": b_samples_torch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
mean_real Ran
ran, honoured the contract we drafted
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("dd8c818eaa83ebdb")
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 ndarray, ndim 1, dtype family float, shape (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 numpy as np

torch.manual_seed(0)

# The function takes b_samples which can be either a torch.Tensor or array-like
# It computes mean along axis 0
# We'll create a small batch of samples

# Option 1: torch.Tensor input
tensor_samples = torch.randn(2, 4)

ARGS = {
    "b_samples": tensor_samples
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (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
repeater Ran
ran; our contract draft was wrong, not the code
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("b1412751e093dbe6")
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 generator. 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.utils.data import DataLoader, TensorDataset

torch.manual_seed(0)

# Create a simple dataset with tiny tensors
x = torch.randn(2, 4)  # 2 samples, 4 features
y = torch.randn(2, 3)  # 2 samples, 3 targets

dataset = TensorDataset(x, y)
data_loader = DataLoader(dataset, batch_size=2)

ARGS = {
    "data_loader": data_loader
}
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 generator — a generator output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a generator 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
two_dim_ds Ran
ran, honoured the contract we drafted
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("8dbe5289e0087ca3")
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 TensorDataset. 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 numpy as np
from torch.utils.data import TensorDataset

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    'npar': 16,
    'data_tag': 'mixture'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TensorDataset — a TensorDataset output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TensorDataset output the recorded ndim 3 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
IPFBase Not yet run
unverified (harvested, no recorded run)
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("2053b848ea398325")
How it ran

no invocation recorded.

IPFBase Not yet run
unverified (harvested, no recorded run)
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("3e2072a73ea85aee")
How it ran

no invocation recorded.

IPFSequential Not yet run
unverified (harvested, no recorded run)
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("5fa86b3b59f03ef2")
How it ran

no invocation recorded.

IPFSequential Not yet run
unverified (harvested, no recorded run)
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("6da2149bcace3567")
How it ran

no invocation recorded.

IPFTree Not yet run
unverified (harvested, no recorded run)
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("462bbf0816d5e3bf")
How it ran

no invocation recorded.

get_datasets Not yet run
unverified (harvested, no recorded run)
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("047f2e89ba81227d")
How it ran

no invocation recorded.

get_logger Not yet run
unverified (harvested, no recorded run)
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("30064cd4e8da4011")
How it ran

no invocation recorded.

get_logger Not yet run
unverified (harvested, no recorded run)
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("b15b7368db6c2575")
How it ran

no invocation recorded.

get_models Not yet run
unverified (harvested, no recorded run)
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("61f03451a0338d12")
How it ran

no invocation recorded.

get_models Not yet run
unverified (harvested, no recorded run)
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("ce40987a5f51f481")
How it ran

no invocation recorded.

get_plotter Not yet run
unverified (harvested, no recorded run)
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("06eaaa03d0e243e5")
How it ran

no invocation recorded.

get_plotter Not yet run
unverified (harvested, no recorded run)
JTT94/diffusion_schrodinger_bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("a6ba07d0c9906f3c")
How it ran

no invocation recorded.

get_tree Not yet run
unverified (harvested, no recorded run)
maxencenoble/tree-diffusion-schrodinger-bridge/bridge/runners/ipf.py
code served (permissive licence) · get_code("24255e007571b204")
How it ran

no invocation recorded.

Also present in other papers' code

Of 35 samples lifted from this paper's linked repositories, 35 carry a function identity and 0 do not. Of the 35 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 35 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-22.

Repositories linked to this paper

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

Abstract

Progressively applying Gaussian noise transforms complex data distributions to approximately Gaussian. Reversing this dynamic defines a generative model. When the forward noising process is given by a Stochastic Differential Equation (SDE), Song et al. (2021) demonstrate how the time inhomogeneous drift of the associated reverse-time SDE may be estimated using score-matching. A limitation of this approach is that the forward-time SDE must be run for a sufficiently long time for the final distribution to be approximately Gaussian while ensuring that the corresponding time-discretization error is controlled. In contrast, solving the Schrödinger Bridge (SB) problem, i.e. an entropy-regularized optimal transport problem on path spaces, yields diffusions which generate samples from the data distribution in finite time. We present Diffusion SB (DSB), an original approximation of the Iterative Proportional Fitting (IPF) procedure to solve the SB problem, and provide theoretical analysis along with generative modeling experiments. The first DSB iteration recovers the methodology proposed by Song et al. (2021), with the flexibility of using shorter time intervals, as subsequent DSB iterations reduce the discrepancy between the final-time marginal of the forward (resp. backward) SDE with respect to the Gaussian prior (resp. data) distribution. Beyond generative modeling, DSB offers a computational optimal transport tool as the continuous state-space analogue of the popular Sinkhorn algorithm (Cuturi, 2013).

For agents

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

get_harvested_code_for_paper("2106.01357")
get_code_for_paper("2106.01357")
have("2106.01357")

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

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

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

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

Connect an agent — have() is free.