Direct Unlearning Optimization for Robust and Safe Text-to-Image Models

Link
Abstract

Recent advancements in text-to-image (T2I) models have greatly benefited from large-scale datasets, but they also pose significant risks due to the potential generation of unsafe content. To mitigate this issue, researchers proposed unlearning techniques that attempt to induce the model to unlearn potentially harmful prompts. However, these methods are easily bypassed by adversarial attacks, making them unreliable for ensuring the safety of generated images. In this paper, we propose Direct Unlearning Optimization (DUO), a novel framework for removing NSFW content from T2I models while preserving their performance on unrelated topics. DUO employs a preference optimization approach using curated paired image data, ensuring that the model learns to remove unsafe visual concepts while retain unrelated features. Furthermore, we introduce an output-preserving regularization term to maintain the model's generative capabilities on safe content. Extensive experiments demonstrate that DUO can robustly defend against various state-of-the-art red teaming methods without significant performance degradation on unrelated topics, as measured by FID and CLIP scores. Our work contributes to the development of safer and more reliable T2I models, paving the way for their responsible deployment in both closed-source and open-source scenarios.

Synth

Problem:: 기존 프롬프트 기반 언러닝 방법은 적대적 공격에 취약 / 텍스트 공간의 많은 동의어나 간접 표현으로 인해 모든 위험 프롬프트 예측 불가능 / 텍스트 조건부 언러닝은 모델 내부 시각적 개념을 실제로 제거하지 않음

Solution:: 이미지 자체에서 안전하지 않은 시각적 특성을 직접 제거하는 Direct Unlearning Optimization(DUO) 제안 / 안전하지 않은 이미지와 안전한 대응 이미지를 쌍으로 구성하여 Preference Optimization 적용 / SDEdit으로 페어 데이터셋 생성 / Output-Preserving Regularization으로 안전한 콘텐츠 생성 능력 보존

Novelty:: 프롬프트 기반이 아닌 이미지 기반 언러닝 방식 최초 제안 / Preference Optimization을 언러닝 문제에 처음 적용 / 적대적 공격에 강건한 안전한 T2I 모델 개발

Note:: 화이트박스 공격 방어를 위해서는 내부 특성을 완전히 제거해야 함 / 관련된 의미의 텍스트로 생성한 사진과 시각적으로 유사한 이미지를 생성하는 경우 모두 잘 동작함

Summary

Motivation

file-20250415165017341.png

기존 Prompt-based Unlearning은 텍스트 임베딩을 수정함. 이 방식은 모델이 Unsafe 생성 성능을 잊은 것이 아니기 때문에 Unsafe Space를 찾는 Adv Attack에 취약함

Method

file-20250415170742201.png

LDUOExt+q(xt+|x0+),x0q(xt|x0),xTN(0,I)[logσ(β(|ϵϵθ(xt+,t)|22|ϵϵφ(xt+,t)|22(|ϵϵθ(xt,t)|22+|ϵϵφ(xt,t)|22)))+λLprior]

Method 검증