DiSCO: 분포 기반 대조적 프롬프트 최적화를 통한 텍스트-이미지 생성 방어
DiSCO: Defending text-to-image generation through distribution-guided contrastive prompt optimization
August 17, 2026
저자: Tong Zhang, Motasem Alfarra, Carlos Hinojosa, Christos Louizos, Bernard Ghanem
cs.AI
초록
텍스트-이미지 생성 모델이 발전함에 따라, 폭력 및 나체와 같은 업무에 부적절한(NSFW) 콘텐츠 생성, 특히 레드팀 적대적 공격으로 더욱 악화되는 문제 등 중대한 안전 우려가 제기되고 있다. 기존 방어 기법들은 대부분 화이트박스 가정 하에 작동하며, 텍스트 인코더 최적화, 가중치 편집 또는 추론 시점 개입에 의존하므로 근본적으로 독점 모델에는 적용할 수 없다. LLM 프롬프트 재작성에 기반한 블랙박스 대안은 더 넓은 적용 가능성을 제공하지만, 본 연구에서 양성 적대 문제(benign adversarial problem)로 식별하는 중요한 영역, 즉 언어적으로는 안전하지만 모델이 학습한 데이터 분포로 인해 유해한 생성을 여전히 유발하는 프롬프트에서는 실패한다. 본 논문은 DiSCO를 제안한다. DiSCO는 프롬프트 수준에서 전적으로 플러그앤플레이 모듈로 작동하는 제로샷, 엄격한 블랙박스 방어 기법으로, 모델 재학습, 파인튜닝 또는 모델 내부 접근이 전혀 요구되지 않는다. DiSCO는 빔 탐색을 통한 분포 기반 접미사 확장을 수행하며, 대상 모델 자체가 생성한 안전 및 불안전 이미지 풀에 대한 대비 점수(contrastive scoring)로 최적화되고, 안전한 콘텐츠가 생성될 때까지 반복적 적응 피드백을 적용한다. 본 연구는 DiSCO가 I2P 벤치마크에서 여러 레드팀 공격에 대해 방어되지 않은 모델과 방어된 모델 모두의 안전성을 일관되게 향상시키며, 공격 성공률(ASR)을 각각 37.7%와 25.13% 감소시키면서도 의미 충실성을 유지하고 이미지 일관성을 개선함을 입증한다. 블랙박스이자 아키텍처에 구애받지 않는 모듈로서, DiSCO는 모델 자체에 어떠한 변경도 요구하지 않고 모든 텍스트-이미지 시스템에 즉시 적용할 수 있다.
English
As text-to-image generative models advance, they raise critical safety concerns, particularly the generation of Not-Safe-For-Work (NSFW) content such as violence and nudity, further exacerbated by red-teaming adversarial attacks. Existing defenses predominantly operate under white-box assumptions, relying on text encoder optimization, weight editing, or inference-time intervention, and fundamentally cannot scale to proprietary models. Black-box alternatives based on LLM prompt rewriting offer broader applicability, yet fail in a critical regime we identify as the benign adversarial problem: prompts that are linguistically safe but still trigger harmful generation due to the model's learned data distribution. We propose DiSCO, a zero-shot, strictly black-box defense that operates entirely at the prompt level as a plug-and-play module, requiring no model retraining, fine-tuning, or access to model internals. DiSCO performs distribution-guided suffix expansion via beam search, optimized through contrastive scoring over safe and unsafe image pools generated by the target model itself, with iterative adaptive feedback until safe content is produced. We demonstrate that DiSCO consistently enhances the safety of both undefended and defended models on the I2P benchmark under multiple red-teaming attacks, achieving 37.7% and 25.13% ASR reduction, respectively, while maintaining semantic fidelity and improving image coherence. As a black-box, architecture-agnostic module, DiSCO can be readily applied to any text-to-image system without necessitating any changes to the model itself.