Image making · Research feature

Look Back to Move Forward: Learning to Revisit for Agentic Compositional Image Generation

Researchers compared GenRevisit against existing baselines using performance metrics on GenEval2, where it outperformed them by 12.7 and 10.9 points with Qwen-Image-2512 and Z-Image-Turbo respectively.

Adapted from research by Zixu Wang, Xiaoran Zhao, Yahui Liu and colleagues.

arXiv preprint revision · 2026-10-12 · Attribution & reuse
In this article
Editorial illustration of a multitrack editing timeline.

Editor’s introduction

The study focuses on GenRevisit, an agentic image generation model that learns to select both which image to edit and how to refine it, rather than always continuing from the latest output. Researchers compared GenRevisit against existing baselines using performance metrics on GenEval2, where it outperformed them by 12.7 and 10.9 points with Qwen-Image-2512 and Z-Image-Turbo respectively. The model uses constraint-level feedback to assess compositional fidelity at each step, enabling more precise iterative refinement. Findings show that the value of a given image as a starting point depends on both its current adherence to constraints and the potential improvement achievable through editing. This approach improves compositional accuracy in multi-object, multi-attribute scenes.

Introduction

Recent text-to-image (T2I) models have made substantial progress in visual fidelity and instruction following, while satisfying object counts, attributes, and spatial relations in a single generation attempt remains challenging. To address this challenge, Iterative generation uses feedback on intermediate results to guide subsequent generation and editing. As iterative generation produces multiple intermediate outcomes, the appropriate corrective action may vary from round to round. Fixed refinement procedures may therefore struggle to adapt to the evolving generation process, motivating an agentic sequential decision-making formulation in which the agent learns to select the next operation based on the accumulated interaction history.

To this end, we introduce GenRevisit, a framework that expands decision space from action selection to joint continuation-state and action selection. We treat image candidates accumulated in the interaction history as candidate continuation states, each corresponding to a possible starting point for further refinement. At each decision step, GenRevisit uses a multimodal planner to choose the next action from generation, editing, querying, and submission, based on decision context. When it edits, it jointly decides a source image and an editing instruction to correct remaining errors while preserving satisfied constraints. This allows the planner to revisit a stronger image candidate and open new refinement branches, rather than being restricted to the latest image.

We train our proposed GenRevisit in two stages. First, we collect multi-round trajectories with GPT-5.5 and initialize the planner by supervised fine-tuning (SFT). We supervise actions that improve the image, including recovery from degraded states. Failed actions are excluded from the SFT loss but kept in the history with their feedback, because they still inform later decisions. We then use reinforcement learning (RL) with GRPO to further improve the planner through its own interactions. The terminal reward measures how well the final submitted image satisfies the task constraints. However, the standard GRPO assigns the same advantage to every action in a trajectory, so a positive trajectory advantage can reinforce actions that worsen the image. To address this issue, we propose Normalized Action Credit Assignment (NACA). In positive-advantage trajectories, NACA redistributes credit among generation and editing actions based on the fraction of the remaining utility gap that each action closes.

Analysis

Controlled teacher continuations. To quantify the benefit of joint selection, we select 200 prefixes from a pool of 800 teacher trajectories where the task remains unsolved after three image calls. Each prefix provides a shared starting history for Joint, Latest-only, and Best-only, with two image calls remaining. All three use the same teacher and interaction protocol, differing only in edit-source access. Latest-only uses the latest image, Best-only uses the current highest-GM image, and Joint selects the source together with its editing instruction. Joint achieves a mean final GM of 55.2, compared with 52.4 for Best-only and 50.2 for Latest-only. Its improvement over Best-only is 2.8 points (paired 95% CI: [0.46, 5.15]). Joint also increases the proportion of prefixes producing a new candidate above the shared prefix best from 57.0% with Best-only to 65.0%. These results support the value of joint selection beyond fixing the editing source to the current highest-scoring image.

