Papers › Iterative Prompt Refinement for Safer Text-to-Image Generation

Iterative Prompt Refinement for Safer Text-to-Image Generation

17 Sep 2025EMNLParXiv:2509.13760added by Syntology

Jinwoo Jeon, JunHyeok Oh, Hayeong Lee, Byung-Jun Lee

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

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 https://github.com/ku-dmlab/IPR. \textbf{\textcolor{red}WARNING: This paper contains examples of harmful or inappropriate images generated by models.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2509.13760")

Code

Syntology Ran 6 of 17 code samples harvested from 1 repository linked to this paper; 11 have no recorded run. Of those that ran: 3 ran · our draft was wrong; 3 ran with no contract checked.

By repository: found in paper text by Syntology: 17 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

ku-dmlab/IPR found in paper text by SyntologyApache-2.0 report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 6 ran; 0 honoured the contract we drafted; 11 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · our draft was wrong
3ran
11unverified

Licence: 0 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from ku-dmlab/IPR. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

basic_clean ku-dmlab/IPR/clip/simple_tokenizer.py found in paper text by Syntology ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 98f385d847636a3e · report
flatten_dict ku-dmlab/IPR/trl/core.py found in paper text by Syntology ran Apache-2.0 (permissive) · dfd0ecd9cb25af69 · report
get_pairs ku-dmlab/IPR/clip/simple_tokenizer.py found in paper text by Syntology ran · our draft was wrong Apache-2.0 (permissive) · d919ae32e5e4e616 · report
masked_mean ku-dmlab/IPR/trl/core.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · 4f7075aac2163cbc · report
masked_var ku-dmlab/IPR/trl/core.py found in paper text by Syntology ran fingerprinted Apache-2.0 (permissive) · 67607956afbb2a83 · report
whitespace_clean ku-dmlab/IPR/clip/simple_tokenizer.py found in paper text by Syntology ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 9542161e9640b858 · report
aesthetic_scorer ku-dmlab/IPR/trl/models/auxiliary_modules.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 1167d54333f6f7a3 · report
aggregate_and_trace_results_generalized ku-dmlab/IPR/util.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 83d665733079f22f · report
apply_chat_template ku-dmlab/IPR/trl/data_utils.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 53017c7a8e570221 · report
build_model ku-dmlab/IPR/clip/model.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 39e6b23b55f376ea · report
format_data ku-dmlab/IPR/vl_sft.py found in paper text by Syntology unverified Apache-2.0 (permissive) · affb4504d85ac0b7 · report
generate_images ku-dmlab/IPR/vl_rl.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 672b96514d81a1c1 · report
is_conversational ku-dmlab/IPR/trl/data_utils.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 3c42df7a6e98e89c · report
is_liger_kernel_available ku-dmlab/IPR/trl/import_utils.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 2bb6075cd6b76760 · report
load ku-dmlab/IPR/clip/clip.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 021a688e5389b8b6 · report
load_prompts ku-dmlab/IPR/vl_rl.py found in paper text by Syntology unverified Apache-2.0 (permissive) · e9c9a97fe7d56a76 · report
maybe_apply_chat_template ku-dmlab/IPR/trl/data_utils.py found in paper text by Syntology unverified Apache-2.0 (permissive) · c695ba9ac4cc3b93 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2509.13760, was issued in September 2025, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections