arXiv:2610.36146cs.AIOct 2026

Manuscript Offprint

arXiv:2610.36146

From Structural Feedback to Prompt Policies: Learning Faithful Text-to-Image Prompt Editors

Wentao Ye, Yali Ye, Zhiqing Xiao, Ru Peng, Xinpeng Ti, Liyao Li, Zhanming Shen, Peng Lu, Jie Zhang, Haobo Wang

Abstract

Prompt optimization should improve the image a user receives without changing the scene the user requested. Yet stylistic rewriting can weaken object attributes and relations even when global text–image similarity remains high. We propose StruPO, a structure-aware prompt editor that uses a calibrated scene graph as a shared representation for policy conditioning and image-grounded supervision. The graph exposes what should be preserved, while deletion, reordering, and insertion provide a token-aligned way to modify the prompt. This turns structural feedback from an external critique into a training signal for a reusable editing policy. Learning from that signal requires handling both uncertain grounding and stochastic image generation. StruPO retains grounding confidence through smooth reward shaping and averages multiple images for each edit before computing group-relative advantages. Experiments span three disjoint 2K-prompt test sets and four frozen generation backbones, with comparisons to learned prompt optimizers, iterative structural feedback, diffusion-model fine-tuning, and inference-time attention control. StruPO improves the faithfulness–aesthetics trade-off, with consistent gains in relational fidelity. Independent automatic evaluators and a 15-annotator study provide complementary evidence, and human preference margins increase with relation complexity. Controlled ablations connect these gains to graph conditioning, local editing, and image-grounded learning. The resulting policy produces reusable optimized text in one pass after graph calibration, without an iterative critique–rewrite loop.

1 Introduction

Text-to-image (T2I) models such as Stable Diffusion [1] and DALL-E [2] have made visual content creation widely accessible, but the quality of their outputs still depends strongly on prompt formulation. Users describe what they want to see; generators also respond to how that intent is expressed through composition, lighting, and stylistic detail. Automatic prompt optimization bridges this gap by transforming a user prompt x into a generator-effective prompt y. Its objective is twofold: improve the resulting image’s perceptual quality and preserve the scene specified by the user.

These goals need not move together. A rewriter can make a prompt more vivid while changing which objects appear, which attributes belong to them, or how they relate. Style-oriented optimizers [3, 4] and embedding-level relevance constraints [5] address important parts of the task, but a high global text–image score can conceal local semantic failures [6, 7]. A tiger with the wrong coat color or

∗^{*}Equal contribution.

†^{\dagger}Corresponding authors: Peng Lu and Jie Zhang.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

without its requested crown may remain topically similar to the prompt. Figure 1 illustrates why preserving the scene requires a more explicit account of intent than preserving overall similarity.

Scene graphs (SGs) express this intent through object phrases and relations. Complete phrases such as “gold crown” retain attributes, while edges specify how the objects are connected. Prior methods already exploit such structure: OPT2I optimizes consistency scores through iterative prompting [8], and VisualPrompter uses atomic visual feedback to target missing concepts [9]. These methods establish the value of structural diagnosis. The next question is how to turn that diagnosis into a learned editing behavior that generalizes across prompts, rather than repeatedly asking an external rewriter to interpret feedback at test time.

Figure

Prompt x: a white tiger king with a gold crown and a blue king suit

Figure 1: Similar global embedding scores can conceal different structural errors. A scene graph makes object attributes and relations explicit.

Our central idea is to use the same structured intent to condition the editor and to evaluate its consequences. This connects the information available when choosing an edit to the object–attribute–relation constraints checked in the generated image. A graph-conditioned policy can then learn which textual changes improve rendering while retaining semantic anchors. Expressing those changes as deletion, reordering, and insertion further biases the policy toward modifying the input rather than replacing it wholesale. The benefit is not only fewer test-time revisions: it is a closer alignment between the representation of user intent, the granularity of prompt changes, and the feedback used to learn them.

Making this alignment learnable presents two challenges. First, text parsers may confuse style or camera descriptions with visible content, while grounding models provide uncertain evidence about genuine constraints. Second, image generation is stochastic: two renders of the same edited prompt can receive different scores. A policy trained on thresholded, single-image feedback can therefore react to evaluator discontinuities or rendering noise instead of the quality of an edit. Graph calibration, confidence-preserving rewards, and environment-sample averaging address these distinct sources of uncertainty.

We instantiate this approach as StruPO (Structured Prompt Optimization). A scene-graph extractor calibrates the input structure, a hybrid encoder exposes text and graph features to the policy, and an edit-action generator produces the optimized prompt. Supervised fine-tuning provides an initial editing behavior; image-grounded reinforcement learning then improves its downstream consequences. Smooth structural rewards retain grounding confidence, and environment-aware GRPO compares edits after averaging multiple renders of each candidate. At inference time, one policy pass follows graph calibration and returns reusable text; the T2I generator stays frozen.

Our contributions are threefold. First, we develop a structure-aware editing policy in which calibrated intent is shared between policy conditioning and image-grounded supervision. Second, we pair confidence-preserving reward shaping with environment-aware group-relative optimization, supported by a reward-stability analysis. Third, we establish the approach's relation-sensitive benefits through controlled ablations, cross-backbone transfer, independent evaluators, and human judgments. The experiments connect improvements to graph access, local edits, and image feedback, while comparisons with learned and iterative optimizers characterize the resulting quality–cost trade-off. Additional evaluator and baseline results are provided in the appendix.

References (41)