SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.03207 · 2024

Light and Optimal Schrödinger Bridge Matching

arXiv · PDF · Open in the Atlas

Code that ran

10 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 2 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/2402.03207.json · badge: /api/ran/2402.03207.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
skholkin/lightsb-matching canonical (classifier label)
classifier basis not recorded on the link
10 ran · 2 no recorded run
FunctionStatusWhere it lives
decode Ran
ran; our contract draft was wrong, not the code
skholkin/lightsb-matching/ALAE/alae_ffhq_inference.py
code served (permissive licence) · get_code("c20cc362e7fc6f55")
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, 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 torch.nn as nn

torch.manual_seed(0)

# Build a minimal model that satisfies the function's usage
class MappingF(nn.Module):
    def __init__(self, num_layers):
        super().__init__()
        self.num_layers = num_layers

class Decoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x, layer_count, arg3, noise=False):
        # The function calls: model.decoder(x[i][None, ...], layer_count - 1, 1, noise=True)
        # x shape will be [1, 1, 4] after indexing and None expansion
        # Return a tensor that can be concatenated
        return self.linear(x).squeeze(0)

class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.mapping_f = MappingF(num_layers=5)
        self.decoder = Decoder()

# Create model and input
model = DummyModel()
x = torch.randn(2, 4)  # batch_size=2, feature_dim=4

