Negative Token Merging: Image-based Adversarial Feature Guidance

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Singh, Jaskirat, Li, Lindsey, Shi, Weijia, Krishna, Ranjay, Choi, Yejin, Koh, Pang Wei, Cohen, Michael F., Gould, Stephen, Zheng, Liang, Zettlemoyer, Luke
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866916508547940352
author Singh, Jaskirat
Li, Lindsey
Shi, Weijia
Krishna, Ranjay
Choi, Yejin
Koh, Pang Wei
Cohen, Michael F.
Gould, Stephen
Zheng, Liang
Zettlemoyer, Luke
author_facet Singh, Jaskirat
Li, Lindsey
Shi, Weijia
Krishna, Ranjay
Choi, Yejin
Koh, Pang Wei
Cohen, Michael F.
Gould, Stephen
Zheng, Liang
Zettlemoyer, Luke
contents Text-based adversarial guidance using a negative prompt has emerged as a widely adopted approach to steer diffusion models away from producing undesired concepts. While useful, performing adversarial guidance using text alone can be insufficient to capture complex visual concepts or avoid specific visual elements like copyrighted characters. In this paper, for the first time we explore an alternate modality in this direction by performing adversarial guidance directly using visual features from a reference image or other images in a batch. We introduce negative token merging (NegToMe), a simple but effective training-free approach which performs adversarial guidance through images by selectively pushing apart matching visual features between reference and generated images during the reverse diffusion process. By simply adjusting the used reference, NegToMe enables a diverse range of applications. Notably, when using other images in same batch as reference, we find that NegToMe significantly enhances output diversity (e.g., racial, gender, visual) by guiding features of each image away from others. Similarly, when used w.r.t. copyrighted reference images, NegToMe reduces visual similarity to copyrighted content by 34.57%. NegToMe is simple to implement using just few-lines of code, uses only marginally higher (<4%) inference time and is compatible with different diffusion architectures, including those like Flux, which don't natively support the use of a negative prompt. Code is available at https://negtome.github.io
format Preprint
id arxiv_https___arxiv_org_abs_2412_01339
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Negative Token Merging: Image-based Adversarial Feature Guidance
Singh, Jaskirat
Li, Lindsey
Shi, Weijia
Krishna, Ranjay
Choi, Yejin
Koh, Pang Wei
Cohen, Michael F.
Gould, Stephen
Zheng, Liang
Zettlemoyer, Luke
Computer Vision and Pattern Recognition
Artificial Intelligence
Graphics
Machine Learning
Text-based adversarial guidance using a negative prompt has emerged as a widely adopted approach to steer diffusion models away from producing undesired concepts. While useful, performing adversarial guidance using text alone can be insufficient to capture complex visual concepts or avoid specific visual elements like copyrighted characters. In this paper, for the first time we explore an alternate modality in this direction by performing adversarial guidance directly using visual features from a reference image or other images in a batch. We introduce negative token merging (NegToMe), a simple but effective training-free approach which performs adversarial guidance through images by selectively pushing apart matching visual features between reference and generated images during the reverse diffusion process. By simply adjusting the used reference, NegToMe enables a diverse range of applications. Notably, when using other images in same batch as reference, we find that NegToMe significantly enhances output diversity (e.g., racial, gender, visual) by guiding features of each image away from others. Similarly, when used w.r.t. copyrighted reference images, NegToMe reduces visual similarity to copyrighted content by 34.57%. NegToMe is simple to implement using just few-lines of code, uses only marginally higher (<4%) inference time and is compatible with different diffusion architectures, including those like Flux, which don't natively support the use of a negative prompt. Code is available at https://negtome.github.io
title Negative Token Merging: Image-based Adversarial Feature Guidance
topic Computer Vision and Pattern Recognition
Artificial Intelligence
Graphics
Machine Learning
url https://arxiv.org/abs/2412.01339