SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2502.05749 · 2025

UniDB: A Unified Diffusion Bridge Framework via Stochastic Optimal Control

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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; 0 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 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/2502.05749.json · badge: /api/ran/2502.05749.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
unidb-soc/unidb canonical (classifier label)
classifier basis not recorded on the link
8 ran · 1 no recorded run
FunctionStatusWhere it lives
NonLinearity Ran
ran; our contract draft was wrong, not the code
unidb-soc/unidb/UniDB-GOU/models/modules/module_util.py
pointer only (licence: MIT); the stored copy get_code serves, from Hammour-steak/ECDB, is pointer only (licence: NONE) · get_code("5b4b368d735cbee9")
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 Hammour-steak/ECDB, 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.

add_noise Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
unidb-soc/unidb/UniDB-GOU/utils/deg_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from Hammour-steak/ECDB, is pointer only (licence: NONE) · get_code("85bf2da666cd3d07")
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 Hammour-steak/ECDB, 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.

default Ran
ran, violated the contract we drafted
unidb-soc/unidb/UniDB-GOU/models/modules/module_util.py
code served (permissive licence) · get_code("d1ef6b8cb9a28a53")
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) and returned str. 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

torch.manual_seed(0)

def exists(x):
    return x is not None

def default(val, d):
    if exists(val):
        return val
    return d() if callable(d) else d

# Test case 1: val is not None, should return val
val_1 = "test_value"
d_1 = lambda: "default_value"

# Test case 2: val is None, d is callable, should return d()
val_2 = None
d_2 = lambda: "computed_default"

# Test case 3: val is None, d is not callable, should return d
val_3 = None
d_3 = "static_default"

# Test case 4: val is a number
val_4 = 42
d_4 = 100

# Test case 5: val is a tensor
val_5 = torch.tensor([1.0, 2.0, 3.0])
d_5 = lambda: torch.tensor([0.0])

ARGS = {
    "val": val_1,
    "d": d_1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
exists Ran
ran, violated the contract we drafted
unidb-soc/unidb/UniDB-GOU/models/modules/module_util.py
code served (permissive licence) · get_code("608e364a9d2376a3")
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) and returned bool, 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

def exists(x):
    return x is not None

ARGS = {
    "x": torch.tensor([1, 2, 3, 4])
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
mask_to Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
unidb-soc/unidb/UniDB-GOU/utils/deg_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from Hammour-steak/ECDB, is pointer only (licence: NONE) · get_code("0a0f56e2ac5b29cf")
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 Hammour-steak/ECDB, 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.

tensor2img Ran
ran; our contract draft was wrong, not the code
unidb-soc/unidb/UniDB-GOU/utils/img_utils.py
code served (permissive licence) · get_code("1b40b4f3f0ea0b6e")
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 3, dtype family int, shape (14, 9, 3) 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 math
from torchvision.utils import make_grid

torch.manual_seed(0)

# Test with a 4D tensor (B, C, H, W)
tensor_4d = torch.rand(2, 3, 4, 5)

# Test with a 3D tensor (C, H, W)
tensor_3d = torch.rand(3, 6, 7)

# Test with a 2D tensor (H, W)
tensor_2d = torch.rand(8, 9)

ARGS = {
    "tensor": tensor_4d,
    "out_type": np.uint8,
    "min_max": (0, 1)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (14, 9, 3) — shape (14, 9, 3) 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
to_pil_image Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
unidb-soc/unidb/UniDB-GOU/utils/img_utils.py
code served (permissive licence) · get_code("d7114767266ade00")
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 Image. 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 valid tensor image: shape (3, 4, 5) meaning 3 channels, 4 height, 5 width
# Using uint8 values [0, 255]
pic_tensor = torch.randint(0, 256, (3, 4, 5), dtype=torch.uint8)

ARGS = {
    "pic": pic_tensor,
    "mode": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 3 and dtype family int 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
upscale Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
unidb-soc/unidb/UniDB-GOU/utils/deg_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from Hammour-steak/ECDB, is pointer only (licence: NONE) · get_code("b3ccfc519d222aca")
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 Hammour-steak/ECDB, 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.

to_tensor Not yet run
unverified (harvested, no recorded run)
unidb-soc/unidb/UniDB-GOU/utils/img_utils.py
code served (permissive licence) · get_code("ed7d86a762c62a9e")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 2 the same month, 2 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
exists 144 other papers
119 dated earlier, 2 the same month, 20 later, 3 same year, order not determinable · 40 only as an assembly brick
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1711.11585 (2017-11)
High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
and 141 more not named here
default 79 other papers
64 dated earlier, 2 the same month, 11 later, 2 same year, order not determinable · 15 only as an assembly brick
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
2006.11239 (2020-06)
Denoising Diffusion Probabilistic Models
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
and 76 more not named here
tensor2img 2 other papers
2 dated earlier
1905.02716 (2019-05)
EDVR: Video Restoration with Enhanced Deformable Convolutional Networks
2006.04924 (2020-06)
A Self-supervised Approach for Adversarial Robustness
to_pil_image 2 other papers
2 dated earlier
1807.06587 (2018-07)
Deep Exemplar-based Colorization
1906.09909 (2019-06)
Deep Exemplar-based Video Colorization
to_tensor 2 other papers
2 dated earlier
1807.06587 (2018-07)
Deep Exemplar-based Colorization
1906.09909 (2019-06)
Deep Exemplar-based Video Colorization
NonLinearity 1 other paper
1 dated earlier
2408.16303 (2024-08)
Enhanced Control for Diffusion Bridge in Image Restoration
add_noise 1 other paper
1 dated earlier
2408.16303 (2024-08)
Enhanced Control for Diffusion Bridge in Image Restoration
mask_to 1 other paper
1 dated earlier
2408.16303 (2024-08)
Enhanced Control for Diffusion Bridge in Image Restoration
upscale 1 other paper
1 dated earlier
2408.16303 (2024-08)
Enhanced Control for Diffusion Bridge in Image Restoration

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

Recent advances in diffusion bridge models leverage Doob's $h$-transform to establish fixed endpoints between distributions, demonstrating promising results in image translation and restoration tasks. However, these approaches frequently produce blurred or excessively smoothed image details and lack a comprehensive theoretical foundation to explain these shortcomings. To address these limitations, we propose UniDB, a unified framework for diffusion bridges based on Stochastic Optimal Control (SOC). UniDB formulates the problem through an SOC-based optimization and derives a closed-form solution for the optimal controller, thereby unifying and generalizing existing diffusion bridge models. We demonstrate that existing diffusion bridges employing Doob's $h$-transform constitute a special case of our framework, emerging when the terminal penalty coefficient in the SOC cost function tends to infinity. By incorporating a tunable terminal penalty coefficient, UniDB achieves an optimal balance between control costs and terminal penalties, substantially improving detail preservation and output quality. Notably, UniDB seamlessly integrates with existing diffusion bridge models, requiring only minimal code modifications. Extensive experiments across diverse image restoration tasks validate the superiority and adaptability of the proposed framework. Our code is available at https://github.com/UniDB-SOC/UniDB/.

For agents

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

get_harvested_code_for_paper("2502.05749")
get_code_for_paper("2502.05749")
have("2502.05749")

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

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

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

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

Connect an agent — have() is free.