SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.09502 · 2024

Golden Noise for Diffusion Models: A Learning Framework

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 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; 2 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 4 failures of our instrument; 0 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/2411.09502.json · badge: /api/ran/2411.09502.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
xie-lab-ml/golden-noise-for-diffusion-models canonical (classifier label)
classifier basis: census
8 ran · 0 no recorded run
FunctionStatusWhere it lives
default Ran
ran, violated the contract we drafted
xie-lab-ml/golden-noise-for-diffusion-models/training/trainer/models/cross_modeling.py
pointer only (licence: Apache-2.0); 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 link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ThomasMrY/VCT, 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.

exists Ran
ran, violated the contract we drafted
xie-lab-ml/golden-noise-for-diffusion-models/training/trainer/models/cross_modeling.py
pointer only (licence: Apache-2.0); 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 link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ThomasMrY/VCT, 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.

gaussain_value Ran
ran, honoured the contract we drafted
xie-lab-ml/golden-noise-for-diffusion-models/training/utils/pipeline_stable_diffusion_xl.py
code served (permissive licence) · get_code("24dc4d42ab940e5d")
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 Tensor, 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 expects a tensor-like object with .mean() and .std() methods
# Create a small tensor with shape (2, 4) for testing
data = torch.randn(2, 4)

ARGS = {
    "data": data
}
Setup block drafted by
a language model, Claude Haiku 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 Tensor, 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
load_pick_prompt Ran
ran; our contract draft was wrong, not the code
xie-lab-ml/golden-noise-for-diffusion-models/training/dataset_collection.py
code served (permissive licence) · get_code("49d9e7d69e90a7ae")
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, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 tempfile
import os

# Create a temporary file with valid prompt data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, encoding='utf-8', suffix='.txt')
temp_file_path = temp_file.name

try:
    # Write test data in the format the function expects
    test_data = [
        "{'caption': 'a dog running in the park', 'seed': 42}",
        "{'caption': 'a cat sleeping on the couch', 'seed': 123}",
    ]
    
    for line in test_data:
        temp_file.write(line + '\n')
    
    temp_file.close()
    
    ARGS = {
        'path': temp_file_path
    }
    
finally:
    # Clean up will happen after ARGS is used
    pass
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
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
load_prompt Ran
ran; our contract draft was wrong, not the code
xie-lab-ml/golden-noise-for-diffusion-models/training/dataset_collection.py
code served (permissive licence) · get_code("94040482358d6999")
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. 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 json
import csv
import tempfile
import os

# Create temporary CSV file for 'pick' version
temp_dir = tempfile.mkdtemp()
pick_csv_path = os.path.join(temp_dir, 'pick_prompts.csv')
with open(pick_csv_path, 'w', newline='', encoding='utf-8') as f:
    writer = csv.writer(f)
    writer.writerow(['id', 'caption'])
    for i in range(105):
        writer.writerow([str(i), f'prompt_{i}'])

# Create temporary CSV file for 'draw' version
draw_csv_path = os.path.join(temp_dir, 'draw_prompts.csv')
with open(draw_csv_path, 'w', newline='', encoding='utf-8') as f:
    writer = csv.writer(f)
    writer.writerow(['Prompts', 'other_col'])
    for i in range(205):
        writer.writerow([f'draw_prompt_{i}', 'data'])

# Create temporary seed JSON file
seed_json_path = os.path.join(temp_dir, 'seeds.json')
seed_list = [1, 2, 3, 4, 5, 42]
with open(seed_json_path, 'w') as f:
    json.dump(seed_list, f)

