SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.17042 · 2023

Adversarial Diffusion Distillation

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 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/2311.17042.json · badge: /api/ran/2311.17042.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
leffff/adversarial-diffusion-distillation reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
2 ran · 0 no recorded run
NJU-PCALab/AddSR extension (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
TA_weight Ran
ran, honoured the contract we drafted
NJU-PCALab/AddSR/train_addsr.py
code served (permissive licence) · get_code("66d08fa44c3c9178")
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 float, 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

torch.manual_seed(0)

# The function TA_weight takes a single parameter 't' which is an integer
# It performs conditional logic based on the value of t and returns a computed weight
# No complex objects needed - just an integer parameter

ARGS = {
    "t": 999
}
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 float, 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
backward_diffusion_process Ran
ran; our contract draft was wrong, not the code
leffff/adversarial-diffusion-distillation/add/diffusion.py
code served (permissive licence) · get_code("7099c38f8214b495")
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. 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, 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 noise scheduler that has the required methods
class MinimalNoiseScheduler:
    def __init__(self):
        self.timesteps = None
    
    def set_timesteps(self, num_inference_steps: int):
        # Create timesteps in reverse order (from num_inference_steps-1 down to 0)
        self.timesteps = torch.arange(num_inference_steps - 1, -1, -1)
    
    def scale_model_input(self, x, t):
        # Just return the input as-is (minimal implementation)
        return x
    
    def step(self, model_output, timestep, sample):
        # Return a simple step result with prev_sample attribute
        class StepOutput:
            def __init__(self, prev_sample):
                self.prev_sample = prev_sample
        
        # Minimal: just return a slightly modified sample
        return StepOutput(sample - 0.01 * model_output)

# Build a minimal model that matches how it's called in the function
class MinimalDiffusionModel(nn.Module):
    def __init__(self, latent_dim: int = 4, time_dim: int = 4, cond_dim: int = 3):
        super().__init__()
        self.fc = nn.Linear(latent_dim + time_dim + cond_dim, latent_dim)
    
    def forward(self, model_input, t_batch, y, return_dict=False):
        # model_input: (bs, latent_dim)
        # t_batch: (bs,) 
        # y: (bs, cond_dim)
        bs = model_input.shape[0]
        t_emb = torch.zeros(bs, 4)  # Simple time embedding
        combined = torch.cat([model_input, t_emb, y], dim=-1)
        noise_pred = self.fc(combined)
        
        if return_dict:
            return {"sample": noise_pred}
        else:
            return (noise_pred,)

# Create instances
noise_scheduler = MinimalNoiseScheduler()
model = MinimalDiffusionModel(latent_dim=4, time_dim=4, cond_dim=3)

# Create small tensors
batch_size = 2
latent_dim = 4
cond_dim = 3

x = torch.randn(batch_size, latent_dim)
y = torch.randn(batch_size, cond_dim)
t = 5

ARGS = {
    'x': x,
    't': t,
    'y': y,
    'model': model,
    'noise_scheduler': noise_scheduler,
    'device': 'cpu',
    'num_timesteps': 1000
}
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
forward_diffusion_process Ran
ran; our contract draft was wrong, not the code
leffff/adversarial-diffusion-distillation/add/diffusion.py
code served (permissive licence) · get_code("8b0e9ee658cf5060")
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. 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 random

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

class MockNoiseScheduler:
    def __init__(self):
        self.timesteps = torch.arange(1000 - 1, -1, -1, dtype=torch.long)
    
    def set_timesteps(self, num_inference_steps: int):
        self.timesteps = torch.arange(num_inference_steps - 1, -1, -1, dtype=torch.long)
    
    def add_noise(self, x, noise, t):
        # Simple mock: just add scaled noise based on timestep
        # t_batch shape is (batch_size,), we need to reshape for broadcasting
        t_expanded = t.view(-1, 1, 1, 1)  # (batch_size, 1, 1, 1)
        alpha = 1.0 - (t_expanded / 1000.0)
        noisy = alpha * x + (1.0 - alpha) * noise
        return noisy

x = torch.randn(2, 4, 3, 3)
noise_scheduler = MockNoiseScheduler()

ARGS = {
    'x': x,
    'noise_scheduler': noise_scheduler,
    'device': 'cpu',
    'num_timesteps': 1000
}
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 — 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
image_grid Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
this paper's copy was not recorded; identical code first harvested from google-research/google-research
pointer only · get_code("bd5a05ce886da4ce")
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.

mean_flat Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from hanjq17/GeoTDM
pointer only · get_code("f6d7c009a8efb8b7")
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.

one_step_backward_diffusion_process Ran
ran; our contract draft was wrong, not the code
leffff/adversarial-diffusion-distillation/add/diffusion.py
code served (permissive licence) · get_code("bae90d136d8df45a")
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. 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, 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)

