SafeDiffusion-R1: 安全な拡散モデルの事後学習のためのオンライン報酬誘導
SafeDiffusion-R1: Online Reward Steering for Safe Diffusion Post-Training
May 18, 2026
著者: Komal Kumar, Ankan Deria, Abhishek Basu, Fahad Shamshad, Hisham Cholakkal, Karthik Nandakumar
cs.AI
要旨
拡散モデルは、事前学習中に獲得された不適切なコンテンツを除去するために広く研究されてきた。既存手法では、安全性のないテキストと安全な画像の正解ペア、あるいは否定的/肯定的な画像ペアといった高コストな教師ありデータが必要であり、スケーラビリティに欠ける。さらに、オフライン強化学習やオフラインで合成データを生成する教師ありファインチューニング手法では、破滅的忘却が生じ、生成品質が低下する。本稿では、グループ相対的政策最適化(GRPO)を用いて、否定的および肯定的なテキストプロンプトの両方に対してポストトレーニングを行う、新たなオンライン強化学習フレームワークを提案する。専門的な安全/不安全報酬モデルのファインチューニングを不要にするため、CLIP埋め込みの固有の特性を活用したステアリング報酬メカニズムを導入する。すなわち、埋め込み空間においてテキスト表現を肯定的な安全方向に引き寄せ、否定的な方向から遠ざける。本提案のオンラインポリシーアプローチにより、明示的に不適切な内容を含む多様なプロンプトから学習しつつ、破滅的忘却を回避できる。大規模な実験により、本手法は不適切コンテンツを18.07%(SD v1.4では48.9%)に削減し、ヌード検出数を15件(ベースライン646件)に低減すると同時に、GenEvalにおける構成的生成品質を42.08%から47.83%に向上させる。特筆すべきは、これらの安全性の向上が7つの有害カテゴリにわたるドメイン外の不適切プロンプトにも一般化され、教師ありペアデータや報酬チューニングを必要とせずに最先端性能を達成する点である。GitHub: https://github.com/MAXNORM8650/SafeDiffusion-R1
English
Diffusion models have been widely studied for removing unsafe content learned during pre-training. Existing methods require expensive supervised data, either unsafe-text paired with safe-image groundtruth or negative/positive image pairs, making them impractical to scale. Furthermore, offline reinforcement learning and supervised fine-tuning approaches that generate synthetic data offline suffer from catastrophic forgetting, degrading generation quality. We propose a novel online reinforcement learning framework that addresses both data scarcity and model degradation through post-training with Group Relative Policy Optimization (GRPO) on both negative and positive text prompts. To eliminate the need for fine-tuning specialized safe/unsafe reward models, we introduce a steering reward mechanism that exploits an inherent property of CLIP embeddings: steering text representations toward positive safety directions and away from negative ones in the embedding space. Our online-policy approach enables the model to learn from diverse prompts, including explicit unsafe content, without catastrophic forgetting. Extensive experiments demonstrate that our method reduces inappropriate content to 18.07\% (vs. 48.9\% for SD v1.4) and nudity detections to 15 (vs. 646 baseline) while improving compositional generation quality from 42.08\% to 47.83\% on GenEval. Remarkably, these safety gains generalize to out-of-domain unsafe prompts across seven harm categories, achieving state-of-the-art performance without supervised paired data or reward tuning. Github: https://github.com/MAXNORM8650/SafeDiffusion-R1.