ARGS = {
    'path': pick_csv_path,
    'seed_path': seed_json_path,
    'prompt_version': 'pick'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — 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
mle_gaussian_loss Ran
ran, honoured the contract we drafted
xie-lab-ml/golden-noise-for-diffusion-models/training/utils/pipeline_stable_diffusion_xl.py
code served (permissive licence) · get_code("f872344aa62193f2")
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 float32, 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
from scipy import stats

torch.manual_seed(0)

# The function expects a tensor with clone(), detach(), to('cpu'), and flatten() methods
# It then converts to numpy and computes skewness and kurtosis
# We need a tensor with some data that will produce valid statistics

latents = torch.randn(2, 4)

ARGS = {
    "latents": latents
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, 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
rescale_noise_cfg Ran
ran; our contract draft was wrong, not the code
xie-lab-ml/golden-noise-for-diffusion-models/training/utils/pipeline_stable_diffusion_xl.py
code served (permissive licence) · get_code("bea2d776a332f2b0")
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 Tensor, ndim 4, dtype family float, shape (2, 4, 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)

# Create small tensors with distinct dimensions
# noise_cfg: shape (batch=2, channels=4, height=3, width=3)
noise_cfg = torch.randn(2, 4, 3, 3)

# noise_pred_text: shape (batch=2, channels=4, height=3, width=3)
noise_pred_text = torch.randn(2, 4, 3, 3)

# guidance_rescale: float between 0 and 1
guidance_rescale = 0.7

ARGS = {
    "noise_cfg": noise_cfg,
    "noise_pred_text": noise_pred_text,
    "guidance_rescale": guidance_rescale,
}
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 Tensor, ndim 4, dtype family float, shape (2, 4, 3, 3) — shape (2, 4, 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
rotate_half Ran
ran; our contract draft was wrong, not the code
xie-lab-ml/golden-noise-for-diffusion-models/training/trainer/models/cross_modeling.py
code served (permissive licence) · get_code("fdd93453f92f9167")
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 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
from einops import rearrange, repeat

torch.manual_seed(0)

# The function rotate_half takes a single parameter 'x' which is a tensor
# It uses rearrange to reshape x into shape '... (j d) -> ... j d' with j=2
# This means the last dimension must be even (divisible by 2)
# Then it unbinds along dim=-2 and concatenates
# Let's create a small tensor with an even last dimension

x = torch.randn(2, 4)  # batch=2, last_dim=4 (even, so can be split into j=2, d=2)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
einops, 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 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 6 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 3 the same month, 6 later) and 2 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
397 dated earlier, 14 the same month, 64 later, 9 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
141 dated earlier, 3 the same month, 16 later, 2 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
rescale_noise_cfg 62 other papers
46 dated earlier, 1 the same month, 14 later, 1 same year, order not determinable
2206.02779 (2022-06)
Blended Latent Diffusion
2304.06720 (2023-04)
Expressive Text-to-Image Generation with Rich Text
2309.06380 (2023-09)
InstaFlow: One Step is Enough for High-Quality Diffusion-Based Text-to-Image Generation
and 59 more not named here
rotate_half 13 other papers
9 dated earlier, 3 later, 1 same year, order not determinable · 2 only as an assembly brick
2112.04426 (2021-12)
Improving language models by retrieving from trillions of tokens
2202.07765 (2022-02)
General-purpose, long-context autoregressive modeling with Perceiver AR
2203.07852 (2022-03)
Block-Recurrent Transformers
and 10 more not named here
gaussain_value 1 other paper
1 later
2412.10891 (2024-12)
Zigzag Diffusion Sampling: Diffusion Models Can Self-Improve via Self-Reflection
mle_gaussian_loss 1 other paper
1 later
2412.10891 (2024-12)
Zigzag Diffusion Sampling: Diffusion Models Can Self-Improve via Self-Reflection

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

Text-to-image diffusion model is a popular paradigm that synthesizes personalized images by providing a text prompt and a random Gaussian noise. While people observe that some noises are ``golden noises'' that can achieve better text-image alignment and higher human preference than others, we still lack a machine learning framework to obtain those golden noises. To learn golden noises for diffusion sampling, we mainly make three contributions in this paper. First, we identify a new concept termed the \textit{noise prompt}, which aims at turning a random Gaussian noise into a golden noise by adding a small desirable perturbation derived from the text prompt. Following the concept, we first formulate the \textit{noise prompt learning} framework that systematically learns ``prompted'' golden noise associated with a text prompt for diffusion models. Second, we design a noise prompt data collection pipeline and collect a large-scale \textit{noise prompt dataset}~(NPD) that contains 100k pairs of random noises and golden noises with the associated text prompts. With the prepared NPD as the training dataset, we trained a small \textit{noise prompt network}~(NPNet) that can directly learn to transform a random noise into a golden noise. The learned golden noise perturbation can be considered as a kind of prompt for noise, as it is rich in semantic information and tailored to the given text prompt. Third, our extensive experiments demonstrate the impressive effectiveness and generalization of NPNet on improving the quality of synthesized images across various diffusion models, including SDXL, DreamShaper-xl-v2-turbo, and Hunyuan-DiT. Moreover, NPNet is a small and efficient controller that acts as a plug-and-play module with very limited additional inference and computational costs, as it just provides a golden noise instead of a random noise without accessing the original pipeline.

For agents

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

get_harvested_code_for_paper("2411.09502")
get_code_for_paper("2411.09502")
have("2411.09502")

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

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

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

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

Connect an agent — have() is free.