SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.02583 · 2023

Stable Diffusion is Unstable

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 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, 1 violated it and 3 have no contract verdict; 2 failures of our instrument; 3 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/2306.02583.json · badge: /api/ran/2306.02583.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
duchengbin8/Stable_Diffusion_is_Unstable community (classifier label)
classifier basis not recorded on the link
6 ran · 3 no recorded run
FunctionStatusWhere it lives
bool_flag Ran
ran, violated the contract we drafted
duchengbin8/Stable_Diffusion_is_Unstable/src/utils.py
code served (permissive licence) · get_code("a198cecc0e49bd0b")
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 bool, 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 argparse

FALSY_STRINGS = {'off', 'false', '0'}
TRUTHY_STRINGS = {'on', 'true', '1'}

def bool_flag(s):
    """
    Parse boolean arguments from the command line.
    """
    if s.lower() in FALSY_STRINGS:
        return False
    elif s.lower() in TRUTHY_STRINGS:
        return True
    else:
        raise argparse.ArgumentTypeError('invalid value for a boolean flag')

ARGS = {
    's': 'true'
}
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 bool, 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
clean_filename Ran
ran on a synthesized input
duchengbin8/Stable_Diffusion_is_Unstable/classfier.py
code served (permissive licence) · get_code("d0d92f08471afa05")
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 str. 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 string

def clean_filename(filename):
    valid_chars = f'-_.() {string.ascii_letters}{string.digits}'
    cleaned_filename = ''.join((c for c in filename if c in valid_chars))
    return cleaned_filename

ARGS = {
    'filename': 'my-file_name(2024).txt@#$%'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
contrastive_loss Ran
ran; our contract draft was wrong, not the code
duchengbin8/Stable_Diffusion_is_Unstable/m_clip.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from microsoft/xpretrain, is pointer only (licence: NOASSERTION) · get_code("4675779aec92d6c0")
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 microsoft/xpretrain, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

img_process Ran
ran on a synthesized input
duchengbin8/Stable_Diffusion_is_Unstable/classfier.py
code served (permissive licence) · get_code("51c134eb7b6fe9c9")
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 4, dtype family float, shape (2, 3, 224, 224) 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 torchvision

torch.manual_seed(0)

# Create a small batch of images
# RoIAlign expects input shape (N, C, H, W)
# Let's create batch_size=2, channels=3, height=32, width=32
images = torch.randn(2, 3, 32, 32, dtype=torch.float16)

# img_size parameter - should match the spatial dimensions of the image
img_size = 32

ARGS = {
    "images": images,
    "img_size": img_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — 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, 3, 224, 224) — shape (2, 3, 224, 224) 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
log_perplexity Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
duchengbin8/Stable_Diffusion_is_Unstable/whitebox_attack.py
code served (permissive licence) · get_code("8f7b3874eb0e028a")
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 torch.nn.functional as F

torch.manual_seed(0)

# logits: shape (batch, seq_len, vocab_size)
# coeffs: shape (batch, seq_len, vocab_size)
# After slicing:
#   shift_logits: (batch, seq_len-1, vocab_size)
#   shift_coeffs: (batch, seq_len-1, vocab_size)
# They need compatible sizes for element-wise multiplication

batch_size = 2
seq_len = 5
vocab_size = 4

logits = torch.randn(batch_size, seq_len, vocab_size)
coeffs = torch.randn(batch_size, seq_len, vocab_size)

ARGS = {
    "logits": logits,
    "coeffs": coeffs,
}
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 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
target_offset Ran
ran on a synthesized input
duchengbin8/Stable_Diffusion_is_Unstable/src/utils.py
code served (permissive licence) · get_code("017e999c1ebc64d8")
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 dict. 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

torch.manual_seed(0)

examples = {
    'label': [5, 10, 3, 7]
}

ARGS = {
    'examples': examples
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
bert_score Not yet run
unverified (harvested, no recorded run)
duchengbin8/Stable_Diffusion_is_Unstable/whitebox_attack.py
code served (permissive licence) · get_code("42aee30e66fd959d")
How it ran

no invocation recorded.

clip_loss Not yet run
unverified (harvested, no recorded run)
duchengbin8/Stable_Diffusion_is_Unstable/m_clip.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from PeterGriffinJin/InstructG2I, is pointer only (licence: NONE) · get_code("f2ca34eca05d40cd")
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 PeterGriffinJin/InstructG2I, 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. No invocation recorded.

load_data Not yet run
unverified (harvested, no recorded run)
duchengbin8/Stable_Diffusion_is_Unstable/src/dataset.py
code served (permissive licence) · get_code("e9399be7719ef02b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 4 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 4 later) and 5 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
contrastive_loss 27 other papers
6 dated earlier, 21 later · 3 only as an assembly brick
2206.00621 (2022-06)
Cross-View Language Modeling: Towards Unified Cross-Lingual Cross-Modal Pre-training
2209.06430 (2022-09)
CLIP-ViP: Adapting Pre-trained Image-Text Model to Video-Language Alignment
2210.00312 (2022-10)
Multimodal Analogical Reasoning over Knowledge Graphs
and 24 more not named here
clip_loss 16 other papers
1 dated earlier, 15 later · 1 only as an assembly brick
2305.13050 (2023-05)
AudioToken: Adaptation of Text-Conditioned Diffusion Models for Audio-to-Image Generation
2309.16429 (2023-09)
Diverse and Aligned Audio-to-Video Generation via Text-to-Video Model Adaptation
aaai_28565 (2024 (year only))
Compositional Inversion for Stable Diffusion Models
and 13 more not named here
bool_flag 3 other papers
2 dated earlier, 1 later
2203.13333 (2022-03)
CLIP-Mesh: Generating textured meshes from text using pretrained image-text models
2210.03403 (2022-10)
TAN Without a Burn: Scaling Laws of DP-SGD
2404.09632 (2024-04)
Bridging Vision and Language Spaces with Assignment Prediction
log_perplexity 1 other paper
1 later
2403.04317 (2024-03)
Online Adaptation of Language Models with a Memory of Amortized Contexts

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

Recently, text-to-image models have been thriving. Despite their powerful generative capacity, our research has uncovered a lack of robustness in this generation process. Specifically, the introduction of small perturbations to the text prompts can result in the blending of primary subjects with other categories or their complete disappearance in the generated images. In this paper, we propose Auto-attack on Text-to-image Models (ATM), a gradient-based approach, to effectively and efficiently generate such perturbations. By learning a Gumbel Softmax distribution, we can make the discrete process of word replacement or extension continuous, thus ensuring the differentiability of the perturbation generation. Once the distribution is learned, ATM can sample multiple attack samples simultaneously. These attack samples can prevent the generative model from generating the desired subjects without compromising image quality. ATM has achieved a 91.1% success rate in short-text attacks and an 81.2% success rate in long-text attacks. Further empirical analysis revealed four attack patterns based on: 1) the variability in generation speed, 2) the similarity of coarse-grained characteristics, 3) the polysemy of words, and 4) the positioning of words.

For agents

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

get_harvested_code_for_paper("2306.02583")
get_code_for_paper("2306.02583")
have("2306.02583")

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

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

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

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

Connect an agent — have() is free.