# Define a minimal model that matches the function's usage
class DummyDiffusionModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def forward(self, x, t, y, return_dict=False):
        # x: model input tensor
        # t: timestep tensor
        # y: conditioning tensor
        # Returns noise prediction
        noise_pred = self.linear(x)
        if return_dict:
            return {"sample": noise_pred}
        else:
            return (noise_pred,)

# Define a minimal noise scheduler that matches the function's usage
class DummyNoiseScheduler:
    def __init__(self):
        self.timesteps = None
    
    def set_timesteps(self, num_inference_steps):
        self.timesteps = torch.arange(num_inference_steps)
    
    def scale_model_input(self, x, t):
        # Scale the input (identity for this dummy)
        return x
    
    def step(self, model_output, timestep, sample):
        # Return an object with pred_original_sample attribute
        class StepOutput:
            def __init__(self, pred_original_sample):
                self.pred_original_sample = pred_original_sample
        
        # Dummy implementation: return scaled output
        return StepOutput(pred_original_sample=model_output)

# Create instances
x = torch.randn(2, 4)  # batch size 2, feature dim 4
t = 5  # timestep index
y = torch.randn(2, 3)  # conditioning tensor, different dim for distinction
model = DummyDiffusionModel()
noise_scheduler = DummyNoiseScheduler()

ARGS = {
    "x": x,
    "t": t,
    "y": y,
    "model": model,
    "noise_scheduler": noise_scheduler,
    "device": "cpu",
    "num_timesteps": 1000
}
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

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, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 3 later) and 3 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
mean_flat 60 other papers
21 dated earlier, 38 later, 1 same year, order not determinable · 25 only as an assembly brick
2010.02502 (2020-10)
Denoising Diffusion Implicit Models
2105.05233 (2021-05)
Diffusion Models Beat GANs on Image Synthesis
2201.06503 (2022-01)
Analytic-DPM: an Analytic Estimate of the Optimal Reverse Variance in Diffusion Probabilistic Models
and 57 more not named here
image_grid 17 other papers
2 dated earlier, 1 the same month, 14 later
2201.08896 (2022-01)
Environment Generation for Zero-Shot Compositional Reinforcement Learning
2303.09522 (2023-03)
P+: Extended Textual Conditioning in Text-to-Image Generation
2311.16518 (2023-11)
SeeSR: Towards Semantics-Aware Real-World Image Super-Resolution
and 14 more not named here
TA_weight 1 other paper
1 later
2404.01717 (2024-04)
AddSR: Accelerating Diffusion-based Blind Super-Resolution with Adversarial Diffusion Distillation

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

We introduce Adversarial Diffusion Distillation (ADD), a novel training approach that efficiently samples large-scale foundational image diffusion models in just 1-4 steps while maintaining high image quality. We use score distillation to leverage large-scale off-the-shelf image diffusion models as a teacher signal in combination with an adversarial loss to ensure high image fidelity even in the low-step regime of one or two sampling steps. Our analyses show that our model clearly outperforms existing few-step methods (GANs, Latent Consistency Models) in a single step and reaches the performance of state-of-the-art diffusion models (SDXL) in only four steps. ADD is the first method to unlock single-step, real-time image synthesis with foundation models. Code and weights available under https://github.com/Stability-AI/generative-models and https://huggingface.co/stabilityai/ .

For agents

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

get_harvested_code_for_paper("2311.17042")
get_code_for_paper("2311.17042")
have("2311.17042")

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

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

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

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

Connect an agent — have() is free.