SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.05762 · CVPR · 2023

TrojDiff: Trojan Attacks on Diffusion Models with Diverse Targets

U Berkeley, Bo Li, Dawn Song, Weixin Chen

arXiv · PDF · Open in the Atlas

Code that ran

1 of 3 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, 0 violated it and 0 have no contract verdict; 1 failure of our instrument; 2 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/2303.05762.json · badge: /api/ran/2303.05762.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
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
xirongc/watermark-audio-diffusion community
Papers with Code archive
0 ran · 2 no recorded run
FunctionStatusWhere it lives
get_timestep_embedding 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 morganstanley/msml
pointer only · get_code("cb49209c125de1b4")
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.

Model Not yet run
unverified (harvested, no recorded run)
xirongc/watermark-audio-diffusion/models/diffusion.py
pointer only (licence: NONE) · get_code("8ed0b4eebb0b98ba")
How it ran

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

ResnetBlock Not yet run
unverified (harvested, no recorded run)
xirongc/watermark-audio-diffusion/models/diffusion.py
pointer only (licence: NONE) · get_code("508610fafe221c17")
How it ran

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

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 2 later) and 1 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
get_timestep_embedding
brick of this paper's assembly: helper
91 other papers
20 dated earlier, 5 the same month, 65 later, 1 same year, order not determinable · 7 only as an assembly brick
2104.07652 (2021-04)
Geometry-Free View Synthesis: Transformers and no 3D Priors
2106.00132 (2021-06)
On Fast Sampling of Diffusion Probabilistic Models
2106.06819 (2021-06)
D2C: Diffusion-Denoising Models for Few-shot Conditional Generation
and 88 more not named here
ResnetBlock
brick of this paper's assembly: model
4 other papers
2 dated earlier, 2 later · 2 only as an assembly brick
2205.07460 (2022-05)
Diffusion Models for Adversarial Purification
2210.00471 (2022-10)
OCD: Learning to Overfit with Conditional Diffusion Models
2510.19618 (2025-10)
Pragmatic Heterogeneous Collaborative Perception via Generative Communication Mechanism
and 1 more not named here

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 have achieved great success in a range of tasks, such as image synthesis and molecule design. As such successes hinge on large-scale training data collected from diverse sources, the trustworthiness of these collected data is hard to control or audit. In this work, we aim to explore the vulnerabilities of diffusion models under potential training data manipulations and try to answer: How hard is it to perform Trojan attacks on well-trained diffusion models? What are the adversarial targets that such Trojan attacks can achieve? To answer these questions, we propose an effective Trojan attack against diffusion models, TrojDiff, which optimizes the Trojan diffusion and generative processes during training. In particular, we design novel transitions during the Trojan diffusion process to diffuse adversarial targets into a biased Gaussian distribution and propose a new parameterization of the Trojan generative process that leads to an effective training objective for the attack. In addition, we consider three types of adversarial targets: the Trojaned diffusion models will always output instances belonging to a certain class from the in-domain distribution (In-D2D attack), out-ofdomain distribution (Out-D2D-attack), and one specific instance (D2I attack). We evaluate TrojDiff on CIFAR-10 and CelebA datasets against both DDPM and DDIM diffusion models. We show that TrojDiff always achieves high attack performance under different adversarial targets using different types of triggers, while the performance in benign environments is preserved. The code is available at https://github.com/chenweixin107/TrojDiff.

For agents

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

get_harvested_code_for_paper("2303.05762")
get_code_for_paper("2303.05762")
have("2303.05762")

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

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

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

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

Connect an agent — have() is free.