Papers › Invisible Backdoor Attacks on Diffusion Models

Invisible Backdoor Attacks on Diffusion Models

2 Jun 2024arXiv:2406.00816archive 2025-07-28

Sen Li, Junchi Ma, Minhao Cheng

In recent years, diffusion models have achieved remarkable success in the realm of high-quality image generation, garnering increased attention. This surge in interest is paralleled by a growing concern over the security threats associated with diffusion models, largely attributed to their susceptibility to malicious exploitation. Notably, recent research has brought to light the vulnerability of diffusion models to backdoor attacks, enabling the generation of specific target images through corresponding triggers. However, prevailing backdoor attack methods rely on manually crafted trigger generation functions, often manifesting as discernible patterns incorporated into input noise, thus rendering them susceptible to human detection. In this paper, we present an innovative and versatile optimization framework designed to acquire invisible triggers, enhancing the stealthiness and resilience of inserted backdoors. Our proposed framework is applicable to both unconditional and conditional diffusion models, and notably, we are the pioneers in demonstrating the backdooring of diffusion models within the context of text-guided image editing and inpainting pipelines. Moreover, we also show that the backdoors in the conditional generation can be directly applied to model watermarking for model ownership verification, which further boosts the significance of the proposed framework. Extensive experiments on various commonly used samplers and datasets verify the efficacy and stealthiness of the proposed framework. Our code is publicly available at https://github.com/invisibleTriggerDiffusion/invisible_triggers_for_diffusion.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 35 code samples harvested from 2 repositories linked to this paper: 24 ran (of which 0 constructed an object rather than computing a result; 17 with no instrument failure: 3 honoured, 0 violated, 14 with no contract checked; 7 where Syntology's instrument failed) · 11 unverified. Where Syntology's instrument failed: 7 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 19 samples from 1 repository, 14 ran (7 with no instrument failure; 7 where Syntology's instrument failed); community (archive-listed): 16 samples from 1 repository, 10 ran (10 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-24 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 24 samples that ran has no recorded date.

invisibletriggerdiffusion/invisible_triggers_for_diffusion officialmentioned in paperjaxSyntology: 19 samples, 14 ran (7 instrument-failed) · 5 unverified report
linweiii/backdoordm mentioned on GitHubpytorchMITSyntology: 16 samples, 10 ran (0 instrument-failed) · 6 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

