GuardT2I: Defending Text-to-Image Models from Adversarial Prompts

Link
Abstract

Recent advancements in Text-to-Image models have raised significant safety concerns about their potential misuse for generating inappropriate or Not-Safe-For-Work contents, despite existing countermeasures such as Not-Safe-For-Work classifiers or model fine-tuning for inappropriate concept removal. Addressing this challenge, our study unveils GuardT2I a novel moderation framework that adopts a generative approach to enhance Text-to-Image models’ robustness against adversarial prompts. Instead of making a binary classification, GuardT2I utilizes a large language model to conditionally transform text guidance embeddings within the Text-to-Image models into natural language for effective adversarial prompt detection, without compromising the models’ inherent performance. Our extensive experiments reveal that GuardT2I outperforms leading commercial solutions like OpenAI-Moderation and Microsoft Azure Moderator by a significant margin across diverse adversarial scenarios. Our framework is available at https://github.com/cure-lab/GuardT2I.

Synth

Problem:: T2I 모델의 NSFW 콘텐츠 생성 방지를 위한 기존 방어 메커니즘(프롬프트 필터/사후 안전성 검사기)이 적대적 프롬프트에 취약 / 기존 분류 기반 방어 방법은 해석 불가능하고 맞춤화 어려움 / 두 방어 메커니즘을 모두 우회하는 적대적 프롬프트에 대응하는 효과적 방어 체계 필요

Solution:: c·LLM을 활용한 프롬프트 해석 생성으로 적대적 프롬프트의 숨겨진 의도 파악 / 이중 파싱 메커니즘으로 정상과 적대적 프롬프트 구분

Novelty:: 적대적 프롬프트 방어를 위한 최초의 해석 패러다임 프레임워크 / T2I 모델 수정 없이 기존 성능 유지하며 적대적 프롬프트 방어 가능 / 다양한 NSFW 개념에 대한 우수한 일반화 능력과 의사결정 해석 제공

Note:: c·LLM 학습에 Unsafe/safe 구분이 필요하지 않음 / 해석 불가능한 영역에 있지만 NSFW를 생성하는 프롬프트도 존재할까?

Summary

Motivation

Method

file-20250414222645285.png

file-20250414222735675.png|364

file-20250414222809444.png|400

Method 검증

file-20250414222957581.png|925

Adv. Prompt의 가장 첫 번째 예시의 경우 해석되기 전 문장도 충분히 NSFW임 → 애초에 기존 Safety Checker의 성능이 낮은 듯