Learning from joint demonstrations. A second experiment examines whether joint demonstrations lead to better performance after SFT. An additional 800 Best-only teacher trajectories are collected using the same prompts and initial images as the Joint trajectories. The two demonstration sets are used to train separate student policies via SFT. Both policies are then evaluated on the official GenEval2 evaluation set of 800 prompts under the same evaluation protocol used for our main results. The student trained on Joint demonstrations achieves 81.5 GM, compared with 77.5 for its Best-only-trained counterpart, an improvement of 4.0 points (paired 95% CI: [2.81, 5.18]). The advantage is thus observed not only in controlled teacher continuations but also in the benchmark performance of the trained policies.

Conclusion

We introduce GenRevisit, which learns to jointly select a continuation state and an action. SFT retains failed actions and outcomes as recovery context rather than supervision. NACA assigns action-level credit using normalized local progress in non-monotonic trajectories. Experiments demonstrate improved compositional generation across benchmarks and cross-generator transfer without additional planner training. Our findings suggest that an image’s value as a starting point depends on both its current constraint satisfaction and what a suitable edit can achieve, highlighting the importance of learning source selection and editing together.

Budget and termination

The first generation is included in the five-image budget. A new generation creates a root candidate; an edit creates a child of the declared input image. Neither restarting nor editing an earlier image resets the budget or removes later observations. Guidance retrieval and submission do not create image candidates. Infrastructure retries are handled by the execution layer rather than recorded as fictitious low-scoring candidates.

With no completed image, the agent cannot edit or submit. Once the image budget is exhausted, it must submit the GM-best with the budget reason. Otherwise, if that candidate passes all constraints, it must submit with the all-pass reason. If neither condition holds, it may continue or submit with no_productive_action_remaining. Budget exhaustion takes precedence when the last image is also all-pass. The planner decides whether to stop early when neither mandatory stopping condition holds. Submission uses the fixed GM-best rule.

Benchmark and Evaluation Protocols

The reported GenEval2 datasets contain 800 prompts. The planner’s ordinary evaluation decoding is greedy, with a maximum of five generation or editing calls including the initial generation. Evaluation scores refer to the selected submitted image rather than automatically to the last generated image. Cross-generator evaluation retains the planner weights and changes the generation backend without additional training.

Execution validates action structure and source eligibility before dispatching image calls. Error handling uses action-validity feedback, deterministic target–preserve overlap resolution, and source-ID correction under the applicable source-eligibility rule. Editing instructions remain planner-generated, and continuation retains the executed prefix and remaining image budget. The current Joint prompt and the archived historical-access protocol are specified separately in Appendices G.5 and E.3.

GenEval and GenEval++ provide the cross-benchmark evaluations in the main paper. Their benchmark-specific results are reported separately from GenEval2 Soft-TIFA GM. External baseline values are taken from the cited publications, author-provided results, or reproductions under the configurations documented by those sources.

Prompt Selection and Teacher Collection

GPT-5.5 collects multi-round trajectories on prompts from the GenEval2 training pool used by Flow-DPPO. The original prompt split contains 800 training, 100 validation, and 100 test memberships. These are prompt counts, not counts of executed trajectories or selected action responses. The teacher prompt pool contains 1,000 prompts across these splits; the selected action responses are summarized in Table B.2.

Teacher collection uses the same four operation types and fixed generation/editing roles described in Appendix A. At an editing step, the teacher selects the image and the corresponding instruction together. It can use completed historical candidates, their evaluations, and earlier executed instructions, rather than restricting editing to a preselected best image.

Teacher collection and student training use different input wrappers. The teacher receives task, planner-context, candidate-observation, and continuation-control objects. The student receives a dedicated structured decision-time input. Both expose the GM-control permissions, but the teacher’s longer instructions are not claimed to be the student’s verbatim system prompt. In particular, the teacher’s four-part editing guidance is a semantic structure inside one instruction string, not four additional action fields.

