SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2312.02696 · 2023

Analyzing and Improving the Training Dynamics of Diffusion Models

arXiv · PDF · Open in the Atlas

Code that ran

14 of 18 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, 6 violated it and 6 have no contract verdict; 1 failure of our instrument; 4 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/2312.02696.json · badge: /api/ran/2312.02696.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
mmathew23/improved_edm community (classifier label)
classifier basis not recorded on the link
6 ran · 4 no recorded run
copy not recorded community
not in the paper's declared repositories
5 ran · 0 no recorded run
lucidrains/ema-pytorch extension (classifier label)
classifier basis: classifier_2025
2 ran · 0 no recorded run
FutureXiang/edm2 reimplementation (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
default Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from ThomasMrY/VCT
pointer only; the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("60fff7c3c400d7ff")
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.

default Ran
ran, violated the contract we drafted
lucidrains/ema-pytorch/ema_pytorch/ema_pytorch.py
code served (permissive licence) · get_code("aa15eaeb5d195280")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned int, ndim 0, dtype family int, 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 `default` takes two parameters: `val` and `d`
# It returns `val` if it exists (is not None), otherwise returns `d` (or calls it if callable)

# Test case 1: val is None, d is a non-callable value
val_none = None
d_value = 42

# Test case 2: val is not None
val_exists = "some_value"

# Test case 3: val is None, d is a callable
def d_callable():
    return "default_from_callable"

# We'll use test case 1 for the ARGS
ARGS = {
    'val': val_none,
    'd': d_value
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
divisible_by Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from lucidrains/soft-moe-pytorch
pointer only · get_code("f912c209e9c899ca")
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.

edm_sampler Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from nvlabs/edm2
pointer only; the stored copy get_code serves, from nvlabs/edm2, is pointer only (licence: NOASSERTION) · get_code("a14db9805bf41197")
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.

exists Ran
ran, violated the contract we drafted
this paper's copy was not recorded; identical code first harvested from ThomasMrY/VCT
pointer only; the stored copy get_code serves, from ThomasMrY/VCT, is pointer only (licence: NONE) · get_code("aa5486a3650902d8")
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.

first Ran
ran, violated the contract we drafted
lucidrains/ema-pytorch/ema_pytorch/post_hoc_ema.py
code served (permissive licence) · get_code("bf7b2572204d3d13")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned int, ndim 0, dtype family int, 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 simply returns the first element of an array
# We can pass any indexable object (list, tuple, numpy array, torch tensor, etc.)

arr = [1, 2, 3, 4, 5]

ARGS = {
    'arr': arr
}
Setup block drafted by
a language model, Claude Sonnet 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
get_default_steps Ran
ran, violated the contract we drafted
FutureXiang/edm2/sample.py
pointer only (licence: NONE) · get_code("b336b517049dc932")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, FutureXiang/edm2 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.

hide_diffusers_warnings Ran
ran on a synthesized input
mmathew23/improved_edm/ema_model.py
code served (permissive licence) · get_code("104550381b6dc76a")
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 function. 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 torch.nn as nn
from functools import wraps
from diffusers import logging

logger = logging.get_logger('diffusers')

class DiffusersHideWarnings:
    log_level = logger.level

    @classmethod
    def hide_warnings(cls):
        logging.set_verbosity_error()

    @classmethod
    def restore_warnings(cls):
        logging.set_verbosity(cls.log_level)

def hide_diffusers_warnings(func):

    @wraps(func)
    def wrapper(*args, **kwargs):
        DiffusersHideWarnings.hide_warnings()
        try:
            return func(*args, **kwargs)
        finally:
            DiffusersHideWarnings.restore_warnings()
    return wrapper


def sample_decorated_function(x, y=5):
    """A simple function to decorate for testing."""
    return x + y


decorated_func = hide_diffusers_warnings(sample_decorated_function)

ARGS = {
    "func": sample_decorated_function
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
diffusers, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
parse_int_list Ran
ran, honoured the contract we drafted
this paper's copy was not recorded; identical code first harvested from newbeeer/stf
pointer only; the stored copy get_code serves, from newbeeer/stf, is pointer only (licence: NONE) · get_code("cacd4f6ec202d9b4")
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.

pixel_norm Ran
ran on a synthesized input
mmathew23/improved_edm/model_a.py
code served (permissive licence) · get_code("a0d505b2d6c56221")
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)

# Create a small float tensor with shape (batch_size=2, channels=4)
# The function performs operations along dim=1, so we need at least 2 dimensions
x = torch.randn(2, 4, dtype=torch.float32)

# Define parameters
eps = 0.0001
dim = 1

ARGS = {
    "x": x,
    "eps": eps,
    "dim": dim,
}
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
rotate2d Ran
ran on a synthesized input
mmathew23/improved_edm/augmentation.py
code served (permissive licence) · get_code("892443de8bab233d")
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 (3, 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

torch.manual_seed(0)

# The function rotate2d takes a single parameter theta
# Looking at the body, theta is used with torch.cos and torch.sin,
# which accept scalar tensors or Python floats
# We'll provide a scalar tensor

theta = torch.tensor(0.5, dtype=torch.float32)

ARGS = {
    "theta": theta
}
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 (3, 3) — shape (3, 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
scale2d Ran
ran on a synthesized input
mmathew23/improved_edm/augmentation.py
code served (permissive licence) · get_code("bc2b81cc2d12e161")
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 (3, 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

torch.manual_seed(0)

sx = 2.5
sy = 3.7

ARGS = {
    "sx": sx,
    "sy": sy,
}
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 (3, 3) — shape (3, 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
translate2d Ran
ran on a synthesized input
mmathew23/improved_edm/augmentation.py
code served (permissive licence) · get_code("c8206975a3365ff0")
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 (3, 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

torch.manual_seed(0)

# The function translate2d takes two parameters: tx and ty
# These are used to construct a 3x3 translation matrix
# tx and ty should be scalar values (or at least convertible to float)

tx = 2.5
ty = 3.7

ARGS = {
    "tx": tx,
    "ty": ty,
}
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 (3, 3) — shape (3, 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
weight_normalize Ran
ran on a synthesized input
mmathew23/improved_edm/model.py
code served (permissive licence) · get_code("a2beaf5faecf80b8")
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 (2, 4, 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

torch.manual_seed(0)

# Create a small tensor with distinct dimensions for probing
# Shape: (batch=2, feature=4, spatial=3) to have multiple dimensions
x = torch.randn(2, 4, 3)

ARGS = {
    "x": x,
    "eps": 0.0001,
}
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 Tensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 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
get_down_block Not yet run
unverified (harvested, no recorded run)
mmathew23/improved_edm/model.py
code served (permissive licence) · get_code("4fa6b80d0288cea1")
How it ran

no invocation recorded.

get_down_block Not yet run
unverified (harvested, no recorded run)
mmathew23/improved_edm/model_a.py
code served (permissive licence) · get_code("eade47d2a50d3683")
How it ran

no invocation recorded.

get_up_block Not yet run
unverified (harvested, no recorded run)
mmathew23/improved_edm/model.py
code served (permissive licence) · get_code("c5a7eb8a1946519a")
How it ran

no invocation recorded.

get_up_block Not yet run
unverified (harvested, no recorded run)
mmathew23/improved_edm/model_a.py
code served (permissive licence) · get_code("3b34295d7d094429")
How it ran

no invocation recorded.

Also present in other papers' code

Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 6 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 3 the same month, 5 later) and 12 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 486 other papers
262 dated earlier, 16 the same month, 202 later, 4 same year, order not determinable, 2 undated · 78 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1611.07004 (2016-11)
Image-to-Image Translation with Conditional Adversarial Networks
1804.04637 (2018-04)
EMBER: An Open Dataset for Training Static PE Malware Machine Learning Models
and 483 more not named here
default 163 other papers
107 dated earlier, 3 the same month, 51 later, 1 same year, order not determinable, 1 undated · 27 only as an assembly brick
1603.08155 (2016-03)
Perceptual Losses for Real-Time Style Transfer and Super-Resolution
1810.00825 (2018-10)
Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks
1907.01470 (2019-07)
Augmenting Self-attention with Persistent Memory
and 160 more not named here
parse_int_list 37 other papers
13 dated earlier, 1 the same month, 23 later
2206.00364 (2022-06)
Elucidating the Design Space of Diffusion-Based Generative Models
2302.00670 (2023-02)
Stable Target Field for Reduced Variance Score Estimation in Diffusion Models
2302.04265 (2023-02)
PFGM++: Unlocking the Potential of Physics-Inspired Generative Models
and 34 more not named here
divisible_by 16 other papers
6 dated earlier, 10 later · 2 only as an assembly brick
2006.07733 (2020-06)
Bootstrap your own latent: A new approach to self-supervised Learning
2010.10241 (2020-10)
BYOL works even without batch statistics
2102.06810 (2021-02)
Understanding self-supervised Learning Dynamics without Contrastive Pairs
and 13 more not named here
edm_sampler 4 other papers
4 later
2406.02507 (2024-06)
Guiding a Diffusion Model with a Bad Version of Itself
2502.14583 (2025-02)
A Theory for Conditional Generative Modeling on Multiple Data Sources
2509.16447 (2025-09)
Local Mechanisms of Compositional Generalization in Conditional Diffusion
and 1 more not named here
default 1 other paper
1 dated earlier
2211.13220 (2022-11)
TetraDiffusion: Tetrahedral Diffusion Models for 3D Shape Generation

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 currently dominate the field of data-driven image synthesis with their unparalleled scaling to large datasets. In this paper, we identify and rectify several causes for uneven and ineffective training in the popular ADM diffusion model architecture, without altering its high-level structure. Observing uncontrolled magnitude changes and imbalances in both the network activations and weights over the course of training, we redesign the network layers to preserve activation, weight, and update magnitudes on expectation. We find that systematic application of this philosophy eliminates the observed drifts and imbalances, resulting in considerably better networks at equal computational complexity. Our modifications improve the previous record FID of 2.41 in ImageNet-512 synthesis to 1.81, achieved using fast deterministic sampling. As an independent contribution, we present a method for setting the exponential moving average (EMA) parameters post-hoc, i.e., after completing the training run. This allows precise tuning of EMA length without the cost of performing several training runs, and reveals its surprising interactions with network architecture, training time, and guidance.

For agents

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

get_harvested_code_for_paper("2312.02696")
get_code_for_paper("2312.02696")
have("2312.02696")

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

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

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

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

Connect an agent — have() is free.