[Paper Review] Compositional Transformers for Scene Generation
GANformer2 proposes a two-stage, object-oriented transformer for compositional scene generation, first planning a high-level layout through iterative object-level refinement and then executing a photorealistic image via bipartite attention. It achieves state-of-the-art performance in image quality, diversity, and semantic consistency on CLEVR and COCO, with improved disentanglement and interpretability through explicit structural priors.
We introduce the GANformer2 model, an iterative object-oriented transformer, explored for the task of generative modeling. The network incorporates strong and explicit structural priors, to reflect the compositional nature of visual scenes, and synthesizes images through a sequential process. It operates in two stages: a fast and lightweight planning phase, where we draft a high-level scene layout, followed by an attention-based execution phase, where the layout is being refined, evolving into a rich and detailed picture. Our model moves away from conventional black-box GAN architectures that feature a flat and monolithic latent space towards a transparent design that encourages efficiency, controllability and interpretability. We demonstrate GANformer2's strengths and qualities through a careful evaluation over a range of datasets, from multi-object CLEVR scenes to the challenging COCO images, showing it successfully achieves state-of-the-art performance in terms of visual quality, diversity and consistency. Further experiments demonstrate the model's disentanglement and provide a deeper insight into its generative process, as it proceeds step-by-step from a rough initial sketch, to a detailed layout that accounts for objects' depths and dependencies, and up to the final high-resolution depiction of vibrant and intricate real-world scenes. See https://github.com/dorarad/gansformer for model implementation.
Motivation & Objective
- To address the limitations of conventional GANs in modeling complex, multi-object scenes with poor controllability and interpretability.
- To enable structured, hierarchical image generation by explicitly modeling objects and their spatial, semantic, and relational dependencies.
- To improve disentanglement and control by separating structure (layout) from style (appearance) in a transparent, iterative process.
- To demonstrate state-of-the-art performance in fidelity, diversity, and consistency on both synthetic and real-world datasets.
- To validate the model's robustness by training on auto-predicted panoptic segmentations instead of ground-truth annotations.
Proposed method
- The model uses a set of learnable latent variables, each representing an object or entity in the scene with associated structure and style.
- In the planning stage, the model iteratively constructs a high-level scene layout by attending to object latents and refining their spatial positions, shapes, and relative ordering.
- In the execution stage, the layout is refined into a photo-realistic image using bipartite attention, where each latent guides the content and style of its corresponding segment.
- The generator is trained with a non-saturating GAN loss and lazy R1 regularization, using Adam optimizer with equalized learning rate and exponential moving average.
- The discriminator is enhanced with structural losses to encourage compositional fidelity, and the model leverages techniques from StyleGAN2, including style mixing and minibatch standard deviation.
- The model is trained on $256 \times 256$ images using gradient accumulation, with latent dimension and R1 factor tuned for stability and performance.
Experimental results
Research questions
- RQ1Can a two-stage transformer-based generator with explicit object-level latents outperform standard GANs in generating complex, multi-object scenes?
- RQ2To what extent does the iterative planning and execution process improve disentanglement of structure and style?
- RQ3How well does the model generalize to challenging, diverse datasets like COCO when trained on auto-predicted segmentations?
- RQ4Does the model exhibit amodal completion of occluded objects, indicating reasoning about scene composition?
- RQ5Can the model achieve state-of-the-art performance in both unconditional and conditional image synthesis, measured by fidelity, diversity, and consistency?
Key findings
- GANformer2 achieves state-of-the-art FID scores on both CLEVR and COCO datasets, demonstrating superior image quality and diversity compared to baselines including StyleGAN2 and GANformer.
- The model shows strong semantic consistency, with high-quality generation even on the COCO p partition, which isolates compositional complexity from visual diversity.
- Ablation studies confirm that the two-stage design significantly improves disentanglement, enabling independent manipulation of object positions and attributes.
- The model exhibits amodal completion of occluded objects, suggesting implicit reasoning about object geometry and scene structure.
- Training on auto-predicted segmentations yields strong performance, demonstrating robustness and reduced reliance on expensive ground-truth annotations.
- The execution stage matches or exceeds the performance of strong conditional models like Pix2PixHD and SPADE, especially in generating detailed, coherent scenes.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.