Action-Level Target Selection

An edit can be selected even when its output remains below the archive best, provided that it improves its own editing input. Constraint-level regressions are recorded separately and do not automatically veto a GM-positive target. This SFT rule is not the pass-count-first utility used in RL.

Actions that do not meet the selection rule are not imitation targets. Their validated execution records, images, and feedback remain available to later decisions. A GM-decreasing bridge action does not become a positive target merely because a later descendant succeeds. The student can therefore learn a later recovery without being trained to reproduce the earlier degrading action.

The export distinguishes a narrower recovery-positive label: an edit uses a non-latest image and exceeds the pre-action GM archive. Other retained actions are other positive. These labels should not be confused with editing an earlier candidate alone. Source-relative GM change, archive-relative GM change, and changes in passed constraints are recorded for audit; they are not additional planner outputs.

Data Splits and Corpus Statistics

All trajectories for the same prompt stay in the same split. Records are deduplicated using the split, rendered input, the identities of the ordered images, and canonical target action. Copying an identical shared prefix therefore does not create duplicate supervision weight; different real actions at the same state can remain distinct targets. Training samples action rows without an additional episode-level weighting rule.

The export records 6,858 image bindings and 3,418 unique image artifacts across the selected records. These quantities differ because the same image can appear in more than one decision context. Training uses 800 distinct prompts; action-response counts in Table B.2 are not prompt counts. Validation and test submission-target totals likewise do not establish their raw collection sizes.

Validation and test rows are rendered and selected under the same compatibility rules as training rows. Their next-token losses measure conditional action modeling. They are not new online image-generation evaluations and should not be reported as final benchmark image quality.

Response Masks and Policy Optimization

The response mask selects every sampled token in an action response. For a valid response, training therefore covers the full action JSON, including the image choice, target and preserve sets, instruction, and structural tokens. The protocol uses direct action JSON without a separate reasoning channel or reasoning mask. If extra text makes a response invalid, its retained sampled tokens can still receive the invalid trajectory’s training signal. History, tool results, and verifier feedback are conditioning inputs, not sampled response targets.

The trainer processes one action segment at a time and accumulates all segments assigned to an optimizer step. Multiplying local loss sums by the world size divided by the retained trajectory count, followed by FSDP gradient averaging, gives the reduction in Eq. equation C.10. Accumulation is determined by the number of segments, not a fixed microstep count.

Interpretation and Scope

The inclusion must hold over reachable histories, not just at the initial branch point. A comparison that also changes observations, available generation actions, submission rules, or budgets is outside the stated controlled setting. Even when the inclusion holds, a trained policy need not realize the larger class’s optimal value. The proposition neither guarantees strict improvement nor requires the planner to reject the current best image.

Current quality and continuation potential are distinct. Two candidates can preserve different useful content and require different edits, even when one currently has a lower score. Appendix F.3 gives an observed successful continuation from a lower-scoring candidate. Appendix F.1 reports an executed Joint/Best-only pair from a common prefix. The former is an observation about one trajectory; the latter compares two realized continuations. Neither is a proof that every edit from the higher-scoring image would fail.

Controlled Teacher Continuations

To quantify the benefit of joint selection, we select 200 prefixes from a pool of 800 teacher trajectories where the task remains unsolved after three image calls. Each prefix provides a shared starting history for Joint, Latest-only, and Best-only, with two image calls remaining. All three use the same teacher and interaction protocol, differing only in edit-source access. Latest-only uses the latest image, Best-only uses the current highest-GM image, and Joint selects the source together with its editing instruction. Joint achieves a mean final GM of 55.2, compared with 52.4 for Best-only and 50.2 for Latest-only. Its improvement over Best-only is 2.8 points (paired 95% CI: [0.46, 5.15]). Joint also increases the proportion of prefixes producing a new candidate above the shared prefix best from 57.0% with Best-only to 65.0%. These results support the value of joint selection beyond fixing the editing source to the current highest-scoring image.

