Papers › Bidirectional Consistency Models

Bidirectional Consistency Models

26 Mar 2024arXiv:2403.18035archive 2025-07-28

Liangchen Li, Jiajun He

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, wh ich 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, inpainting, and blind restoration of compressed images. Notably, when the number of function evaluations (NFE) is constrained, BCM surpasses domain-specific restoration methods, such as I²SB and Palette, in a fully zero-shot manner, offering an efficient alternative for inversion problems. Our code and weights are available at https://github.com/Mosasaur5526/BCM-iCT-torch.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

Syntology holds a reference implementation of Bidirectional Consistency Model (BCM), generated from the paper text (not the authors' code), at level 3 on Syntology's ladder: V2 “two implementations GENERATED from the paper's signature and spec agree numerically (1e-6) on fixture inputs” “neither of the two ever read the authors' own code, so V2 measures how unambiguously the paper specifies the method, not fidelity to the authors' implementation (measured 2026-09-11, commit 75eaa77: cross_checked_by is a second LLM on 2,628 of 2,831 served samples)”; V3 “paper-derived property tests pass on both of those same two generations.” (quoted from Syntology's server card). No rung compares this code against the authors' implementation. For agents: get_reference_implementation(name='Bidirectional Consistency Model (BCM)') (how to connect); the free check have('2403.18035') needs no token.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 6 code samples harvested from 1 repository linked to this paper: 2 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 4 unverified. Where Syntology's instrument failed: 2 where our contract draft was wrong; failures of Syntology's instrument, not of the code. Every run on this page is a failure of Syntology's instrument, not of the code.

By repository: official repository: 6 samples from 1 repository, 2 ran (0 with no instrument failure; 2 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 2 samples that ran has no recorded date.

Mosasaur5526/BCM-iCT-torch officialmentioned in papermentioned on GitHubpytorchSyntology: 6 samples, 2 ran (2 instrument-failed) · 4 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

6 samples harvested: 2 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 4 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Every run on this page is a failure of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · our draft was wrong
4unverified

Licence: 1 of the 6 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from Mosasaur5526/BCM-iCT-torch. 1 sample whose link to this paper records no repository is listed under one of this paper's own repositories, because identical code was harvested from it for another paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

Mosasaur5526/BCM-iCT-torch official repository 6 samples, 2 ran (2 instrument-failed) · 4 unverified
center_crop_arr in 79 papers BCM/scripts/image_sample.py ran · our draft was wrong MIT (permissive) · 8ab9a97df8161f31 · report fixture: signature pil_image:Image/0/?, image_size:int/0/int · returned ndarray · level recorded, date not recorded
normalize in 638 papers
census: 70 implementations from 82 papers, 51 distinct outputs across 11 buckets, one shared input per bucket this sample: bucket 5 of 11, arg 1: rank 3, kind float, dtype float32
iCT/cm/unet.py identical code Syntology harvested from this repository for another paper; this paper's link records no repository, path or licence of its own ran · our draft was wrong fingerprinted licence of this copy not recorded · b0e4dda425036670 · report fixture: signature x:Tensor/3/float, dim:NoneType/0/?, eps:float/0/float · returned Tensor · level recorded 2026-09-22
AttentionBlock in 69 papers BCM/cm/unet_bcf.py unverified MIT (permissive) · 53a57001a5ab3d90 · report
QKVAttentionLegacy in 20 papers BCM/cm/unet_bcf.py unverified MIT (permissive) · df0352093b65b725 · report
QKVFlashAttention BCM/cm/unet_bcf.py unverified MIT (permissive) · 9d3252bcb34c8c87 · report
UNetModel in 23 papers BCM/cm/unet_bcf.py unverified MIT (permissive) · 4b40be28390ec6d9 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. For a generated assembly, an independent peer is a second implementation generated separately from the same paper text; neither implementation read the authors' code. At level 2 the two agreed numerically on the fixture's inputs; level 3 is recorded when property tests derived from the paper also passed on both, and each level 3 card prints how many its report lists. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. A generated assembly's label was set when its code was generated for the method, and no model judged it; its card prints it as "by construction" or "not judged by a model". Where an assembly's phrase has no constructed figure, a brick that ran is not among the harvested samples this build reads, and whether a brick's run only constructed an object is read from that brick's harvested sample, so the figure was not counted; it does not say there were none.

2 assemblies on this paper: 1 harvested, 1 generated.

generated Assembly for Bidirectional Consistency Model (BCM) (graph method: Bidirectional Consistency Model (BCM)), generated from the paper text, not the repository's code. 1 brick; individually on a fixture: 1 ran (1 with no instrument failure: 1 honoured, 0 violated, 0 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified. Ran end-to-end against an independent peer (level 3; 5 property tests passed on both).

label matches by construction: the code was generated for this method (not judged by a model)

  1. bidirectional_consistency_loss entry · level 3 · ran · honoured contract · c5b6f8bf47d9e2743fe2bff232e61beb698d18519dd4c3684f9860072eab2afd

harvested Assembly for Bidirectional Consistency Model (BCM) (graph method: Bidirectional Consistency Model (BCM)). 22 bricks; individually on a fixture: 9 ran (of which 4 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 5 where Syntology's instrument failed) · 13 unverified. The assembly has not been run end-to-end.

  1. UNetModel entry · level 0 · unverified · 4b40be28390ec6d9
  2. AttentionBlock model · level 0 · unverified · 53a57001a5ab3d90
  3. Downsample model · level 1 · ran · 8c5676227adb2492
  4. ResBlock model · level 0 · unverified · 0fc14114982f5c9d
  5. TimestepEmbedSequential model · level 0 · unverified · ed74c5af0b1d1d51
  6. Upsample model · level 1 · ran · 6998a3677700ee6c
  7. conv_nd helper · level 0 · unverified · fe4eb545bbb728e0
  8. convert_module_to_f16 helper · level 0 · unverified · ac07425399caf784
  9. convert_module_to_f32 helper · level 0 · unverified · b283a8ab305dc007
  10. linear helper · level 1 · ran · our draft was wrong · 0e30585f04efffbe
  11. normalization helper · level 1 · ran · our draft was wrong · 5b31715a9b105926
  12. timestep_embedding helper · level 1 · ran · our draft was wrong · b0aa348a2f95ef0f
  13. zero_module helper · level 1 · ran · our draft was wrong · 129b804760b3115f
  14. QKVAttentionLegacy helper · level 0 · unverified · df0352093b65b725
  15. QKVFlashAttention model · level 0 · unverified · 9d3252bcb34c8c87
  16. checkpoint helper · level 0 · unverified · fb150e1f7e53041e
  17. avg_pool_nd helper · level 0 · unverified · ecd0fc28815b65ae
  18. TimestepBlock helper · level 0 · unverified · 40fb9bc947892adc
  19. GroupNorm32 helper · level 1 · ran · 426c2385fa431d9a
  20. count_flops_attn helper · level 0 · unverified · 0c49097ae6ff37ef
  21. normalize helper · level 1 · ran · our draft was wrong · b0e4dda425036670
  22. CheckpointFunction helper · level 1 · ran · 27faeacc0d8cf344

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2403.18035") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Image GenerationImage InpaintingJPEG Artifact Removal

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Consistency Models

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections