SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2509.13760 · EMNLP · 2025

Iterative Prompt Refinement for Safer Text-to-Image Generation

Byung-Jun Lee, Jinwoo Jeon, Junhyeok Oh, Hayeong Lee, User Prompt

arXiv · PDF · Open in the Atlas

Code that ran

11 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 10 failures of our instrument; 6 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2509.13760.json · badge: /api/ran/2509.13760.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
ku-dmlab/IPR canonical (classifier label)
classifier basis: census
11 ran · 6 no recorded run
FunctionStatusWhere it lives
aggregate_and_trace_results_generalized Ran
ran; our contract draft was wrong, not the code
ku-dmlab/IPR/util.py
code served (permissive licence) · get_code("83d665733079f22f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from dataclasses import dataclass, fields
from typing import List, Optional

@dataclass
class SampleDataclass:
    """A simple dataclass for testing the aggregation function."""
    is_keep: np.ndarray
    values: np.ndarray
    scores: list

# Create test data
def create_test_iter_result() -> List[Optional[List[SampleDataclass]]]:
    """Create a sample iter_result structure for testing."""
    # First iteration
    iter_1_data = SampleDataclass(
        is_keep=np.array([True, False, True]),
        values=np.array([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=np.float32),
        scores=[0.9, 0.5, 0.8]
    )
    
    # Second iteration
    iter_2_data = SampleDataclass(
        is_keep=np.array([True, True, False]),
        values=np.array([[1.1, 2.1], [3.1, 4.1], [5.1, 6.1]], dtype=np.float32),
        scores=[0.95, 0.6, 0.7]
    )
    
    # Third iteration
    iter_3_data = SampleDataclass(
        is_keep=np.array([False, True, True]),
        values=np.array([[1.2, 2.2], [3.2, 4.2], [5.2, 6.2]], dtype=np.float32),
        scores=[0.85, 0.65, 0.75]
    )
    
    # Build the iter_result list: each element is a list containing dataclass instance(s)
    iter_result = [
        [iter_1_data],
        [iter_2_data],
        [iter_3_data]
    ]
    
    return iter_result

ARGS = {
    'iter_result': create_test_iter_result(),
    'keep_field_name': 'is_keep'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
apply_chat_template Ran
ran; our contract draft was wrong, not the code
ku-dmlab/IPR/trl/data_utils.py
code served (permissive licence) · get_code("53017c7a8e570221")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from transformers import PreTrainedTokenizer
from typing import Optional, Union, Callable

torch.manual_seed(0)

class MockTokenizer(PreTrainedTokenizer):
    """Minimal tokenizer mock with apply_chat_template method"""
    
    def __init__(self):
        # Initialize with minimal required attributes
        self.model_max_length = 512
        self.eos_token = "</s>"
        self.bos_token = "<s>"
        self.unk_token = "<unk>"
        self.pad_token = "<pad>"
    
    def apply_chat_template(self, messages, tools=None, tokenize=True, 
                           add_generation_prompt=False, continue_final_message=False):
        """Mock implementation that returns formatted text"""
        if isinstance(messages, str):
            return messages
        
        # Build a simple text representation
        text_parts = []
        for msg in messages:
            role = msg.get('role', 'user')
            content = msg.get('content', '')
            text_parts.append(f"{role}: {content}")
        
        result = "\n".join(text_parts)
        
        if add_generation_prompt:
            result += "\nassistant:"
        
        if continue_final_message and messages and messages[-1].get('role') == 'assistant':
            # Remove the last closing if we're continuing
            pass
        
        return result
    
    def vocab_size(self):
        return 1000
    
    def get_vocab(self):
        return {}


# Create a minimal example with 'prompt' and 'completion' keys
example = {
    'prompt': [
        {'role': 'user', 'content': 'What is 2+2?'}
    ],
    'completion': [
        {'role': 'assistant', 'content': 'The answer is 4.'}
    ]
}

tokenizer = MockTokenizer()

tools = None

ARGS = {
    'example': example,
    'tokenizer': tokenizer,
    'tools': tools
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
basic_clean Ran
ran; our contract draft was wrong, not the code
ku-dmlab/IPR/clip/simple_tokenizer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("98f385d847636a3e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ltpwy/MSCI, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

flatten_dict Ran
ran; our contract draft was wrong, not the code
ku-dmlab/IPR/trl/core.py
code served (permissive licence) · get_code("dfd0ecd9cb25af69")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from collections.abc import Mapping

torch.manual_seed(0)

# Create a nested dictionary with various data types
nested_dict = {
    'model': {
        'layers': {
            'layer1': 0.5,
            'layer2': 0.3
        },
        'name': 'test_model'
    },
    'training': {
        'epochs': 100,
        'batch_size': 32
    },
    'data': 42
}

# The function takes:
# 1. nested: dict - a nested dictionary to flatten
# 2. sep: str - separator to use when concatenating keys (default '/')

ARGS = {
    'nested': nested_dict,
    'sep': '/'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
format_data Ran
ran; our contract draft was wrong, not the code
ku-dmlab/IPR/vl_sft.py
code served (permissive licence) · get_code("affb4504d85ac0b7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from PIL import Image
import io

torch.manual_seed(0)

# Create a small sample image as bytes
img_array = np.random.randint(0, 256, (32, 32, 3), dtype=np.uint8)
img = Image.fromarray(img_array)
img_buffer = io.BytesIO()
img.save(img_buffer, format='PNG')
img_bytes = img_buffer.getvalue()

sample = {
    'image': img_bytes,
    'query': 'A person doing something dangerous',
    'response': 'A person engaging in a safe outdoor activity'
}

ARGS = {
    'sample': sample
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_pairs Ran
ran; our contract draft was wrong, not the code
ku-dmlab/IPR/clip/simple_tokenizer.py
code served (permissive licence) · get_code("d919ae32e5e4e616")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned set. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function get_pairs takes a word parameter
# A word is represented as a tuple of symbols (variable-length strings)
# The function iterates through the word and creates pairs of consecutive symbols

word = ("hello", "world", "test")

ARGS = {
    "word": word
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_conversational Ran
ran, violated the contract we drafted
ku-dmlab/IPR/trl/data_utils.py
code served (permissive licence) · get_code("3c42df7a6e98e89c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# Example 1: Conversational format with messages
example_conversational = {
    "prompt": [
        {"role": "user", "content": "What color is the sky?"}
    ]
}

# Example 2: Non-conversational format (string prompt)
example_non_conversational = {
    "prompt": "The sky is"
}

# Example 3: Conversational format with chosen/rejected
example_conversational_chosen = {
    "chosen": [
        {"role": "assistant", "content": "The sky is blue."}
    ]
}

# Example 4: Conversational format with messages key
example_conversational_messages = {
    "messages": [
        {"role": "system", "content": "You are helpful."},
        {"role": "user", "content": "Hello"}
    ]
}

# Use the first example as the main test case
ARGS = {
    "example": example_conversational
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
masked_mean Ran
ran; our contract draft was wrong, not the code
ku-dmlab/IPR/trl/core.py
code served (permissive licence) · get_code("4f7075aac2163cbc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Create small tensors for testing masked_mean
# values: tensor of shape (2, 4) with float values
values = torch.randn(2, 4)

# mask: binary tensor of same shape as values, with 0s and 1s
mask = torch.randint(0, 2, (2, 4)).float()

# axis: can be None or an integer axis
axis = None

ARGS = {
    "values": values,
    "mask": mask,
    "axis": axis,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
masked_var Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ku-dmlab/IPR/trl/core.py
code served (permissive licence) · get_code("67607956afbb2a83")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small test tensors
# values: the tensor to compute variance over
# mask: binary mask to select which values to include
values = torch.randn(2, 4)  # shape (2, 4)
mask = torch.ones(2, 4)     # shape (2, 4), all ones means all values are included

ARGS = {
    "values": values,
    "mask": mask,
    "unbiased": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
maybe_apply_chat_template Ran
ran; our contract draft was wrong, not the code
ku-dmlab/IPR/trl/data_utils.py
code served (permissive licence) · get_code("c695ba9ac4cc3b93")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from typing import Any, Callable, Optional, Union
from unittest.mock import Mock

torch.manual_seed(0)

# Create a mock tokenizer
class MockTokenizer:
    def apply_chat_template(
        self,
        messages,
        tools=None,
        tokenize=False,
        add_generation_prompt=False,
        continue_final_message=False
    ):
        # Simple mock: concatenate role and content fields
        if isinstance(messages, list) and len(messages) > 0:
            result = ""
            for msg in messages:
                if isinstance(msg, dict) and 'role' in msg and 'content' in msg:
                    result += f"[{msg['role']}]: {msg['content']} "
            if add_generation_prompt:
                result += "[assistant]: "
            return result.strip()
        return ""

tokenizer = MockTokenizer()

# Create a valid conversational example with prompt and chosen/rejected
example = {
    "prompt": [
        {"role": "user", "content": "What is 2+2?"}
    ],
    "chosen": [
        {"role": "assistant", "content": "The answer is 4."}
    ],
    "rejected": [
        {"role": "assistant", "content": "The answer is 5."}
    ]
}

# Optional tools parameter
tools = None

ARGS = {
    "example": example,
    "tokenizer": tokenizer,
    "tools": tools
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, transformers — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
whitespace_clean Ran
ran; our contract draft was wrong, not the code
ku-dmlab/IPR/clip/simple_tokenizer.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from ltpwy/MSCI, is pointer only (licence: NONE) · get_code("9542161e9640b858")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from ltpwy/MSCI, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

aesthetic_scorer Not yet run
unverified (harvested, no recorded run)
ku-dmlab/IPR/trl/models/auxiliary_modules.py
code served (permissive licence) · get_code("1167d54333f6f7a3")
How it ran

no invocation recorded.

build_model Not yet run
unverified (harvested, no recorded run)
ku-dmlab/IPR/clip/model.py
code served (permissive licence) · get_code("39e6b23b55f376ea")
How it ran

no invocation recorded.

generate_images Not yet run
unverified (harvested, no recorded run)
ku-dmlab/IPR/vl_rl.py
code served (permissive licence) · get_code("672b96514d81a1c1")
How it ran

no invocation recorded.

is_liger_kernel_available Not yet run
unverified (harvested, no recorded run)
ku-dmlab/IPR/trl/import_utils.py
code served (permissive licence) · get_code("2bb6075cd6b76760")
How it ran

no invocation recorded.

load Not yet run
unverified (harvested, no recorded run)
ku-dmlab/IPR/clip/clip.py
code served (permissive licence) · get_code("021a688e5389b8b6")
How it ran

no invocation recorded.

load_prompts Not yet run
unverified (harvested, no recorded run)
ku-dmlab/IPR/vl_rl.py
code served (permissive licence) · get_code("e9c9a97fe7d56a76")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 13 are also present in other papers whose code we hold (13 with at least one paper dated earlier, 0 the same month, 11 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
get_pairs 258 other papers
221 dated earlier, 25 later, 11 same year, order not determinable, 1 undated · 4 only as an assembly brick
1802.06474 (2018-02)
A Closed-form Solution to Photorealistic Image Stylization
1803.01128 (2018-03)
Seq2Sick: Evaluating the Robustness of Sequence-to-Sequence Models with Adversarial Examples
1809.00125 (2018-09)
Simple Fusion: Return of the Language Model
and 255 more not named here
whitespace_clean 231 other papers
202 dated earlier, 18 later, 10 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 228 more not named here
basic_clean 218 other papers
202 dated earlier, 5 later, 10 same year, order not determinable, 1 undated · 4 only as an assembly brick
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2108.10904 (2021-08)
SimVLM: Simple Visual Language Model Pretraining with Weak Supervision
and 215 more not named here
build_model 53 other papers
44 dated earlier, 4 later, 5 same year, order not determinable
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2210.01115 (2022-10)
LASP: Text-to-Text Optimization for Language-Aware Soft Prompting of Vision &amp; Language Models
2211.09552 (2022-11)
UniFormerV2: Spatiotemporal Learning by Arming Image ViTs with Video UniFormer
and 50 more not named here
load 18 other papers
12 dated earlier, 3 later, 3 same year, order not determinable
2107.06383 (2021-07)
How Much Can CLIP Benefit Vision-and-Language Tasks?
2311.11261 (2023-11)
Adversarial Prompt Tuning for Vision-Language Models
2311.18231 (2023-11)
TCP:Textual-based Class-aware Prompt tuning for Visual-Language Model
and 15 more not named here
flatten_dict 6 other papers
5 dated earlier, 1 later
2504.20157 (2025-04)
Toward Evaluative Thinking: Meta Policy Optimization with Evolving Reward Models
2505.09655 (2025-05)
DRA-GRPO: Your GRPO Needs to Know Diverse Reasoning Paths for Mathematical Reasoning
2505.15404 (2025-05)
How Should We Enhance the Safety of Large Reasoning Models: An Empirical Study
and 3 more not named here
masked_mean 6 other papers
5 dated earlier, 1 later
2504.20157 (2025-04)
Toward Evaluative Thinking: Meta Policy Optimization with Evolving Reward Models
2505.09655 (2025-05)
DRA-GRPO: Your GRPO Needs to Know Diverse Reasoning Paths for Mathematical Reasoning
2505.15404 (2025-05)
How Should We Enhance the Safety of Large Reasoning Models: An Empirical Study
and 3 more not named here
masked_var 6 other papers
5 dated earlier, 1 later
2504.20157 (2025-04)
Toward Evaluative Thinking: Meta Policy Optimization with Evolving Reward Models
2505.09655 (2025-05)
DRA-GRPO: Your GRPO Needs to Know Diverse Reasoning Paths for Mathematical Reasoning
2505.15404 (2025-05)
How Should We Enhance the Safety of Large Reasoning Models: An Empirical Study
and 3 more not named here
is_conversational 4 other papers
3 dated earlier, 1 later
2504.20157 (2025-04)
Toward Evaluative Thinking: Meta Policy Optimization with Evolving Reward Models
2505.09655 (2025-05)
DRA-GRPO: Your GRPO Needs to Know Diverse Reasoning Paths for Mathematical Reasoning
2505.15656 (2025-05)
Be Careful When Fine-tuning On Open-Source LLMs: Your Fine-tuning Data Could Be Secretly Stolen!
and 1 more not named here
aesthetic_scorer 2 other papers
1 dated earlier, 1 later
2504.20157 (2025-04)
Toward Evaluative Thinking: Meta Policy Optimization with Evolving Reward Models
2605.11974 (2026-05)
Towards Order Fairness: Mitigating LLMs Order Sensitivity through Dual Group Advantage Optimization
apply_chat_template 2 other papers
2 dated earlier
2505.09655 (2025-05)
DRA-GRPO: Your GRPO Needs to Know Diverse Reasoning Paths for Mathematical Reasoning
2505.15656 (2025-05)
Be Careful When Fine-tuning On Open-Source LLMs: Your Fine-tuning Data Could Be Secretly Stolen!
is_liger_kernel_available 2 other papers
1 dated earlier, 1 later
2504.20157 (2025-04)
Toward Evaluative Thinking: Meta Policy Optimization with Evolving Reward Models
2605.11974 (2026-05)
Towards Order Fairness: Mitigating LLMs Order Sensitivity through Dual Group Advantage Optimization
maybe_apply_chat_template 2 other papers
2 dated earlier
2505.09655 (2025-05)
DRA-GRPO: Your GRPO Needs to Know Diverse Reasoning Paths for Mathematical Reasoning
2505.15656 (2025-05)
Be Careful When Fine-tuning On Open-Source LLMs: Your Fine-tuning Data Could Be Secretly Stolen!

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2509.13760")
get_code_for_paper("2509.13760")
have("2509.13760")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2509.13760.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2509.13760.svg)](https://syntology.ai/paper/2509.13760)

Connect an agent — have() is free.