One Rewrite to Fix Them All? Type-Aware Repair Allocation for Text-to-Image Prompt Optimization
- URL: http://arxiv.org/abs/2607.18724v1
- Date: Tue, 21 Jul 2026 05:31:43 GMT
- Title: One Rewrite to Fix Them All? Type-Aware Repair Allocation for Text-to-Image Prompt Optimization
- Abstract summary: Text-to-image (T2I) generators often fail to follow their prompts faithfully, producing wrong counts, swapped attributes, ambiguous relations, and illegible text.<n> Prompt optimization repairs such failures by rewriting the user prompt, requiring no generator retraining, and has yielded promising results.<n>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.
- Score: 59.164665622252016
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- 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.
Related papers
- Dictionary-Guided Mutation Operators for Automated HDL Repair [0.8450904497835263]
We propose a dictionary-guided HDL repair system that combines ANTLR-derived DUT-specific mutation vocabularies with a simulation-divergence fault localization module.<n>The proposed approach produces correct oracle-passing repairs on 14 bug variants, including a 6-edit multi-bug instance that CirFix cannot repair.
arXiv Detail & Related papers (2026-09-01T18:43:53Z) - CausalRepair: Bridging the Causality Gap in Large Language Model-Based Automated Program Repair via Dual-Slicing [18.917995731082073]
CausalRepair is a conversation-driven APR framework based on minimal causal context.<n>It correctly fixes 313 bugs on Defects4J, outperforming state-of-the-art approaches such as ReinFix and TSAPR.
arXiv Detail & Related papers (2026-08-11T07:56:32Z) - Are Prompt Optimizers Blind? Cross-Modal Visual Feedback for Automatic Prompt Optimization [59.164665622252016]
We introduce Cross-Modal Visual Feedback (CMVF)<n> CMVF incorporates (1) a failure visual diagnosis stage, in which a stronger VLM inspects each failed image without access to predictions or labels, and (2) an error-aware aggregation stage that compresses these observations into reusable, task-level visual blind-spot patterns.<n>We show CMVF consistently ranks first, improving over the strongest baseline on every target by 2.4 points on average, with gains of up to 6.5 points on individual benchmarks.
arXiv Detail & Related papers (2026-07-27T12:31:58Z) - TextReg: Mitigating Prompt Distributional Overfitting via Regularized Text-Space Optimization [41.70456027589437]
Large language models (LLMs) are highly sensitive to the prompts used to specify task objectives and behavioral constraints.<n>We study this failure mode as prompt distributional overfitting and argue that it reflects a lack of representation control in discrete text-space optimization.<n>We propose TextReg, a regularization framework that realizes a soft-penalty objective through regularized textual gradients.
arXiv Detail & Related papers (2026-05-20T15:47:26Z) - ContraFix: Agentic Vulnerability Repair via Differential Runtime Evidence and Skill Reuse [10.503895811137095]
Large language model (LLM) agents are increasingly used for automated vulnerability repair.<n>Recent empirical results show that these agents still struggle with real-world vulnerabilities.<n>We present ContraFix, an agentic framework that couples runtime evidence with reusable repair skills.
arXiv Detail & Related papers (2026-05-17T13:48:25Z) - Project Prometheus: Bridging the Intent Gap in Agentic Program Repair via Reverse-Engineered Executable Specifications [14.657771106188115]
Current solutions relying on natural language summaries or adversarial sampling often fail to provide the deterministic constraints required for surgical repairs.<n>We introduce textscPrometheus, a novel framework that bridges this gap by prioritizing textitSpecification Inference over code generation.<n>Our framework achieved a total correct patch rate of textbf93.97% (639/680)
arXiv Detail & Related papers (2026-04-19T14:27:27Z) - QiMeng-PRepair: Precise Code Repair via Edit-Aware Reward Optimization [50.722636027998]
Large Language Models (LLMs) achieve strong program repair performance but often suffer from over-editing.<n>We propose PRepair, a framework that mitigates over-editing and improves repair accuracy.
arXiv Detail & Related papers (2026-04-07T14:56:38Z) - Specification Vibing for Automated Program Repair [8.68148153927532]
VibeRepair is a specification-centric APR technique that treats repair as behavior-specification repair rather than ad-hoc code editing.<n>On Defects4J v1.2, VibeRepair correctly repairs 174 bugs, exceeding the strongest state-of-the-art baseline by 28 bugs.<n>On Defects4J v2.0, it repairs 178 bugs, outperforming prior approaches by 33 bugs, representing a 23% improvement.
arXiv Detail & Related papers (2026-02-09T04:44:58Z) - RAPO++: Cross-Stage Prompt Optimization for Text-to-Video Generation via Data Alignment and Test-Time Scaling [59.088798018184235]
textbfRAPO++ is a cross-stage prompt optimization framework.<n>It unifies training-data-aligned refinement, test-time iterative scaling, and large language model fine-tuning.<n> RAPO++ achieves significant gains in semantic alignment, compositional reasoning, temporal stability, and physical plausibility.
arXiv Detail & Related papers (2025-10-23T04:45:09Z) - Repairing Regex Vulnerabilities via Localization-Guided Instructions [6.033257307910245]
Regular expressions (regexes) expose systems to regular expression denial of service (ReDoS)<n>Current approaches, however, are hampered by a trade-off.<n>We introduce a hybrid framework, localized repair (LRR), designed to harness generalization while enforcing reliability.
arXiv Detail & Related papers (2025-10-10T06:15:43Z) - Specification-Guided Repair of Arithmetic Errors in Dafny Programs using LLMs [79.74676890436174]
We present an APR tool for Dafny that uses formal specifications as oracles for fault localization and repair.<n>We localize faults through a series of steps, which include using Hoare logic to determine the state of each statement within the program.<n>Our tool achieves 89.6% fault localization coverage and GPT-4o mini yields the highest repair success rate of 74.18%.
arXiv Detail & Related papers (2025-07-04T15:36:12Z) - Beyond Degradation Redundancy: Contrastive Prompt Learning for All-in-One Image Restoration [109.38288333994407]
Contrastive Prompt Learning (CPL) is a novel framework that fundamentally enhances prompt-task alignment.<n>Our framework establishes new state-of-the-art performance while maintaining parameter efficiency, offering a principled solution for unified image restoration.
arXiv Detail & Related papers (2025-04-14T08:24:57Z) - RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic
Program Repair [75.40584530380589]
We propose a novel Retrieval-Augmented Patch Generation framework (RAP-Gen)
RAP-Gen explicitly leveraging relevant fix patterns retrieved from a list of previous bug-fix pairs.
We evaluate RAP-Gen on three benchmarks in two programming languages, including the TFix benchmark in JavaScript, and Code Refinement and Defects4J benchmarks in Java.
arXiv Detail & Related papers (2023-09-12T08:52:56Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.