paper-with-me

홈 › Papers

Distorting Embedding Space for Safety: A Defense Mechanism for Adversarially Robust Diffusion Models

2025-01-31 · Jaesin Ahn, Heechul Jung

Text-to-image diffusion models show remarkable generation performance following text prompts, but risk generating Not Safe For Work (NSFW) contents from unsafe prompts. Existing approaches, such as prompt filtering or concept unlearning, fail to defend against adversarial attacks while maintaining benign image quality. In this paper, we propose a novel approach called Distorting Embedding Space (DES), a text encoder-based defense mechanism that effectively tackles these issues through innovative embedding space control. DES transforms unsafe embeddings, extracted from a text encoder using unsafe prompts, toward carefully calculated safe embedding regions to prevent unsafe contents generation, while reproducing the original safe embeddings. DES also neutralizes the nudity embedding, extracted using prompt ``nudity", by aligning it with neutral embedding to enhance robustness against adversarial attacks. These methods ensure both robust defense and high-quality image generation. Additionally, DES can be adopted in a plug-and-play manner and requires zero inference overhead, facilitating its deployment. Extensive experiments on diverse attack types, including black-box and white-box scenarios, demonstrate DES's state-of-the-art performance in both defense capability and benign image generation quality. Our model is available at https://github.com/aei13/DES.

📄 PDF Abstract BibTeX arXiv:2501.18877

Code (1)

aei13/des 공식 구현 pytorch

Tasks

Image Generation

Methods 이 논문이 사용한 방법론

Diffusion Diffusion models generate samples by gradually removing noise from a signal, and their training objective can be expressed as a reweighted variational lower-bound…

Similar Papers 제목 키워드 기반

Latent-space adversarial training with post-aware calibration for defending large language models against jailbreak attacks

2025-01-18 · Xin Yi, Yue Li, Dongsheng Shi, LinLin Wang 외

Ensuring safety alignment is a critical requirement for large language models (LLMs), particularly given increasing deployment in real-world applications. Despite considerable advancements, LLMs remain susceptible to jai…

Safety Alignment

Circumventing Safety Alignment in Large Language Models Through Embedding Space Toxicity Attenuation

2025-07-08 · Zhibo Zhang, Yuxi Li, Kailong Wang, Shuai Yuan 외 arxiv

Large Language Models (LLMs) have achieved remarkable success across domains such as healthcare, education, and cybersecurity. However, this openness also introduces significant security risks, particularly through embed…

Safety Without Semantic Disruptions: Editing-free Safe Image Generation via Context-preserving Dual Latent Reconstruction

2024-11-21 · Jordan Vice, Naveed Akhtar, Richard Hartley, Ajmal Mian

Training multimodal generative models on large, uncurated datasets can result in users being exposed to harmful, unsafe and controversial or culturally-inappropriate outputs. While model editing has been proposed to remo…

Image GenerationModel Editing

STShield: Single-Token Sentinel for Real-Time Jailbreak Detection in Large Language Models

2025-03-23 · Xunguang Wang, Wenxuan Wang, Zhenlan Ji, Zongjie Li 외

Large Language Models (LLMs) have become increasingly vulnerable to jailbreak attacks that circumvent their safety mechanisms. While existing defense methods either suffer from adaptive attacks or require computationally…

How Jailbreak Defenses Work and Ensemble? A Mechanistic Investigation

2025-02-20 · Zhuohang Long, Siyuan Wang, Shujun Liu, Yuhang Lai 외

Jailbreak attacks, where harmful prompts bypass generative models' built-in safety, raise serious concerns about model vulnerability. While many defense methods have been proposed, the trade-offs between safety and helpf…

Binary Classification