SafetyDPO: Scalable Safety Alignment for Text-to-Image Generation

Link
Abstract

Text-to-image (T2I) models have become widespread, but their limited safety guardrails expose end users to harmful content and potentially allow for model misuse. Current safety measures are typically limited to text-based filtering or concept removal strategies, able to remove just a few concepts from the model's generative capabilities. In this work, we introduce SafetyDPO, a method for safety alignment of T2I models through Direct Preference Optimization (DPO). We enable the application of DPO for safety purposes in T2I models by synthetically generating a dataset of harmful and safe image-text pairs, which we call CoProV2. Using a custom DPO strategy and this dataset, we train safety experts, in the form of low-rank adaptation (LoRA) matrices, able to guide the generation process away from specific safety-related concepts. Then, we merge the experts into a single LoRA using a novel merging strategy for optimal scaling performance. This expert-based approach enables scalability, allowing us to remove 7 times more harmful concepts from T2I models compared to baselines. SafetyDPO consistently outperforms the state-of-the-art on many benchmarks and establishes new practices for safety alignment in T2I networks. Code and data will be shared at https://safetydpo.github.io/.

Synth

Problem:: 대규모 T2I 모델이 유해 콘텐츠 생성 가능 / 기존 안전장치(텍스트 필터링, 개념 제거)는 우회 가능하거나 확장성 부족 / 한 번에 많은 개념 제거 시 모델 성능 저하

Solution:: DPO를 활용한 T2I 모델 안전성 정렬 방법 제안 / 합성 데이터셋(CoProV2) 구축으로 DPO 학습 지원 / 카테고리별 안전 전문가(LoRA) 훈련 후 Co-Merge 알고리즘으로 통합

Novelty:: T2I 모델을 위한 최초의 확장 가능한 안전성 정렬 방법 / 전문가 모델 기반 훈련과 효율적 병합 전략 도입

Note:: 내가 생각하는 Vision Embedding이 Text 보다 좋을 것이다와 직접적으로 관련된 논문 / Unet을 LoRA로 학습했음 → 우리는 Text Encoder의 출력을 건드는 방향으로 가야할 듯

Summary

Motivation

Method

Method 검증

벤치마크 성능 평가

전문가 모델 성능 분석

적대적 공격 견고성

방법론 요소별 효과 분석