CyCLeGen: Cycle-Consistent Layout Prediction and Image Generation

Xiaojun Shan, Haoyu Shen, Yucheng Mao, Haiyang Xu, Xiang Zhang, Abhay Anand, Bingnan Li, Zhuowen TuNeurIPS 2026

TL;DR

Imagine teaching one model both to draw a scene from a blueprint and to sketch a blueprint from a photograph. Usually, training a unified vision-language model on one task degrades the other; CyCLeGen fixes this by locking them into a self-verifying loop using reinforcement learning. Using just 8,000 samples, the model learns to critique its own work—improving both spatial understanding and image generation while unexpectedly getting much better at image captioning along the way.

What Problem Does This Paper Address?

Controllable visual AI relies on two inverse skills: layout understanding (extracting bounding boxes and object descriptions from an image) and layout-to-image generation (painting an image that obeys a given spatial map). Recently, unified autoregressive transformers have managed to house both capabilities under one roof by treating images, text, and bounding boxes as sequences of tokens.

However, sharing parameters doesn't mean sharing wisdom. The authors uncover a frustrating tug-of-war: fine-tuning a unified model to get better at detecting layouts degrades its ability to generate crisp images, and fine-tuning it for generation causes catastrophic forgetting in layout detection. Because the two directions don't talk to each other during training, the "understanding" branch might output a layout that is mathematically valid but impossible for the "generation" branch to render well, and vice versa. How do we get these two inverse tasks to reinforce rather than sabotage each other?

Methods

Enter CyCLeGen, which binds the two tasks together via cycle consistency: a predicted layout must generate a faithful image (image → layout → image), and a generated image must be parseable back into its original prompt (layout → image → layout).

Figure 1: Overview of the CyCLeGen framework. CyCLeGen employs a unified autoregressive transformer that jointly performs layout understanding (image →layout) and layout-conditioned image generation (layout →image) within a shared token space. Given image tokens, the model predicts layout and text tokens through the understanding branch; conversely, conditioned on layout and text tokens, the generation branch produces image tokens. Training enforces bidirectional cycle consistency across the two directions, forming image → layout →image and layout →image →layout loops. Cycle rewards/losses encourage the generated outputs in one direction to remain structurally and semantically recoverable in the reverse direction, aligning visual understanding with controllable image generation.

While building on a standard unified autoregressive architecture (specifically the 1.5B-parameter PlanGen model) and Group Relative Policy Optimization (GRPO—a critic-free RL algorithm popularized by DeepSeek), the authors introduce a novel two-stage pipeline:

  1. Cycle-Consistent SFT Warm-Up: Instead of standard supervised training on ground-truth pairs, the model predicts a layout $\hat{L}$ from an image and feeds that prediction directly into its generation module to reconstruct the image. This aligns the representation spaces before RL begins.
  2. CycleGRPO (The Core Novelty): A bidirectional, interleaved RL strategy where the model alternates between two self-introspective loops using separate optimizer groups on the shared backbone:
  3. Understanding $\rightarrow$ Generation: The model rolls out candidate layouts for an image, generates new images from them, and gets rewarded for geometric box accuracy (IoU) plus how semantically close the regenerated image is to the original (CLIP).
  4. Generation $\rightarrow$ Understanding: Given a layout, the model rolls out candidate images, parses them back into bounding boxes, and gets rewarded for box recoverability (IoU) plus human-aligned aesthetic quality (HPSv2).
Figure 2: Overview of CycleGRPO. CycleGRPO trains a unified autoregressive transformer for both layout understanding and layout-conditioned generation through two complementary directions. The Und →Gen direction (blue arrows) starts from an input image, where the model autoregressively predicts layouts via trajectory rollouts and decodes them into bounding boxes. The Gen →Und direction (purple arrows) starts from a layout prompt, where the model generates images and enforces that the generated images can recover the original layout through understanding. Multiple trajectories are sampled in both directions and optimized with GRPO, providing cycle-consistent reinforcement signals that align visual understanding with image generation.

Datasets

No new datasets are introduced, allowing fair comparisons on established benchmarks:

  • LayoutSAM / LayoutSAM-Eval: Used for training (an 8k subset for RL) and evaluation. Unlike older datasets like COCO, it pairs bounding boxes with rich, fine-grained textual descriptions for every object instance (note: its labels are auto-generated by Grounding-DINO).
  • OverlayBench: An evaluation benchmark designed to stress-test spatial clutter. It splits scenes into Simple, Regular, and Complex based on bounding-box overlap, occlusion, and semantic ambiguity.

