One Rewrite to Fix Them All? Type-Aware Repair Allocation for Text-to-Image Prompt Optimization

arXiv cs.AI Papers

Summary

This paper introduces Type-Aware Repair Allocation (TARA), a training-free framework that decomposes text-to-image prompt optimization into atomic repair allocation, where each failed proposition is routed to a type-conditioned repair operator. Experiments show TARA achieves the best semantic accuracy on DSG and TIFA benchmarks across four generators, improving over VisualPrompter while maintaining image quality.

arXiv:2607.18724v1 Announce Type: new Abstract: Text-to-image (T2I) generators often fail to follow their prompts faithfully, producing wrong counts, swapped attributes, ambiguous relations, and illegible text. Prompt optimization repairs such failures by rewriting the user prompt, requiring no generator retraining, and has yielded promising results. However, existing optimizers absorb heterogeneous failures into one uniform prompt expansion, even though each calls for different repair language. We formulate semantic prompt optimization as atomic repair allocation: each failed proposition is routed to a type-conditioned repair operator before the resulting local constraints are compiled into one executable prompt. We instantiate this formulation in the training-free Type-Aware Repair Allocation (TARA) framework, which separates diagnosis, allocation, compilation, and a semantic repair gate, an accept-or-revert controller over exactly one prescribed repair that prevents semantic regressions. Extensive experiments on DSG and TIFA across four frozen generators demonstrate that TARA achieves the best semantic accuracy in all eight benchmark-generator cells, improving over VisualPrompter by 5.6 and 2.6 points on DSG and TIFA, respectively, while maintaining image quality and running fastest in our matched local setting at 16.0 seconds versus 20.0 seconds per prompt.
Original Article
View Cached Full Text

Cached at: 07/22/26, 08:22 AM