ARGS = {
    "model": model,
    "x": x
}
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 (10, 4) — shape (10, 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
encode Ran
ran; our contract draft was wrong, not the code
skholkin/lightsb-matching/ALAE/alae_ffhq_inference.py
code served (permissive licence) · get_code("343978ea7f961051")
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 3, dtype family float, shape (1, 6, 5) 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 torch.nn as nn

torch.manual_seed(0)

class MappingF(nn.Module):
    def __init__(self, num_layers):
        super().__init__()
        self.num_layers = num_layers
    
    def forward(self, x):
        return x

class Encoder(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 5)
    
    def encode(self, x, layer_count, param):
        # x shape: (1, 4) based on x[i][None, ...] usage
        # Returns Z and something else (underscore in unpacking)
        Z = self.fc(x)  # shape: (1, 5)
        return Z, None

class Model(nn.Module):
    def __init__(self):
        super().__init__()
        self.mapping_f = MappingF(num_layers=3)
        self.encoder = Encoder()
    
    def encode(self, x, layer_count, param):
        return self.encoder.encode(x, layer_count, param)

model = Model()
x = torch.randn(2, 4)  # batch size 2, feature dim 4

ARGS = {
    "model": model,
    "x": x
}
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 3, dtype family float, shape (1, 6, 5) — shape (1, 6, 5) 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
kl Ran
ran; our contract draft was wrong, not the code
skholkin/lightsb-matching/ALAE/losses.py
code served (permissive licence) · get_code("96e5a2bdc93b101d")
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 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

torch.manual_seed(0)

# Create small tensors for mu and log_var
# The function performs operations: pow(2), exp(), mean
# Shapes should be (batch_size, latent_dim) for a VAE-like usage
batch_size = 2
latent_dim = 4

mu = torch.randn(batch_size, latent_dim)
log_var = torch.randn(batch_size, latent_dim)

ARGS = {
    "mu": mu,
    "log_var": log_var,
}
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 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
parse_meta_mat Ran
ran; our contract draft was wrong, not the code
skholkin/lightsb-matching/ALAE/dataset_preparation/prepare_imagenet.py
code served (permissive licence) · get_code("fa9606a3ab19942d")
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 os
import scipy.io as sio
import numpy as np
import tempfile
import shutil

# Create a temporary directory structure with a meta.mat file
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data')
os.makedirs(data_dir, exist_ok=True)

# Create a mock meta.mat file with synsets data
# synsets structure: (idx, wnid, words, gloss, num_children, ...)
# We need entries with num_children == 0 (leaf nodes)
synsets = np.array([
    (1, 'n00000001', 'dog, canine', 'a member of the genus Canis', 0),
    (2, 'n00000002', 'cat, feline', 'a feline mammal', 2),  # has children, will be filtered
    (3, 'n00000003', 'bird, avian', 'a feathered vertebrate', 0),
    (4, 'n00000004', 'fish, aquatic', 'an aquatic vertebrate', 1),  # has children, will be filtered
], dtype=[('idx', 'O'), ('wnid', 'O'), ('words', 'O'), ('gloss', 'O'), ('num_children', 'O')])

# Save the meta.mat file
meta_path = os.path.join(data_dir, 'meta.mat')
sio.savemat(meta_path, {'synsets': synsets}, oned_as='row')

# Define ARGS with the devkit_root pointing to our temporary directory
ARGS = {
    'devkit_root': temp_dir
}
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 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
parse_val_groundtruth_txt Ran
ran, honoured the contract we drafted
skholkin/lightsb-matching/ALAE/dataset_preparation/prepare_imagenet.py
code served (permissive licence) · get_code("a928de007e90f17d")
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 list, ndim 1, dtype family int; 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 os
import tempfile
import shutil

# Create a temporary directory structure that mimics the devkit_root layout
temp_dir = tempfile.mkdtemp()
data_dir = os.path.join(temp_dir, 'data')
os.makedirs(data_dir, exist_ok=True)

# Create the validation ground truth file with sample content
val_gt_file = os.path.join(data_dir, 'ILSVRC2012_validation_ground_truth.txt')
with open(val_gt_file, 'w') as f:
    f.write('1\n')
    f.write('5\n')
    f.write('10\n')
    f.write('3\n')
    f.write('7\n')

ARGS = {
    'devkit_root': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list 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
pixel_norm Ran
ran; our contract draft was wrong, not the code
skholkin/lightsb-matching/ALAE/net.py
code served (permissive licence) · get_code("a320e6151da0b774")
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

torch.manual_seed(0)

# The function takes a tensor x and an optional epsilon parameter
# It performs pixel normalization: normalizes each pixel across the channel dimension
# x should be a tensor where mean is computed over dim=1

x = torch.randn(2, 4)  # batch_size=2, channels=4
epsilon = 1e-08

ARGS = {
    "x": x,
    "epsilon": epsilon,
}
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
reconstruction Ran
ran; our contract draft was wrong, not the code
skholkin/lightsb-matching/ALAE/losses.py
code served (permissive licence) · get_code("d1629b5dc1a4aac0")
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 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

torch.manual_seed(0)

# Create small tensors for reconstruction input and target
batch_size = 2
dim = 4

recon_x = torch.randn(batch_size, dim)
x = torch.randn(batch_size, dim)
lod = None

ARGS = {
    "recon_x": recon_x,
    "x": x,
    "lod": lod,
}
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 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
style_mod Ran
ran; our contract draft was wrong, not the code
skholkin/lightsb-matching/ALAE/net.py
pointer only (licence: MIT); the stored copy get_code serves, from podgorskiy/StyleGAN_Blobless, is pointer only (licence: NONE) · get_code("6df6223c6a733719")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from podgorskiy/StyleGAN_Blobless, and GitHub detected no licence in that repository 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. A run is recorded.

upscale2d Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
skholkin/lightsb-matching/ALAE/net.py
pointer only (licence: MIT); the stored copy get_code serves, from podgorskiy/StyleGAN_Blobless, is pointer only (licence: NONE) · get_code("10f278fd8f76579c")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from podgorskiy/StyleGAN_Blobless, and GitHub detected no licence in that repository 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. A run is recorded.

wasserstein Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
skholkin/lightsb-matching/src/discrete_ot.py
pointer only (licence: MIT); the stored copy get_code serves, from daniil-selikhanovych/asbm, is pointer only (licence: NOASSERTION) · get_code("419817784dce5e96")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from daniil-selikhanovych/asbm, and GitHub could not classify the licence of that repository (NOASSERTION). 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. A run is recorded.

discriminator_logistic_simple_gp Not yet run
unverified (harvested, no recorded run)
skholkin/lightsb-matching/ALAE/losses.py
code served (permissive licence) · get_code("f4fc729366d8c63c")
How it ran

no invocation recorded.

get_model_dict Not yet run
unverified (harvested, no recorded run)
skholkin/lightsb-matching/ALAE/checkpointer.py
code served (permissive licence) · get_code("424dcbf4c7ecc430")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 12 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 1 the same month, 12 later) and 0 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.

FunctionAlso present inEarliest-datedOthers named
upscale2d 6 other papers
3 dated earlier, 3 later
1807.07543 (2018-07)
Understanding and Improving Interpolation in Autoencoders via an Adversarial Regularizer
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
2310.01174 (2023-10)
Light Schrödinger Bridge
and 3 more not named here
kl 5 other papers
2 dated earlier, 3 later
1807.07543 (2018-07)
Understanding and Improving Interpolation in Autoencoders via an Adversarial Regularizer
2310.01174 (2023-10)
Light Schrödinger Bridge
2511.06856 (2025-11)
Contact Wasserstein Geodesics for Non-Conservative Schrödinger Bridges
and 2 more not named here
pixel_norm 5 other papers
2 dated earlier, 3 later
1807.07543 (2018-07)
Understanding and Improving Interpolation in Autoencoders via an Adversarial Regularizer
2310.01174 (2023-10)
Light Schrödinger Bridge
2511.06856 (2025-11)
Contact Wasserstein Geodesics for Non-Conservative Schrödinger Bridges
and 2 more not named here
reconstruction 5 other papers
2 dated earlier, 3 later
1807.07543 (2018-07)
Understanding and Improving Interpolation in Autoencoders via an Adversarial Regularizer
2310.01174 (2023-10)
Light Schrödinger Bridge
2511.06856 (2025-11)
Contact Wasserstein Geodesics for Non-Conservative Schrödinger Bridges
and 2 more not named here
style_mod 5 other papers
2 dated earlier, 3 later
1812.04948 (2018-12)
A Style-Based Generator Architecture for Generative Adversarial Networks
2310.01174 (2023-10)
Light Schrödinger Bridge
2511.06856 (2025-11)
Contact Wasserstein Geodesics for Non-Conservative Schrödinger Bridges
and 2 more not named here
discriminator_logistic_simple_gp 4 other papers
1 dated earlier, 3 later
2310.01174 (2023-10)
Light Schrödinger Bridge
2511.06856 (2025-11)
Contact Wasserstein Geodesics for Non-Conservative Schrödinger Bridges
2602.02241 (2026-02)
Variational Entropic Optimal Transport
and 1 more not named here
decode 3 other papers
1 dated earlier, 2 later
2310.01174 (2023-10)
Light Schrödinger Bridge
2511.06856 (2025-11)
Contact Wasserstein Geodesics for Non-Conservative Schrödinger Bridges
2602.02241 (2026-02)
Variational Entropic Optimal Transport
encode 3 other papers
1 dated earlier, 2 later
2310.01174 (2023-10)
Light Schrödinger Bridge
2511.06856 (2025-11)
Contact Wasserstein Geodesics for Non-Conservative Schrödinger Bridges
2602.02241 (2026-02)
Variational Entropic Optimal Transport
get_model_dict 3 other papers
1 dated earlier, 2 later
2310.01174 (2023-10)
Light Schrödinger Bridge
2511.06856 (2025-11)
Contact Wasserstein Geodesics for Non-Conservative Schrödinger Bridges
2602.02241 (2026-02)
Variational Entropic Optimal Transport
parse_meta_mat 3 other papers
1 dated earlier, 2 later
2310.01174 (2023-10)
Light Schrödinger Bridge
2511.06856 (2025-11)
Contact Wasserstein Geodesics for Non-Conservative Schrödinger Bridges
2602.02241 (2026-02)
Variational Entropic Optimal Transport
parse_val_groundtruth_txt 3 other papers
1 dated earlier, 2 later
2310.01174 (2023-10)
Light Schrödinger Bridge
2511.06856 (2025-11)
Contact Wasserstein Geodesics for Non-Conservative Schrödinger Bridges
2602.02241 (2026-02)
Variational Entropic Optimal Transport
wasserstein 3 other papers
1 the same month, 2 later
2402.05098 (2024-02)
Improved off-policy training of diffusion samplers
2405.14449 (2024-05)
Adversarial Schrödinger Bridge Matching
2410.12456 (2024-10)
Training Neural Samplers with Reverse Diffusive KL Divergence

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

Schrödinger Bridges (SB) have recently gained the attention of the ML community as a promising extension of classic diffusion models which is also interconnected to the Entropic Optimal Transport (EOT). Recent solvers for SB exploit the pervasive bridge matching procedures. Such procedures aim to recover a stochastic process transporting the mass between distributions given only a transport plan between them. In particular, given the EOT plan, these procedures can be adapted to solve SB. This fact is heavily exploited by recent works giving rise to matching-based SB solvers. The cornerstone here is recovering the EOT plan: recent works either use heuristical approximations (e.g., the minibatch OT) or establish iterative matching procedures which by the design accumulate the error during the training. We address these limitations and propose a novel procedure to learn SB which we call the \textbf{optimal Schrödinger bridge matching}. It exploits the optimal parameterization of the diffusion process and provably recovers the SB process \textbf{(a)} with a single bridge matching step and \textbf{(b)} with arbitrary transport plan as the input. Furthermore, we show that the optimal bridge matching objective coincides with the recently discovered energy-based modeling (EBM) objectives to learn EOT/SB. Inspired by this observation, we develop a light solver (which we call LightSB-M) to implement optimal matching in practice using the Gaussian mixture parameterization of the adjusted Schrödinger potential. We experimentally showcase the performance of our solver in a range of practical tasks. The code for our solver can be found at https://github.com/SKholkin/LightSB-Matching.

For agents

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

get_harvested_code_for_paper("2402.03207")
get_code_for_paper("2402.03207")
have("2402.03207")

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

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

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

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

Connect an agent — have() is free.