Abstract
Text-to-Image (T2I) models have made remarkable progress in generating images from text prompts, but their output quality and safety still depend heavily on how prompts are phrased. Existing safety methods typically refine prompts using large language models (LLMs), but they overlook the images produced, which can result in unsafe outputs or unnecessary changes to already safe prompts. To address this, we propose an iterative prompt refinement algorithm that uses Vision Language Models (VLMs) to analyze both the input prompts and the generated images. By leveraging visual feedback, our method refines prompts more effectively, improving safety while maintaining user intent and reliability comparable to existing LLM-based approaches. Additionally, we introduce a new dataset labeled with both textual and visual safety signals using off-the-shelf multi-modal LLM, enabling supervised fine-tuning. Experimental results demonstrate that our approach produces safer outputs without compromising alignment with user intent, offering a practical solution for generating safer T2I content. Our code is available at this https URL. \textbf{\textcolor{red}WARNING: This paper contains examples of harmful or inappropriate images generated by models.
Abstract (translated)
文本到图像(T2I)模型在从文字提示生成图像方面取得了显著进展,但其输出质量和安全性仍然很大程度上取决于提示语的措辞。现有的安全方法通常利用大型语言模型(LLMs)来优化提示语,但它们忽略了生成的图片本身,这可能导致不安全的输出或对原本已经安全的提示进行不必要的修改。为了应对这一挑战,我们提出了一种迭代式提示优化算法,该算法使用视觉语言模型(VLMs)来分析输入提示和生成的图像两者。通过利用视觉反馈,我们的方法能够更有效地优化提示语,在提高安全性的同时保持用户意图并维持与现有LLM基线方法相当的可靠性。此外,我们还引入了一个新数据集,其中文本和视觉安全信号均使用现成的多模态语言模型标注,从而允许进行监督微调。实验结果表明,我们的方法能够在不牺牲与用户意图的一致性的情况下生成更安全的内容,为生成更安全的T2I内容提供了一种实用方案。我们的代码可在以下网址获得:[此URL]。 **警告:该论文包含由模型生成的有害或不当图像的例子。** 请注意,在处理这类研究时需要格外小心,并确保在适当的安全和伦理框架内操作这些数据,以避免任何潜在的危害。
URL
https://arxiv.org/abs/2509.13760