Abstract
This paper presents a novel transformer-based architecture for generating images from scene graphs. Unlike traditional Generative Adversarial Network (GAN) methods that produce images in a single pass, the proposed model utilizes an autoregressive approach, combining Graph Convolutional Networks (GCNs) with an encoder-decoder transformer. This design enables iterative image synthesis and fine-grained user control, allowing for tasks such as scene completion and modification. Evaluated on custom Grid-MNIST and Grid-CIFAR10 datasets, the model demonstrates superior performance in maintaining spatial relationships and visual quality compared to existing baselines, achieving a Fréchet Inception Distance (FID) of 4.77 on Grid-CIFAR10.
1. Introduction
Generating realistic images from semantic descriptions—such as "a cat to the left of a dog"—is a fundamental challenge in controllable artificial intelligence. While GANs have historically dominated this field, they typically operate in a "one-shot" fashion. In these models, a scene graph is provided, and a finished image is generated immediately. This approach lacks the flexibility required for iterative editing or partial conditioning.
The authors identify a significant gap in current generative pipelines: the inability to support a "human-in-the-loop" workflow. If a user possesses a partially completed image and wishes to add a specific object based on a new relationship, standard models like sg2im struggle to integrate the new information while respecting existing spatial constraints. This paper proposes a transformer-centric architecture to address these limitations through autoregressive synthesis.
2. Methodology
The proposed architecture moves away from pure convolutional GANs toward a modular design consisting of three primary components: a Graph Convolutional Network (GCN), a Convolutional Autoencoder (AE), and an Encoder-Decoder Transformer.
2.1 Graph Convolutional Network (GCN)
The GCN serves as the semantic foundation of the model. It processes the input scene graph by extracting features for each node (object) based on its neighbors and their defined relationships (edges). These node embeddings provide the contextual information necessary for the transformer to understand the desired layout.
2.2 Convolutional Autoencoder (AE)
To mitigate the computational burden of predicting raw pixels directly within a transformer, the authors utilize a pre-trained autoencoder. The encoder compresses images into a lower-dimensional latent space, while the decoder (generator) reconstructs these features back into pixels. This decoupling of representation from synthesis significantly accelerates training; the authors note that the transformer requires only 200 epochs to converge with the AE, compared to an estimated 1,000 epochs without it.
2.3 Encoder-Decoder Transformer
The transformer acts as the central processing unit. The Encoder receives the node embeddings from the GCN. The Decoder operates autoregressively, receiving features from the current partial image and predicting the features for the next iteration. This allows the model to gradually build the scene until the requirements of the scene graph are met. During training, "teacher forcing" is employed using ground-truth partial images, while inference can begin from either a blank canvas or a user-provided partial rendering.
3. Experimental Setup
To validate the architecture, the authors developed two benchmark datasets:
- Grid-MNIST: 10,000 images featuring MNIST digits in a $2 \times 2$ grid, with scene graphs describing relative positions (e.g., "1 is below 2").
- Grid-CIFAR10: A more complex version using colorful objects from the CIFAR10 dataset.
These datasets allow for precise measurement of how well the model respects spatial relationships in a controlled environment before transitioning to high-resolution natural imagery.
4. Results and Discussion
The model was compared against established baselines, including sg2im and PasteGAN.
4.1 Quantitative Performance
On the Grid-CIFAR10 dataset, the full model achieved an MSE of 0.001 and an SSIM of 0.990. Crucially, it achieved an FID of 4.77, indicating significantly higher visual quality and diversity than GAN-based alternatives.
4.2 Ablation Studies
Ablation tests highlighted the importance of the transformer decoder. When the decoder was removed, SSIM dropped precipitously from 0.991 to 0.083. This confirms that the autoregressive transformer is responsible for the majority of the spatial reasoning and iterative refinement.
4.3 Qualitative Flexibility
The model demonstrated a unique ability to update images when scene graphs were modified. For instance, changing a "left-to" relationship to "below" or removing a node entirely resulted in coherent image updates, a task that one-shot GANs are not designed to handle.
5. Conclusion and Future Work
By treating image generation as a sequence of additions, this research demonstrates that autoregression is a powerful tool for scene control. The transformer's cross-attention mechanism allows the model to maintain global context, ensuring that new additions do not violate existing spatial relationships.
The primary limitation remains the scale of the datasets. While the model excels at $32 \times 32$ grid tasks, natural scenes are significantly more complex. Future work will focus on scaling the architecture to the Visual Genome dataset, testing its ability to handle dense scene graphs and nuanced relationships such as "holding" or "part of" in high-resolution natural environments.
Summary updated