# One Rewrite to Fix Them All? Type-Aware Repair Allocation for Text-to-Image Prompt Optimization
Source: [https://arxiv.org/html/2607.18724](https://arxiv.org/html/2607.18724)
Haoyue Liu1Xiaoyu Ma1Ye Chen2Shuguang Cui1,3Xiaoying Tang1,3,†\\dagger 1School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen 518172, China 2XJTU\-POLIMI Joint School, Xi’an Jiaotong University, Xi’an 710049, China 3Shenzhen Future Network of Intelligence Institute \(FNii\-Shenzhen\)

###### Abstract

Text\-to\-image \(T2I\) generators often fail to follow their prompts faithfully, producing wrong counts, swapped attributes, ambiguous relations, and illegible text\. Prompt optimization repairs such failures by rewriting the user prompt, requiring no generator retraining, and has yielded promising results\. However, existing optimizers absorb heterogeneous failures into one uniform prompt expansion, even though each calls for different repair language\. We formulate semantic prompt optimization as*atomic repair allocation*: each failed proposition is routed to a type\-conditioned repair operator before the resulting local constraints are compiled into one executable prompt\. We instantiate this formulation in the training\-free Type\-Aware Repair Allocation \(TARA\) framework, which separates diagnosis, allocation, compilation, and a semantic repair gate—an accept\-or\-revert controller over exactly one prescribed repair that prevents semantic regressions\. Extensive experiments on DSG and TIFA across four frozen generators demonstrate that TARA achieves the best semantic accuracy in all eight benchmark–generator cells, improving over VisualPrompter by\+5\.6\+5\.6/\+2\.6\+2\.6points on DSG/TIFA, while maintaining image quality and running fastest in our matched local setting \(16\.016\.0s versus20\.020\.0s per prompt\)\.

22footnotetext:Corresponding author\.## 1Introduction

Text\-to\-image \(T2I\) generation has become a default way to turn language into pictures\(Ho et al\.,[2020](https://arxiv.org/html/2607.18724#bib.bib17); Rombach et al\.,[2022](https://arxiv.org/html/2607.18724#bib.bib31); Black Forest Labs,[2024](https://arxiv.org/html/2607.18724#bib.bib1); Chen et al\.,[2025](https://arxiv.org/html/2607.18724#bib.bib4)\), yet making an image actually satisfy its prompt is still fragile: modern generators routinely drop a requested object, miscount, swap an attribute, scramble a relation, or render text no one can read\. Prompt optimization has therefore emerged as a practical remedy that requires no generator retraining\. Keyword\-driven rewriters such as Promptist\(Hao et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib12)\), BeautifulPrompt\(Cao et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib3)\), NeuroPrompts\(Rosenman et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib32)\), and TIPO\(Yeh et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib42)\)increase visual appeal, and recent visual\-feedback methods such as VisualPrompter\(Wu et al\.,[2026](https://arxiv.org/html/2607.18724#bib.bib39)\)decompose the prompt into atomic propositions and detect missing concepts with a VLM, targeting semantic faithfulness directly\.

Despite this progress, existing optimizers share an unavoidable drawback:*whatever the failure, the prompt is repaired by a single uniform expansion*\. A missing object, a wrong count, a broken relation, and illegible text are handled by the same enrichment rule, so the repair seldom matches the failure; VisualPrompter, for instance, uses atomic feedback to decide*what*is missing, but still applies a largely type\-agnostic strategy when deciding*how*to rewrite it\. As illustrated in Figure[1](https://arxiv.org/html/2607.18724#S1.F1), on a prompt that jointly demands a count, an attribute, a layout, and a legible sign, one such expansion leaves several errors standing\. Notably,*different failures call for different repair language*: a missing object must be made salient, a wrong count needs explicit cardinality and separation, a spatial relation needs an unambiguous layout, and rendered text needs the exact string with legible typography\. Under our formulation, uniform expansion is a degenerate allocation policy with one type\-invariant shared operator across failure types\. Rather than using atomic categories only to describe what failed, TARA operationalizes them as routing variables that determine how each failed proposition is repaired\.

To tackle the above problem, we rethink how visual feedback should drive prompt rewriting and address the following core question:

*Can atomic visual feedback be used not merely to trigger a rewrite, but to route heterogeneous failures to specialized repairs and compile them into one reliable prompt under a single\-regeneration budget?*

Hence, we formulate semantic prompt optimization as*atomic repair allocation*and instantiate it with the*Type\-Aware Repair Allocation*\(TARA\) method\. TARA follows four explicit stages:*Diagnose*which atomic propositions fail;*Allocate*each failure to a type\-conditioned repair operator;*Compile*the resulting local constraints into one concise executable prompt through a text\-only portfolio\-and\-fusion step; and*Adopt*the single repaired image only when a semantic repair gate deems it a reliable replacement\. This design separates decisions that existing prompt optimizers conflate or leave uncontrolled: what went wrong, how each failure should be repaired, how heterogeneous local repairs should coexist in one prompt, and whether the result should replace the original output\. The repair budget is a single additional image generation, matched to prior visual\-feedback optimizers; TARA needs no task\-specific training labels, generator finetuning, or white\-box access, and can be applied out of the box across diverse frozen T2I generators\. We summarize the contributions of this paper as follows:

- •We formulate visual\-feedback prompt optimization as*atomic repair allocation*\. Rather than using atomic feedback only to trigger one global expansion, TARA treats each failed proposition as an intervention unit and assigns it a type\-conditioned local repair; uniform expansion is the single\-operator special case\.
- •We instantiate this formulation with TARA, a training\-free framework that compiles heterogeneous local repairs into one executable prompt under a single\-regeneration budget and uses a semantic repair gate to prevent the prescribed repair from introducing regressions\.
- •Across DSG and TIFA, four generators, and three seeds, TARA leads all eight benchmark–generator cells\. Its gains persist across semantic types and independent evaluators, while controlled ablations isolate the explicit typed\-expansion branch, repair compilation, recovery, and adoption under a matched image budget\.

![Refer to caption](https://arxiv.org/html/2607.18724v1/x1.png)Figure 1:Type\-agnostic expansion \(VisualPrompter, left\) versus atomic repair allocation \(TARA, right\)\. One uniform expansion leaves several fine\-grained failures unresolved, whereas TARA routes each failure to a type\-conditioned repair within the same single re\-generation budget\.
## 2TARA

The discussion above motivates a four\-stage view of prompt optimization:*Diagnose*failed atomic requirements,*Allocate*a type\-conditioned operator to each failure,*Compile*the allocated local repairs into one globally coherent prompt, and*Adopt*the repaired output only when it is a reliable replacement\. The following subsections instantiate these four decisions without training or extra repaired\-image candidates\.

### 2\.1Overview and Problem Setup

We cast prompt optimization as single\-pass visual feedback\. LetGGbe a frozen text\-to\-image generator andppa user prompt\. Following DSG\(Cho et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib6)\),ppis decomposed into atomic semantic propositionsQ​\(p\)=\{q1,…,qn\}Q\(p\)=\\\{q\_\{1\},\\dots,q\_\{n\}\\\}, each carrying a natural\-language verification question and a semantic category\. A frozen VLM judgeVVanswers each question on an imagexx, and we define the semantic score

s​\(x\)=1n​\|\{i:V​\(x,qi\)=correct\}\|,s\(x\)\\;=\\;\\frac\{1\}\{n\}\\,\\bigl\|\\\{\\,i:V\(x,q\_\{i\}\)=\\textsc\{correct\}\\,\\\}\\bigr\|,\(1\)computed with the same DSG evaluator and judge for every method, so all methods are scored under an identical protocol\.

TARA first rendersx0=G​\(p\)x\_\{0\}=G\(p\)and obtains diagnosisd0d\_\{0\}\. Let

F0​\(x0,p\)\\displaystyle F\_\{0\}\(x\_\{0\},p\)=\{\(qi,ti\):qi​is diagnosed as failed on​x0\},\\displaystyle=\\\{\(q\_\{i\},t\_\{i\}\):q\_\{i\}\\text\{ is diagnosed as failed on \}x\_\{0\}\\\},\(2\)F\\displaystyle F=F0∪ℛ​\(d0\),\\displaystyle=F\_\{0\}\\cup\\mathcal\{R\}\(d\_\{0\}\),ri\\displaystyle r\_\{i\}=𝒜​\(qi,ti\),\\displaystyle=\\mathcal\{A\}\(q\_\{i\},t\_\{i\}\),p^\\displaystyle\\hat\{p\}=𝒞​\(p,\{ri\}\(qi,ti\)∈F\),\\displaystyle=\\mathcal\{C\}\\\!\\left\(p,\\\{r\_\{i\}\\\}\_\{\(q\_\{i\},t\_\{i\}\)\\in F\}\\right\),wheretit\_\{i\}is the diagnosed error type andℛ​\(d0\)\\mathcal\{R\}\(d\_\{0\}\)recovers pruned relation/action constraints needed for repair\. The allocator𝒜\\mathcal\{A\}maps each target to a local repair constraintrir\_\{i\}, and the compiler𝒞\\mathcal\{C\}realizes all allocated repairs through one prompt\. In TARA, a repair operator is a fixed local language\-transformation rule rather than a learned router\. Uniform expansion is the type\-invariant special case

𝒜uni​\(q,t\)=Runi​\(q\)for every type​t,\\mathcal\{A\}\_\{\\mathrm\{uni\}\}\(q,t\)=R\_\{\\mathrm\{uni\}\}\(q\)\\qquad\\text\{for every type \}t,\(3\)so the resulting constraint may depend on the failed propositionqq, but the repair policy does not change with its typett\.

Operationally, TARA \(i\) diagnoses the failed propositions inx0x\_\{0\}; \(ii\) allocates each failure to a type\-conditioned repair operator; \(iii\) compiles the resulting local constraints into one optimized promptp^\\hat\{p\}; and \(iv\) renders a single repaired imagex^=G​\(p^\)\\hat\{x\}=G\(\\hat\{p\}\), which is adopted only if it improves the score and is otherwise discarded in favor ofx0x\_\{0\}\. TARA thus uses at most two image generations, one diagnostic and one repaired, while all diagnosis, candidate construction, selection, and fusion are text\- or VLM\-side\. Figure[2](https://arxiv.org/html/2607.18724#S2.F2)summarizes the two stages \(initial diagnosis, then type\-aware repair with a final gate\), and Algorithm[1](https://arxiv.org/html/2607.18724#alg1)in the appendix gives the full procedure\.

![Refer to caption](https://arxiv.org/html/2607.18724v1/x2.png)Figure 2:Overview of TARA\. It diagnoses failed atomic propositions, allocates type\-conditioned repairs, compiles them into one prompt, and adopts the single repaired image only if its semantic score improves\. Training\-free, within at most two image generations\.
### 2\.2Typed Visual Diagnosis

Following DSG\(Cho et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib6)\), each prompt is decomposed into atomic propositions, and the VLM judge assigns every proposition one of three states \(*correct*,*absent*when not generated, or*wrong*when generated but incorrect\), together with a semantic category \(entity, attribute, relation, action, count, text, style, or global\)\. The DSG dependency graph prunes invalid downstream questions: if an entity is absent, questions about its attributes or relations are not counted as independent failures\. Following the DSG evaluation protocol, a pruned proposition counts as zero in the numerator of Eq\.[1](https://arxiv.org/html/2607.18724#S2.E1)but stays in its denominator, so TARA and all baselines are compared under an identical metric rather than a more lenient one\.

TARA maps each failed proposition to a repairable error type through a fixed category\-to\-type table: entity→\\rightarrow*missing object*, count→\\rightarrow*wrong count*, attribute→\\rightarrow*wrong attribute*, relation→\\rightarrow*wrong relation*, action→\\rightarrow*wrong action*, text→\\rightarrow*missing or illegible text*, style→\\rightarrow*style mismatch*, and global→\\rightarrow*global mismatch*\. Through this fixed mapping, shared across all benchmarks and generators, TARA organizes diagnosed failures into eight repairable types that act as actionable routing variables\. The type determines the repair language: explicit cardinality and separation for counts, unambiguous spatial anchors for relations, visible pose and contact for actions, an exact quoted string with legible typography for text, and salient foreground grounding for missing objects, all while leaving already\-correct content untouched\. These typed failures instantiate the base setF0F\_\{0\}in Eq\.[2](https://arxiv.org/html/2607.18724#S2.E2)\.

A failed entity prunes its dependent relations, which can trap an optimizer into repeatedly re\-adding the missing object while never re\-describing the layout\. TARA therefore*also*adds pruned relation and action propositions that are themselves wrong or absent intoFF, so that a single rewrite can re\-describe a missing object together with its spatial relation\. This recovery affects only the repair targets, not the comparable score of Eq\.[1](https://arxiv.org/html/2607.18724#S2.E1)\.

### 2\.3Typed Repair Compilation and Output Adoption

Once each failed proposition has been allocated a repair operator, TARA must compile heterogeneous local constraints into one globally coherent prompt\. Directly committing to one rewrite bias is brittle: a conservative edit may under\-specify a missing concept, while an aggressive one may inject unrelated detail\. TARA therefore implements typed repair compilation with a small portfolioCCof text\-only rewrite drafts, each encoding a different compilation bias:

1. 1\.Uniform expansion: a type\-agnostic rewrite that enrichesppso all failed aspects are depicted at once, with no type information—mirroring the uniform\-expansion bias of prior optimizers and serving as an in\-method control for typing\. Like every candidate, it is a non\-final draft built from the recovered targetsFFand later passed to fusion\.
2. 2\.Typed expansion: the same expansion, but each failed aspect is annotated with its error type and a type\-specific repair phrase \(word\-and\-digit counts, spatial anchors, quoted legible text, pose and contact for actions\)\.
3. 3\.Minimal append: keepsppalmost verbatim and appends only the shortest concrete clauses needed to fix the failures, for strong generators where a full rewrite tends to drift from the original intent\.

When the initial image is already close to correct \(s​\(x0\)≥τs\(x\_\{0\}\)\\geq\\tau, withτ=0\.72\\tau\{=\}0\.72\), TARA additionally admits are\-seedcandidate that retainsppunchanged, allowing the single repair\-generation step to use a fresh seed instead of a rewritten prompt—avoiding harmful edits to near\-correct images\. We useτ=0\.72\\tau\{=\}0\.72as a near\-correct cutoff \(roughly “most propositions already pass”\); a threshold sweep \(Appendix[C\.2](https://arxiv.org/html/2607.18724#A3.SS2)\) shows that all values in\[0\.60,0\.84\]\[0\.60,0\.84\]give large gains at a comparable image budget, and we keep this single globalτ\\taufixed rather than tuning it per generator or benchmark\. Because every candidate is text\-only, the portfolio adds no image generations\. The portfolio is not an image\-level candidate set: none of its drafts is rendered or scored as an image\. Instead, it provides complementary textual realizations of the allocated local repairs so they can be compiled into one prompt under the single\-regeneration budget\.

TARA then fuses the portfolio into one optimized promptp^\\hat\{p\}with a text\-only LLM step whose instruction enforces four principles: preserve all already\-correct semantics, fix every failed proposition, avoid unrelated objects and generic aesthetic filler, and stay concise\. As an implementation alternative, we also consider a purely heuristic selector that instead picks one existing candidate by a text\-only score rewarding coverage of failed\-proposition words and preservation of the original wording while penalizing over\-long prompts; it never inspects an image, preserving the single\-pass budget\.

Even a type\-targeted rewrite may remove previously correct content\. TARA therefore ends its inference policy with a semantic repair gate: after generating exactly one prescribed repairx^=G​\(p^\)\\hat\{x\}=G\(\\hat\{p\}\), it adopts the repair iffs​\(x^\)\>s​\(x0\)s\(\\hat\{x\}\)\>s\(x\_\{0\}\)and otherwise reverts to\(p,x0\)\(p,x\_\{0\}\)\. This accept\-or\-revert regression guard is not a best\-of\-NNselector: it generates no additional repaired candidates and performs no image search\. It operates per input without ground\-truth annotations or reference images, and its full cost is included in our runtime accounting \(Appendix[A\.1](https://arxiv.org/html/2607.18724#A1.SS1)\)\.

## 3Experiments

We organize our study around four questions, answered in turn:

- •Q1 \(accuracy\)\.Does TARA produce more semantically accurate images than existing prompt optimizers?
- •Q2 \(quality\)\.Does it do so without sacrificing CLIP alignment or aesthetics?
- •Q3 \(allocation\)\.Does explicit type\-conditioned repair contribute, and do gains hold across semantic categories and generators?
- •Q4 \(reliability and efficiency\)\.Do repair compilation and adoption contribute under the matched budget, and is TARA efficient?

Implementation details, repair templates, seed robustness, proposition\-type breakdowns, and preference numbers are in the Appendix\.

### 3\.1Experiment Setup

We evaluate on DSG\-1k\(Cho et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib6)\)\(10 source datasets\) and TIFA v1\.0\(Hu et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib18)\), running three seeds with 200 stratified prompts per seed for each benchmark\-generator\-method cell\.

Our primary metric is Semantic Accuracy: the fraction of atomic propositions answered “yes” by the shared VLM judge \(pruned propositions count as zero but stay in the denominator\)\. We also report CLIP Score\(Hessel et al\.,[2021](https://arxiv.org/html/2607.18724#bib.bib14)\), Aesthetic Score\(Schuhmann et al\.,[2022](https://arxiv.org/html/2607.18724#bib.bib34)\), and a VLM\-as\-Judge preference study\. The VLM never sees the optimized prompt text, so a rewrite cannot cue the evaluator\.

Four generators: SD v1\.5, SD v2\.1\(Rombach et al\.,[2022](https://arxiv.org/html/2607.18724#bib.bib31)\), Flux\-dev\(Black Forest Labs,[2024](https://arxiv.org/html/2607.18724#bib.bib1)\), and Janus\-Pro\(Chen et al\.,[2025](https://arxiv.org/html/2607.18724#bib.bib4)\)\. Baselines: Promptist\(Hao et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib12)\), BeautifulPrompt\(Cao et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib3)\), NeuroPrompts\(Rosenman et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib32)\), TIPO\(Yeh et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib42)\), and VisualPrompter\(Wu et al\.,[2026](https://arxiv.org/html/2607.18724#bib.bib39)\)\. All methods share prompts, seeds, image sizes, judge, and evaluation protocol, and each is evaluated in its native end\-to\-end configuration under the same maximum image\-generation budget: VisualPrompter follows its published pipeline, whereas TARA includes the semantic repair gate as part of its inference procedure, with all additional model calls and end\-to\-end costs reported\. External methods remain native; the gate’s contribution is isolated by the controlled within\-TARA ablation in §[3\.5](https://arxiv.org/html/2607.18724#S3.SS5)\. The external VisualPrompter baseline is distinct from TARA’s internal uniform\-expansion candidate \(§[2\.3](https://arxiv.org/html/2607.18724#S2.SS3)\), a non\-final draft used as an in\-method control for typing\. Details are in Appendix[A\.1](https://arxiv.org/html/2607.18724#A1.SS1)\.

### 3\.2A1: TARA Achieves the Best Semantic Accuracy in Every Cell

TARA is the strongest method in all eight benchmark\-generator cells\. As shown in Tables[2](https://arxiv.org/html/2607.18724#S3.T2)and[3](https://arxiv.org/html/2607.18724#S3.T3)\(whose Avg columns give the per\-generator overall\), TARA improves over VisualPrompter by\+5\.6points on DSG \(76\.4±\\pm0\.2 vs\. 70\.8±\\pm0\.7\) and\+2\.6on TIFA \(85\.4±\\pm0\.2 vs\. 82\.8±\\pm0\.6\), with prompt\-clustered paired bootstrap 95% CIs of\[4\.7,6\.5\]\[4\.7,6\.5\]and\[1\.6,3\.6\]\[1\.6,3\.6\], respectively\. Across 4,800 paired evaluations, the mean paired gain is\+4\.11\+4\.11points \(95% CI\[3\.45,4\.80\]\[3\.45,4\.80\]\)\. Re\-scoring the saved final images with four held\-out VLM evaluators, none of which participates in diagnosis or gate decisions, confirms the ranking, with Overall gains ranging from\+2\.4\+2\.4to\+3\.2\+3\.2points \(Table[1](https://arxiv.org/html/2607.18724#S3.T1)\)\. In contrast, aesthetics\-oriented optimizers such as BeautifulPrompt and TIPO fall well below the raw\-prompt baseline, showing that generic enrichment can actively hurt semantics\.

Table 1:Evaluator robustness for VP and TARA\. Scores are averages over four generators\.Because visual feedback methods can be sensitive to the VLM used for diagnosis and scoring, we also test evaluator robustness\. Keeping the generated images fixed, we re\-run only the atomic yes/no evaluation for the strongest semantic baseline, VisualPrompter, and TARA using four held\-out VLM judges\. Table[1](https://arxiv.org/html/2607.18724#S3.T1)shows that the ranking does not depend on the main evaluator: TARA remains better on both DSG and TIFA averages under all four judges\.

The gains are not uniform across difficulty: TARA improves the most on DSG, whose prompts carry more explicit counts, relations, text, and unusual compositions, exactly the cases where a single uniform expansion is least adequate and type\-aware repair helps most\.

Table 2:Per\-source semantic accuracy \(%\) on DSG across four generators and seven methods \(3\-seed mean±\\pmstd; per\-column best in bold; colored row is TARA−\-VisualPrompter\)\.Table 3:Per\-source semantic accuracy \(%\) on TIFA across four generators and seven methods \(transposed: rows are sources, columns are methods\)\. Conventions as in Table[2](https://arxiv.org/html/2607.18724#S3.T2)\.Tables[2](https://arxiv.org/html/2607.18724#S3.T2)and[3](https://arxiv.org/html/2607.18724#S3.T3)break down DSG and TIFA by source category across all four generators\. The largest gains appear in sources that emphasize difficult semantic structure: CountBench requires explicit cardinality, PoseScript and VRD require relations and actions, and DrawText requires robust text constraints\. This supports the central claim that atomic repair allocation is more effective than absorbing heterogeneous failures into a single uniform expansion\.

Figure[3](https://arxiv.org/html/2607.18724#S3.F3)compares all seven methods on two SD v1\.5 cases\. In the count case \(top\), most baselines render the wrong number of manikins and aesthetics\-oriented methods drift to stylized figures, whereas TARA yields three clean, countable manikins\. In the object/relation case \(bottom\), only TARA keeps both the orange car and the background screen\. Additional cases are in Figure[8](https://arxiv.org/html/2607.18724#A2.F8)\.

![Refer to caption](https://arxiv.org/html/2607.18724v1/x3.png)Figure 3:Qualitative comparison on SD v1\.5\. TARA \(green\) fixes the count \(top\) and the missing screen \(bottom\) that baselines miss\.
### 3\.3A2: TARA Preserves Image Quality While Fixing Semantics

Higher semantic accuracy does not cost image quality\. From Table[5](https://arxiv.org/html/2607.18724#S3.T5)and Table[5](https://arxiv.org/html/2607.18724#S3.T5)on DSG, we observe that

1. 1\.TARA attains the highest average CLIP score and the best CLIP score on all four generators \(mean31\.8631\.86vs\.31\.4531\.45for VisualPrompter\), so its prompts stay tightly aligned with the rendered images\.
2. 2\.Aesthetic\-oriented baselines such as NeuroPrompts and BeautifulPrompt reach higher aesthetic scores but suffer large semantic drops, exposing a quality\-for\-semantics trade\-off that TARA avoids\.
3. 3\.TARA stays within0\.020\.02of VisualPrompter and the raw prompt in aesthetic score while improving semantic alignment, adding correctness without degrading visual appeal\. This is a direct consequence of typed repair compilation: by targeting only the diagnosed failures with short, specific clauses rather than injecting generic aesthetic filler, TARA avoids the style drift that afflicts verbose expansion methods\.

Table 4:CLIP Score on DSG\.
Table 5:Aesthetic Score on DSG\.

### 3\.4A3: TARA Performs Consistently across Types and Generators

The improvement is broad, not a trade between failure types\. Aggregating over all 24 benchmark–generator–seed cells \(Figure[4](https://arxiv.org/html/2607.18724#S3.F4)\), TARA improves over the raw prompt on all eight semantic categories and over*every*prompt\-optimization baseline on seven of them, essentially matching VisualPrompter on action \(83\.283\.2vs\.83\.383\.3\), rather than improving one category at another’s expense\. Action and style are the two rarest categories, so their per\-method margins carry wider sampling noise; per\-type repair behavior for all eight types is detailed in Table[13](https://arxiv.org/html/2607.18724#A3.T13)\. The gains are largest on style \(\+4\.3\+4\.3\), attribute \(\+4\.2\+4\.2\), entity \(\+4\.1\+4\.1\), and relation \(\+3\.7\+3\.7\)—exactly the types where uniform expansion under\-specifies or drifts\. A complementary VLM\-as\-Judge preference study \(Appendix[C\.4](https://arxiv.org/html/2607.18724#A3.SS4)\) favors TARA in69\.0%69\.0\\%of changed\-prompt cases for semantic consistency\. This per\-type consistency is the empirical signature of type\-aware repair: each failed proposition is rewritten with type\-specific language, so gains accrue across categories rather than trading one for another\.

![Refer to caption](https://arxiv.org/html/2607.18724v1/x4.png)Figure 4:Per\-type semantic accuracy of seven methods over eight categories, aggregated over 24 benchmark–generator–seed cells; the pill above each green bar is TARA’s gain over VisualPrompter\.![Refer to caption](https://arxiv.org/html/2607.18724v1/x5.png)Figure 5:Human preferences on 100 sampled cases under VisualPrompter’s three\-way protocol: TARA / Tie / Original\.Following the human\-evaluation protocol of VisualPrompter\(Wu et al\.,[2026](https://arxiv.org/html/2607.18724#bib.bib39)\), we compare TARA\-optimized outputs against their original\-prompt counterparts on 100 sampled cases from two representative generators, allowing raters to express equal preference\. Human judgments corroborate the automatic results \(Figure[5](https://arxiv.org/html/2607.18724#S3.F5)\)\. For semantic consistency, raters prefer TARA in 62% of Stable Diffusion v1\.5 cases and 58% of Flux\-dev cases, compared with 18% and 20% for the original outputs\. TARA is also favored in overall preference \(58% and 54%, versus 24% and 26%\), showing that its semantic gains translate to perceptually preferable images rather than metric\-specific improvements\.

TARA’s typed prompts also show qualitative transfer to closed commercial systems; Appendix[B\.3](https://arxiv.org/html/2607.18724#A2.SS3)gives examples on Doubao and GPT Image where TARA realizes the requested layout while baselines leave text incomplete or split objects\.

### 3\.5A4: TARA Runs Faster than VisualPrompter, and Each Component Helps

Table 6:End\-to\-end time per prompt \(s\)\.TARA is the fastest optimizer in our setting\. At a matched1\.641\.64image generations per prompt, it averages16\.016\.0s versus20\.020\.0s for VisualPrompter and2525–2828s for the others \(Table[6](https://arxiv.org/html/2607.18724#S3.T6)\)\. Although TARA uses more cheap text\-only calls, its repaired prompts are shorter \(22\.7 vs\. 41\.6 words\) and repair is faster \(19\.37 vs\. 25\.47s\)\. Repairs are attempted on roughly two\-thirds of prompts \(those whose initial diagnosis reports a failure\), unrepaired prompts finish in about1010s, and per\-type adoption rates range from22\.5%22\.5\\%to29\.7%29\.7\\%\(Table[13](https://arxiv.org/html/2607.18724#A3.T13)\)\. Short, targeted rewrites thus improve both speed and accuracy; details are in Appendix[A\.1](https://arxiv.org/html/2607.18724#A1.SS1)\.

![Refer to caption](https://arxiv.org/html/2607.18724v1/x6.png)Figure 6:Full\-scale DSG ablation across four generators and three seeds; diamonds denote means\.Figure[6](https://arxiv.org/html/2607.18724#S3.F6)reports a full\-scale ablation on DSG across all four generators, three seeds, and 200 stratified prompts per seed, totaling 2,400 prompt–generator–seed evaluations for each variant\. At a fixed image budget, full TARA reaches82\.882\.8; removing the explicit typed\-expansion branch, the repair gate, the portfolio, or recovery lowers it by3\.83\.8,3\.63\.6,2\.22\.2, or1\.31\.3points, respectively\. The comparable first two drops show that gains arise jointly from explicit type\-conditioned repair language and regression\-controlled adoption, rather than from the gate alone\.

*W/o explicit type branch*removes explicit type labels and the typed\-expansion candidate while retaining the other portfolio branches—including minimal append—as well as fusion, recovery, the repair gate, and the matched image budget;*w/o recovery*omits pruned relation/action recovery; and*w/o portfolio*replaces typed repair compilation with a one\-shot typed holistic rewrite\.*W/o repair gate*retains the complete repair pipeline and matched image budget but unconditionally adopts the single repaired image, isolating only the accept\-or\-revert policy\.

## 4Related Work

Diffusion models\(Ho et al\.,[2020](https://arxiv.org/html/2607.18724#bib.bib17); Song et al\.,[2021b](https://arxiv.org/html/2607.18724#bib.bib36);[a](https://arxiv.org/html/2607.18724#bib.bib35); Dhariwal & Nichol,[2021](https://arxiv.org/html/2607.18724#bib.bib9); Kingma & Welling,[2014](https://arxiv.org/html/2607.18724#bib.bib20); Rombach et al\.,[2022](https://arxiv.org/html/2607.18724#bib.bib31); Ho & Salimans,[2022](https://arxiv.org/html/2607.18724#bib.bib16); Radford et al\.,[2021](https://arxiv.org/html/2607.18724#bib.bib29); Raffel et al\.,[2020](https://arxiv.org/html/2607.18724#bib.bib30)\), scaled by stronger backbones such as SDXL\(Podell et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib28)\), SD 3\(Esser et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib10)\), and Flux\(Black Forest Labs,[2024](https://arxiv.org/html/2607.18724#bib.bib1)\), and joined by autoregressive generators like Janus\-Pro\(Chen et al\.,[2025](https://arxiv.org/html/2607.18724#bib.bib4)\), have made high\-fidelity synthesis routine yet still fail on compositional and fine\-grained semantic constraints, motivating prompt\-side optimization without retraining or internal access\.

Early work targets visual appeal via style modifiers and keyword search\(Liu et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib22); Sahoo et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib33); Liu & Chilton,[2022](https://arxiv.org/html/2607.18724#bib.bib23); Pavlichenko & Ustalov,[2023](https://arxiv.org/html/2607.18724#bib.bib27); Oppenlaender,[2024](https://arxiv.org/html/2607.18724#bib.bib26)\)\. Interactive systems\(Wang et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib37); Brade et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib2); Feng et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib11); Wang et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib38); Datta et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib7)\)and learned rewriters—Promptist\(Hao et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib12)\), BeautifulPrompt\(Cao et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib3)\), NeuroPrompts\(Rosenman et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib32)\), TIPO\(Yeh et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib42)\)—automate prompt refinement but mainly improve aesthetics rather than semantic faithfulness\. VisualPrompter\(Wu et al\.,[2026](https://arxiv.org/html/2607.18724#bib.bib39)\)closes this gap by feeding VLM diagnostic feedback back into prompt rewriting, yet it applies one uniform expansion regardless of failure type\. Under our formulation, such feedback\-triggered rewriting is a single\-operator allocation policy; TARA instead uses feedback to route each atomic failure to a type\-conditioned intervention\. The distinction is therefore not whether visual feedback is available, but how it is operationalized: prior methods decide*what*to rewrite, whereas TARA additionally decides*how each failure should be repaired*\. Process\-side methods\(Hei et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib13); Mañas et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib24); Jiang et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib19); Zhang et al\.,[2026](https://arxiv.org/html/2607.18724#bib.bib43)\)improve alignment through multi\-round generation or direct latent manipulation, requiring additional generator calls or internal access\. TARA compiles its allocated local repairs into one prompt and gates one repaired output, achieving stronger accuracy within a single re\-generation\.

Global metrics such as FID\(Heusel et al\.,[2017](https://arxiv.org/html/2607.18724#bib.bib15)\), CLIPScore\(Hessel et al\.,[2021](https://arxiv.org/html/2607.18724#bib.bib14)\), and learned preference scores\(Kirstain et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib21); Wu et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib40)\)capture distributional or perceptual quality but cannot pinpoint which semantic requirements are met\. Recent work decomposes prompts into atomic checkable questions\(Yarom et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib41); Cho et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib5); Deutsch et al\.,[2021](https://arxiv.org/html/2607.18724#bib.bib8); Min et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib25)\); DSG\(Cho et al\.,[2024](https://arxiv.org/html/2607.18724#bib.bib6)\)and TIFA\(Hu et al\.,[2023](https://arxiv.org/html/2607.18724#bib.bib18)\)instantiate this for T2I with dependency\-aware question generation and VLM\-based verification\. TARA moves from feedback\-triggered rewriting to feedback\-routed repair: atomic feedback is not only an evaluation signal, but the routing variable that selects how each failed proposition is repaired\.

## 5Conclusion

*TARA*reformulates semantic prompt optimization as atomic repair allocation: diagnose, allocate, compile, and adopt\. It leads all eight benchmark–generator cells \(\+5\.6\+5\.6/\+2\.6\+2\.6over VisualPrompter\), preserves image quality, and runs fastest\. More broadly, atomic visual feedback should not merely identify what failed; it should determine how each failure is repaired\.

## References

- Black Forest Labs \(2024\)Black Forest Labs\.FLUX\.[https://github\.com/black\-forest\-labs/flux](https://github.com/black-forest-labs/flux), 2024\.
- Brade et al\. \(2023\)Stephen Brade, Bryan Wang, Mauricio Sousa, Sageev Oore, and Tovi Grossman\.Promptify: Text\-to\-image generation through interactive prompt exploration with large language models\.In*Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology*, pp\. 1–14, 2023\.
- Cao et al\. \(2023\)Tingfeng Cao, Chengyu Wang, Bingyan Liu, Ziheng Wu, Jinhui Zhu, and Jun Huang\.BeautifulPrompt: Towards automatic prompt engineering for text\-to\-image synthesis\.In*Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing: Industry Track*, pp\. 1–11, 2023\.
- Chen et al\. \(2025\)Xiaokang Chen, Zhiyu Wu, Xingchao Liu, Zizheng Pan, Wen Liu, Zhenda Xie, Xingkai Yu, and Chong Ruan\.Janus\-Pro: Unified multimodal understanding and generation with data and model scaling\.*arXiv preprint arXiv:2501\.17811*, 2025\.
- Cho et al\. \(2023\)Jaemin Cho, Abhay Zala, and Mohit Bansal\.Visual programming for step\-by\-step text\-to\-image generation and evaluation\.In*Advances in Neural Information Processing Systems*, volume 36, pp\. 6048–6069, 2023\.
- Cho et al\. \(2024\)Jaemin Cho, Yushi Hu, Jason Baldridge, Roopal Garg, Peter Anderson, Ranjay Krishna, Mohit Bansal, Jordi Pont\-Tuset, and Su Wang\.Davidsonian scene graph: Improving reliability in fine\-grained evaluation for text\-to\-image generation\.In*International Conference on Learning Representations*, 2024\.URL[https://openreview\.net/forum?id=ITq4ZRUT4a](https://openreview.net/forum?id=ITq4ZRUT4a)\.
- Datta et al\. \(2024\)Siddhartha Datta, Alexander Ku, Deepak Ramachandran, and Peter Anderson\.Prompt expansion for adaptive text\-to\-image generation\.In*Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics \(Volume 1: Long Papers\)*, pp\. 3449–3476, 2024\.
- Deutsch et al\. \(2021\)Daniel Deutsch, Tania Bedrax\-Weiss, and Dan Roth\.Towards question\-answering as an automatic metric for evaluating the content quality of a summary\.*Transactions of the Association for Computational Linguistics*, 9:774–789, 2021\.doi:10\.1162/tacl˙a˙00397\.URL[https://aclanthology\.org/2021\.tacl\-1\.47/](https://aclanthology.org/2021.tacl-1.47/)\.
- Dhariwal & Nichol \(2021\)Prafulla Dhariwal and Alexander Nichol\.Diffusion models beat GANs on image synthesis\.In*Advances in Neural Information Processing Systems*, volume 34, pp\. 8780–8794, 2021\.
- Esser et al\. \(2024\)Patrick Esser, Sumith Kulal, Andreas Blattmann, Rahim Entezari, Jonas Müller, Harry Saini, Yam Levi, Dominik Lorenz, Axel Sauer, Frederic Boesel, et al\.Scaling rectified flow transformers for high\-resolution image synthesis\.In*Forty\-first international conference on machine learning*, 2024\.
- Feng et al\. \(2024\)Yingchaojie Feng, Xingbo Wang, Kam Kwai Wong, Sijia Wang, Yuhong Lu, Minfeng Zhu, Baicheng Wang, and Wei Chen\.PromptMagician: Interactive prompt engineering for text\-to\-image creation\.*IEEE Transactions on Visualization and Computer Graphics*, 30\(1\):295–305, 2024\.
- Hao et al\. \(2023\)Yaru Hao, Zewen Chi, Li Dong, and Furu Wei\.Optimizing prompts for text\-to\-image generation\.In*Advances in Neural Information Processing Systems*, volume 36, pp\. 66923–66939, 2023\.
- Hei et al\. \(2024\)Nailei Hei, Qianyu Guo, Zihao Wang, Yan Wang, Haofen Wang, and Wenqiang Zhang\.A user\-friendly framework for generating model\-preferred prompts in text\-to\-image synthesis\.In*Proceedings of the AAAI Conference on Artificial Intelligence*, volume 38, pp\. 2139–2147, 2024\.
- Hessel et al\. \(2021\)Jack Hessel, Ari Holtzman, Maxwell Forbes, Ronan Le Bras, and Yejin Choi\.CLIPScore: A reference\-free evaluation metric for image captioning\.In*Proceedings of the 2021 conference on empirical methods in natural language processing*, pp\. 7514–7528, 2021\.
- Heusel et al\. \(2017\)Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter\.GANs trained by a two time\-scale update rule converge to a local nash equilibrium\.In*Advances in Neural Information Processing Systems*, volume 30, 2017\.
- Ho & Salimans \(2022\)Jonathan Ho and Tim Salimans\.Classifier\-free diffusion guidance\.*arXiv preprint arXiv:2207\.12598*, 2022\.
- Ho et al\. \(2020\)Jonathan Ho, Ajay Jain, and Pieter Abbeel\.Denoising diffusion probabilistic models\.In*Advances in Neural Information Processing Systems*, volume 33, pp\. 6840–6851, 2020\.
- Hu et al\. \(2023\)Yushi Hu, Benlin Liu, Jungo Kasai, Yizhong Wang, Mari Ostendorf, Ranjay Krishna, and Noah A Smith\.TIFA: Accurate and interpretable text\-to\-image faithfulness evaluation with question answering\.In*Proceedings of the IEEE/CVF International Conference on Computer Vision*, pp\. 20406–20417, 2023\.
- Jiang et al\. \(2024\)Liyao Jiang, Negar Hassanpour, Mohammad Salameh, Mohan Sai Singamsetti, Fengyu Sun, Wei Lu, and Di Niu\.FRAP: Faithful and realistic text\-to\-image generation with adaptive prompt weighting\.*arXiv preprint arXiv:2408\.11706*, 2024\.
- Kingma & Welling \(2014\)Diederik P\. Kingma and Max Welling\.Auto\-encoding variational bayes\.In*International Conference on Learning Representations*, 2014\.URL[http://arxiv\.org/abs/1312\.6114](http://arxiv.org/abs/1312.6114)\.
- Kirstain et al\. \(2023\)Yuval Kirstain, Adam Polyak, Uriel Singer, Shahbuland Matiana, Joe Penna, and Omer Levy\.Pick\-a\-pic: An open dataset of user preferences for text\-to\-image generation\.In*Advances in Neural Information Processing Systems 36, NeurIPS 2023*, 2023\.
- Liu et al\. \(2023\)Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig\.Pre\-train, prompt, and predict: A systematic survey of prompting methods in natural language processing\.*ACM computing surveys*, 55\(9\):1–35, 2023\.
- Liu & Chilton \(2022\)Vivian Liu and Lydia B Chilton\.Design guidelines for prompt engineering text\-to\-image generative models\.In*Proceedings of the 2022 CHI conference on human factors in computing systems*, pp\. 1–23, 2022\.
- Mañas et al\. \(2024\)Oscar Mañas, Pietro Astolfi, Melissa Hall, Candace Ross, Jack Urbanek, Adina Williams, Aishwarya Agrawal, Adriana Romero\-Soriano, and Michal Drozdzal\.Improving Text\-to\-Image Consistency via Automatic Prompt Optimization\.*Transactions on Machine Learning Research*, 2024\.URL[https://mlanthology\.org/tmlr/2024/manas2024tmlr\-improving/](https://mlanthology.org/tmlr/2024/manas2024tmlr-improving/)\.
- Min et al\. \(2023\)Sewon Min, Kalpesh Krishna, Xinxi Lyu, Mike Lewis, Wen\-tau Yih, Pang Koh, Mohit Iyyer, Luke Zettlemoyer, and Hannaneh Hajishirzi\.FActScore: Fine\-grained atomic evaluation of factual precision in long form text generation\.In*Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing*, pp\. 12076–12100, 2023\.
- Oppenlaender \(2024\)Jonas Oppenlaender\.A taxonomy of prompt modifiers for text\-to\-image generation\.*Behaviour & Information Technology*, 43\(15\):3763–3776, 2024\.
- Pavlichenko & Ustalov \(2023\)Nikita Pavlichenko and Dmitry Ustalov\.Best prompts for text\-to\-image models and how to find them\.In*Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval*, pp\. 2067–2071, 2023\.
- Podell et al\. \(2024\)Dustin Podell, Zion English, Kyle Lacey, Andreas Blattmann, Tim Dockhorn, Jonas Müller, Joe Penna, and Robin Rombach\.SDXL: Improving latent diffusion models for high\-resolution image synthesis\.In*International Conference on Learning Representations*, 2024\.
- Radford et al\. \(2021\)Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al\.Learning transferable visual models from natural language supervision\.In*International Conference on Machine Learning*, pp\. 8748–8763\. PMLR, 2021\.
- Raffel et al\. \(2020\)Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu\.Exploring the limits of transfer learning with a unified text\-to\-text transformer\.*Journal of machine learning research*, 21\(140\):1–67, 2020\.
- Rombach et al\. \(2022\)Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer\.High\-resolution image synthesis with latent diffusion models\.In*Proceedings of the IEEE/CVF conference on computer vision and pattern recognition*, pp\. 10684–10695, 2022\.
- Rosenman et al\. \(2024\)Shachar Rosenman, Vasudev Lal, and Phillip Howard\.NeuroPrompts: An adaptive framework to optimize prompts for text\-to\-image generation\.In*Proceedings of the 18th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations*, pp\. 159–167, 2024\.
- Sahoo et al\. \(2024\)Pranab Sahoo, Ayush Kumar Singh, Sriparna Saha, Vinija Jain, Samrat Mondal, and Aman Chadha\.A systematic survey of prompt engineering in large language models: Techniques and applications\.*arXiv preprint arXiv:2402\.07927*, 1, 2024\.
- Schuhmann et al\. \(2022\)Christoph Schuhmann, Romain Beaumont, Richard Vencu, Cade Gordon, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush Katta, Clayton Mullis, Mitchell Wortsman, et al\.LAION\-5B: An open large\-scale dataset for training next generation image\-text models\.In*Advances in Neural Information Processing Systems*, volume 35, pp\. 25278–25294, 2022\.
- Song et al\. \(2021a\)Jiaming Song, Chenlin Meng, and Stefano Ermon\.Denoising diffusion implicit models\.In*International Conference on Learning Representations*, 2021a\.URL[https://openreview\.net/forum?id=St1giarCHLP](https://openreview.net/forum?id=St1giarCHLP)\.
- Song et al\. \(2021b\)Yang Song, Jascha Sohl\-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole\.Score\-based generative modeling through stochastic differential equations\.In*International Conference on Learning Representations*, 2021b\.URL[https://openreview\.net/forum?id=PxTIG12RRHS](https://openreview.net/forum?id=PxTIG12RRHS)\.
- Wang et al\. \(2023\)Yunlong Wang, Shuyuan Shen, and Brian Y Lim\.RePrompt: Automatic prompt editing to refine AI\-generative art towards precise expressions\.In*Proceedings of the 2023 CHI conference on human factors in computing systems*, pp\. 1–29, 2023\.
- Wang et al\. \(2024\)Zhijie Wang, Yuheng Huang, Da Song, Lei Ma, and Tianyi Zhang\.PromptCharm: Text\-to\-image generation through multi\-modal prompting and refinement\.In*Proceedings of the 2024 CHI conference on human factors in computing systems*, pp\. 1–21, 2024\.
- Wu et al\. \(2026\)Shiyu Wu, Mingzhen Sun, Weining Wang, Yequan Wang, and Jing Liu\.VisualPrompter: Semantic\-aware prompt optimization with visual feedback for text\-to\-image synthesis\.In*The Fourteenth International Conference on Learning Representations*, 2026\.URL[https://openreview\.net/forum?id=hIwVFRLaFy](https://openreview.net/forum?id=hIwVFRLaFy)\.
- Wu et al\. \(2023\)Xiaoshi Wu, Keqiang Sun, Feng Zhu, Rui Zhao, and Hongsheng Li\.Human preference score: Better aligning text\-to\-image models with human preference\.In*Proceedings of the IEEE/CVF International Conference on Computer Vision*, pp\. 2096–2105, 2023\.
- Yarom et al\. \(2023\)Michal Yarom, Yonatan Bitton, Soravit Changpinyo, Roee Aharoni, Jonathan Herzig, Oran Lang, Eran Ofek, and Idan Szpektor\.What you see is what you read? improving text\-image alignment evaluation\.In*Advances in Neural Information Processing Systems*, volume 36, pp\. 1601–1619, 2023\.
- Yeh et al\. \(2024\)Shih\-Ying Yeh, Yi Li, Sang\-Hyun Park, Giyeong Oh, Xuehai Wang, Min Song, Youngjae Yu, and Shang\-Hong Lai\.TIPO: Text to image with text presampling for prompt optimization\.*arXiv preprint arXiv:2411\.08127*, 2024\.
- Zhang et al\. \(2026\)Ruiqiang Zhang, Hengyi Wang, Chang Liu, Guanjie Wang, Zehua Ma, and Weiming Zhang\.FreeText: Training\-free text rendering via attention localization and spectral glyph injection\.In*Proceedings of the 43rd International Conference on Machine Learning*, 2026\.URL[https://icml\.cc/virtual/2026/poster/62440](https://icml.cc/virtual/2026/poster/62440)\.

###### Contents of the Paper

1. [1Introduction](https://arxiv.org/html/2607.18724#S1)
2. [2TARA](https://arxiv.org/html/2607.18724#S2)1. [2\.1Overview and Problem Setup](https://arxiv.org/html/2607.18724#S2.SS1) 2. [2\.2Typed Visual Diagnosis](https://arxiv.org/html/2607.18724#S2.SS2) 3. [2\.3Typed Repair Compilation and Output Adoption](https://arxiv.org/html/2607.18724#S2.SS3)
3. [3Experiments](https://arxiv.org/html/2607.18724#S3)1. [3\.1Experiment Setup](https://arxiv.org/html/2607.18724#S3.SS1) 2. [3\.2A1: TARA Achieves the Best Semantic Accuracy in Every Cell](https://arxiv.org/html/2607.18724#S3.SS2) 3. [3\.3A2: TARA Preserves Image Quality While Fixing Semantics](https://arxiv.org/html/2607.18724#S3.SS3) 4. [3\.4A3: TARA Performs Consistently across Types and Generators](https://arxiv.org/html/2607.18724#S3.SS4) 5. [3\.5A4: TARA Runs Faster than VisualPrompter, and Each Component Helps](https://arxiv.org/html/2607.18724#S3.SS5)
4. [4Related Work](https://arxiv.org/html/2607.18724#S4)
5. [5Conclusion](https://arxiv.org/html/2607.18724#S5)
6. [References](https://arxiv.org/html/2607.18724#bib)
7. [AExperimental Setup and Method Details](https://arxiv.org/html/2607.18724#A1)1. [A\.1Implementation and Runtime Protocol](https://arxiv.org/html/2607.18724#A1.SS1) 2. [A\.2Repair Mapping and Templates](https://arxiv.org/html/2607.18724#A1.SS2) 3. [A\.3Full Algorithm](https://arxiv.org/html/2607.18724#A1.SS3) 4. [A\.4Prompt Templates](https://arxiv.org/html/2607.18724#A1.SS4) 5. [A\.5Worked Example](https://arxiv.org/html/2607.18724#A1.SS5)
8. [BSupplementary Qualitative Results](https://arxiv.org/html/2607.18724#A2)1. [B\.1Qualitative Comparisons](https://arxiv.org/html/2607.18724#A2.SS1) 2. [B\.2Per\-Generator Galleries](https://arxiv.org/html/2607.18724#A2.SS2) 3. [B\.3Adaptation to Commercial Online Generators](https://arxiv.org/html/2607.18724#A2.SS3) 4. [B\.4Failure Cases](https://arxiv.org/html/2607.18724#A2.SS4)
9. [CSupplementary Quantitative Results](https://arxiv.org/html/2607.18724#A3)1. [C\.1Behavioral Analysis](https://arxiv.org/html/2607.18724#A3.SS1) 2. [C\.2Threshold Sensitivity](https://arxiv.org/html/2607.18724#A3.SS2) 3. [C\.3Robustness and Diagnostic Breakdowns](https://arxiv.org/html/2607.18724#A3.SS3) 4. [C\.4VLM\-as\-Judge Preference Details](https://arxiv.org/html/2607.18724#A3.SS4)

## Appendix AExperimental Setup and Method Details

This appendix provides full details: implementation and decoding settings, repair\-language templates, the complete prompt templates used in portfolio rewriting and fusion \(per\-type rules, few\-shot examples, fusion/minimal\-append/uniform instructions\), worked examples with step\-by\-step repair traces, qualitative comparisons across all generators and benchmarks, runtime accounting, threshold sensitivity, random\-seed robustness, optimized\-prompt\-length and per\-error\-type repair\-behavior analyses, and the complete VLM\-as\-Judge preference numbers\. Unless otherwise specified, all semantic scores are percentages averaged over three seed groups with 200 prompts per seed group\.

### A\.1Implementation and Runtime Protocol

All visual\-feedback methods are run locally with the same OpenAI\-compatible vLLM protocol for VLM diagnosis and LLM rewriting\. The main endpoint serves Qwen3\.5\-9B under the aliasqwen3\.5\-9b; distributed runs use local ports8013/8023for the same model, and the ablation/robustness runs use the same protocol on ports8004/8026\. The endpoints are local\-only \(127\.0\.0\.1\) and are called with environment proxies disabled\. The main semantic judge and prompt rewriter therefore share the same model family for VisualPrompter and TARA\. The repair gate is executed per input before dataset\-level aggregation, with one global rule fixed across all generators and benchmarks; no threshold or decision rule is tuned on the test set\. After those outputs are fixed, Table[1](https://arxiv.org/html/2607.18724#S3.T1)independently re\-scores them with Qwen3\.5\-4B, Qwen2\.5\-VL\-7B\-Instruct, Gemma4\-31B, and Qwen3\.5\-27B evaluators that play no role in gate decisions\.

For VLM yes/no diagnosis, the request contains the image and one benchmark atomic question only; it does not contain either the original prompt or the rewritten prompt\. We use deterministic decoding for scoring \(temperature0, maximum 8 output tokens for yes/no answers; auxiliary visual evidence, when enabled, is capped at 256 tokens\)\. Prompt rewriting uses maximum 1024 new tokens\. VisualPrompter follows its deterministic single\-rewrite setting, while TARA samples text\-only candidate rewrites with temperature0\.70\.7and top\-pp0\.80\.8before fusing them into one final prompt\. All random seeds are derived from the prompt id and seed group, and API sampling seeds are fixed per request for reproducibility\. Table[7](https://arxiv.org/html/2607.18724#A1.T7)summarizes the image\-generation and decoding settings used throughout\.

Table 7:Image\-generation and decoding settings used in the main experiments\. SD models use 30 denoising steps and guidance 7\.5 unless otherwise noted\.Table[8](https://arxiv.org/html/2607.18724#A1.T8)accounts for the per\-prompt cost of the two visual\-feedback methods: both spend the same image budget, but TARA trades one long rewrite for several cheap text\-only calls, ending with a shorter prompt and a lower repair time\.

Table 8:Runtime accounting for the two visual\-feedback methods\. Image budget is matched; TARA spends more cheap text\-only calls but keeps each rewrite short\. “Repair time” is measured on prompts whose initial image triggers a rewrite\.The end\-to\-end times in Table[6](https://arxiv.org/html/2607.18724#S3.T6)include image generation, VLM diagnosis, prompt rewriting, the final gate check, and disk I/O for saved records\. They exclude only one\-time model loading\. Because all methods use the same generated images for scoring and the same local evaluation endpoint, the runtime comparison measures the optimizer pipeline rather than differences in evaluator deployment\.

### A\.2Repair Mapping and Templates

TARA maps atomic\-evaluation categories to eight repairable error types, each associated with a distinct local language transformation\. The mapping is fixed before evaluation and shared across all generators and benchmarks\. Table[9](https://arxiv.org/html/2607.18724#A1.T9)lists the exact categories and representative templates\.

Table 9:Category\-to\-type mapping and repair\-language templates used by TARA\. Bracketed fields are filled from the failed atomic proposition; already\-correct entities and attributes are explicitly preserved in the LLM instruction\.These templates only shape the rewritten prompt\. During evaluation, the VLM judge receives neither the template nor the optimized prompt, only the image and the original benchmark question\. This separation is important: type\-aware language can help the image generator attend to the missing semantics, but it cannot directly hint the automatic yes/no evaluator\.

### A\.3Full Algorithm

Algorithm[1](https://arxiv.org/html/2607.18724#alg1)states the complete single\-pass procedure illustrated in Figure[2](https://arxiv.org/html/2607.18724#S2.F2)\.

Algorithm 1TARA: single\-pass atomic repair allocation1:prompt

pp, generator

GG, judge

VV, propositions

Q​\(p\)Q\(p\), threshold

τ=0\.72\\tau\{=\}0\.72
2:

x0←G​\(p\)x\_\{0\}\\leftarrow G\(p\);

d0←Diagnose​\(x0,Q​\(p\),V\)d\_\{0\}\\leftarrow\\textsc\{Diagnose\}\(x\_\{0\},Q\(p\),V\)
3:if

d0d\_\{0\}is perfectthen

4:return

\(p,x0\)\(p,x\_\{0\}\)⊳\\trianglerightalready correct: one generation

5:endif

6:

F←RepairTargets​\(d0\)F\\leftarrow\\textsc\{RepairTargets\}\(d\_\{0\}\)⊳\\trianglerightfailures\+\+pruned wrong relations/actions

7:

C←\{Uniform,Typed,MinimalAppend\}​\(p,F\)C\\leftarrow\\\{\\textsc\{Uniform\},\\textsc\{Typed\},\\textsc\{MinimalAppend\}\\\}\(p,F\)⊳\\trianglerighttext\-only

8:if

s​\(x0\)≥τs\(x\_\{0\}\)\\geq\\tauthen

9:

C←C∪\{ReSeed​\(p\)\}C\\leftarrow C\\cup\\\{\\textsc\{ReSeed\}\(p\)\\\}
10:endif

11:

p^←LLMFuse​\(C,F,p\)\\hat\{p\}\\leftarrow\\textsc\{LLMFuse\}\(C,F,p\)⊳\\trianglerighttext\-only: one fused prompt

12:

x^←G​\(p^\)\\hat\{x\}\\leftarrow G\(\\hat\{p\}\);

d^←Diagnose​\(x^,Q​\(p\),V\)\\hat\{d\}\\leftarrow\\textsc\{Diagnose\}\(\\hat\{x\},Q\(p\),V\)⊳\\trianglerightd^\\hat\{d\}yieldss​\(x^\)s\(\\hat\{x\}\)

13:if

s​\(x^\)\>s​\(x0\)s\(\\hat\{x\}\)\>s\(x\_\{0\}\)then

14:return

\(p^,x^\)\(\\hat\{p\},\\hat\{x\}\)⊳\\trianglerightaccept: two generations

15:else

16:return

\(p,x0\)\(p,x\_\{0\}\)⊳\\trianglerightreject and revert

17:endif

### A\.4Prompt Templates

Below we list the exact prompt templates used by TARA’s portfolio rewriting and fusion stages\. Bracketed fields \(e\.g\.\{original\_prompt\}\) are filled at runtime from the diagnosed prompt and its failed atomic propositions\.

#### Per\-type repair rules\.

Each error type maps to a type\-specific system instruction that encodes domain knowledge about how diffusion models fail on that type \(Table[10](https://arxiv.org/html/2607.18724#A1.T10)\)\.

Table 10:Per\-type repair rules used in the typed\-expansion candidate\. Each rule is the system instruction given to the LLM rewriter for that failure type\.
#### Global constraints\.

Every rewrite candidate receives the following constraint block appended to its type\-specific rule:

> Rules: fix ONLY the issues listed below; keep everything already correct unchanged; do NOT add objects that are not in the original prompt or the issues; preserve the user’s intent and overall scene; output exactly ONE image prompt on a single line \-\-\- no quotes, no list, no explanation\.

#### Few\-shot examples\.

Representative type\-specific instructions include one or two few\-shot examples; Table[11](https://arxiv.org/html/2607.18724#A1.T11)lists the examples used\.

Table 11:Representative few\-shot examples used in the type\-specific rewrite instructions\.
#### Fusion instruction\.

After the portfolio candidates are generated, TARA fuses them with the following LLM instruction:

> You are selecting the final prompt for a text\-to\-image generator\. There is only ONE remaining image generation, so choose the prompt most likely to satisfy the semantic questions\. Original prompt: \{original\_prompt\} Already\-correct aspects to preserve: \{passed\} Failed aspects to fix: \{failed\} Candidate prompts: \{choices\} Decision rule: Prefer semantic correctness over aesthetics\. Penalize prompts that drop original entities, add unrelated objects, make counts ambiguous, or describe relations/actions vaguely\. Task: Synthesize one final image prompt using the strongest parts of the candidates\. Keep the original intent, preserve already\-correct aspects, fix all failed aspects, avoid unrelated objects and generic quality filler, and stay under 70 words if possible\. Output exactly one final image prompt, no explanation\.

#### Minimal\-append instruction\.

The conservative candidate keeps the original prompt nearly verbatim and appends only the shortest typed clauses:

> Keep the original prompt almost verbatim\. Append only the shortest concrete phrases needed to fix the failed aspects\. Do not rewrite correct content, do not add unrelated objects, and do not add generic aesthetic filler\. Type rules: For count, use exact word \+ digit and separate visible instances\. For relation, add a clear left/right/above/below layout\. For action, add visible pose/contact/motion\. For text, quote the exact legible text\. For object/attribute/global/style, add only the missing concrete phrase\.

#### Uniform\-expansion instruction \(in\-method control\)\.

The type\-agnostic uniform\-expansion candidate receives no type information:

> You repair text\-to\-image prompts\. The aspects below were requested but are missing or incorrect in the generated image\. Rewrite the prompt by enriching it with concrete detail so that ALL listed aspects are clearly depicted at once, while preserving the original intent and everything already correct\. Output exactly ONE image prompt on a single line, no explanation\.

### A\.5Worked Example

Figure[7](https://arxiv.org/html/2607.18724#A1.F7)traces one prompt through TARA’s pipeline: the initial render, the per\-proposition diagnosis with assigned error types, the typed repairs fused into a single rewrite, and the regenerated image—using the category\-to\-type templates of Table[9](https://arxiv.org/html/2607.18724#A1.T9)\.

![Refer to caption](https://arxiv.org/html/2607.18724v1/figures/worked_init.png)

Initial render, score0\.000\.00

![Refer to caption](https://arxiv.org/html/2607.18724v1/figures/worked_final.png)

TARA render, score0\.83\\mathbf\{0\.83\}

Original:studio shot of vines in the shape of text knowledge is power sprouting, centered

TARA \(one fused rewrite, one regeneration\):a studio shot of lush green vines clearly shaped into the large, legible text “knowledge is power” sprouting from the ground and centered in the frame

Figure 7:Worked example of type\-aware repair \(SD 1\.5, DrawText\)\. The initial image is decomposed into DSG atomic propositions and judged by the VLM; the three failed propositions are each routed to type\-specific operators \(global condition, missing object, and rendered text\)\. TARA fuses the three typed repairs into a*single*rewritten prompt, regenerates once, and the semantic score rises from0\.000\.00to0\.830\.83—all within the single\-pass image budget\.#### Additional worked examples \(text\-only\)\.

Below we show two further cases where TARA’s typed repair produces a large score jump, one for*wrong count*and one for*wrong relation*\. For post\-hoc analysis only, we additionally rendered each candidate’s output in isolation; these renders are not part of TARA’s inference and are excluded from the main image budget\. In each case no individually rendered candidate improves the score, while the fused prompt combines the strongest typed clauses and jumps sharply\.

Count repair \(SD 2\.1, DSG,localized\_narratives\_59\)\.Original: “In this image I can see few white color flowers\. In the background I can see few leaves\.” Initial score:0\.670\.67\. The separately rendered uniform, typed, minimal\-append, and heuristic\-selector outputs all score0\.670\.67; the fused prompt—“In this image I can see exactly two white flowers and exactly five leaves in the background, all clearly visible and distinct”—scores1\.00\\mathbf\{1\.00\}, fixing both vague counts\.

Relation repair \(SD 2\.1, DSG,vrd\_42\)\.Original: “person sit on chair\. chair on the right of monitor\. vase on table\. pot on table\.” Initial score:0\.550\.55\. Again, the separately rendered outputs stay at0\.550\.55; fusion yields “A person sits on a chair positioned to the right of a monitor, with a vase and a pot placed on a table in the scene”—score0\.91\\mathbf\{0\.91\}, resolving ambiguous spatial relations\.

## Appendix BSupplementary Qualitative Results

### B\.1Qualitative Comparisons

Figure[8](https://arxiv.org/html/2607.18724#A2.F8)shows representative cases on Stable Diffusion v1\.5 \(DSG\) where every prompt\-optimization baseline—including the official VisualPrompter—fails to satisfy the prompt while TARA renders an image that does\. The number below each image is its VLM semantic score for that prompt\.

![Refer to caption](https://arxiv.org/html/2607.18724v1/x7.png)Figure 8:Qualitative comparison on SD 1\.5 / DSG\. Each row is one prompt; columns are the raw prompt, four prompt\-optimization baselines, the official VisualPrompter, and TARA \(green outline\)\. The number below each image is its VLM semantic score\. TARA satisfies all atomic requirements—relations, actions, rendered text, and global style—where the baselines leave at least one unmet\.
### B\.2Per\-Generator Galleries

Figures[9](https://arxiv.org/html/2607.18724#A2.F9)–[16](https://arxiv.org/html/2607.18724#A2.F16)show, for each generator and both benchmarks \(DSG and TIFA\), original vs\. TARA\-optimized images grouped by source category\. In every pair the left image is rendered from the original prompt and the right \(green outline\) from TARA’s optimized prompt; the numbers are VLM semantic scores\. The gains are largest exactly where typed repair targets—counts, relations and poses, and rendered text—and they transfer across both benchmarks\.

![Refer to caption](https://arxiv.org/html/2607.18724v1/x8.png)Figure 9:Original vs\. TARA on Stable Diffusion v1\.5 \(DSG\), grouped by source category\. Left: original prompt; right \(green outline\): TARA\. Numbers are VLM semantic scores\.![Refer to caption](https://arxiv.org/html/2607.18724v1/x9.png)Figure 10:Original vs\. TARA on Stable Diffusion v2\.1 \(DSG\)\. Conventions as in Figure[9](https://arxiv.org/html/2607.18724#A2.F9)\.![Refer to caption](https://arxiv.org/html/2607.18724v1/x10.png)Figure 11:Original vs\. TARA on FLUX\-dev \(DSG\)\. Conventions as in Figure[9](https://arxiv.org/html/2607.18724#A2.F9)\.![Refer to caption](https://arxiv.org/html/2607.18724v1/x11.png)Figure 12:Original vs\. TARA on Janus\-Pro \(DSG\)\. Conventions as in Figure[9](https://arxiv.org/html/2607.18724#A2.F9)\.![Refer to caption](https://arxiv.org/html/2607.18724v1/x12.png)Figure 13:Original vs\. TARA on Stable Diffusion v1\.5 \(TIFA\), grouped by source category\. Conventions as in Figure[9](https://arxiv.org/html/2607.18724#A2.F9)\.![Refer to caption](https://arxiv.org/html/2607.18724v1/x13.png)Figure 14:Original vs\. TARA on Stable Diffusion v2\.1 \(TIFA\)\. Conventions as in Figure[9](https://arxiv.org/html/2607.18724#A2.F9)\.![Refer to caption](https://arxiv.org/html/2607.18724v1/x14.png)Figure 15:Original vs\. TARA on FLUX\-dev \(TIFA\)\. Conventions as in Figure[9](https://arxiv.org/html/2607.18724#A2.F9)\.![Refer to caption](https://arxiv.org/html/2607.18724v1/x15.png)Figure 16:Original vs\. TARA on Janus\-Pro \(TIFA\)\. Conventions as in Figure[9](https://arxiv.org/html/2607.18724#A2.F9)\.
### B\.3Adaptation to Commercial Online Generators

Beyond the open\-source generators studied above, we check whether TARA’s typed prompts transfer to commercial online systems\. Figure[17](https://arxiv.org/html/2607.18724#A2.F17)compares the original, VisualPrompter, and TARA prompts on two such systems—Doubao on a smoke\-trail text case, and GPT Image on a “dining table above a bear” spatial case\. In both, TARA’s typed rewrite realizes the layout the prompt asks for—a complete smoke\-trail script with a visible contrail, and a table placed directly above the bear—whereas the baselines leave the text incomplete or split the two objects onto separate levels\.

OriginalVisualPrompterTARA \(Ours\)![Refer to caption](https://arxiv.org/html/2607.18724v1/figures/fig5cells/sky_orig.png)![Refer to caption](https://arxiv.org/html/2607.18724v1/figures/fig5cells/sky_vp.png)![Refer to caption](https://arxiv.org/html/2607.18724v1/figures/fig5cells/sky_tara.png)An airplane flying over a city, with the message ‘Support Skywriters’ written in smoke trails\.An airplane is flying over a city, with white smoke above the city\. The smoke creates the message “Support Skywriters” in the sky\. Tall buildings are in the city\.An airplane flying over a city, with the message ‘Support Skywriters’ clearly written in large, legible smoke trails\.![Refer to caption](https://arxiv.org/html/2607.18724v1/figures/fig5cells/bear_orig.png)![Refer to caption](https://arxiv.org/html/2607.18724v1/figures/fig5cells/bear_vp.png)![Refer to caption](https://arxiv.org/html/2607.18724v1/figures/fig5cells/bear_tara.png)a photo of bear and dining table; dining table is above beara photo of wooden dining table and bear; dining table is above bear with its light on\. There are some fruits on the dining table, and the bear is eating them on the table\.a photo of a bear and a dining table where the dining table is positioned above the bear, with the bear located below the table\.Figure 17:Adaptation to commercial online generators—top: Doubao \(text “Support Skywriters” in smoke trails\), bottom: GPT Image \(a dining table above a bear\)\. Each cell shows the rendered image with its prompt beneath\. TARA produces the complete smoke\-trail text and places the table directly above the bear, while the baselines leave the text incomplete or split the two objects\.
### B\.4Failure Cases

Figure[18](https://arxiv.org/html/2607.18724#A2.F18)shows cases where the optimized image still misses a requirement\. Most residual failures stem from generator\-side limits—multi\-object counting, rare poses, and long rendered strings—where a better prompt is not enough to force compliance; the repair gate then keeps the higher\-scoring of the two images under the atomic evaluator but cannot manufacture a capability the generator lacks\.

![Refer to caption](https://arxiv.org/html/2607.18724v1/x16.png)Figure 18:Failure cases \(DSG\)\. Left: original; right \(red outline\): TARA\. Numbers are VLM semantic scores; the caption under each pair is a requirement still unmet after repair\.

## Appendix CSupplementary Quantitative Results

### C\.1Behavioral Analysis

Diagnosed failures are diverse\. Figure[19](https://arxiv.org/html/2607.18724#A3.F19)shows the complete eight\-type distribution over all diagnosed failures\. Missing objects \(29\.9%29\.9\\%\), wrong relations \(27\.1%27\.1\\%\), and wrong attributes \(23\.0%23\.0\\%\) are most frequent, while action and style errors are rarer but remain explicitly routed by TARA\. A single uniform expansion cannot match this heterogeneity; routing each failure to a type\-specific repair is exactly what this calls for\.

![Refer to caption](https://arxiv.org/html/2607.18724v1/x17.png)Figure 19:Distribution of all eight diagnosed error types over failed atomic propositions, aggregated across the 24 benchmark–generator–seed cells\.TARA’s prompts stay short\. Figure[20](https://arxiv.org/html/2607.18724#A3.F20)compares the length of the optimized prompts\. Over all prompts TARA averages1818words versus3030for VisualPrompter, because typed repair compilation makes a short targeted edit instead of a verbose global expansion\.

![Refer to caption](https://arxiv.org/html/2607.18724v1/x18.png)Figure 20:Optimized\-prompt length over all prompts \(DSG and TIFA, four generators\)\. TARA’s compiled typed repairs are substantially shorter than VisualPrompter’s uniform expansions\.Table[12](https://arxiv.org/html/2607.18724#A3.T12)extends the length comparison to all seven methods\. Aesthetics\-oriented optimizers inflate the prompt the most \(NeuroPrompts and TIPO exceed5050words\), VisualPrompter’s uniform expansion averages3030, whereas TARA’s typed repair compilation stays at1818—the shortest among the rewriters while remaining the most faithful\.

Table 12:Optimized\-prompt length \(mean words\) by method and generator, over all prompts\. Aesthetics\-oriented optimizers inflate the prompt the most; VisualPrompter’s uniform expansion is long, whereas TARA’s typed repair compilation stays the shortest among the rewriters while still being the most faithful \(cf\. main results\)\.The repair traces let us inspect TARA’s behavior per failure type\. Table[13](https://arxiv.org/html/2607.18724#A3.T13)reports, for each diagnosed error type, its frequency, how often a typed rewrite improves the semantic score and is kept, and the mean gain when accepted: missing objects and actions are the most repairable, whereas rendered text is the hardest, echoing the per\-type accuracy in the main text\. Table[14](https://arxiv.org/html/2607.18724#A3.T14)breaks the accept rate down by generator—the same failure type is far more repairable on stronger generators, indicating that part of the ceiling is generator capacity rather than the optimizer\.

Table 13:Repair behavior by error type \(TARA, aggregated over all 24 benchmark–generator–seed cells\)\.*Frequency*is the number of diagnosed failures of each type;*accept rate*is the fraction whose typed rewrite improved the semantic score and was kept;*mean gain*is the average score increase of accepted repairs\. Object and action failures are the most repairable, whereas rendered text is the hardest—consistent with the per\-type accuracy in the main text\. Each diagnosed failure occurrence inherits its prompt’s gate decision, so prompts containing multiple error types contribute to multiple rows\.Table 14:Repair accept rate \(%\) by error type and generator \(TARA\)\. Darker is higher\. The same failure type is far more repairable on stronger generators—e\.g\. rendered text is nearly unrepairable on Stable Diffusion but much easier on Flux/Janus—showing that part of the ceiling is generator capacity, not the optimizer\.
### C\.2Threshold Sensitivity

TARA fixes a single globalτ=0\.72\\tau\{=\}0\.72\(the same value across every generator and benchmark\) to admit the conservative re\-seed candidate only when the initial image is already near\-correct\. A threshold sweep on DSG/SD 2\.1 \(Table[15](https://arxiv.org/html/2607.18724#A3.T15)\) shows that all tested values in\[0\.60,0\.84\]\[0\.60,0\.84\]produce large gains over the initial image \(\+8\+8to\+10\+10points\) at a similar image budget \(1\.781\.78–1\.811\.81generations\)\. We therefore keepτ=0\.72\\tau\{=\}0\.72fixed throughout, without tuning it per generator or benchmark\.

Table 15:Sensitivity to the re\-seed threshold on DSG/SD 2\.1 \(single seeds=1234s\{=\}1234,n=200n\{=\}200\)\. All tested thresholds give large gains over the initial image at a comparable image budget\. The default row reuses the main\-experiment run, whereas the remaining rows come from a separately launched sensitivity sweep\. Although the nominal seed is shared, image generation is not guaranteed to be bitwise deterministic across independent GPU sessions, leading to the small difference in Init\.
### C\.3Robustness and Diagnostic Breakdowns

To quantify uncertainty in the comparison with VisualPrompter, we use a prompt\-clustered paired bootstrap\. Within each benchmark, one cluster contains a prompt’s 12 paired TARA\-minus\-VisualPrompter differences across four generators and three seeds; we average within each cluster and resample the 200 prompt clusters with replacement for 100,000 replicates \(random seed 20260713\)\. The overall interval averages benchmark\-stratified bootstrap draws\. The 2\.5th and 97\.5th percentiles give 95% CIs of\[4\.72,6\.52\]\[4\.72,6\.52\]for DSG,\[1\.63,3\.63\]\[1\.63,3\.63\]for TIFA, and\[3\.45,4\.80\]\[3\.45,4\.80\]overall, all excluding zero\.

Table[16](https://arxiv.org/html/2607.18724#A3.T16)reports semantic accuracy by seed group, each averaged over the four generators; the scores are stable across the three groups, confirming the main results are not seed\-specific\.

Table 16:Random\-seed robustness\. Each seed column averages semantic accuracy \(%\) over four generators; the final column reports mean±\\pmstandard deviation over the three seed groups\.
### C\.4VLM\-as\-Judge Preference Details

Table[17](https://arxiv.org/html/2607.18724#A3.T17)details the VLM\-as\-Judge preference between TARA and the raw prompt on changed\-prompt cases, for both semantic consistency and aesthetics\.

Table 17:Detailed VLM\-as\-Judge preference on changed\-prompt cases\. Each entry is TARA / Tie / Raw preference percentage\.

Similar Articles

Contrastive Reflection for Iterative Prompt Optimization

arXiv cs.AI

Introduces Contrastive Reflection, an iterative prompt-optimization framework for agentic IR workflows that uses structured traces to identify error-anchored behavioral slices and applies contrastive repair via a Teacher LLM, achieving significant improvements on HotpotQA.

PrompTessor

Product Hunt

PrompTessor is an AI prompt generator, optimizer, and library that helps users craft effective prompts.

TIPSv2: Advancing Vision-Language Pretraining with Enhanced Patch-Text Alignment

Hugging Face Daily Papers

TIPSv2 introduces enhanced vision-language pretraining techniques including patch-level distillation, an upgraded masked image objective (iBOT++), and improved caption sampling strategies to achieve superior dense patch-text alignment. The resulting family of image-text encoder models demonstrates strong performance across 9 tasks and 20 datasets.