Key Insights and Ideas

  • Inverse tasks are natural verifiers: RL typically requires external reward models or human labels. Here, the generation branch acts as a downstream verifier for understanding, while the understanding branch acts as a structural auditor for generation.
  • RL without the cycle makes things worse: Applying standard GRPO to both tasks independently causes severe optimization instability and drops performance below the starting baseline. The mutual recoverability constraint—not RL alone—is the secret sauce.
  • Extreme data and compute efficiency: Because the model generates its own synthetic supervision via rollouts, CycleGRPO needs only 8,000 samples (1,000 steps), taking less than half the GPU hours of standard joint supervised fine-tuning.
  • Emergent cross-task generalization: Even though image captioning is never trained during RL, forcing the model to align fine-grained object geometry and semantics causes a massive jump in captioning quality.

Key Results

Across the board, CyCLeGen outperforms its autoregressive baseline (PlanGen) and closes the gap with—or beats—specialized diffusion models:

  • Cluttered Generation (OverlayBench): Boosts Overlap-mIoU over PlanGen across Simple (+3.49%), Regular (+1.47%), and Complex (+1.56%) splits, while removing the cycle constraint (RL w/o Cycle) crashes O-mIoU by up to 7.28%.
  • Region-Wise Fidelity (LayoutSAM-Eval): Achieves the highest scores among all tested diffusion and AR models on Spatial (92.71), Color (84.22), Texture (87.97), and Shape (87.02) consistency.
  • Layout Understanding: Dramatically lifts Average Recall (AR) on LayoutSAM-Eval from 51.58 to 71.05 (+19.47), meaning far fewer missed objects in complex scenes, alongside cleaner bounding boxes.
  • Emergent Captioning: Jumps CIDEr score from 37.48 (PlanGen) to 66.46 (+28.98) and BLEU-4 from 17.92 to 25.68 without direct RL captioning supervision.
Figure 3: Qualitative comparison of layout-to-image generation. Given the same input layouts, our CyCLe- Gen model produces images that more faithfully preserve object geometry, spatial configuration, and fine-grained structure compared to PlanGen and diffusion-based baselines (InstanceDiff[7], HiCo[6], CreatiLayout[9]). Across diverse scenes—including people, architectural facades, cable cars, and airplanes—CyCLeGen demon- strates stronger adherence to layout constraints and generates visually coherent, detail-rich images.

Limitations and Future Work

The authors note two minor trade-offs:

  • Modest FID increase: On LayoutSAM-Eval, FID rises slightly from 13.91 (PlanGen) to 15.62, as cycle consistency prioritizes strict object-level structural fidelity over global pixel-distribution matching.
  • Dataset noise ceiling: Average Precision (AP) gains in layout understanding (+0.67 overall, +3.05 AP50) are partially capped by noisy, auto-generated Grounding-DINO annotations in LayoutSAM.

For future work, the authors suggest extending this reciprocal, self-correcting cycle formulation to broader unified multimodal models to align and generalize across diverse understanding and generation tasks.

Summary updated

Abstract

We present CyCLeGen, an autoregressive framework that integrates layout understanding and layout-to-image generation through cycle consistency: predicted layouts must produce faithful images, and generated images must yield consistent layouts. We enforce this constraint via CycleGRPO, a bidirectional reinforcement learning strategy with complementary geometric and perceptual rewards, enabling self-introspective learning from only 8k RL samples. This creates a natural loop, generation helps understanding by rewarding only those layouts that lead to high-quality images, and understanding helps generation by rewarding only those images whose spatial structure can be faithfully recovered. Extensive experiments show that CyCLeGen achieves significant gains across diverse image understanding and generation benchmarks, with emergent gains on image captioning.
BibTeX
@inproceedings{shan2026cyclegen,
  author = {Xiaojun Shan and Haoyu Shen and Yucheng Mao and Haiyang Xu and Xiang Zhang and Abhay Anand and Bingnan Li and Zhuowen Tu},
  title = {{CyCLeGen: Cycle-Consistent Layout Prediction and Image Generation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=MUrqtx2pBo},
}
Figure