Papers › DiffAM: Diffusion-based Adversarial Makeup Transfer for Facial Privacy Protection

DiffAM: Diffusion-based Adversarial Makeup Transfer for Facial Privacy Protection

16 May 2024CVPR 2024 1arXiv:2405.09882archive 2025-07-28

Yuhao Sun, Lingyun Yu, Hongtao Xie, Jiaming Li, Yongdong Zhang

With the rapid development of face recognition (FR) systems, the privacy of face images on social media is facing severe challenges due to the abuse of unauthorized FR systems. Some studies utilize adversarial attack techniques to defend against malicious FR systems by generating adversarial examples. However, the generated adversarial examples, i.e., the protected face images, tend to suffer from subpar visual quality and low transferability. In this paper, we propose a novel face protection approach, dubbed DiffAM, which leverages the powerful generative ability of diffusion models to generate high-quality protected face images with adversarial makeup transferred from reference images. To be specific, we first introduce a makeup removal module to generate non-makeup images utilizing a fine-tuned diffusion model with guidance of textual prompts in CLIP space. As the inverse process of makeup transfer, makeup removal can make it easier to establish the deterministic relationship between makeup domain and non-makeup domain regardless of elaborate text prompts. Then, with this relationship, a CLIP-based makeup loss along with an ensemble attack strategy is introduced to jointly guide the direction of adversarial makeup domain, achieving the generation of protected face images with natural-looking makeup and high black-box transferability. Extensive experiments demonstrate that DiffAM achieves higher visual quality and attack success rates with a gain of 12.98% under black-box setting compared with the state of the arts. The code will be available at https://github.com/HansSunY/DiffAM.

PaperPDFConference PDFCodeCode Syntology ran

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

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2405.09882")

Code

Syntology Ran 11 of 14 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 2 ran · our draft was wrong; 1 ran · fixture could not drive it; 8 ran with no contract checked.

By repository: official repository: 14 samples from 1 repository, 11 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

hanssuny/diffam officialmentioned in papermentioned on GitHubpytorch 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

14 samples harvested; 11 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
1ran · fixture could not drive it
8ran
3unverified

Licence: 14 of the 14 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 HansSunY/DiffAM. “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. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (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 from a repository marked official are listed first. 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 four 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; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). 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.

Normalize HansSunY/DiffAM/models/ddpm/diffusion.py official repository ran · our draft was wrong no licence file found · pointer only · c3a6b977022957cb · report
cal_adv_loss HansSunY/DiffAM/losses/id_loss.py official repository ran no licence file found · pointer only · 501cb621a55f9607 · report
cos_simi HansSunY/DiffAM/losses/id_loss.py official repository ran fingerprinted no licence file found · pointer only · efae82b620750f99 · report
get_celeba_dataset HansSunY/DiffAM/datasets/celeba_dataset.py official repository ran no licence file found · pointer only · 1fc7a7721b881e1a · report
get_dataloader HansSunY/DiffAM/datasets/data_utils.py official repository ran no licence file found · pointer only · 360b55d77b3607a1 · report
get_param_groups_and_shapes HansSunY/DiffAM/models/improved_ddpm/fp16_util.py official repository ran no licence file found · pointer only · e41367ad14ff58fd · report
get_timestep_embedding HansSunY/DiffAM/models/ddpm/diffusion.py official repository ran · fixture could not drive it fingerprinted no licence file found · pointer only · cb49209c125de1b4 · report
make_master_params HansSunY/DiffAM/models/improved_ddpm/fp16_util.py official repository ran no licence file found · pointer only · e20dd5102da3b050 · report
make_output_format HansSunY/DiffAM/models/improved_ddpm/logger.py official repository ran no licence file found · pointer only · af251dae21d711a5 · report
nonlinearity HansSunY/DiffAM/models/ddpm/diffusion.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 3137073275f8c21a · report
unflatten_master_params HansSunY/DiffAM/models/improved_ddpm/fp16_util.py official repository ran no licence file found · pointer only · 64fff1e30802b815 · report
get_dataset HansSunY/DiffAM/datasets/data_utils.py official repository unverified no licence file found · pointer only · 414cb905a4aa4afe · report
mpi_weighted_mean HansSunY/DiffAM/models/improved_ddpm/logger.py official repository unverified no licence file found · pointer only · e515a67f7f32e76d · report
profile HansSunY/DiffAM/models/improved_ddpm/logger.py official repository unverified no licence file found · pointer only · 956759c272bea487 · report

Tasks

Adversarial AttackFace Recognition

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

CLIPDiffusion

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