Historical Continuation and Latest-only Refinement

The archived student comparison in Figure F.2 uses the prompt “a violin under a chair behind a spotted mushroom.” The prefix best a001 and latest a002 both pass eight of nine constraints. The remaining failed relation is the violin being under the chair. Both branches have exactly two image calls left.

Full-history edits a001 on both calls. The first result remains incomplete, while the second places the violin horizontally under the chair and passes all nine constraints (GM 99.91). Latest-only edits a002 and then its own new result. Its final generated image still fails the relation, so the branch submits the original prefix best (GM 79.92). Thus, the last generated image and the submitted image are different in the Latest-only branch.

This case concerns access to historical editing inputs relative to latest-only editing. It is not relabelled as a Joint/Best-only experiment: the historical edits shown here both use the current best. Its complete statistical protocol is separate from the present case description.

Current Quality and Continuation Potential

An earlier teacher trajectory for “three cats chasing five sheeps” contains two candidates with complementary satisfied constraints. The current best a000 passes the sheep-count requirement but fails the chasing relation. Candidate a001 passes the chasing relation but fails sheep counting. Both pass four of five constraints, although a001 has lower GM (35.68 versus 61.88).

With one call remaining, the teacher edits a001 to add a separately countable sheep while preserving the chasing relation. The submitted result a004 passes all five constraints with GM 99.27. Figure F.3 places the comparison candidate separately from the executed editing path.

The observation establishes that the successful final edit did not have to start from the highest-scoring available image. It does not establish that every possible edit from a000 would fail, or compare the two candidates’ expected continuation values. This distinction is consistent with the scope of Proposition 1 in Appendix D.2.

Teacher and Student Prompt Contracts

Both teacher and student emit one executable structured response. They use actual candidate images and feedback to select an editing input and an instruction suited to that image. A selected image need not be latest or GM-best. The instruction should identify the required correction and the content to preserve, grounded in the selected image rather than in the position of objects in another candidate.

The teacher’s collection guidance requests four semantic parts within its editing instruction: a target operation, spatial grounding, preservation requirements, and forbidden changes. These parts remain one instruction string. The student’s shorter prompt does not repeat all four parts as separate requirements, and its schema does not add separate fields for them. Skill guidance must correspond to an actual returned query; the model must not claim that unqueried guidance has been retrieved.

Action Fields and Examples

Each response specifies one action and its arguments. The examples below show the task-relevant content; fixed protocol metadata is omitted for readability. Extra prose, Markdown wrappers, or unrecognized keys are rejected. Table G.2 lists the required arguments for each mutually exclusive action type.

Target identifiers are nonempty, distinct, and drawn from the task. Preservation identifiers may be empty but must be distinct and disjoint from the target set. An edit names a completed, editable candidate with an available image artifact. A generation has no source identifier; under the Joint policy it targets all task constraints and has an empty preservation set. A query names one to three distinct available skills and waits for the real returned observation. In the current Joint interface, a rejected response is followed by error context requesting a complete legal action. Evaluation-time execution rules are described in Appendix A.4.

Guidance Retrieval and Verifier Interfaces

The skill directory is fixed. Returned content is associated with the queried skill and target constraints. The student sees the actual guidance in either full or summary form. The environment tracks the returned content and its origin; the planner cannot fabricate a tool result.

Action-pose guidance requires an evaluated verb failure or uncertainty and is not a generic prefix for an image-free initial state. Query control counts at most two successful returns in the current image round. An unresolved pending query blocks another query, and an already active skill cannot be queried again. A new image evaluation begins the next image round.

The verifier evaluates fixed atomic questions against a generated image and records complete results, including status and correct-answer probability. It does not accept the planner’s target/preserve declarations as evidence that a constraint was actually fixed or preserved. Table G.4 gives the real final feedback for J:a_004 in Figure F.1.