SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.18035 · ICML · 2024

Bidirectional Consistency Models

Jiajun He, Liangchen Li

arXiv · PDF · Open in the Atlas

Code that ran

2 of 6 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, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 4 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; 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/2403.18035.json · badge: /api/ran/2403.18035.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
Mosasaur5526/BCM-iCT-torch canonical (classifier label)
classifier basis: classifier_2025
1 ran · 4 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
center_crop_arr Ran
ran; our contract draft was wrong, not the code
Mosasaur5526/BCM-iCT-torch/BCM/scripts/image_sample.py
code served (permissive licence) · get_code("8ab9a97df8161f31")
How it ran

Ran in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned ndarray, ndim 3, dtype family int, shape (64, 64, 3) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-05T00:51:18Z). 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.

from PIL import Image
import numpy as np

# Create a small PIL Image for testing
# Make it larger than 2 * image_size so we can test the resizing logic
pil_image = Image.new('RGB', (256, 256), color='red')

# Define image_size parameter
image_size = 64

# Construct ARGS dictionary
ARGS = {
    'pil_image': pil_image,
    'image_size': image_size
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL, numpy — 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 (64, 64, 3) — shape (64, 64, 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
normalize Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from Mosasaur5526/BCM-iCT-torch
pointer only · get_code("b0e4dda425036670")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

AttentionBlock Not yet run
unverified (harvested, no recorded run)
Mosasaur5526/BCM-iCT-torch/BCM/cm/unet_bcf.py
code served (permissive licence) · get_code("53a57001a5ab3d90")
How it ran

no invocation recorded.

QKVAttentionLegacy Not yet run
unverified (harvested, no recorded run)
Mosasaur5526/BCM-iCT-torch/BCM/cm/unet_bcf.py
code served (permissive licence) · get_code("df0352093b65b725")
How it ran

no invocation recorded.

QKVFlashAttention Not yet run
unverified (harvested, no recorded run)
Mosasaur5526/BCM-iCT-torch/BCM/cm/unet_bcf.py
code served (permissive licence) · get_code("9d3252bcb34c8c87")
How it ran

no invocation recorded.

UNetModel Not yet run
unverified (harvested, no recorded run)
Mosasaur5526/BCM-iCT-torch/BCM/cm/unet_bcf.py
code served (permissive licence) · get_code("4b40be28390ec6d9")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 1 later) and 4 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
center_crop_arr 33 other papers
19 dated earlier, 1 the same month, 12 later, 1 same year, order not determinable
2111.11672 (2021-11)
Few-shot Image Generation with Mixup-based Distance Learning
2111.14818 (2021-11)
Blended Diffusion for Text-driven Editing of Natural Images
2203.15636 (2022-03)
Diffusion Models for Counterfactual Explanations
and 30 more not named here
normalize
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2310.14189 (2023-10)
Improved Techniques for Training Consistency Models

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

Diffusion models (DMs) are capable of generating remarkably high-quality samples by iteratively denoising a random vector, a process that corresponds to moving along the probability flow ordinary differential equation (PF ODE). Interestingly, DMs can also invert an input image to noise by moving backward along the PF ODE, a key operation for downstream tasks such as interpolation and image editing. However, the iterative nature of this process restricts its speed, hindering its broader application. Recently, Consistency Models (CMs) have emerged to address this challenge by approximating the integral of the PF ODE, largely reducing the number of iterations. Yet, the absence of an explicit ODE solver complicates the inversion process. To resolve this, we introduce Bidirectional Consistency Model (BCM), which learns a single neural network that enables both forward and backward traversal along the PF ODE, efficiently unifying generation and inversion tasks within one framework. We can train BCM from scratch or tune it using a pretrained consistency model, which reduces the training cost and increases scalability. We demonstrate that BCM enables one-step generation and inversion while also allowing the use of additional steps to enhance generation quality or reduce reconstruction error. We further showcase BCM's capability in downstream tasks, such as interpolation and inpainting. Our code and weights are available at https://github.com/Mosasaur5526/BCM-iCT-torch. This issue has been recently addressed by consistency models (CMs) (Song et al., 2023;Song & Dhariwal, 2024), which directly compute the integral of PF ODE trajectory from any time step to zero. Similar to CMs, Kim et al. (2024) introduced the Consistency Trajectory Model (CTM), ˚Equal Contribution 1 The inversion problem also refers to restoring a high-quality image from its degraded version. However, in this paper, we define it more narrowly as the task of finding the corresponding noise for an input image.

For agents

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

get_harvested_code_for_paper("2403.18035")
get_code_for_paper("2403.18035")
have("2403.18035")

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

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

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

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

Connect an agent — have() is free.