35 samples harvested: 24 ran (of which 0 constructed an object rather than computing a result; 17 with no instrument failure: 3 honoured, 0 violated, 14 with no contract checked; 7 where Syntology's instrument failed) · 11 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

3ran · honoured contract
7ran · our draft was wrong
14ran
11unverified

Licence: 19 of the 35 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

invisibletriggerdiffusion/invisible_triggers_for_diffusion official repository 19 samples, 14 ran (7 instrument-failed) · 5 unverified
batch_sampling model.py ran no licence file found · pointer only · 68b412f99839b629 · report fixture: signature sample_n:int/0/int, pipeline:callable/0/?, init:Tensor/2/float, max_batch_n:int/0/int, rng:Generator/0/? · returned ndarray · level recorded 2026-09-24
betas_for_alpha_bar in 123 papers glide/glide_text2im/gaussian_diffusion.py ran · honoured contract no licence file found · pointer only · 2ab2316ac6fdd869 · report fixture: signature num_diffusion_timesteps:int/0/int, alpha_bar:callable/0/?, max_beta:float/0/float · returned ndarray · level recorded, date not recorded
check_imports in 15 papers diffusers/dynamic_modules_utils.py ran · our draft was wrong no licence file found · pointer only · 301682fc3342590a · report fixture: signature filename:str/0/str · returned list · level recorded 2026-09-26
convert_pytorch_state_dict_to_flax in 21 papers diffusers/modeling_flax_pytorch_utils.py ran no licence file found · pointer only · 7d657d43bf8f10fc · report fixture: signature pt_state_dict:dict/0/?, flax_model:MinimalFlaxModel/0/?, init_key:int/0/int · returned dict · level recorded 2026-09-24
get_beta_schedule in 66 papers glide/glide_text2im/gaussian_diffusion.py ran · honoured contract no licence file found · pointer only · 0996aa0f716afd2d · report fixture: signature beta_schedule:str/0/str, beta_start:float/0/float, beta_end:float/0/float, num_diffusion_timesteps:int/0/int · returned ndarray · level recorded 2026-09-25
get_named_beta_schedule in 119 papers glide/glide_text2im/gaussian_diffusion.py ran · honoured contract no licence file found · pointer only · 14e2c5e6c9d5ba6c · report fixture: signature schedule_name:str/0/str, num_diffusion_timesteps:int/0/int · returned ndarray · level recorded 2026-09-25
get_parameter_device in 18 papers diffusers/modeling_utils.py ran · our draft was wrong no licence file found · pointer only · eafa252fd6f86857 · report fixture: signature parameter:callable/0/? · returned device · level recorded 2026-09-24
get_parameter_dtype in 20 papers diffusers/modeling_utils.py ran · our draft was wrong no licence file found · pointer only · dc2045840ce679cb · report fixture: signature parameter:callable/0/? · returned dtype · level recorded 2026-09-24
get_relative_import_files in 28 papers diffusers/dynamic_modules_utils.py ran · our draft was wrong no licence file found · pointer only · 00cc853a73f3aeb6 · report fixture: signature module_file:str/0/str · returned list · level recorded 2026-09-26
get_relative_imports in 28 papers diffusers/dynamic_modules_utils.py ran · our draft was wrong no licence file found · pointer only · 450aeffe7f80f917 · report fixture: signature module_file:str/0/str · returned list · level recorded 2026-09-26
p_losses_diffuser loss.py ran · our draft was wrong no licence file found · pointer only · 43781d58d40083e9 · report fixture: signature noise_sched:NoiseSchedule/0/?, model:callable/0/?, x_start:Tensor/2/float, R:Tensor/2/float, timesteps:Tensor/1/int, noise:Tensor/2/float, loss_type:str/0/str · returned Tensor · level recorded 2026-09-24
q_sample_diffuser loss.py ran no licence file found · pointer only · 9735f098c72a930a · report fixture: signature noise_sched:NoiseSchedule/0/?, x_start:Tensor/3/float, R:Tensor/3/float, timesteps:Tensor/1/int, noise:Tensor/3/float · returned tuple · level recorded 2026-09-24
rename_key in 8 papers diffusers/modeling_flax_pytorch_utils.py ran · our draft was wrong fingerprinted no licence file found · pointer only · fa58367fb507f72f · report fixture: signature key:str/0/str · returned str · level recorded 2026-09-24
rename_key_and_reshape_tensor in 22 papers diffusers/modeling_flax_pytorch_utils.py ran no licence file found · pointer only · 5f1d8a0f6c5bcb3e · report fixture: signature pt_tuple_key:tuple/1/str, pt_tensor:Tensor/2/float, random_flax_state_dict:dict/0/? · returned tuple · level recorded 2026-09-24
batch_sampling_save model.py unverified no licence file found · pointer only · ffd3703863aadaca · report
calculate_activation_statistics in 75 papers fid_score.py unverified no licence file found · pointer only · a17aa1b06ec919e8 · report
calculate_frechet_distance in 119 papers fid_score.py unverified no licence file found · pointer only · 0def50a351111624 · report
get_activations in 100 papers fid_score.py unverified no licence file found · pointer only · 9f5980b8530c7409 · report
load_state_dict in 114 papers diffusers/modeling_utils.py unverified no licence file found · pointer only · 77bd5e6e8ca8c91d · report
linweiii/backdoordm community (archive-listed) 16 samples, 10 ran (0 instrument-failed) · 6 unverified
PreActResNet18 in 38 papers classifier_models/preact_resnet.py ran MIT (permissive) · 4427a19ae0928cb2 · report fixture: signature num_classes:int/0/int · returned PreActResNet · level recorded 2026-09-24
add_label_column classifier_models/train_classifiers.py ran MIT (permissive) · 098c7b352e3b9513 · report fixture: signature ds:Dataset/0/? · returned Dataset · level recorded 2026-09-24
compute_backdoor_loss analysis/preactivations/backdoor_loss.py ran MIT (permissive) · 255d89bf31e49ce4 · report fixture: signature args:Args/0/?, dsl:DSL/0/?, model:callable/0/?, model_clean:callable/0/?, noise_sched:NoiseScheduler/0/?, rng:Generator/0/?, sample_n:int/0/int, max_batch_n:int/0/int · returned float · level recorded 2026-09-24
get_sd_noise analysis/preactivations/backdoor_loss.py ran MIT (permissive) · 7a4b2e5785b258ca · report fixture: signature pipe:StandInPipe/0/?, prompt:str/0/str, init:Tensor/4/float, timesteps:Tensor/1/int, device:str/0/str · returned Tensor · level recorded 2026-09-24
get_target_for_name evaluation/configs/bdmodel_path.py ran MIT (permissive) · 9b28bdc9071839c4 · report fixture: signature args:Args/0/?, backdoor:dict/0/? · returned str · level recorded 2026-09-24
move_pipe_to_cpu analysis/preactivations/backdoor_loss.py ran MIT (permissive) · e118876b938dca06 · report fixture: signature pipe:SimplePipe/0/? · returned SimplePipe · level recorded 2026-09-24
str_to_bool in 32 papers evaluation/main_eval.py ran MIT (permissive) · 8035fbe8d79fa731 · report fixture: signature value:str/0/str · returned bool · level recorded 2026-09-24
test in 377 papers classifier_models/train_classifiers.py ran MIT (permissive) · 5ba3ce200e91c692 · report fixture: signature model:callable/0/?, test_loader:list/1/dict, criterion:callable/0/?, device:device/0/?, key:str/0/str · returned tuple · level recorded 2026-09-24
train in 522 papers classifier_models/train_classifiers.py ran MIT (permissive) · 92cb5c70af1c2002 · report fixture: signature model:callable/0/?, train_loader:list/1/dict, criterion:callable/0/?, optimizer:SGD/0/?, scheduler:StepLR/0/?, device:str/0/str, key:str/0/str · returned tuple · level recorded 2026-09-24
train_model in 103 papers classifier_models/resnet.py ran MIT (permissive) · ff87142d35038989 · report fixture: signature model:callable/0/?, train_loader:LoaderWrapper/0/?, val_loader:LoaderWrapper/0/?, criterion:callable/0/?, optimizer:SGD/0/?, scheduler:StepLR/0/?, num_epochs:int/0/int, device:str/0/str · returned SimpleModel · level recorded 2026-09-24
apply_trigger_with_random_crops evaluation/generate_img.py unverified MIT (permissive) · 070eb3053dfec545 · report
apply_trigger_with_random_noise evaluation/generate_img.py unverified MIT (permissive) · 7cee0a9d2949bf77 · report
apply_trojdiff_trigger_with_random_crops evaluation/generate_img_trojdiff.py unverified MIT (permissive) · 794d443efca3cca9 · report
apply_trojdiff_trigger_with_random_noise evaluation/generate_img_trojdiff.py unverified MIT (permissive) · ca9d21906c166b9c · report
test_model in 25 papers classifier_models/resnet.py unverified MIT (permissive) · bd3f866cccaf7c8b · report
train in 522 papers classifier_models/resnet.py unverified MIT (permissive) · c24870633e16b862 · report

Tasks

Backdoor AttackHuman DetectionImage Generationtext-guided-image-editing

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

DiffusionInpainting

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections